16 #ifndef _ASTARTE_BSON_DESERIALIZER_H_
17 #define _ASTARTE_BSON_DESERIALIZER_H_
Astarte types and defines.
astarte_err_t
Astarte return codes.
Definition: astarte.h:28
int64_t astarte_bson_deserializer_element_to_datetime(astarte_bson_element_t element)
Extract the value from the passed element.
astarte_err_t astarte_bson_deserializer_next_element(astarte_bson_document_t document, astarte_bson_element_t curr_element, astarte_bson_element_t *next_element)
Get the next element in a list.
const uint8_t * astarte_bson_deserializer_element_to_binary(astarte_bson_element_t element, uint32_t *len)
Extract the value from the passed element.
int64_t astarte_bson_deserializer_element_to_int64(astarte_bson_element_t element)
Extract the value from the passed element.
const char * astarte_bson_deserializer_element_to_string(astarte_bson_element_t element, uint32_t *len)
Extract the value from the passed element.
astarte_bson_document_t astarte_bson_deserializer_init_doc(const void *buffer)
Initialize a document type from a BSON data buffer.
bool astarte_bson_deserializer_element_to_bool(astarte_bson_element_t element)
Extract the value from the passed element.
astarte_err_t astarte_bson_deserializer_first_element(astarte_bson_document_t document, astarte_bson_element_t *element)
Get the first element in a document's list.
astarte_bson_document_t astarte_bson_deserializer_element_to_array(astarte_bson_element_t element)
Extract the value from the passed element.
int32_t astarte_bson_deserializer_element_to_int32(astarte_bson_element_t element)
Extract the value from the passed element.
double astarte_bson_deserializer_element_to_double(astarte_bson_element_t element)
Extract the value from the passed element.
astarte_bson_document_t astarte_bson_deserializer_element_to_document(astarte_bson_element_t element)
Extract the value from the passed element.
bool astarte_bson_deserializer_check_validity(const void *buffer, int buffer_size)
Perform some checks on the validity of the BSON.
astarte_err_t astarte_bson_deserializer_element_lookup(astarte_bson_document_t document, const char *key, astarte_bson_element_t *element)
Fetch the element with name corresponding to the specified key from the document.
Definition: astarte_bson_deserializer.h:29
uint32_t list_size
Definition: astarte_bson_deserializer.h:32
const void * list
Definition: astarte_bson_deserializer.h:31
Definition: astarte_bson_deserializer.h:36
const char * name
Definition: astarte_bson_deserializer.h:38
const void * value
Definition: astarte_bson_deserializer.h:40
size_t name_len
Definition: astarte_bson_deserializer.h:39