Kaa client C SDK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
kaa_channel_manager.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 
27 #ifndef KAA_CHANNEL_MANAGER_H_
28 #define KAA_CHANNEL_MANAGER_H_
29 
30 #include "kaa_common.h"
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
40 #ifndef KAA_CHANNEL_MANAGER_T
41 # define KAA_CHANNEL_MANAGER_T
43 #endif
44 
45 
46 
56  uint32_t *channel_id);
57 
77  uint32_t *channel_id);
78 
87  kaa_extension_id service_type);
88 
89 
103  uint32_t channel_id);
104 
105 
106 
111 typedef enum {
116 
117 
118 
125 typedef void (*kaa_auth_failure_fn)(kaa_auth_failure_reason reason, void *context);
126 
127 
128 
137  kaa_auth_failure_fn handler, void *context);
138 
139 
147  kaa_auth_failure_reason reason);
148 
149 #ifdef __cplusplus
150 } /* extern "C" */
151 #endif
152 #endif /* KAA_CHANNEL_MANAGER_H_ */
void kaa_channel_manager_set_auth_failure_handler(kaa_channel_manager_t *self, kaa_auth_failure_fn handler, void *context)
Specify authorization failure handler.
Common C EP SDK definitions and small utilities.
kaa_error_t
Definition: kaa_error.h:31
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...
Interface for a client transport channel implementation.
Definition: ext_transport_channel.h:130
kaa_auth_failure_reason
Specifies authorization failure reason.
Definition: kaa_channel_manager.h:111
void(* kaa_auth_failure_fn)(kaa_auth_failure_reason reason, void *context)
Processes authorization failure.
Definition: kaa_channel_manager.h:125
void kaa_channel_manager_process_auth_failure(kaa_channel_manager_t *self, kaa_auth_failure_reason reason)
Processes authorization failure if valid handler exists.
kaa_extension_id
Kaa extensions.
Definition: kaa_common.h:35
kaa_error_t kaa_transport_channel_id_calculate(kaa_transport_channel_interface_t *channel, uint32_t *channel_id)
Calculates the unique id for the transport channel implementations.
Authorization failed because credentials are invalid.
Definition: kaa_channel_manager.h:113
Authorization failed for unknown reason.
Definition: kaa_channel_manager.h:112
struct kaa_channel_manager_t kaa_channel_manager_t
Definition: kaa_channel_manager.h:42
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 se...
Authorization failed because of verification failure.
Definition: kaa_channel_manager.h:114
kaa_transport_channel_interface_t * kaa_channel_manager_get_transport_channel(kaa_channel_manager_t *self, kaa_extension_id service_type)
Gets transport channel associated with the service.