CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
Loading...
Searching...
No Matches
host_api_event.cpp File Reference

EventBus subscribe/unsubscribe/publish for plugins. More...

Go to the source code of this file.

Functions

void * plg_get_active_plugin (void)
void plg_log_warn (const char *msg)
int host_event_subscribe (uint32_t event_mask, uint32_t action_id)
 Subscribe to one or more events.
int host_event_unsubscribe (uint32_t subscription_id)
 Cancel a subscription returned by host_event_subscribe.
int host_event_publish (uint32_t module_event_subtype, uint32_t value)
 Publish an EVENT_MODULE_EVENT carrying subtype and value.

Detailed Description

EventBus subscribe/unsubscribe/publish for plugins.

Subscriptions are bound to the plugin instance that registered them (foreground or background). When an event matches, the host dispatches plugin_on_action(action_id, evt_type, evt_value) to the owning plugin regardless of who currently has the UI focus.

Definition in file host_api_event.cpp.

Function Documentation

◆ plg_get_active_plugin()

void * plg_get_active_plugin ( void )

Definition at line 24 of file plugin_log_bridge.cpp.

Referenced by host_event_subscribe().

◆ plg_log_warn()

void plg_log_warn ( const char * msg)