client-c  0.7.0
kaa_channel_manager.h File Reference

User defined channels manager for Kaa C SDK. More...

+ Include dependency graph for kaa_channel_manager.h:

Go to the source code of this file.

Functions

kaa_error_t kaa_transport_channel_id_calculate (kaa_transport_channel_interface_t *channel, uint32_t *channel_id)
 Kaa channel manager structure. More...
 
kaa_error_t kaa_channel_manager_add_transport_channel (kaa_channel_manager_t *self, kaa_transport_channel_interface_t *channel, uint32_t *channel_id)
 Adds user-defined transport channel implementation as a sync request handler for the given list of services. More...
 
kaa_error_t kaa_channel_manager_remove_transport_channel (kaa_channel_manager_t *self, uint32_t channel_id)
 Removes user-defined transport channel implementation from the currently registered list. More...
 

Detailed Description

User defined channels manager for Kaa C SDK.

Manages client transport channels.

Notifies about new access points and indicates to user defined protocol implementations that Kaa services have data to sync with Operations server.

Definition in file kaa_channel_manager.h.

Function Documentation

kaa_error_t kaa_channel_manager_add_transport_channel ( kaa_channel_manager_t self,
kaa_transport_channel_interface_t channel,
uint32_t *  channel_id 
)

Adds user-defined transport channel implementation as a sync request handler for the given list of services.

Kaa library will call the channel's callback when there is data to be sent to Operations server for one of the specified services.

NOTE: It is possible to register more than one channel for the same service. In such event Kaa library will use the last registered one.

Parameters
[in]selfChannel manager.
[in]channelTransport channel implementations.
[in,out]channel_idPointer to calculate channel id. May be NULL if id isn't needed.
Returns
Error code.
kaa_error_t kaa_channel_manager_remove_transport_channel ( kaa_channel_manager_t self,
uint32_t  channel_id 
)

Removes user-defined transport channel implementation from the currently registered list.

NOTE: The channel manager is responsible to release all resources related to this channel.

Parameters
[in]selfChannel manager.
[in]channel_idChannel id.
Returns
Error code.
kaa_error_t kaa_transport_channel_id_calculate ( kaa_transport_channel_interface_t channel,
uint32_t *  channel_id 
)

Kaa channel manager structure.

Calculates the unique id for the transport channel implementations.

Parameters
[in]channelInterface of the transport channel implementations.
[in,out]channel_idPointer to calculated channel id.
Returns
Error code.