Kaa client C SDK
|
Extension manager. More...
Go to the source code of this file.
Data Structures | |
struct | kaa_extension |
An extension interface facing Kaa core. More... | |
Functions | |
const struct kaa_extension * | kaa_extension_get (kaa_extension_id id) |
Return extension for given extension id . More... | |
void * | kaa_extension_get_context (kaa_extension_id id) |
Return context for the given extension id . More... | |
kaa_error_t | kaa_extension_set_context (kaa_extension_id id, void *context) |
Sets extension context to later be retrieved with kaa_extension_get_context(). More... | |
kaa_error_t | kaa_extension_init_all (struct kaa_context_s *kaa_context) |
Initializes all extensions. More... | |
kaa_error_t | kaa_extension_deinit_all (void) |
Deinitializes all extensions in reverse order. More... | |
kaa_error_t | kaa_extension_request_serialize (kaa_extension_id id, uint32_t request_id, uint8_t *buffer, size_t *size, bool *sync_needed) |
A proxy for kaa_extension::request_serialize(). More... | |
kaa_error_t | kaa_extension_server_sync (kaa_extension_id id, uint32_t request_id, uint16_t extension_options, const uint8_t *buffer, size_t size) |
A proxy for kaa_extension::server_sync(). More... | |
Extension manager.
The extensions should be defined in the kaa_extension_private.h. Currently that file is static but will be auto-generated in the future.
kaa_error_t kaa_extension_deinit_all | ( | void | ) |
Deinitializes all extensions in reverse order.
If any extension errored during deinitialization, error code is returned.
KAA_ERR_NONE | All extensions deinitialized successfully. |
const struct kaa_extension* kaa_extension_get | ( | kaa_extension_id | id | ) |
Return extension for given extension id
.
NULL | Extension not found. |
void* kaa_extension_get_context | ( | kaa_extension_id | id | ) |
Return context for the given extension id
.
NULL | Extension not found. |
kaa_error_t kaa_extension_init_all | ( | struct kaa_context_s * | kaa_context | ) |
Initializes all extensions.
If error occurs, it deinitializes all initialized extensions in reverse order and returns error.
kaa_error_t kaa_extension_request_serialize | ( | kaa_extension_id | id, |
uint32_t | request_id, | ||
uint8_t * | buffer, | ||
size_t * | size, | ||
bool * | sync_needed | ||
) |
A proxy for kaa_extension::request_serialize().
KAA_ERR_NOT_FOUND | Extension was not found. |
kaa_error_t kaa_extension_server_sync | ( | kaa_extension_id | id, |
uint32_t | request_id, | ||
uint16_t | extension_options, | ||
const uint8_t * | buffer, | ||
size_t | size | ||
) |
A proxy for kaa_extension::server_sync().
KAA_ERR_NOT_FOUND | Extension was not found. |
kaa_error_t kaa_extension_set_context | ( | kaa_extension_id | id, |
void * | context | ||
) |
Sets extension context to later be retrieved with kaa_extension_get_context().
KAA_ERR_NONE | Success. |
KAA_ERR_NOT_FOUND | No extension with such id. |