Kaa client C SDK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
kaa_private.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 
24 #ifndef KAA_PRIVATE_H
25 #define KAA_PRIVATE_H
26 
27 #include <kaa_error.h>
28 #include <kaa_status.h>
29 #include <kaa_channel_manager.h>
30 #include <kaa_platform_utils.h>
31 #include <platform/kaa_client.h>
32 #include <kaa_platform_common.h>
33 #include <stdint.h>
34 #include <kaa_context.h>
36 #include <utilities/kaa_log.h>
37 #include <kaa_bootstrap_manager.h>
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif // __cplusplus
42 
46 
50  kaa_extension_id service_type);
51 
53 
55 
57  kaa_logger_t *logger, kaa_status_t *status);
59 
60 kaa_error_t kaa_status_set_registered(kaa_status_t *self, bool is_registered);
61 
65 
67  , kaa_transport_protocol_id_t *protocol_id
68  , kaa_server_type_t server_type
69  , kaa_access_point_t *access_point);
70 
72  , kaa_transport_protocol_id_t *protocol_info);
73 
76  kaa_transport_protocol_id_t *protocol_id);
77 
78 
80 
81 
82 kaa_error_t kaa_status_set_updated(kaa_status_t *self, bool is_updated);
83 
84 kaa_error_t kaa_status_set_attached(kaa_status_t *self, bool is_attached);
85 
86 kaa_error_t kaa_context_set_status_registered(kaa_context_t *kaa_context, bool is_registered);
87 
90 };
91 
92 kaa_error_t kaa_extension_bootstrap_init(kaa_context_t *kaa_context, void **context);
93 kaa_error_t kaa_extension_profile_init(kaa_context_t *kaa_context, void **context);
94 kaa_error_t kaa_extension_event_init(kaa_context_t *kaa_context, void **context);
95 kaa_error_t kaa_extension_logging_init(kaa_context_t *kaa_context, void **context);
96 kaa_error_t kaa_extension_configuration_init(kaa_context_t *kaa_context, void **context);
97 kaa_error_t kaa_extension_notification_init(kaa_context_t *kaa_context, void **context);
98 kaa_error_t kaa_extension_user_init(kaa_context_t *kaa_context, void **context);
99 
107 
108 kaa_error_t kaa_extension_bootstrap_request_serialize(void *context, uint32_t request_id,
109  uint8_t *buffer, size_t *size, bool *need_resync);
110 kaa_error_t kaa_extension_profile_request_serialize(void *context, uint32_t request_id,
111  uint8_t *buffer, size_t *size, bool *need_resync);
112 kaa_error_t kaa_extension_event_request_serialize(void *context, uint32_t request_id,
113  uint8_t *buffer, size_t *size, bool *need_resync);
114 kaa_error_t kaa_extension_logging_request_serialize(void *context, uint32_t request_id,
115  uint8_t *buffer, size_t *size, bool *need_resync);
116 kaa_error_t kaa_extension_configuration_request_serialize(void *context, uint32_t request_id,
117  uint8_t *buffer, size_t *size, bool *need_resync);
118 kaa_error_t kaa_extension_notification_request_serialize(void *context, uint32_t request_id,
119  uint8_t *buffer, size_t *size, bool *need_resync);
120 kaa_error_t kaa_extension_user_request_serialize(void *context, uint32_t request_id,
121  uint8_t *buffer, size_t *size, bool *need_resync);
122 
123 kaa_error_t kaa_extension_bootstrap_server_sync(void *context, uint32_t request_id,
124  uint16_t extension_options, const uint8_t *buffer, size_t size);
125 kaa_error_t kaa_extension_profile_server_sync(void *context, uint32_t request_id,
126  uint16_t extension_options, const uint8_t *buffer, size_t size);
127 kaa_error_t kaa_extension_event_server_sync(void *context, uint32_t request_id,
128  uint16_t extension_options, const uint8_t *buffer, size_t size);
129 kaa_error_t kaa_extension_logging_server_sync(void *context, uint32_t request_id,
130  uint16_t extension_options, const uint8_t *buffer, size_t size);
131 kaa_error_t kaa_extension_configuration_server_sync(void *context, uint32_t request_id,
132  uint16_t extension_options, const uint8_t *buffer, size_t size);
133 kaa_error_t kaa_extension_notification_server_sync(void *context, uint32_t request_id,
134  uint16_t extension_options, const uint8_t *buffer, size_t size);
135 kaa_error_t kaa_extension_user_server_sync(void *context, uint32_t request_id,
136  uint16_t extension_options, const uint8_t *buffer, size_t size);
137 
138 /* ALL FUNCTIONS BELOW ARE DEPRECATED
139  *
140  * They should be removed once we move extensions out of the core.
141  */
142 
144 
150  kaa_platform_message_writer_t* writer, uint32_t request_id);
151 
152 kaa_error_t kaa_bootstrap_manager_handle_server_sync(kaa_bootstrap_manager_t *self, kaa_platform_message_reader_t *reader, uint16_t extension_options, size_t extension_length);
153 #ifdef __cplusplus
154 }
155 #endif // __cplusplus
156 
157 #endif /* KAA_PRIVATE_H */
kaa_server_type_t
Definition: kaa_bootstrap_manager.h:44
kaa_error_t kaa_extension_user_deinit(void *context)
kaa_error_t kaa_extension_notification_server_sync(void *context, uint32_t request_id, uint16_t extension_options, const uint8_t *buffer, size_t size)
kaa_error_t kaa_extension_logging_deinit(void *context)
kaa_access_point_t * kaa_bootstrap_manager_get_bootstrap_access_point(kaa_bootstrap_manager_t *self, kaa_transport_protocol_id_t *protocol_id)
User defined channels manager for Kaa C SDK.
Definition: kaa_platform_utils.h:40
kaa_error_t kaa_extension_bootstrap_deinit(void *context)
General Kaa endpoint context.
Definition: kaa_context.h:50
kaa_error_t kaa_bootstrap_manager_handle_server_sync(kaa_bootstrap_manager_t *self, kaa_platform_message_reader_t *reader, uint16_t extension_options, size_t extension_length)
kaa_error_t kaa_channel_manager_create(kaa_channel_manager_t **channel_manager_p, kaa_context_t *context)
Identifier used to uniquely represent transport protocol.
Definition: kaa_common.h:71
kaa_error_t kaa_failover_strategy_create(kaa_failover_strategy_t **strategy, kaa_logger_t *logger)
kaa_error_t kaa_status_set_attached(kaa_status_t *self, bool is_attached)
kaa_error_t
Definition: kaa_error.h:31
kaa_error_t kaa_status_set_registered(kaa_status_t *self, bool is_registered)
kaa_error_t kaa_meta_data_request_serialize(kaa_platform_protocol_t *status, kaa_platform_message_writer_t *writer, uint32_t request_id)
Interface for a client transport channel implementation.
Definition: ext_transport_channel.h:130
kaa_error_t kaa_extension_configuration_request_serialize(void *context, uint32_t request_id, uint8_t *buffer, size_t *size, bool *need_resync)
Definition: kaa_private.h:88
kaa_error_t kaa_extension_logging_init(kaa_context_t *kaa_context, void **context)
kaa_error_t kaa_status_save(kaa_status_t *kaa_status_p)
kaa_error_t kaa_extension_event_request_serialize(void *context, uint32_t request_id, uint8_t *buffer, size_t *size, bool *need_resync)
Management of the Operations servers connection parameters.
void kaa_status_destroy(kaa_status_t *self)
kaa_error_t kaa_extension_configuration_deinit(void *context)
Definition: kaa_platform_utils.h:33
void kaa_bootstrap_manager_destroy(kaa_bootstrap_manager_t *self)
Kaa endpoint context definition.
kaa_access_point_t * kaa_bootstrap_manager_get_operations_access_point(kaa_bootstrap_manager_t *self, kaa_transport_protocol_id_t *protocol_info)
kaa_error_t kaa_extension_bootstrap_init(kaa_context_t *kaa_context, void **context)
Kaa error codes.
kaa_error_t kaa_extension_profile_deinit(void *context)
kaa_extension_id
Kaa extensions.
Definition: kaa_common.h:35
bool kaa_bootstrap_manager_process_failover(kaa_bootstrap_manager_t *self)
struct kaa_failover_strategy_t kaa_failover_strategy_t
Definition: ext_kaa_failover_strategy.h:52
struct kaa_logger_t kaa_logger_t
Definition: kaa_log.h:68
kaa_error_t kaa_channel_manager_bootstrap_request_serialize(kaa_channel_manager_t *self, kaa_platform_message_writer_t *writer)
kaa_error_t kaa_channel_manager_on_new_access_point(kaa_channel_manager_t *self, kaa_transport_protocol_id_t *protocol_id, kaa_server_type_t server_type, kaa_access_point_t *access_point)
kaa_error_t kaa_status_set_endpoint_access_token(kaa_status_t *self, const char *token)
kaa_error_t kaa_platform_protocol_create(kaa_platform_protocol_t **platform_protocol_p, kaa_logger_t *logger, kaa_status_t *status)
kaa_error_t kaa_extension_event_server_sync(void *context, uint32_t request_id, uint16_t extension_options, const uint8_t *buffer, size_t size)
kaa_error_t kaa_extension_notification_init(kaa_context_t *kaa_context, void **context)
kaa_error_t kaa_channel_manager_bootstrap_request_get_size(kaa_channel_manager_t *self, size_t *expected_size)
kaa_error_t kaa_status_create(kaa_status_t **kaa_status_p)
void kaa_channel_manager_destroy(kaa_channel_manager_t *self)
kaa_error_t kaa_extension_profile_server_sync(void *context, uint32_t request_id, uint16_t extension_options, const uint8_t *buffer, size_t size)
kaa_error_t kaa_extension_profile_request_serialize(void *context, uint32_t request_id, uint8_t *buffer, size_t *size, bool *need_resync)
kaa_error_t kaa_extension_configuration_init(kaa_context_t *kaa_context, void **context)
kaa_transport_channel_interface_t * kaa_channel_manager_get_transport_channel(kaa_channel_manager_t *self, kaa_extension_id service_type)
kaa_status_t * status_instance
Definition: kaa_private.h:89
struct kaa_platform_protocol_t kaa_platform_protocol_t
Kaa platform protocol state structure.
Definition: kaa_platform_protocol.h:44
kaa_error_t kaa_extension_configuration_server_sync(void *context, uint32_t request_id, uint16_t extension_options, const uint8_t *buffer, size_t size)
kaa_error_t kaa_extension_user_server_sync(void *context, uint32_t request_id, uint16_t extension_options, const uint8_t *buffer, size_t size)
kaa_error_t kaa_bootstrap_manager_create(kaa_bootstrap_manager_t **bootstrap_manager_p, kaa_context_t *kaa_context)
struct kaa_channel_manager_t kaa_channel_manager_t
Definition: kaa_channel_manager.h:42
kaa_error_t kaa_extension_user_init(kaa_context_t *kaa_context, void **context)
void kaa_failover_strategy_destroy(kaa_failover_strategy_t *strategy)
kaa_error_t kaa_bootstrap_manager_bootstrap_request_serialize(kaa_bootstrap_manager_t *self, kaa_platform_message_writer_t *writer)
Simple logger for Kaa C Endpoint.
kaa_error_t kaa_extension_profile_init(kaa_context_t *kaa_context, void **context)
kaa_error_t kaa_extension_bootstrap_server_sync(void *context, uint32_t request_id, uint16_t extension_options, const uint8_t *buffer, size_t size)
kaa_error_t kaa_extension_notification_deinit(void *context)
Connection parameters used by transport channels to establish connection both to Bootstrap and Operat...
Definition: kaa_common.h:85
kaa_error_t kaa_extension_event_init(kaa_context_t *kaa_context, void **context)
kaa_error_t kaa_extension_user_request_serialize(void *context, uint32_t request_id, uint8_t *buffer, size_t *size, bool *need_resync)
kaa_error_t kaa_status_set_updated(kaa_status_t *self, bool is_updated)
Definition: kaa_status.h:36
kaa_error_t kaa_extension_logging_request_serialize(void *context, uint32_t request_id, uint8_t *buffer, size_t *size, bool *need_resync)
kaa_error_t kaa_extension_bootstrap_request_serialize(void *context, uint32_t request_id, uint8_t *buffer, size_t *size, bool *need_resync)
kaa_error_t kaa_extension_logging_server_sync(void *context, uint32_t request_id, uint16_t extension_options, const uint8_t *buffer, size_t size)
kaa_error_t kaa_extension_event_deinit(void *context)
kaa_error_t kaa_extension_notification_request_serialize(void *context, uint32_t request_id, uint8_t *buffer, size_t *size, bool *need_resync)
struct kaa_bootstrap_manager_t kaa_bootstrap_manager_t
Definition: kaa_bootstrap_manager.h:39
kaa_error_t kaa_context_set_status_registered(kaa_context_t *kaa_context, bool is_registered)
void kaa_platform_protocol_destroy(kaa_platform_protocol_t *self)