Structure that defines the form of event-source plugins for the HNM.
struct hnm_event_source hnm_EventSource { char * name ; int connection_id ; void * data ; hnm_EventPriorityMap * priority_map ; int(* open )(hnm_EventSource *event_source, int channel_id); void(* close )(hnm_EventSource *event_source); hnm_Event *(* read_event )(hnm_EventSource *event_source); };
The name of the application that is associated with the event source (e.g. HFP for the Bluetooth handsfree phone system).
The connection ID (i.e. file descriptor or connection ID) used to communicate with the plugin. This member must be initialized in the (*open)() callback and is used to poll the plugin for input.
The private data associated with the specialized per-module hnm_EventSource.
The global mapping of event names to priorities for the current event-source instance.
Called by the HNM subsystem when a plugin is initially loaded via dlopen() to open the event source. Returns a file descriptor associated with the event source, if successful; otherwise, returns a negative value.
Called by the HNM subsystem when a plugin is being released via dlclose().
Read the event parameters from the event source.
This structure declares the interface used for dynamically loading code into an existing HNM runtime environment. Once this code is loaded, the known layout of objects can be relied upon to enable the module.