client-c  0.7.0
ext_transport_channel.h
Go to the documentation of this file.
1 /*
2  * Copyright 2014-2015 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 #include "../kaa_bootstrap_manager.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 
29 
34 typedef struct {
38 
39 
40 
49 typedef kaa_error_t (*kaa_init_channel_fn)(void *channel_context
50  , kaa_transport_context_t *transport_context);
51 
52 
53 
65 typedef kaa_error_t (*kaa_set_access_point_fn)(void *channel_context
66  , kaa_access_point_t *access_point);
67 
68 
69 
79 typedef kaa_error_t (*kaa_get_protocol_id_fn)(void *context
80  , kaa_transport_protocol_id_t *protocol_info);
81 
82 
83 
95  , kaa_service_t **supported_services
96  , size_t *service_count);
97 
98 
99 
110 typedef kaa_error_t (*kaa_sync_handler_fn)(void *context
111  , const kaa_service_t services[]
112  , size_t service_count);
113 
114 
115 
123 typedef kaa_error_t (*kaa_tcp_channel_destroy_fn)(void *context);
124 
125 
126 
132 typedef struct {
133  void *context;
141 
142 
143 
144 #ifdef __cplusplus
145 } /* extern "C" */
146 #endif
147 
148 #endif /* EXT_TRANSPORT_CHANNEL_H_ */
Identifier used to uniquely represent transport protocol.
Definition: kaa_common.h:69
kaa_error_t
Definition: kaa_error.h:31
Interface for a client transport channel implementation.
kaa_service_t
Types of Kaa platform services.
Definition: kaa_common.h:57
Uses to initialize transport channel implementation with Kaa specific transport context.
kaa_error_t(* kaa_tcp_channel_destroy_fn)(void *context)
Releases channel context.
kaa_error_t(* kaa_init_channel_fn)(void *channel_context, kaa_transport_context_t *transport_context)
Initializes the transport channel implementation.
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.
kaa_get_supported_services_fn get_supported_services
struct kaa_bootstrap_manager_t kaa_bootstrap_manager_t
Definition: kaa_context.h:45
kaa_platform_protocol_t * platform_protocol
kaa_error_t(* kaa_set_access_point_fn)(void *channel_context, kaa_access_point_t *access_point)
Sets transport connection data.
kaa_error_t(* kaa_sync_handler_fn)(void *context, const kaa_service_t services[], size_t service_count)
Kaa sync request handler function for specific services.
struct kaa_platform_protocol_t kaa_platform_protocol_t
Definition: kaa_context.h:38
Connection parameters used by transport channels to establish connection both to Bootstrap and Operat...
Definition: kaa_common.h:84
kaa_set_access_point_fn set_access_point
kaa_error_t(* kaa_get_supported_services_fn)(void *context, kaa_service_t **supported_services, size_t *service_count)
Retrieves the list of the supported services.
kaa_tcp_channel_destroy_fn destroy
kaa_bootstrap_manager_t * bootstrap_manager