Kaa client C SDK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
kaa_platform_protocol.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 
25 #ifndef KAA_PLATFORM_PROTOCOL_H_
26 #define KAA_PLATFORM_PROTOCOL_H_
27 
28 #include <stdint.h>
29 #include <stddef.h>
30 
31 #include "kaa_error.h"
32 #include "kaa_context.h"
33 #include "kaa_common.h"
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 #ifndef KAA_PLATFORM_PRTOCOL_T
40 #define KAA_PLATFORM_PRTOCOL_T
41 
45 #endif
46 
50 typedef struct {
52  size_t services_count;
54 
76  const kaa_extension_id *services, size_t services_count,
77  uint8_t *buffer, size_t *buffer_size);
78 
90  const kaa_extension_id *services, size_t services_count,
91  uint8_t **buffer, size_t *buffer_size);
92 
103  const uint8_t *buffer, size_t buffer_size);
104 
105 #ifdef __cplusplus
106 } /* extern "C" */
107 #endif
108 #endif /* KAA_PLATFORM_PROTOCOL_H_ */
kaa_error_t kaa_platform_protocol_process_server_sync(kaa_platform_protocol_t *self, const uint8_t *buffer, size_t buffer_size)
Processes downstream data received from Operations server.
kaa_error_t kaa_platform_protocol_serialize_client_sync(kaa_platform_protocol_t *self, const kaa_extension_id *services, size_t services_count, uint8_t *buffer, size_t *buffer_size)
Constructs a sync request for the specified list of services based on the current state of Kaa contex...
kaa_error_t kaa_platform_protocol_alloc_serialize_client_sync(kaa_platform_protocol_t *self, const kaa_extension_id *services, size_t services_count, uint8_t **buffer, size_t *buffer_size)
Allocates the buffer of the needed size and calls kaa_platform_protocol_serialize_client_sync().
Common C EP SDK definitions and small utilities.
kaa_extension_id * services
Non-empty list of services to include into the sync message.
Definition: kaa_platform_protocol.h:51
kaa_error_t
Definition: kaa_error.h:31
Kaa endpoint context definition.
Kaa error codes.
kaa_extension_id
Kaa extensions.
Definition: kaa_common.h:35
size_t services_count
Number of elements in services.
Definition: kaa_platform_protocol.h:52
Serialize info structure.
Definition: kaa_platform_protocol.h:50
struct kaa_platform_protocol_t kaa_platform_protocol_t
Kaa platform protocol state structure.
Definition: kaa_platform_protocol.h:44