Kaa client C SDK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ext_transport_channel.h
Go to the documentation of this file.
1 /*
2  * Copyright 2014-2016 CyberVision, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef EXT_TRANSPORT_CHANNEL_H_
18 #define EXT_TRANSPORT_CHANNEL_H_
19 
20 #include "kaa_common.h"
21 #include "kaa_platform_protocol.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 
28 
33 typedef struct {
36 
37 
38 
47 typedef kaa_error_t (*kaa_init_channel_fn)(void *channel_context
48  , kaa_transport_context_t *transport_context);
49 
50 
51 
63 typedef kaa_error_t (*kaa_set_access_point_fn)(void *channel_context
64  , kaa_access_point_t *access_point);
65 
66 
67 
77 typedef kaa_error_t (*kaa_get_protocol_id_fn)(void *context
78  , kaa_transport_protocol_id_t *protocol_info);
79 
80 
81 
92 typedef kaa_error_t (*kaa_get_supported_services_fn)(void *context,
93  const kaa_extension_id **supported_services,
94  size_t *service_count);
95 
96 
97 
108 typedef kaa_error_t (*kaa_sync_handler_fn)(void *context
109  , const kaa_extension_id services[]
110  , size_t service_count);
111 
112 
113 
121 typedef kaa_error_t (*kaa_tcp_channel_destroy_fn)(void *context);
122 
123 
124 
130 typedef struct {
131  void *context;
139 
140 
141 
142 #ifdef __cplusplus
143 } /* extern "C" */
144 #endif
145 
146 #endif /* EXT_TRANSPORT_CHANNEL_H_ */
General Kaa endpoint context.
Definition: kaa_context.h:50
Identifier used to uniquely represent transport protocol.
Definition: kaa_common.h:71
Common C EP SDK definitions and small utilities.
kaa_error_t
Definition: kaa_error.h:31
Interface for a client transport channel implementation.
Definition: ext_transport_channel.h:130
kaa_context_t * kaa_context
Definition: ext_transport_channel.h:34
Used to initialize transport channel implementation with Kaa specific transport context.
Definition: ext_transport_channel.h:33
kaa_error_t(* kaa_tcp_channel_destroy_fn)(void *context)
Releases channel context.
Definition: ext_transport_channel.h:121
kaa_error_t(* kaa_sync_handler_fn)(void *context, const kaa_extension_id services[], size_t service_count)
Kaa sync request handler function for specific services.
Definition: ext_transport_channel.h:108
kaa_error_t(* kaa_init_channel_fn)(void *channel_context, kaa_transport_context_t *transport_context)
Initializes the transport channel implementation.
Definition: ext_transport_channel.h:47
kaa_extension_id
Kaa extensions.
Definition: kaa_common.h:35
kaa_error_t(* kaa_get_protocol_id_fn)(void *context, kaa_transport_protocol_id_t *protocol_info)
Retrieves a transport protocol id supported by a transport channel implementation.
Definition: ext_transport_channel.h:77
kaa_get_supported_services_fn get_supported_services
Definition: ext_transport_channel.h:137
kaa_error_t(* kaa_get_supported_services_fn)(void *context, const kaa_extension_id **supported_services, size_t *service_count)
Retrieves the list of the supported services.
Definition: ext_transport_channel.h:92
Kaa binary platform level protocol implementation (org.kaaproject.protocol.platform.binary).
kaa_get_protocol_id_fn get_protocol_id
Definition: ext_transport_channel.h:136
kaa_error_t(* kaa_set_access_point_fn)(void *channel_context, kaa_access_point_t *access_point)
Sets transport connection data.
Definition: ext_transport_channel.h:63
void * context
Definition: ext_transport_channel.h:131
Connection parameters used by transport channels to establish connection both to Bootstrap and Operat...
Definition: kaa_common.h:85
kaa_init_channel_fn init
Definition: ext_transport_channel.h:134
kaa_sync_handler_fn sync_handler
Definition: ext_transport_channel.h:133
kaa_set_access_point_fn set_access_point
Definition: ext_transport_channel.h:135
kaa_tcp_channel_destroy_fn destroy
May be NULL.
Definition: ext_transport_channel.h:132