12 #ifndef _ASTARTE_BSON_SERIALIZER_H_
13 #define _ASTARTE_BSON_SERIALIZER_H_
242 const char *name,
const char *
const *string_array,
int count);
256 const char *name,
const void *
const *binary_array,
const int *sizes,
int count);
270 const char *name,
const int64_t *epoch_millis_array,
int count);
Astarte types and defines.
astarte_err_t
Astarte return codes.
Definition: astarte.h:28
astarte_err_t astarte_bson_serializer_write_document(const struct astarte_bson_serializer_t *bs, void *out_buf, int out_buf_len, int *out_doc_size)
copy bson serializer internal buffer to a different buffer.
void astarte_bson_serializer_append_end_of_document(struct astarte_bson_serializer_t *bs)
append end of document marker.
void astarte_bson_serializer_append_binary(struct astarte_bson_serializer_t *bs, const char *name, const void *value, int size)
append a binary blob value
void astarte_bson_serializer_append_int32_array(struct astarte_bson_serializer_t *bs, const char *name, const int32_t *int32_array, int count)
append an int32 array
void astarte_bson_serializer_append_double(struct astarte_bson_serializer_t *bs, const char *name, double value)
append a double value
void astarte_bson_serializer_append_int64(struct astarte_bson_serializer_t *bs, const char *name, int64_t value)
append an int64 value
void astarte_bson_serializer_append_string(struct astarte_bson_serializer_t *bs, const char *name, const char *string)
append an UTF-8 string
void astarte_bson_serializer_init(struct astarte_bson_serializer_t *bs)
initialize given BSON serializer.
int astarte_bson_serializer_document_size(const struct astarte_bson_serializer_t *bs)
return document size
void astarte_bson_serializer_append_document(struct astarte_bson_serializer_t *bs, const char *name, const void *document)
append a sub-BSON document.
void astarte_bson_serializer_append_binary_array(struct astarte_bson_serializer_t *bs, const char *name, const void *const *binary_array, const int *sizes, int count)
append a binary blob array
void astarte_bson_serializer_append_datetime(struct astarte_bson_serializer_t *bs, const char *name, uint64_t epoch_millis)
append a date time value
void astarte_bson_serializer_append_string_array(struct astarte_bson_serializer_t *bs, const char *name, const char *const *string_array, int count)
append a string array
void astarte_bson_serializer_append_int32(struct astarte_bson_serializer_t *bs, const char *name, int32_t value)
append an int32 value
void astarte_bson_serializer_append_double_array(struct astarte_bson_serializer_t *bs, const char *name, const double *double_array, int count)
append a double array
void astarte_bson_serializer_append_boolean_array(struct astarte_bson_serializer_t *bs, const char *name, const bool *boolean_array, int count)
append a boolean array
void astarte_bson_serializer_append_datetime_array(struct astarte_bson_serializer_t *bs, const char *name, const int64_t *epoch_millis_array, int count)
append a date time array
void astarte_bson_serializer_append_boolean(struct astarte_bson_serializer_t *bs, const char *name, bool value)
append a boolean value
const void * astarte_bson_serializer_get_document(const struct astarte_bson_serializer_t *bs, int *size)
return bson serializer internal buffer.
void astarte_bson_serializer_append_int64_array(struct astarte_bson_serializer_t *bs, const char *name, const int64_t *int64_array, int count)
append an int64 array
void astarte_bson_serializer_destroy(struct astarte_bson_serializer_t *bs)
destroy given BSON serializer.
Definition: astarte_bson_serializer.h:33
Definition: astarte_bson_serializer.h:26