client-c
0.8.1
|
User defined channels manager for Kaa C SDK. More...
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_transport_channel_interface_t * | kaa_channel_manager_get_transport_channel (kaa_channel_manager_t *self, kaa_service_t service_type) |
Gets transport channel associated with the service. 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... | |
User defined channels manager for Kaa C SDK.
Copyright 2014-2016 CyberVision, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
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.
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.
[in] | self | Channel manager. |
[in] | channel | Transport channel implementations. |
[in,out] | channel_id | Pointer to calculate channel id. May be NULL if id isn't needed. |
kaa_transport_channel_interface_t* kaa_channel_manager_get_transport_channel | ( | kaa_channel_manager_t * | self, |
kaa_service_t | service_type | ||
) |
Gets transport channel associated with the service.
[in] | self | Channel manager. |
[in] | service_type | Type of service with associated channel. |
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.
[in] | self | Channel manager. |
[in] | channel_id | Channel id. |
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.
[in] | channel | Interface of the transport channel implementations. |
[in,out] | channel_id | Pointer to calculated channel id. |