client-c  0.7.0
kaa_platform_protocol.h
Go to the documentation of this file.
1 /*
2  * Copyright 2014 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 "kaa_error.h"
29 #include "kaa_context.h"
30 #include "kaa_common.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
39 #ifndef KAA_PLATFORM_PRTOCOL_T
40 # define KAA_PLATFORM_PRTOCOL_T
42 #endif
43 
47 typedef char* (*kaa_buffer_alloc_fn)(void *context, size_t buffer_size);
48 
52 typedef struct {
54  size_t services_count;
58 
75  , const kaa_serialize_info_t *info
76  , char **buffer
77  , size_t *buffer_size);
78 
89  , const char *buffer
90  , size_t buffer_size);
91 
92 #ifdef __cplusplus
93 } /* extern "C" */
94 #endif
95 #endif /* KAA_PLATFORM_PROTOCOL_H_ */
char *(* kaa_buffer_alloc_fn)(void *context, size_t buffer_size)
kaa_error_t kaa_platform_protocol_serialize_client_sync(kaa_platform_protocol_t *self, const kaa_serialize_info_t *info, char **buffer, size_t *buffer_size)
Constructs a sync request for the specified list of services based on the current state of Kaa contex...
Common C EP SDK definitions and small utilities.
kaa_error_t
Definition: kaa_error.h:31
kaa_service_t
Types of Kaa platform services.
Definition: kaa_common.h:57
Kaa endpoint context definition.
Kaa error codes.
kaa_buffer_alloc_fn allocator
struct kaa_platform_protocol_t kaa_platform_protocol_t
Definition: kaa_context.h:38
kaa_error_t kaa_platform_protocol_process_server_sync(kaa_platform_protocol_t *self, const char *buffer, size_t buffer_size)
Processes downstream data received from Operations server.