Astarte Device SDK ESP32
ESP32 device SDK for the Astarte platform
astarte_bson.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2016, Ispirata Srl, info@ispirata.com.
3  *
4  * SPDX-License-Identifier: LGPL-2.1+ OR Apache-2.0
5  */
6 
12 #ifndef _ASTARTE_BSON_H_
13 #define _ASTARTE_BSON_H_
14 
15 #include "astarte.h"
16 #include <stdbool.h>
17 #include <stdint.h>
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 const void *astarte_bson_key_lookup(const char *key, const void *document, uint8_t *type);
24 void *astarte_bson_next_item(const void *document, const void *current_item);
25 const void *astarte_bson_first_item(const void *document);
26 const char *astarte_bson_key(const void *item);
27 const char *astarte_bson_value_to_string(const void *valuePtr, uint32_t *len);
28 const char *astarte_bson_value_to_binary(const void *valuePtr, uint32_t *len);
29 const void *astarte_bson_value_to_document(const void *valuePtr, uint32_t *len);
30 int8_t astarte_bson_value_to_int8(const void *valuePtr);
31 int32_t astarte_bson_value_to_int32(const void *valuePtr);
32 int64_t astarte_bson_value_to_int64(const void *valuePtr);
33 double astarte_bson_value_to_double(const void *valuePtr);
34 bool astarte_bson_check_validity(const void *document, unsigned int fileSize);
35 int32_t astarte_bson_document_size(const void *document);
36 
37 #ifdef __cplusplus
38 }
39 #endif
40 
41 #endif
Astarte types and defines.