Kaa client C SDK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
kaa_extension_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 
30 #include <kaa_common.h>
31 
32 #include "kaa_private.h"
33 
34 // Meta data extension is not really an extension. It doesn't have any
35 // context and its implementation is embedded in platfrom_protocol.
36 
37 // They will be extern, thus prefixed.
42  .request_serialize = kaa_extension_bootstrap_request_serialize,
44 };
45 
46 #ifndef KAA_DISABLE_FEATURE_PROFILE
51  .request_serialize = kaa_extension_profile_request_serialize,
52  .server_sync = kaa_extension_profile_server_sync,
53 };
54 #endif
55 
56 #ifndef KAA_DISABLE_FEATURE_EVENTS
61  .request_serialize = kaa_extension_event_request_serialize,
62  .server_sync = kaa_extension_event_server_sync,
63 };
64 #endif
65 
66 #ifndef KAA_DISABLE_FEATURE_LOGGING
71  .request_serialize = kaa_extension_logging_request_serialize,
72  .server_sync = kaa_extension_logging_server_sync,
73 };
74 #endif
75 
76 #ifndef KAA_DISABLE_FEATURE_CONFIGURATION
83 };
84 #endif
85 
86 #ifndef KAA_DISABLE_FEATURE_NOTIFICATION
93 };
94 #endif
95 
96 #ifndef KAA_DISABLE_FEATURE_USER
100  .deinit = kaa_extension_user_deinit,
101  .request_serialize = kaa_extension_user_request_serialize,
102  .server_sync = kaa_extension_user_server_sync,
103 };
104 #endif
105 
106 // I'm not sure in what order they should be, so just kept order from
107 // kaa_context_init().
108 static const struct kaa_extension *kaa_extensions[] = {
110 
111 #ifndef KAA_DISABLE_FEATURE_PROFILE
113 #endif
114 
115 #ifndef KAA_DISABLE_FEATURE_EVENTS
117 #endif
118 
119 #ifndef KAA_DISABLE_FEATURE_LOGGING
121 #endif
122 
123 #ifndef KAA_DISABLE_FEATURE_CONFIGURATION
125 #endif
126 
127 #ifndef KAA_DISABLE_FEATURE_NOTIFICATION
129 #endif
130 
131 #ifndef KAA_DISABLE_FEATURE_USER
133 #endif
134 };
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)
Definition: kaa_common.h:42
This file is a container for all private APIs.
kaa_error_t kaa_extension_bootstrap_deinit(void *context)
An extension interface facing Kaa core.
Definition: kaa_extension.h:40
kaa_extension_id id
Definition: kaa_extension.h:41
Common C EP SDK definitions and small utilities.
Definition: kaa_common.h:44
kaa_error_t kaa_extension_configuration_request_serialize(void *context, uint32_t request_id, uint8_t *buffer, size_t *size, bool *need_resync)
kaa_error_t kaa_extension_logging_init(kaa_context_t *kaa_context, void **context)
static struct kaa_extension kaa_extension_bootstrap
Definition: kaa_extension_private.h:38
kaa_error_t kaa_extension_event_request_serialize(void *context, uint32_t request_id, uint8_t *buffer, size_t *size, bool *need_resync)
kaa_error_t kaa_extension_configuration_deinit(void *context)
static struct kaa_extension kaa_extension_profile
Definition: kaa_extension_private.h:47
kaa_error_t kaa_extension_bootstrap_init(kaa_context_t *kaa_context, void **context)
static struct kaa_extension kaa_extension_logging
Definition: kaa_extension_private.h:67
kaa_error_t kaa_extension_profile_deinit(void *context)
static struct kaa_extension kaa_extension_user
Definition: kaa_extension_private.h:97
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_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)
static struct kaa_extension kaa_extension_configuration
Definition: kaa_extension_private.h:77
kaa_error_t kaa_extension_configuration_init(kaa_context_t *kaa_context, void **context)
Definition: kaa_common.h:39
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_extension_user_init(kaa_context_t *kaa_context, void **context)
static struct kaa_extension kaa_extension_notification
Definition: kaa_extension_private.h:87
Definition: kaa_common.h:41
Definition: kaa_common.h:43
static struct kaa_extension kaa_extension_event
Definition: kaa_extension_private.h:57
kaa_error_t kaa_extension_profile_init(kaa_context_t *kaa_context, void **context)
Definition: kaa_common.h:37
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)
Definition: kaa_common.h:40
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)
static const struct kaa_extension * kaa_extensions[]
Definition: kaa_extension_private.h:108
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)