PebbleOS
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations | Functions
event.h File Reference
#include <pbl/services/blob_db/pin_db.h>

Data Structures

struct  TimelineEventImpl
 Callbacks of a timeline event service. More...
 

Macros

#define TIMELINE_EVENT_DELTA_INFINITE   (INT32_MAX)
 Delta meaning "unbounded" for timeline_event_starts_within().
 

Typedefs

typedef void(* TimelineEventWillUpdateCallback) (void **context)
 Called before filtering and updating begins.
 
typedef bool(* TimelineEventFilterCallback) (SerializedTimelineItemHeader *header, void **context)
 Called for every pin header to filter.
 
typedef void(* TimelineEventDidUpdateCallback) (void **context)
 Called after filtering and updating, to tear down state set up by other callbacks.
 
typedef int(* TimelineEventComparator) (SerializedTimelineItemHeader *new_header, SerializedTimelineItemHeader *old_header, void **context)
 Pick between two pins that passed filtering.
 
typedef uint32_t(* TimelineEventUpdateCallback) (TimelineItem *item, void **context)
 Called with the selected pin, or NULL if no pin passed filtering.
 
typedef const TimelineEventImpl *(* TimelineEventImplGetter) (void)
 Get the callbacks of a timeline event service.
 

Enumerations

enum  TimelineEventService { TimelineEventService_Calendar , TimelineEventService_Peek , TimelineEventServiceCount }
 Services using the timeline event service. More...
 

Functions

void timeline_event_init (void)
 Initialize the timeline event service and all registered services.
 
void timeline_event_deinit (void)
 Stop the timeline event service.
 
void timeline_event_handle_blobdb_event (void)
 Resynchronize after a pin was added, deleted or changed.
 
void timeline_event_refresh (void)
 Refresh the timeline event services.
 
bool timeline_event_is_all_day (CommonTimelineItemHeader *common)
 Check whether an event is all day.
 
bool timeline_event_is_ongoing (time_t now, time_t event_start, int event_duration_m)
 Check whether an event is ongoing.
 
bool timeline_event_starts_within (CommonTimelineItemHeader *common, time_t now, int delta_start_s, int delta_end_s)
 Check whether a pin starts within a time range relative to now.