Kaa client C SDK
|
Kaa event subsystem API. More...
Go to the source code of this file.
Macros | |
#define | KAA_EVENT_MANAGER_T |
Typedefs | |
typedef void(* | kaa_event_callback_t )(const char *event_fqn, const char *event_data, size_t event_data_size, kaa_endpoint_id_p event_source) |
typedef size_t | kaa_event_block_id |
typedef struct kaa_event_manager_t | kaa_event_manager_t |
Functions | |
kaa_error_t | kaa_event_manager_find_event_listeners (kaa_event_manager_t *self, const char *fqns[], size_t fqns_count, const kaa_event_listeners_callback_t *callback) |
Initiates a request to the server to search for available event listeners by given FQNs. More... | |
kaa_error_t | kaa_event_create_transaction (kaa_event_manager_t *self, kaa_event_block_id *trx_id) |
Start a new event block. More... | |
kaa_error_t | kaa_event_finish_transaction (kaa_event_manager_t *self, kaa_event_block_id trx_id) |
Send all the events from the event block at once. More... | |
kaa_error_t | kaa_event_remove_transaction (kaa_event_manager_t *self, kaa_event_block_id trx_id) |
Removes the event block without sending events. More... | |
const char * | kaa_find_class_family_name (const char *fqn) |
Find class family name of the event by its fully-qualified name. More... | |
Kaa event subsystem API.
Supplies API for Kaa event subsystem
#define KAA_EVENT_MANAGER_T |
typedef size_t kaa_event_block_id |
typedef void(* kaa_event_callback_t)(const char *event_fqn, const char *event_data, size_t event_data_size, kaa_endpoint_id_p event_source) |
typedef struct kaa_event_manager_t kaa_event_manager_t |
kaa_error_t kaa_event_create_transaction | ( | kaa_event_manager_t * | self, |
kaa_event_block_id * | trx_id | ||
) |
Start a new event block.
Returns a new id which must be used to add an event to the block.
[in] | self | Valid pointer to the event manager instance. |
[in,out] | trx_id | Pointer to the kaa_event_block_id instance which will be fulfilled with a corresponding ID. |
kaa_error_t kaa_event_finish_transaction | ( | kaa_event_manager_t * | self, |
kaa_event_block_id | trx_id | ||
) |
Send all the events from the event block at once.
The event block is identified by the given trx_id
.
[in] | self | Valid pointer to the event manager instance. |
[in] | trx_id | The ID of the event block to be sent. |
kaa_error_t kaa_event_manager_find_event_listeners | ( | kaa_event_manager_t * | self, |
const char * | fqns[], | ||
size_t | fqns_count, | ||
const kaa_event_listeners_callback_t * | callback | ||
) |
Initiates a request to the server to search for available event listeners by given FQNs.
[in] | self | Valid pointer to the event manager instance. |
[in] | fqns | List of FQN strings. |
[in] | fqns_count | Number of FQNs in the list. |
[in] | callback | Pointer to callback structure. |
kaa_error_t kaa_event_remove_transaction | ( | kaa_event_manager_t * | self, |
kaa_event_block_id | trx_id | ||
) |
Removes the event block without sending events.
[in] | self | Valid pointer to the event manager instance. |
[in] | trx_id | The ID of the event block to be sent. |
const char* kaa_find_class_family_name | ( | const char * | fqn | ) |
Find class family name of the event by its fully-qualified name.
[in] | fqn | Fully-qualified name of the event (null-terminated string). |
NULL
otherwise.