Kaa client C SDK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Typedefs | Functions
kaa_client.h File Reference
#include <platform/time.h>
#include "kaa_context.h"
#include <platform/kaa_client_properties.h>

Go to the source code of this file.

Typedefs

typedef struct kaa_client_t kaa_client_t
 
typedef void(* external_process_fn )(void *context)
 

Functions

kaa_error_t kaa_client_create (kaa_client_t **kaa_client, kaa_client_props_t *props)
 Creates and initializes kaa_client. More...
 
void kaa_client_destroy (kaa_client_t *kaa_client)
 De-initializes and destroys Kaa client. More...
 
kaa_error_t kaa_client_start (kaa_client_t *kaa_client, external_process_fn external_process, void *external_process_context, kaa_time_t max_delay)
 Start Kaa client. More...
 
kaa_error_t kaa_client_stop (kaa_client_t *kaa_client)
 Stop Kaa client. More...
 
kaa_context_tkaa_client_get_context (kaa_client_t *kaa_client)
 Return pointer to Kaa context. More...
 

Typedef Documentation

typedef void(* external_process_fn)(void *context)
typedef struct kaa_client_t kaa_client_t

Function Documentation

kaa_error_t kaa_client_create ( kaa_client_t **  kaa_client,
kaa_client_props_t props 
)

Creates and initializes kaa_client.

Create Kaa client, initialize Kaa framework.

Parameters
[in,out]kaa_clientPointer to return the address of initialized Kaa client.
[in]propsKaa client properties
Returns
Error code.
void kaa_client_destroy ( kaa_client_t kaa_client)

De-initializes and destroys Kaa client.

After a successful call kaa_client pointer becomes invalid.

Parameters
[in]kaa_clientPointer to an Kaa client.
Returns
Error code.
kaa_context_t* kaa_client_get_context ( kaa_client_t kaa_client)

Return pointer to Kaa context.

Parameters
[in]kaa_clientPointer to an Kaa client.
Returns
pointer to Kaa context.
kaa_error_t kaa_client_start ( kaa_client_t kaa_client,
external_process_fn  external_process,
void *  external_process_context,
kaa_time_t  max_delay 
)

Start Kaa client.

Start Kaa client IO loop.

Parameters
[in]kaa_clientPointer to an Kaa client.
[in]external_processCallback function to process something outside a main loop
[in]external_process_contextCallback function context
[in]max_delayCallback delay
Returns
Error code.
kaa_error_t kaa_client_stop ( kaa_client_t kaa_client)

Stop Kaa client.

Stop Kaa client IO loop.

Parameters
[in]kaa_clientPointer to an Kaa client.
Returns
Error code.