PebbleOS
Loading...
Searching...
No Matches
Typedefs | Functions
event_service.h File Reference
#include <kernel/events.h>
#include <process_management/app_manager.h>

Typedefs

typedef void(* EventServiceAddSubscriberCallback) (PebbleTask task)
 Called on KernelMain when a task subscribes to an event type.
 
typedef void(* EventServiceRemoveSubscriberCallback) (PebbleTask task)
 Called on KernelMain when a task unsubscribes from an event type.
 

Functions

void event_service_system_init (void)
 Initialize the event service, once during system startup.
 
void event_service_init (PebbleEventType type, EventServiceAddSubscriberCallback start_cb, EventServiceRemoveSubscriberCallback stop_cb)
 Register an event type and its subscriber callbacks.
 
bool event_service_is_running (PebbleEventType event_type)
 Check whether an event type has subscribers.
 
void event_service_handle_event (PebbleEvent *e)
 Deliver an event to its subscribers.
 
void event_service_subscribe_from_kernel_main (PebbleSubscriptionEvent *subscription)
 Subscribe to an event type on behalf of a task.
 
void event_service_handle_subscription (PebbleSubscriptionEvent *subscription)
 Handle a subscription or unsubscription event.
 
void event_service_clear_process_subscriptions (PebbleTask task)
 Remove all subscriptions of a task.
 
void * event_service_claim_buffer (PebbleEvent *e)
 Claim the heap buffer of an event so it is not freed with the event.
 
void event_service_free_claimed_buffer (void *ref)
 Release a buffer claimed with event_service_claim_buffer().
 
bool event_service_is_known_buffer (const void *buf)
 Check whether a buffer is tracked by the event service.