diff --git a/docs/doxygen/allocators_8c.html b/docs/doxygen/allocators_8c.html new file mode 100644 index 00000000..2db4f7fb --- /dev/null +++ b/docs/doxygen/allocators_8c.html @@ -0,0 +1,202 @@ + + +
+ + + + +
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
#include "cbor/common.h"
Go to the source code of this file.
++Functions | |
void | cbor_set_allocs (_cbor_malloc_t custom_malloc, _cbor_realloc_t custom_realloc, _cbor_free_t custom_free) |
Sets the memory management routines to use. More... | |
+Variables | |
_cbor_malloc_t | _cbor_malloc = malloc |
_cbor_realloc_t | _cbor_realloc = realloc |
_cbor_free_t | _cbor_free = free |
void cbor_set_allocs | +( | +_cbor_malloc_t | +custom_malloc, | +
+ | + | _cbor_realloc_t | +custom_realloc, | +
+ | + | _cbor_free_t | +custom_free | +
+ | ) | ++ |
Sets the memory management routines to use.
+Only available when CBOR_CUSTOM_ALLOC is truthy
+embed:rst:leading-asterisk +* .. warning:: This function modifies the global state and should therefore be used accordingly. Changing the memory handlers while allocated items exist will result in a ``free``/``malloc`` mismatch. This function is not thread safe with respect to both itself and all the other *libcbor* functions that work with the heap. +* .. note:: `realloc` implementation must correctly support `NULL` reallocation +*
custom_malloc | malloc implementation |
custom_realloc | realloc implementation |
custom_free | free implementation |
Definition at line 14 of file allocators.c.
+ +_cbor_free_t _cbor_free = free | +
Definition at line 12 of file allocators.c.
+ +_cbor_malloc_t _cbor_malloc = malloc | +
Definition at line 10 of file allocators.c.
+ +_cbor_realloc_t _cbor_realloc = realloc | +
Definition at line 11 of file allocators.c.
+ +
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
C_cbor_array_metadata | Arrays specific metadata |
C_cbor_bytestring_metadata | Bytestrings specific metadata |
C_cbor_decoder_context | High-level decoding context |
C_cbor_double_helper | Raw memory casts helper |
C_cbor_float_ctrl_metadata | Floats specific metadata - includes CTRL values |
C_cbor_float_helper | Raw memory casts helper |
C_cbor_int_metadata | Integers specific metadata |
C_cbor_map_metadata | Maps specific metadata |
C_cbor_stack | Stack handle - contents and size |
C_cbor_stack_record | Simple stack record for the parser |
C_cbor_string_metadata | Strings specific metadata |
C_cbor_tag_metadata | Arrays specific metadata |
C_cbor_unicode_status | Signals unicode validation error and possibly its location |
Ccbor_callbacks | Callback bundle – passed to the decoder |
Ccbor_decoder_result | Streaming decoder result |
Ccbor_error | High-level decoding error |
Ccbor_indefinite_string_data | Defines cbor_item_t::data structure for indefinite strings and bytestrings |
Ccbor_item_metadata | Union of metadata across all possible types - discriminated in cbor_item_t |
Ccbor_item_t | The item handle |
Ccbor_load_result | High-level decoding result |
Ccbor_pair | Simple pair of items for use in maps |
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
Go to the source code of this file.
++Functions | |
size_t | cbor_array_size (const cbor_item_t *item) |
Get the number of members. More... | |
size_t | cbor_array_allocated (const cbor_item_t *item) |
Get the size of the allocated storage. More... | |
cbor_item_t * | cbor_array_get (const cbor_item_t *item, size_t index) |
Get item by index. More... | |
bool | cbor_array_set (cbor_item_t *item, size_t index, cbor_item_t *value) |
Set item by index. More... | |
bool | cbor_array_replace (cbor_item_t *item, size_t index, cbor_item_t *value) |
Replace item at an index. More... | |
bool | cbor_array_push (cbor_item_t *array, cbor_item_t *pushee) |
Append to the end. More... | |
bool | cbor_array_is_definite (const cbor_item_t *item) |
Is the array definite? More... | |
bool | cbor_array_is_indefinite (const cbor_item_t *item) |
Is the array indefinite? More... | |
cbor_item_t ** | cbor_array_handle (const cbor_item_t *item) |
Get the array contents. More... | |
cbor_item_t * | cbor_new_definite_array (size_t size) |
Create new definite array. More... | |
cbor_item_t * | cbor_new_indefinite_array () |
Create new indefinite array. More... | |
size_t cbor_array_allocated | +( | +const cbor_item_t * | +item | ) | ++ |
cbor_item_t* cbor_array_get | +( | +const cbor_item_t * | +item, | +
+ | + | size_t | +index | +
+ | ) | ++ |
cbor_item_t** cbor_array_handle | +( | +const cbor_item_t * | +item | ) | ++ |
Get the array contents.
+The items may be reordered and modified as long as references remain consistent.
+item[borrow] | An array |
bool cbor_array_is_definite | +( | +const cbor_item_t * | +item | ) | ++ |
bool cbor_array_is_indefinite | +( | +const cbor_item_t * | +item | ) | ++ |
bool cbor_array_push | +( | +cbor_item_t * | +array, | +
+ | + | cbor_item_t * | +pushee | +
+ | ) | ++ |
Append to the end.
+For indefinite items, storage may be realloacted. For definite items, only the preallocated capacity is available.
+array[borrow] | An array |
pushee[incref] | The item to push |
bool cbor_array_replace | +( | +cbor_item_t * | +item, | +
+ | + | size_t | +index, | +
+ | + | cbor_item_t * | +value | +
+ | ) | ++ |
Replace item at an index.
+The item being replace will be cbor_decref 'ed.
+item[borrow] | An array |
value[incref] | The item to assign |
index | The index, first item is 0. |
bool cbor_array_set | +( | +cbor_item_t * | +item, | +
+ | + | size_t | +index, | +
+ | + | cbor_item_t * | +value | +
+ | ) | ++ |
size_t cbor_array_size | +( | +const cbor_item_t * | +item | ) | ++ |
cbor_item_t* cbor_new_definite_array | +( | +size_t | +size | ) | ++ |
cbor_item_t* cbor_new_indefinite_array | +( | +) | ++ |
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
#include "cbor/common.h"
Go to the source code of this file.
++Functions | |
size_t | cbor_array_size (const cbor_item_t *item) |
Get the number of members. More... | |
size_t | cbor_array_allocated (const cbor_item_t *item) |
Get the size of the allocated storage. More... | |
cbor_item_t * | cbor_array_get (const cbor_item_t *item, size_t index) |
Get item by index. More... | |
bool | cbor_array_set (cbor_item_t *item, size_t index, cbor_item_t *value) |
Set item by index. More... | |
bool | cbor_array_replace (cbor_item_t *item, size_t index, cbor_item_t *value) |
Replace item at an index. More... | |
bool | cbor_array_is_definite (const cbor_item_t *item) |
Is the array definite? More... | |
bool | cbor_array_is_indefinite (const cbor_item_t *item) |
Is the array indefinite? More... | |
cbor_item_t ** | cbor_array_handle (const cbor_item_t *item) |
Get the array contents. More... | |
cbor_item_t * | cbor_new_definite_array (size_t size) |
Create new definite array. More... | |
cbor_item_t * | cbor_new_indefinite_array () |
Create new indefinite array. More... | |
bool | cbor_array_push (cbor_item_t *array, cbor_item_t *pushee) |
Append to the end. More... | |
size_t cbor_array_allocated | +( | +const cbor_item_t * | +item | ) | ++ |
cbor_item_t* cbor_array_get | +( | +const cbor_item_t * | +item, | +
+ | + | size_t | +index | +
+ | ) | ++ |
cbor_item_t** cbor_array_handle | +( | +const cbor_item_t * | +item | ) | ++ |
Get the array contents.
+The items may be reordered and modified as long as references remain consistent.
+item[borrow] | An array |
bool cbor_array_is_definite | +( | +const cbor_item_t * | +item | ) | ++ |
bool cbor_array_is_indefinite | +( | +const cbor_item_t * | +item | ) | ++ |
bool cbor_array_push | +( | +cbor_item_t * | +array, | +
+ | + | cbor_item_t * | +pushee | +
+ | ) | ++ |
Append to the end.
+For indefinite items, storage may be realloacted. For definite items, only the preallocated capacity is available.
+array[borrow] | An array |
pushee[incref] | The item to push |
bool cbor_array_replace | +( | +cbor_item_t * | +item, | +
+ | + | size_t | +index, | +
+ | + | cbor_item_t * | +value | +
+ | ) | ++ |
Replace item at an index.
+The item being replace will be cbor_decref 'ed.
+item[borrow] | An array |
value[incref] | The item to assign |
index | The index, first item is 0. |
bool cbor_array_set | +( | +cbor_item_t * | +item, | +
+ | + | size_t | +index, | +
+ | + | cbor_item_t * | +value | +
+ | ) | ++ |
size_t cbor_array_size | +( | +const cbor_item_t * | +item | ) | ++ |
cbor_item_t* cbor_new_definite_array | +( | +size_t | +size | ) | ++ |
cbor_item_t* cbor_new_indefinite_array | +( | +) | ++ |
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
#include "builder_callbacks.h"
#include "unicode.h"
#include <string.h>
#include "../arrays.h"
#include "../bytestrings.h"
#include "../floats_ctrls.h"
#include "../ints.h"
#include "../maps.h"
#include "../strings.h"
#include "../tags.h"
Go to the source code of this file.
++Macros | |
#define | CHECK_RES do { if (res == NULL) { ctx->creation_failed = true; return; } } while (0) |
+Functions | |
void | _cbor_builder_append (cbor_item_t *item, struct _cbor_decoder_context *ctx) |
void | cbor_builder_uint8_callback (void *context, uint8_t value) |
void | cbor_builder_uint16_callback (void *context, uint16_t value) |
void | cbor_builder_uint32_callback (void *context, uint32_t value) |
void | cbor_builder_uint64_callback (void *context, uint64_t value) |
void | cbor_builder_negint8_callback (void *context, uint8_t value) |
void | cbor_builder_negint16_callback (void *context, uint16_t value) |
void | cbor_builder_negint32_callback (void *context, uint32_t value) |
void | cbor_builder_negint64_callback (void *context, uint64_t value) |
void | cbor_builder_byte_string_callback (void *context, cbor_data data, size_t length) |
void | cbor_builder_byte_string_start_callback (void *context) |
void | cbor_builder_string_callback (void *context, cbor_data data, size_t length) |
void | cbor_builder_string_start_callback (void *context) |
void | cbor_builder_array_start_callback (void *context, size_t size) |
void | cbor_builder_indef_array_start_callback (void *context) |
void | cbor_builder_indef_map_start_callback (void *context) |
void | cbor_builder_map_start_callback (void *context, size_t size) |
void | cbor_builder_indef_break_callback (void *context) |
void | cbor_builder_float2_callback (void *context, float value) |
void | cbor_builder_float4_callback (void *context, float value) |
void | cbor_builder_float8_callback (void *context, double value) |
void | cbor_builder_null_callback (void *context) |
void | cbor_builder_undefined_callback (void *context) |
void | cbor_builder_boolean_callback (void *context, bool value) |
void | cbor_builder_tag_callback (void *context, uint64_t value) |
#define CHECK_RES do { if (res == NULL) { ctx->creation_failed = true; return; } } while (0) | +
Definition at line 84 of file builder_callbacks.c.
+ +void _cbor_builder_append | +( | +cbor_item_t * | +item, | +
+ | + | struct _cbor_decoder_context * | +ctx | +
+ | ) | ++ |
Definition at line 19 of file builder_callbacks.c.
+ +void cbor_builder_array_start_callback | +( | +void * | +context, | +
+ | + | size_t | +size | +
+ | ) | ++ |
Definition at line 251 of file builder_callbacks.c.
+ +void cbor_builder_boolean_callback | +( | +void * | +context, | +
+ | + | bool | +value | +
+ | ) | ++ |
Definition at line 345 of file builder_callbacks.c.
+ +void cbor_builder_byte_string_callback | +( | +void * | +context, | +
+ | + | cbor_data | +data, | +
+ | + | size_t | +length | +
+ | ) | ++ |
Definition at line 165 of file builder_callbacks.c.
+ +void cbor_builder_byte_string_start_callback | +( | +void * | +context | ) | ++ |
Definition at line 197 of file builder_callbacks.c.
+ +void cbor_builder_float2_callback | +( | +void * | +context, | +
+ | + | float | +value | +
+ | ) | ++ |
Definition at line 303 of file builder_callbacks.c.
+ +void cbor_builder_float4_callback | +( | +void * | +context, | +
+ | + | float | +value | +
+ | ) | ++ |
Definition at line 311 of file builder_callbacks.c.
+ +void cbor_builder_float8_callback | +( | +void * | +context, | +
+ | + | double | +value | +
+ | ) | ++ |
Definition at line 320 of file builder_callbacks.c.
+ +void cbor_builder_indef_array_start_callback | +( | +void * | +context | ) | ++ |
Definition at line 263 of file builder_callbacks.c.
+ +void cbor_builder_indef_break_callback | +( | +void * | +context | ) | ++ |
Definition at line 291 of file builder_callbacks.c.
+ +void cbor_builder_indef_map_start_callback | +( | +void * | +context | ) | ++ |
Definition at line 271 of file builder_callbacks.c.
+ +void cbor_builder_map_start_callback | +( | +void * | +context, | +
+ | + | size_t | +size | +
+ | ) | ++ |
Definition at line 279 of file builder_callbacks.c.
+ +void cbor_builder_negint16_callback | +( | +void * | +context, | +
+ | + | uint16_t | +value | +
+ | ) | ++ |
Definition at line 136 of file builder_callbacks.c.
+ +void cbor_builder_negint32_callback | +( | +void * | +context, | +
+ | + | uint32_t | +value | +
+ | ) | ++ |
Definition at line 145 of file builder_callbacks.c.
+ +void cbor_builder_negint64_callback | +( | +void * | +context, | +
+ | + | uint64_t | +value | +
+ | ) | ++ |
Definition at line 155 of file builder_callbacks.c.
+ +void cbor_builder_negint8_callback | +( | +void * | +context, | +
+ | + | uint8_t | +value | +
+ | ) | ++ |
Definition at line 126 of file builder_callbacks.c.
+ +void cbor_builder_null_callback | +( | +void * | +context | ) | ++ |
Definition at line 329 of file builder_callbacks.c.
+ +void cbor_builder_string_callback | +( | +void * | +context, | +
+ | + | cbor_data | +data, | +
+ | + | size_t | +length | +
+ | ) | ++ |
Definition at line 206 of file builder_callbacks.c.
+ +void cbor_builder_string_start_callback | +( | +void * | +context | ) | ++ |
Definition at line 243 of file builder_callbacks.c.
+ +void cbor_builder_tag_callback | +( | +void * | +context, | +
+ | + | uint64_t | +value | +
+ | ) | ++ |
Definition at line 353 of file builder_callbacks.c.
+ +void cbor_builder_uint16_callback | +( | +void * | +context, | +
+ | + | uint16_t | +value | +
+ | ) | ++ |
Definition at line 96 of file builder_callbacks.c.
+ +void cbor_builder_uint32_callback | +( | +void * | +context, | +
+ | + | uint32_t | +value | +
+ | ) | ++ |
Definition at line 106 of file builder_callbacks.c.
+ +void cbor_builder_uint64_callback | +( | +void * | +context, | +
+ | + | uint64_t | +value | +
+ | ) | ++ |
Definition at line 116 of file builder_callbacks.c.
+ +void cbor_builder_uint8_callback | +( | +void * | +context, | +
+ | + | uint8_t | +value | +
+ | ) | ++ |
Definition at line 86 of file builder_callbacks.c.
+ +void cbor_builder_undefined_callback | +( | +void * | +context | ) | ++ |
Definition at line 337 of file builder_callbacks.c.
+ +
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
Go to the source code of this file.
++Data Structures | |
struct | _cbor_decoder_context |
High-level decoding context. More... | |
void cbor_builder_array_start_callback | +( | +void * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 251 of file builder_callbacks.c.
+ +void cbor_builder_boolean_callback | +( | +void * | +, | +
+ | + | bool | ++ |
+ | ) | ++ |
Definition at line 345 of file builder_callbacks.c.
+ +void cbor_builder_byte_string_callback | +( | +void * | +, | +
+ | + | cbor_data | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 165 of file builder_callbacks.c.
+ +void cbor_builder_byte_string_start_callback | +( | +void * | +) | ++ |
Definition at line 197 of file builder_callbacks.c.
+ +void cbor_builder_float2_callback | +( | +void * | +, | +
+ | + | float | ++ |
+ | ) | ++ |
Definition at line 303 of file builder_callbacks.c.
+ +void cbor_builder_float4_callback | +( | +void * | +, | +
+ | + | float | ++ |
+ | ) | ++ |
Definition at line 311 of file builder_callbacks.c.
+ +void cbor_builder_float8_callback | +( | +void * | +, | +
+ | + | double | ++ |
+ | ) | ++ |
Definition at line 320 of file builder_callbacks.c.
+ +void cbor_builder_indef_array_start_callback | +( | +void * | +) | ++ |
Definition at line 263 of file builder_callbacks.c.
+ +void cbor_builder_indef_break_callback | +( | +void * | +) | ++ |
Definition at line 291 of file builder_callbacks.c.
+ +void cbor_builder_indef_map_start_callback | +( | +void * | +) | ++ |
Definition at line 271 of file builder_callbacks.c.
+ +void cbor_builder_map_start_callback | +( | +void * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 279 of file builder_callbacks.c.
+ +void cbor_builder_negint16_callback | +( | +void * | +, | +
+ | + | uint16_t | ++ |
+ | ) | ++ |
Definition at line 136 of file builder_callbacks.c.
+ +void cbor_builder_negint32_callback | +( | +void * | +, | +
+ | + | uint32_t | ++ |
+ | ) | ++ |
Definition at line 145 of file builder_callbacks.c.
+ +void cbor_builder_negint64_callback | +( | +void * | +, | +
+ | + | uint64_t | ++ |
+ | ) | ++ |
Definition at line 155 of file builder_callbacks.c.
+ +void cbor_builder_negint8_callback | +( | +void * | +, | +
+ | + | uint8_t | ++ |
+ | ) | ++ |
Definition at line 126 of file builder_callbacks.c.
+ +void cbor_builder_null_callback | +( | +void * | +) | ++ |
Definition at line 329 of file builder_callbacks.c.
+ +void cbor_builder_string_callback | +( | +void * | +, | +
+ | + | cbor_data | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 206 of file builder_callbacks.c.
+ +void cbor_builder_string_start_callback | +( | +void * | +) | ++ |
Definition at line 243 of file builder_callbacks.c.
+ +void cbor_builder_tag_callback | +( | +void * | +, | +
+ | + | uint64_t | ++ |
+ | ) | ++ |
Definition at line 353 of file builder_callbacks.c.
+ +void cbor_builder_uint16_callback | +( | +void * | +, | +
+ | + | uint16_t | ++ |
+ | ) | ++ |
Definition at line 96 of file builder_callbacks.c.
+ +void cbor_builder_uint32_callback | +( | +void * | +, | +
+ | + | uint32_t | ++ |
+ | ) | ++ |
Definition at line 106 of file builder_callbacks.c.
+ +void cbor_builder_uint64_callback | +( | +void * | +, | +
+ | + | uint64_t | ++ |
+ | ) | ++ |
Definition at line 116 of file builder_callbacks.c.
+ +void cbor_builder_uint8_callback | +( | +void * | +, | +
+ | + | uint8_t | ++ |
+ | ) | ++ |
Definition at line 86 of file builder_callbacks.c.
+ +void cbor_builder_undefined_callback | +( | +void * | +) | ++ |
Definition at line 337 of file builder_callbacks.c.
+ +
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
Go to the source code of this file.
++Functions | |
size_t | cbor_bytestring_length (const cbor_item_t *item) |
Returns the length of the binary data. More... | |
unsigned char * | cbor_bytestring_handle (const cbor_item_t *item) |
Get the handle to the binary data. More... | |
bool | cbor_bytestring_is_definite (const cbor_item_t *item) |
Is the byte string definite? More... | |
bool | cbor_bytestring_is_indefinite (const cbor_item_t *item) |
Is the byte string indefinite? More... | |
cbor_item_t * | cbor_new_definite_bytestring () |
Creates a new definite byte string. More... | |
cbor_item_t * | cbor_new_indefinite_bytestring () |
Creates a new indefinite byte string. More... | |
cbor_item_t * | cbor_build_bytestring (cbor_data handle, size_t length) |
Creates a new byte string and initializes it. More... | |
void | cbor_bytestring_set_handle (cbor_item_t *item, cbor_mutable_data CBOR_RESTRICT_POINTER data, size_t length) |
Set the handle to the binary data. More... | |
cbor_item_t ** | cbor_bytestring_chunks_handle (const cbor_item_t *item) |
Get the handle to the array of chunks. More... | |
size_t | cbor_bytestring_chunk_count (const cbor_item_t *item) |
Get the number of chunks this string consist of. More... | |
bool | cbor_bytestring_add_chunk (cbor_item_t *item, cbor_item_t *chunk) |
Appends a chunk to the bytestring. More... | |
cbor_item_t* cbor_build_bytestring | +( | +cbor_data | +handle, | +
+ | + | size_t | +length | +
+ | ) | ++ |
Creates a new byte string and initializes it.
+The handle
will be copied to a newly allocated block
handle | Block of binary data |
length | Length of data |
handle
. NULL
on malloc failure. Definition at line 63 of file bytestrings.c.
+ +bool cbor_bytestring_add_chunk | +( | +cbor_item_t * | +item, | +
+ | + | cbor_item_t * | +chunk | +
+ | ) | ++ |
Appends a chunk to the bytestring.
+Indefinite byte strings only.
+May realloc the chunk storage.
+item[borrow] | An indefinite byte string |
item[incref] | A definite byte string |
chunk
is not increased and the item
is left intact. Definition at line 95 of file bytestrings.c.
+ +size_t cbor_bytestring_chunk_count | +( | +const cbor_item_t * | +item | ) | ++ |
Get the number of chunks this string consist of.
+item[borrow] | A indefinite bytestring |
Definition at line 87 of file bytestrings.c.
+ +cbor_item_t** cbor_bytestring_chunks_handle | +( | +const cbor_item_t * | +item | ) | ++ |
Get the handle to the array of chunks.
+Manipulations with the memory block (e.g. sorting it) are allowed, but the validity and the number of chunks must be retained.
+item[borrow] | A indefinite byte string |
Definition at line 80 of file bytestrings.c.
+ +unsigned char* cbor_bytestring_handle | +( | +const cbor_item_t * | +item | ) | ++ |
Get the handle to the binary data.
+Definite items only. Modifying the data is allowed. In that case, the caller takes responsibility for the effect on items this item might be a part of
+item[borrow] | A definite byte string |
NULL
if no data have been assigned yet. Definition at line 18 of file bytestrings.c.
+ +bool cbor_bytestring_is_definite | +( | +const cbor_item_t * | +item | ) | ++ |
Is the byte string definite?
+item[borrow] | a byte string |
Definition at line 24 of file bytestrings.c.
+ +bool cbor_bytestring_is_indefinite | +( | +const cbor_item_t * | +item | ) | ++ |
Is the byte string indefinite?
+item[borrow] | a byte string |
Definition at line 30 of file bytestrings.c.
+ +size_t cbor_bytestring_length | +( | +const cbor_item_t * | +item | ) | ++ |
Returns the length of the binary data.
+For definite byte strings only
+item[borrow] | a definite bytestring |
Definition at line 12 of file bytestrings.c.
+ +void cbor_bytestring_set_handle | +( | +cbor_item_t * | +item, | +
+ | + | cbor_mutable_data CBOR_RESTRICT_POINTER | +data, | +
+ | + | size_t | +length | +
+ | ) | ++ |
Set the handle to the binary data.
+item[borrow] | A definite byte string |
data | The memory block. The caller gives up the ownership of the block. libcbor will deallocate it when appropriate using its free function |
length | Length of the data block |
Definition at line 72 of file bytestrings.c.
+ +cbor_item_t* cbor_new_definite_bytestring | +( | +) | ++ |
Creates a new definite byte string.
+The handle is initialized to NULL
and length to 0
NULL
on malloc failure. Definition at line 35 of file bytestrings.c.
+ +cbor_item_t* cbor_new_indefinite_bytestring | +( | +) | ++ |
Creates a new indefinite byte string.
+The chunks array is initialized to NULL
and chunkcount to 0
NULL
on malloc failure. Definition at line 46 of file bytestrings.c.
+ +
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
#include "cbor/common.h"
Go to the source code of this file.
++Functions | |
size_t | cbor_bytestring_length (const cbor_item_t *item) |
Returns the length of the binary data. More... | |
bool | cbor_bytestring_is_definite (const cbor_item_t *item) |
Is the byte string definite? More... | |
bool | cbor_bytestring_is_indefinite (const cbor_item_t *item) |
Is the byte string indefinite? More... | |
cbor_mutable_data | cbor_bytestring_handle (const cbor_item_t *item) |
Get the handle to the binary data. More... | |
void | cbor_bytestring_set_handle (cbor_item_t *item, cbor_mutable_data CBOR_RESTRICT_POINTER data, size_t length) |
Set the handle to the binary data. More... | |
cbor_item_t ** | cbor_bytestring_chunks_handle (const cbor_item_t *item) |
Get the handle to the array of chunks. More... | |
size_t | cbor_bytestring_chunk_count (const cbor_item_t *item) |
Get the number of chunks this string consist of. More... | |
bool | cbor_bytestring_add_chunk (cbor_item_t *item, cbor_item_t *chunk) |
Appends a chunk to the bytestring. More... | |
cbor_item_t * | cbor_new_definite_bytestring () |
Creates a new definite byte string. More... | |
cbor_item_t * | cbor_new_indefinite_bytestring () |
Creates a new indefinite byte string. More... | |
cbor_item_t * | cbor_build_bytestring (cbor_data handle, size_t length) |
Creates a new byte string and initializes it. More... | |
cbor_item_t* cbor_build_bytestring | +( | +cbor_data | +handle, | +
+ | + | size_t | +length | +
+ | ) | ++ |
Creates a new byte string and initializes it.
+The handle
will be copied to a newly allocated block
handle | Block of binary data |
length | Length of data |
handle
. NULL
on malloc failure. Definition at line 63 of file bytestrings.c.
+ +bool cbor_bytestring_add_chunk | +( | +cbor_item_t * | +item, | +
+ | + | cbor_item_t * | +chunk | +
+ | ) | ++ |
Appends a chunk to the bytestring.
+Indefinite byte strings only.
+May realloc the chunk storage.
+item[borrow] | An indefinite byte string |
item[incref] | A definite byte string |
chunk
is not increased and the item
is left intact. Definition at line 95 of file bytestrings.c.
+ +size_t cbor_bytestring_chunk_count | +( | +const cbor_item_t * | +item | ) | ++ |
Get the number of chunks this string consist of.
+item[borrow] | A indefinite bytestring |
Definition at line 87 of file bytestrings.c.
+ +cbor_item_t** cbor_bytestring_chunks_handle | +( | +const cbor_item_t * | +item | ) | ++ |
Get the handle to the array of chunks.
+Manipulations with the memory block (e.g. sorting it) are allowed, but the validity and the number of chunks must be retained.
+item[borrow] | A indefinite byte string |
Definition at line 80 of file bytestrings.c.
+ +cbor_mutable_data cbor_bytestring_handle | +( | +const cbor_item_t * | +item | ) | ++ |
Get the handle to the binary data.
+Definite items only. Modifying the data is allowed. In that case, the caller takes responsibility for the effect on items this item might be a part of
+item[borrow] | A definite byte string |
NULL
if no data have been assigned yet. Definition at line 18 of file bytestrings.c.
+ +bool cbor_bytestring_is_definite | +( | +const cbor_item_t * | +item | ) | ++ |
Is the byte string definite?
+item[borrow] | a byte string |
Definition at line 24 of file bytestrings.c.
+ +bool cbor_bytestring_is_indefinite | +( | +const cbor_item_t * | +item | ) | ++ |
Is the byte string indefinite?
+item[borrow] | a byte string |
Definition at line 30 of file bytestrings.c.
+ +size_t cbor_bytestring_length | +( | +const cbor_item_t * | +item | ) | ++ |
Returns the length of the binary data.
+For definite byte strings only
+item[borrow] | a definite bytestring |
Definition at line 12 of file bytestrings.c.
+ +void cbor_bytestring_set_handle | +( | +cbor_item_t * | +item, | +
+ | + | cbor_mutable_data CBOR_RESTRICT_POINTER | +data, | +
+ | + | size_t | +length | +
+ | ) | ++ |
Set the handle to the binary data.
+item[borrow] | A definite byte string |
data | The memory block. The caller gives up the ownership of the block. libcbor will deallocate it when appropriate using its free function |
length | Length of the data block |
Definition at line 72 of file bytestrings.c.
+ +cbor_item_t* cbor_new_definite_bytestring | +( | +) | ++ |
Creates a new definite byte string.
+The handle is initialized to NULL
and length to 0
NULL
on malloc failure. Definition at line 35 of file bytestrings.c.
+ +cbor_item_t* cbor_new_indefinite_bytestring | +( | +) | ++ |
Creates a new indefinite byte string.
+The chunks array is initialized to NULL
and chunkcount to 0
NULL
on malloc failure. Definition at line 46 of file bytestrings.c.
+ +
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
#include "callbacks.h"
Go to the source code of this file.
++Macros | |
#define | CBOR_DUMMY_CALLBACK { } |
+Variables | |
void uint16_t _val CBOR_DUMMY_CALLBACK void uint64_t _val CBOR_DUMMY_CALLBACK void uint16_t _val CBOR_DUMMY_CALLBACK void uint64_t _val CBOR_DUMMY_CALLBACK void cbor_data | _val |
#define CBOR_DUMMY_CALLBACK { } | +
Definition at line 10 of file callbacks.c.
+ +void uint16_t _val CBOR_DUMMY_CALLBACK void uint64_t _val CBOR_DUMMY_CALLBACK void uint16_t _val CBOR_DUMMY_CALLBACK void uint64_t _val CBOR_DUMMY_CALLBACK void cbor_data size_t _val2 CBOR_DUMMY_CALLBACK void cbor_null_byte_string_start_callback | +( | +void * | +_ctx | ) | ++ |
Dummy callback implementation - does nothing.
+ +void uint16_t _val CBOR_DUMMY_CALLBACK void uint64_t _val CBOR_DUMMY_CALLBACK void uint16_t _val CBOR_DUMMY_CALLBACK void uint64_t _val CBOR_DUMMY_CALLBACK void cbor_data size_t _val2 CBOR_DUMMY_CALLBACK void size_t _val CBOR_DUMMY_CALLBACK void size_t _val CBOR_DUMMY_CALLBACK void uint64_t _val CBOR_DUMMY_CALLBACK void cbor_null_float2_callback | +( | +void * | +_ctx, | +
+ | + | float | +_val | +
+ | ) | ++ |
Dummy callback implementation - does nothing.
+ +void uint16_t _val CBOR_DUMMY_CALLBACK void uint64_t _val CBOR_DUMMY_CALLBACK void uint16_t _val CBOR_DUMMY_CALLBACK void uint64_t _val CBOR_DUMMY_CALLBACK void cbor_data size_t _val2 CBOR_DUMMY_CALLBACK void size_t _val CBOR_DUMMY_CALLBACK void size_t _val CBOR_DUMMY_CALLBACK void uint64_t _val CBOR_DUMMY_CALLBACK void float _val CBOR_DUMMY_CALLBACK void cbor_null_float8_callback | +( | +void * | +_ctx, | +
+ | + | double | +_val | +
+ | ) | ++ |
Dummy callback implementation - does nothing.
+ +void uint16_t _val CBOR_DUMMY_CALLBACK void uint64_t _val CBOR_DUMMY_CALLBACK void uint16_t _val CBOR_DUMMY_CALLBACK void uint64_t _val CBOR_DUMMY_CALLBACK void cbor_data size_t _val2 CBOR_DUMMY_CALLBACK void size_t _val CBOR_DUMMY_CALLBACK void cbor_null_indef_array_start_callback | +( | +void * | +_ctx | ) | ++ |
Dummy callback implementation - does nothing.
+ +void uint16_t _val CBOR_DUMMY_CALLBACK void uint64_t _val CBOR_DUMMY_CALLBACK void uint16_t _val CBOR_DUMMY_CALLBACK void uint64_t _val CBOR_DUMMY_CALLBACK void cbor_data size_t _val2 CBOR_DUMMY_CALLBACK void size_t _val CBOR_DUMMY_CALLBACK void size_t _val CBOR_DUMMY_CALLBACK void uint64_t _val CBOR_DUMMY_CALLBACK void float _val CBOR_DUMMY_CALLBACK void bool _val CBOR_DUMMY_CALLBACK void cbor_null_indef_break_callback | +( | +void * | +_ctx | ) | +const | +
void uint16_t _val CBOR_DUMMY_CALLBACK void uint64_t _val CBOR_DUMMY_CALLBACK void uint16_t _val CBOR_DUMMY_CALLBACK void uint64_t _val CBOR_DUMMY_CALLBACK void cbor_data size_t _val2 CBOR_DUMMY_CALLBACK void size_t _val CBOR_DUMMY_CALLBACK void size_t _val CBOR_DUMMY_CALLBACK void cbor_null_indef_map_start_callback | +( | +void * | +_ctx | ) | ++ |
Dummy callback implementation - does nothing.
+ +void uint16_t _val CBOR_DUMMY_CALLBACK void uint64_t _val CBOR_DUMMY_CALLBACK void uint16_t _val CBOR_DUMMY_CALLBACK void cbor_null_negint32_callback | +( | +void * | +_ctx, | +
+ | + | uint32_t | +_val | +
+ | ) | ++ |
Dummy callback implementation - does nothing.
+ +void uint16_t _val CBOR_DUMMY_CALLBACK void uint64_t _val CBOR_DUMMY_CALLBACK void cbor_null_negint8_callback | +( | +void * | +_ctx, | +
+ | + | uint8_t | +_val | +
+ | ) | ++ |
Dummy callback implementation - does nothing.
+ +void uint16_t _val CBOR_DUMMY_CALLBACK void uint64_t _val CBOR_DUMMY_CALLBACK void uint16_t _val CBOR_DUMMY_CALLBACK void uint64_t _val CBOR_DUMMY_CALLBACK void cbor_null_string_callback | +( | +void * | +_ctx, | +
+ | + | cbor_data | +_val, | +
+ | + | size_t | +_val2 | +
+ | ) | ++ |
Dummy callback implementation - does nothing.
+ +void uint16_t _val CBOR_DUMMY_CALLBACK void cbor_null_uint32_callback | +( | +void * | +_ctx, | +
+ | + | uint32_t | +_val | +
+ | ) | ++ |
Dummy callback implementation - does nothing.
+ +void cbor_null_uint8_callback | +( | +void * | +_ctx, | +
+ | + | uint8_t | +_val | +
+ | ) | ++ |
Dummy callback implementation - does nothing.
+ +void uint16_t _val CBOR_DUMMY_CALLBACK void uint64_t _val CBOR_DUMMY_CALLBACK void uint16_t _val CBOR_DUMMY_CALLBACK void uint64_t _val CBOR_DUMMY_CALLBACK void cbor_data _val | +
Definition at line 32 of file callbacks.c.
+ +
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
#include "cbor/common.h"
Go to the source code of this file.
++Data Structures | |
struct | cbor_callbacks |
Callback bundle – passed to the decoder. More... | |
+Typedefs | |
typedef void(* | cbor_int8_callback) (void *, uint8_t) |
Callback prototype. More... | |
typedef void(* | cbor_int16_callback) (void *, uint16_t) |
Callback prototype. More... | |
typedef void(* | cbor_int32_callback) (void *, uint32_t) |
Callback prototype. More... | |
typedef void(* | cbor_int64_callback) (void *, uint64_t) |
Callback prototype. More... | |
typedef void(* | cbor_simple_callback) (void *) |
Callback prototype. More... | |
typedef void(* | cbor_string_callback) (void *, cbor_data, size_t) |
Callback prototype. More... | |
typedef void(* | cbor_collection_callback) (void *, size_t) |
Callback prototype. More... | |
typedef void(* | cbor_float_callback) (void *, float) |
Callback prototype. More... | |
typedef void(* | cbor_double_callback) (void *, double) |
Callback prototype. More... | |
typedef void(* | cbor_bool_callback) (void *, bool) |
Callback prototype. More... | |
+Functions | |
void | cbor_null_uint8_callback (void *, uint8_t) |
Dummy callback implementation - does nothing. More... | |
void | cbor_null_uint16_callback (void *, uint16_t) |
Dummy callback implementation - does nothing. More... | |
void | cbor_null_uint32_callback (void *, uint32_t) |
Dummy callback implementation - does nothing. More... | |
void | cbor_null_uint64_callback (void *, uint64_t) |
Dummy callback implementation - does nothing. More... | |
void | cbor_null_negint8_callback (void *, uint8_t) |
Dummy callback implementation - does nothing. More... | |
void | cbor_null_negint16_callback (void *, uint16_t) |
Dummy callback implementation - does nothing. More... | |
void | cbor_null_negint32_callback (void *, uint32_t) |
Dummy callback implementation - does nothing. More... | |
void | cbor_null_negint64_callback (void *, uint64_t) |
Dummy callback implementation - does nothing. More... | |
void | cbor_null_string_callback (void *, cbor_data, size_t) |
Dummy callback implementation - does nothing. More... | |
void | cbor_null_string_start_callback (void *) |
Dummy callback implementation - does nothing. More... | |
void | cbor_null_byte_string_callback (void *, cbor_data, size_t) |
Dummy callback implementation - does nothing. More... | |
void | cbor_null_byte_string_start_callback (void *) |
Dummy callback implementation - does nothing. More... | |
void | cbor_null_array_start_callback (void *, size_t) |
Dummy callback implementation - does nothing. More... | |
void | cbor_null_indef_array_start_callback (void *) |
Dummy callback implementation - does nothing. More... | |
void | cbor_null_map_start_callback (void *, size_t) |
Dummy callback implementation - does nothing. More... | |
void | cbor_null_indef_map_start_callback (void *) |
Dummy callback implementation - does nothing. More... | |
void | cbor_null_tag_callback (void *, uint64_t) |
Dummy callback implementation - does nothing. More... | |
void | cbor_null_float2_callback (void *, float) |
Dummy callback implementation - does nothing. More... | |
void | cbor_null_float4_callback (void *, float) |
Dummy callback implementation - does nothing. More... | |
void | cbor_null_float8_callback (void *, double) |
Dummy callback implementation - does nothing. More... | |
void | cbor_null_null_callback (void *) |
Dummy callback implementation - does nothing. More... | |
void | cbor_null_undefined_callback (void *) |
Dummy callback implementation - does nothing. More... | |
void | cbor_null_boolean_callback (void *, bool) |
Dummy callback implementation - does nothing. More... | |
void | cbor_null_indef_break_callback (void *) |
Dummy callback implementation - does nothing. More... | |
+Variables | |
const struct cbor_callbacks | cbor_empty_callbacks |
Dummy callback bundle - does nothing. More... | |
typedef void(* cbor_bool_callback) (void *, bool) | +
Callback prototype.
+ +Definition at line 45 of file callbacks.h.
+ +typedef void(* cbor_collection_callback) (void *, size_t) | +
Callback prototype.
+ +Definition at line 36 of file callbacks.h.
+ +typedef void(* cbor_double_callback) (void *, double) | +
Callback prototype.
+ +Definition at line 42 of file callbacks.h.
+ +typedef void(* cbor_float_callback) (void *, float) | +
Callback prototype.
+ +Definition at line 39 of file callbacks.h.
+ +typedef void(* cbor_int16_callback) (void *, uint16_t) | +
Callback prototype.
+ +Definition at line 21 of file callbacks.h.
+ +typedef void(* cbor_int32_callback) (void *, uint32_t) | +
Callback prototype.
+ +Definition at line 24 of file callbacks.h.
+ +typedef void(* cbor_int64_callback) (void *, uint64_t) | +
Callback prototype.
+ +Definition at line 27 of file callbacks.h.
+ +typedef void(* cbor_int8_callback) (void *, uint8_t) | +
Callback prototype.
+ +Definition at line 18 of file callbacks.h.
+ +typedef void(* cbor_simple_callback) (void *) | +
Callback prototype.
+ +Definition at line 30 of file callbacks.h.
+ +typedef void(* cbor_string_callback) (void *, cbor_data, size_t) | +
Callback prototype.
+ +Definition at line 33 of file callbacks.h.
+ +void cbor_null_array_start_callback | +( | +void * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Dummy callback implementation - does nothing.
+ +void cbor_null_boolean_callback | +( | +void * | +, | +
+ | + | bool | ++ |
+ | ) | ++ |
Dummy callback implementation - does nothing.
+ +void cbor_null_byte_string_callback | +( | +void * | +, | +
+ | + | cbor_data | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Dummy callback implementation - does nothing.
+ +void cbor_null_byte_string_start_callback | +( | +void * | +) | ++ |
Dummy callback implementation - does nothing.
+ +void cbor_null_float2_callback | +( | +void * | +, | +
+ | + | float | ++ |
+ | ) | ++ |
Dummy callback implementation - does nothing.
+ +void cbor_null_float4_callback | +( | +void * | +, | +
+ | + | float | ++ |
+ | ) | ++ |
Dummy callback implementation - does nothing.
+ +void cbor_null_float8_callback | +( | +void * | +, | +
+ | + | double | ++ |
+ | ) | ++ |
Dummy callback implementation - does nothing.
+ +void cbor_null_indef_array_start_callback | +( | +void * | +) | ++ |
Dummy callback implementation - does nothing.
+ +void cbor_null_indef_break_callback | +( | +void * | +) | ++ |
Dummy callback implementation - does nothing.
+ +void cbor_null_indef_map_start_callback | +( | +void * | +) | ++ |
Dummy callback implementation - does nothing.
+ +void cbor_null_map_start_callback | +( | +void * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Dummy callback implementation - does nothing.
+ +void cbor_null_negint16_callback | +( | +void * | +, | +
+ | + | uint16_t | ++ |
+ | ) | ++ |
Dummy callback implementation - does nothing.
+ +void cbor_null_negint32_callback | +( | +void * | +, | +
+ | + | uint32_t | ++ |
+ | ) | ++ |
Dummy callback implementation - does nothing.
+ +void cbor_null_negint64_callback | +( | +void * | +, | +
+ | + | uint64_t | ++ |
+ | ) | ++ |
Dummy callback implementation - does nothing.
+ +void cbor_null_negint8_callback | +( | +void * | +, | +
+ | + | uint8_t | ++ |
+ | ) | ++ |
Dummy callback implementation - does nothing.
+ +void cbor_null_null_callback | +( | +void * | +) | ++ |
Dummy callback implementation - does nothing.
+ +void cbor_null_string_callback | +( | +void * | +, | +
+ | + | cbor_data | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Dummy callback implementation - does nothing.
+ +void cbor_null_string_start_callback | +( | +void * | +) | ++ |
Dummy callback implementation - does nothing.
+ +void cbor_null_tag_callback | +( | +void * | +, | +
+ | + | uint64_t | ++ |
+ | ) | ++ |
Dummy callback implementation - does nothing.
+ +void cbor_null_uint16_callback | +( | +void * | +, | +
+ | + | uint16_t | ++ |
+ | ) | ++ |
Dummy callback implementation - does nothing.
+ +void cbor_null_uint32_callback | +( | +void * | +, | +
+ | + | uint32_t | ++ |
+ | ) | ++ |
Dummy callback implementation - does nothing.
+ +void cbor_null_uint64_callback | +( | +void * | +, | +
+ | + | uint64_t | ++ |
+ | ) | ++ |
Dummy callback implementation - does nothing.
+ +void cbor_null_uint8_callback | +( | +void * | +, | +
+ | + | uint8_t | ++ |
+ | ) | ++ |
Dummy callback implementation - does nothing.
+ +void cbor_null_undefined_callback | +( | +void * | +) | ++ |
Dummy callback implementation - does nothing.
+ +const struct cbor_callbacks cbor_empty_callbacks | +
Dummy callback bundle - does nothing.
+ +
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
#include "cbor.h"
#include "cbor/internal/builder_callbacks.h"
#include "cbor/internal/loaders.h"
Go to the source code of this file.
++Functions | |
cbor_item_t * | cbor_load (cbor_data source, size_t source_size, struct cbor_load_result *result) |
Loads data item from a buffer. More... | |
cbor_item_t * | cbor_copy (cbor_item_t *item) |
Deep copy of an item. More... | |
cbor_item_t* cbor_copy | +( | +cbor_item_t * | +item | ) | ++ |
cbor_item_t* cbor_load | +( | +cbor_data | +source, | +
+ | + | size_t | +source_size, | +
+ | + | struct cbor_load_result * | +result | +
+ | ) | ++ |
Loads data item from a buffer.
+source | The buffer |
source_size | |
result[out] | Result indicator. CBOR_ERR_NONE on success |
NULL
on failure. In that case, result
contains location and description of the error.
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
#include "cbor/data.h"
#include "cbor/common.h"
#include "cbor/arrays.h"
#include "cbor/bytestrings.h"
#include "cbor/floats_ctrls.h"
#include "cbor/ints.h"
#include "cbor/maps.h"
#include "cbor/strings.h"
#include "cbor/tags.h"
#include "cbor/encoding.h"
#include "cbor/serialization.h"
#include "cbor/callbacks.h"
#include "cbor/streaming.h"
Go to the source code of this file.
++Functions | |
cbor_item_t * | cbor_load (cbor_data source, size_t source_size, struct cbor_load_result *result) |
Loads data item from a buffer. More... | |
cbor_item_t * | cbor_copy (cbor_item_t *item) |
Deep copy of an item. More... | |
cbor_item_t* cbor_copy | +( | +cbor_item_t * | +item | ) | ++ |
cbor_item_t* cbor_load | +( | +cbor_data | +source, | +
+ | + | size_t | +source_size, | +
+ | + | struct cbor_load_result * | +result | +
+ | ) | ++ |
Loads data item from a buffer.
+source | The buffer |
source_size | |
result[out] | Result indicator. CBOR_ERR_NONE on success |
NULL
on failure. In that case, result
contains location and description of the error.
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
#include "cbor/common.h"
#include "arrays.h"
#include "bytestrings.h"
#include "data.h"
#include "floats_ctrls.h"
#include "ints.h"
#include "maps.h"
#include "strings.h"
#include "tags.h"
Go to the source code of this file.
++Functions | |
bool | cbor_isa_uint (const cbor_item_t *item) |
Does the item have the appropriate major type? More... | |
bool | cbor_isa_negint (const cbor_item_t *item) |
Does the item have the appropriate major type? More... | |
bool | cbor_isa_bytestring (const cbor_item_t *item) |
Does the item have the appropriate major type? More... | |
bool | cbor_isa_string (const cbor_item_t *item) |
Does the item have the appropriate major type? More... | |
bool | cbor_isa_array (const cbor_item_t *item) |
Does the item have the appropriate major type? More... | |
bool | cbor_isa_map (const cbor_item_t *item) |
Does the item have the appropriate major type? More... | |
bool | cbor_isa_tag (const cbor_item_t *item) |
Does the item have the appropriate major type? More... | |
bool | cbor_isa_float_ctrl (const cbor_item_t *item) |
Does the item have the appropriate major type? More... | |
cbor_type | cbor_typeof (const cbor_item_t *item) |
Get the type of the item. More... | |
bool | cbor_is_int (const cbor_item_t *item) |
Is the item an integer, either positive or negative? More... | |
bool | cbor_is_bool (const cbor_item_t *item) |
Is the item an a boolean? More... | |
bool | cbor_is_null (const cbor_item_t *item) |
Does this item represent null More... | |
bool | cbor_is_undef (const cbor_item_t *item) |
Does this item represent undefined More... | |
bool | cbor_is_float (const cbor_item_t *item) |
Is the item an a floating point number? More... | |
cbor_item_t * | cbor_incref (cbor_item_t *item) |
Increases the reference count by one. More... | |
void | cbor_decref (cbor_item_t **item_ref) |
Decreases the reference count by one, deallocating the item if needed. More... | |
void | cbor_intermediate_decref (cbor_item_t *item) |
Decreases the reference count by one, deallocating the item if needed. More... | |
size_t | cbor_refcount (const cbor_item_t *item) |
Get the reference count. More... | |
cbor_item_t * | cbor_move (cbor_item_t *item) |
Provides CPP-like move construct. More... | |
void cbor_decref | +( | +cbor_item_t ** | +item | ) | ++ |
Decreases the reference count by one, deallocating the item if needed.
+In case the item is deallocated, the reference count of any dependent items is adjusted accordingly in a recursive manner.
+item[take] | the item. Set to NULL if deallocated |
cbor_item_t* cbor_incref | +( | +cbor_item_t * | +item | ) | ++ |
void cbor_intermediate_decref | +( | +cbor_item_t * | +item | ) | ++ |
Decreases the reference count by one, deallocating the item if needed.
+Convenience wrapper for cbor_decref when its set-to-null behavior is not needed
+item[take] | the item |
bool cbor_is_bool | +( | +const cbor_item_t * | +item | ) | ++ |
bool cbor_is_float | +( | +const cbor_item_t * | +item | ) | ++ |
bool cbor_is_int | +( | +const cbor_item_t * | +item | ) | ++ |
bool cbor_is_null | +( | +const cbor_item_t * | +item | ) | ++ |
Does this item represent null
embed:rst:leading-asterisk +* .. warning:: This is in no way related to the value of the pointer. Passing a null pointer will most likely result in a crash. +*
item[borrow] | the item |
bool cbor_is_undef | +( | +const cbor_item_t * | +item | ) | ++ |
bool cbor_isa_array | +( | +const cbor_item_t * | +item | ) | ++ |
Does the item have the appropriate major type?
+item[borrow] | the item |
bool cbor_isa_bytestring | +( | +const cbor_item_t * | +item | ) | ++ |
Does the item have the appropriate major type?
+item[borrow] | the item |
bool cbor_isa_float_ctrl | +( | +const cbor_item_t * | +item | ) | ++ |
Does the item have the appropriate major type?
+item[borrow] | the item |
bool cbor_isa_map | +( | +const cbor_item_t * | +item | ) | ++ |
Does the item have the appropriate major type?
+item[borrow] | the item |
bool cbor_isa_negint | +( | +const cbor_item_t * | +item | ) | ++ |
Does the item have the appropriate major type?
+item[borrow] | the item |
bool cbor_isa_string | +( | +const cbor_item_t * | +item | ) | ++ |
Does the item have the appropriate major type?
+item[borrow] | the item |
bool cbor_isa_tag | +( | +const cbor_item_t * | +item | ) | ++ |
Does the item have the appropriate major type?
+item[borrow] | the item |
bool cbor_isa_uint | +( | +const cbor_item_t * | +item | ) | ++ |
Does the item have the appropriate major type?
+item[borrow] | the item |
cbor_item_t* cbor_move | +( | +cbor_item_t * | +item | ) | ++ |
Provides CPP-like move construct.
+Decreases the reference count by one, but does not deallocate the item even if its refcount reaches zero. This is useful for passing intermediate values to functions that increase reference count. Should only be used with functions that incref
their arguments.
embed:rst:leading-asterisk +* .. warning:: If the item is moved without correctly increasing the reference count afterwards, the memory will be leaked. +*
item[take] | the item |
size_t cbor_refcount | +( | +const cbor_item_t * | +item | ) | ++ |
cbor_type cbor_typeof | +( | +const cbor_item_t * | +item | ) | ++ |
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
#include <stdlib.h>
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include <assert.h>
#include "data.h"
#include "cbor/configuration.h"
Go to the source code of this file.
++Macros | |
#define | CBOR_RESTRICT_POINTER CBOR_RESTRICT_SPECIFIER |
#define | CBOR_VERSION TO_STR(CBOR_MAJOR_VERSION) "." TO_STR(CBOR_MINOR_VERSION) "." TO_STR(CBOR_PATCH_VERSION) |
#define | CBOR_HEX_VERSION ((CBOR_MAJOR_VERSION << 16) | (CBOR_MINOR_VERSION << 8) | CBOR_PATCH_VERSION) |
#define | debug_print(fmt, ...) do {} while (0) |
#define | TO_STR_(x) #x |
#define | TO_STR(x) TO_STR_(x) /* enables proper double expansion */ |
#define | _CBOR_MALLOC _cbor_malloc |
#define | _CBOR_REALLOC _cbor_realloc |
#define | _CBOR_FREE _cbor_free |
+Typedefs | |
typedef void *(* | _cbor_malloc_t) (size_t) |
typedef void *(* | _cbor_realloc_t) (void *, size_t) |
typedef void(* | _cbor_free_t) (void *) |
+Functions | |
void | cbor_set_allocs (_cbor_malloc_t custom_malloc, _cbor_realloc_t custom_realloc, _cbor_free_t custom_free) |
Sets the memory management routines to use. More... | |
cbor_type | cbor_typeof (const cbor_item_t *item) |
Get the type of the item. More... | |
bool | cbor_isa_uint (const cbor_item_t *item) |
Does the item have the appropriate major type? More... | |
bool | cbor_isa_negint (const cbor_item_t *item) |
Does the item have the appropriate major type? More... | |
bool | cbor_isa_bytestring (const cbor_item_t *item) |
Does the item have the appropriate major type? More... | |
bool | cbor_isa_string (const cbor_item_t *item) |
Does the item have the appropriate major type? More... | |
bool | cbor_isa_array (const cbor_item_t *item) |
Does the item have the appropriate major type? More... | |
bool | cbor_isa_map (const cbor_item_t *item) |
Does the item have the appropriate major type? More... | |
bool | cbor_isa_tag (const cbor_item_t *item) |
Does the item have the appropriate major type? More... | |
bool | cbor_isa_float_ctrl (const cbor_item_t *item) |
Does the item have the appropriate major type? More... | |
bool | cbor_is_int (const cbor_item_t *item) |
Is the item an integer, either positive or negative? More... | |
bool | cbor_is_float (const cbor_item_t *item) |
Is the item an a floating point number? More... | |
bool | cbor_is_bool (const cbor_item_t *item) |
Is the item an a boolean? More... | |
bool | cbor_is_null (const cbor_item_t *item) |
Does this item represent null More... | |
bool | cbor_is_undef (const cbor_item_t *item) |
Does this item represent undefined More... | |
cbor_item_t * | cbor_incref (cbor_item_t *item) |
Increases the reference count by one. More... | |
void | cbor_decref (cbor_item_t **item) |
Decreases the reference count by one, deallocating the item if needed. More... | |
void | cbor_intermediate_decref (cbor_item_t *item) |
Decreases the reference count by one, deallocating the item if needed. More... | |
size_t | cbor_refcount (const cbor_item_t *item) |
Get the reference count. More... | |
cbor_item_t * | cbor_move (cbor_item_t *item) |
Provides CPP-like move construct. More... | |
+Variables | |
_cbor_malloc_t | _cbor_malloc |
_cbor_realloc_t | _cbor_realloc |
_cbor_free_t | _cbor_free |
#define _CBOR_FREE _cbor_free | +
#define _CBOR_MALLOC _cbor_malloc | +
#define _CBOR_REALLOC _cbor_realloc | +
#define CBOR_HEX_VERSION ((CBOR_MAJOR_VERSION << 16) | (CBOR_MINOR_VERSION << 8) | CBOR_PATCH_VERSION) | +
#define CBOR_RESTRICT_POINTER CBOR_RESTRICT_SPECIFIER | +
#define debug_print | +( | ++ | fmt, | +
+ | + | + | ... | +
+ | ) | +do {} while (0) | +
#define TO_STR | +( | ++ | x | ) | +TO_STR_(x) /* enables proper double expansion */ | +
typedef void(* _cbor_free_t) (void *) | +
typedef void*(* _cbor_malloc_t) (size_t) | +
typedef void*(* _cbor_realloc_t) (void *, size_t) | +
void cbor_decref | +( | +cbor_item_t ** | +item | ) | ++ |
Decreases the reference count by one, deallocating the item if needed.
+In case the item is deallocated, the reference count of any dependent items is adjusted accordingly in a recursive manner.
+item[take] | the item. Set to NULL if deallocated |
cbor_item_t* cbor_incref | +( | +cbor_item_t * | +item | ) | ++ |
void cbor_intermediate_decref | +( | +cbor_item_t * | +item | ) | ++ |
Decreases the reference count by one, deallocating the item if needed.
+Convenience wrapper for cbor_decref when its set-to-null behavior is not needed
+item[take] | the item |
bool cbor_is_bool | +( | +const cbor_item_t * | +item | ) | ++ |
bool cbor_is_float | +( | +const cbor_item_t * | +item | ) | ++ |
bool cbor_is_int | +( | +const cbor_item_t * | +item | ) | ++ |
bool cbor_is_null | +( | +const cbor_item_t * | +item | ) | ++ |
Does this item represent null
embed:rst:leading-asterisk +* .. warning:: This is in no way related to the value of the pointer. Passing a null pointer will most likely result in a crash. +*
item[borrow] | the item |
bool cbor_is_undef | +( | +const cbor_item_t * | +item | ) | ++ |
bool cbor_isa_array | +( | +const cbor_item_t * | +item | ) | ++ |
Does the item have the appropriate major type?
+item[borrow] | the item |
bool cbor_isa_bytestring | +( | +const cbor_item_t * | +item | ) | ++ |
Does the item have the appropriate major type?
+item[borrow] | the item |
bool cbor_isa_float_ctrl | +( | +const cbor_item_t * | +item | ) | ++ |
Does the item have the appropriate major type?
+item[borrow] | the item |
bool cbor_isa_map | +( | +const cbor_item_t * | +item | ) | ++ |
Does the item have the appropriate major type?
+item[borrow] | the item |
bool cbor_isa_negint | +( | +const cbor_item_t * | +item | ) | ++ |
Does the item have the appropriate major type?
+item[borrow] | the item |
bool cbor_isa_string | +( | +const cbor_item_t * | +item | ) | ++ |
Does the item have the appropriate major type?
+item[borrow] | the item |
bool cbor_isa_tag | +( | +const cbor_item_t * | +item | ) | ++ |
Does the item have the appropriate major type?
+item[borrow] | the item |
bool cbor_isa_uint | +( | +const cbor_item_t * | +item | ) | ++ |
Does the item have the appropriate major type?
+item[borrow] | the item |
cbor_item_t* cbor_move | +( | +cbor_item_t * | +item | ) | ++ |
Provides CPP-like move construct.
+Decreases the reference count by one, but does not deallocate the item even if its refcount reaches zero. This is useful for passing intermediate values to functions that increase reference count. Should only be used with functions that incref
their arguments.
embed:rst:leading-asterisk +* .. warning:: If the item is moved without correctly increasing the reference count afterwards, the memory will be leaked. +*
item[take] | the item |
size_t cbor_refcount | +( | +const cbor_item_t * | +item | ) | ++ |
void cbor_set_allocs | +( | +_cbor_malloc_t | +custom_malloc, | +
+ | + | _cbor_realloc_t | +custom_realloc, | +
+ | + | _cbor_free_t | +custom_free | +
+ | ) | ++ |
Sets the memory management routines to use.
+Only available when CBOR_CUSTOM_ALLOC is truthy
+embed:rst:leading-asterisk +* .. warning:: This function modifies the global state and should therefore be used accordingly. Changing the memory handlers while allocated items exist will result in a ``free``/``malloc`` mismatch. This function is not thread safe with respect to both itself and all the other *libcbor* functions that work with the heap. +* .. note:: `realloc` implementation must correctly support `NULL` reallocation +*
custom_malloc | malloc implementation |
custom_realloc | realloc implementation |
custom_free | free implementation |
Definition at line 14 of file allocators.c.
+ +cbor_type cbor_typeof | +( | +const cbor_item_t * | +item | ) | ++ |
_cbor_free_t _cbor_free | +
Definition at line 12 of file allocators.c.
+ +_cbor_malloc_t _cbor_malloc | +
Definition at line 10 of file allocators.c.
+ +_cbor_realloc_t _cbor_realloc | +
Definition at line 11 of file allocators.c.
+ +
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
#include <stdlib.h>
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
Go to the source code of this file.
++Data Structures | |
struct | _cbor_int_metadata |
Integers specific metadata. More... | |
struct | _cbor_bytestring_metadata |
Bytestrings specific metadata. More... | |
struct | _cbor_string_metadata |
Strings specific metadata. More... | |
struct | _cbor_array_metadata |
Arrays specific metadata. More... | |
struct | _cbor_map_metadata |
Maps specific metadata. More... | |
struct | _cbor_tag_metadata |
Arrays specific metadata. More... | |
struct | _cbor_float_ctrl_metadata |
Floats specific metadata - includes CTRL values. More... | |
union | _cbor_float_helper |
Raw memory casts helper. More... | |
union | _cbor_double_helper |
Raw memory casts helper. More... | |
union | cbor_item_metadata |
Union of metadata across all possible types - discriminated in cbor_item_t. More... | |
struct | cbor_item_t |
The item handle. More... | |
struct | cbor_indefinite_string_data |
Defines cbor_item_t::data structure for indefinite strings and bytestrings. More... | |
struct | cbor_error |
High-level decoding error. More... | |
struct | cbor_pair |
Simple pair of items for use in maps. More... | |
struct | cbor_load_result |
High-level decoding result. More... | |
struct | cbor_decoder_result |
Streaming decoder result. More... | |
+Typedefs | |
typedef const unsigned char * | cbor_data |
typedef unsigned char * | cbor_mutable_data |
typedef enum cbor_type | cbor_type |
Specifies the Major type of cbor_item_t. More... | |
typedef struct cbor_item_t | cbor_item_t |
The item handle. More... | |
+Enumerations | |
enum | cbor_type { + CBOR_TYPE_UINT, +CBOR_TYPE_NEGINT, +CBOR_TYPE_BYTESTRING, +CBOR_TYPE_STRING, + + CBOR_TYPE_ARRAY, +CBOR_TYPE_MAP, +CBOR_TYPE_TAG, +CBOR_TYPE_FLOAT_CTRL + + } |
Specifies the Major type of cbor_item_t. More... | |
enum | cbor_error_code { + CBOR_ERR_NONE, +CBOR_ERR_NOTENOUGHDATA, +CBOR_ERR_NODATA, +CBOR_ERR_MALFORMATED, + + CBOR_ERR_MEMERROR, +CBOR_ERR_SYNTAXERROR + + } |
Possible decoding errors. More... | |
enum | cbor_int_width { CBOR_INT_8, +CBOR_INT_16, +CBOR_INT_32, +CBOR_INT_64 + } |
Possible widths of CBOR_TYPE_UINT items. More... | |
enum | cbor_float_width { CBOR_FLOAT_0, +CBOR_FLOAT_16, +CBOR_FLOAT_32, +CBOR_FLOAT_64 + } |
Possible widths of CBOR_TYPE_FLOAT_CTRL items. More... | |
enum | _cbor_dst_metadata { _CBOR_METADATA_DEFINITE, +_CBOR_METADATA_INDEFINITE + } |
Metadata for dynamically sized types. More... | |
enum | _cbor_ctrl { + CBOR_CTRL_NONE = 0, +CBOR_CTRL_FALSE = 20, +CBOR_CTRL_TRUE = 21, +CBOR_CTRL_NULL = 22, + + CBOR_CTRL_UNDEF = 23 + + } |
Semantic mapping for CTRL simple values. More... | |
enum | cbor_decoder_status { CBOR_DECODER_FINISHED, +CBOR_DECODER_NEDATA, +CBOR_DECODER_EBUFFER, +CBOR_DECODER_ERROR + } |
Streaming decoder result - status. More... | |
typedef struct cbor_item_t cbor_item_t | +
The item handle.
+ +typedef unsigned char* cbor_mutable_data | +
Specifies the Major type of cbor_item_t.
+ +enum _cbor_ctrl | +
enum _cbor_dst_metadata | +
enum cbor_decoder_status | +
enum cbor_error_code | +
enum cbor_float_width | +
Possible widths of CBOR_TYPE_FLOAT_CTRL items.
+Enumerator | |
---|---|
CBOR_FLOAT_0 | Internal use - ctrl and special values. + |
CBOR_FLOAT_16 | Half float. + |
CBOR_FLOAT_32 | Single float. + |
CBOR_FLOAT_64 | Double. + |
enum cbor_int_width | +
Possible widths of CBOR_TYPE_UINT items.
+Enumerator | |
---|---|
CBOR_INT_8 | |
CBOR_INT_16 | |
CBOR_INT_32 | |
CBOR_INT_64 |
enum cbor_type | +
Specifies the Major type of cbor_item_t.
+Enumerator | |
---|---|
CBOR_TYPE_UINT | 0 - positive integers + |
CBOR_TYPE_NEGINT | 1 - negative integers + |
CBOR_TYPE_BYTESTRING | 2 - byte strings + |
CBOR_TYPE_STRING | 3 - strings + |
CBOR_TYPE_ARRAY | 4 - arrays + |
CBOR_TYPE_MAP | 5 - maps + |
CBOR_TYPE_TAG | 6 - tags + |
CBOR_TYPE_FLOAT_CTRL | 7 - decimals and special values (true, false, nil, ...) + |
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+Files | |
file | builder_callbacks.c [code] |
file | builder_callbacks.h [code] |
file | encoders.c [code] |
file | encoders.h [code] |
file | loaders.c [code] |
file | loaders.h [code] |
file | memory_utils.c [code] |
file | memory_utils.h [code] |
file | stack.c [code] |
file | stack.h [code] |
file | unicode.c [code] |
file | unicode.h [code] |
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+Directories | |
directory | cbor |
+Files | |
file | allocators.c [code] |
file | cbor.c [code] |
file | cbor.h [code] |
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+Directories | |
directory | internal |
+Files | |
file | arrays.c [code] |
file | arrays.h [code] |
file | bytestrings.c [code] |
file | bytestrings.h [code] |
file | callbacks.c [code] |
file | callbacks.h [code] |
file | common.c [code] |
file | common.h [code] |
file | data.h [code] |
file | encoding.c [code] |
file | encoding.h [code] |
file | floats_ctrls.c [code] |
file | floats_ctrls.h [code] |
file | ints.c [code] |
file | ints.h [code] |
file | maps.c [code] |
file | maps.h [code] |
file | serialization.c [code] |
file | serialization.h [code] |
file | streaming.c [code] |
file | streaming.h [code] |
file | strings.c [code] |
file | strings.h [code] |
file | tags.c [code] |
file | tags.h [code] |
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
#include "encoders.h"
Go to the source code of this file.
++Functions | |
size_t | _cbor_encode_uint8 (uint8_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset) |
size_t | _cbor_encode_uint16 (uint16_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset) |
size_t | _cbor_encode_uint32 (uint32_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset) |
size_t | _cbor_encode_uint64 (uint64_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset) |
size_t | _cbor_encode_uint (uint64_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset) |
size_t _cbor_encode_uint | +( | +uint64_t | +value, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size, | +
+ | + | uint8_t | +offset | +
+ | ) | ++ |
Definition at line 102 of file encoders.c.
+ +size_t _cbor_encode_uint16 | +( | +uint16_t | +value, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size, | +
+ | + | uint8_t | +offset | +
+ | ) | ++ |
Definition at line 31 of file encoders.c.
+ +size_t _cbor_encode_uint32 | +( | +uint32_t | +value, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size, | +
+ | + | uint8_t | +offset | +
+ | ) | ++ |
Definition at line 52 of file encoders.c.
+ +size_t _cbor_encode_uint64 | +( | +uint64_t | +value, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size, | +
+ | + | uint8_t | +offset | +
+ | ) | ++ |
Definition at line 75 of file encoders.c.
+ +size_t _cbor_encode_uint8 | +( | +uint8_t | +value, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size, | +
+ | + | uint8_t | +offset | +
+ | ) | ++ |
Definition at line 14 of file encoders.c.
+ +
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
#include "cbor/common.h"
Go to the source code of this file.
++Functions | |
size_t | _cbor_encode_uint8 (uint8_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset) |
size_t | _cbor_encode_uint16 (uint16_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset) |
size_t | _cbor_encode_uint32 (uint32_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset) |
size_t | _cbor_encode_uint64 (uint64_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset) |
size_t | _cbor_encode_uint (uint64_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset) |
size_t _cbor_encode_uint | +( | +uint64_t | +value, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size, | +
+ | + | uint8_t | +offset | +
+ | ) | ++ |
Definition at line 102 of file encoders.c.
+ +size_t _cbor_encode_uint16 | +( | +uint16_t | +value, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size, | +
+ | + | uint8_t | +offset | +
+ | ) | ++ |
Definition at line 31 of file encoders.c.
+ +size_t _cbor_encode_uint32 | +( | +uint32_t | +value, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size, | +
+ | + | uint8_t | +offset | +
+ | ) | ++ |
Definition at line 52 of file encoders.c.
+ +size_t _cbor_encode_uint64 | +( | +uint64_t | +value, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size, | +
+ | + | uint8_t | +offset | +
+ | ) | ++ |
Definition at line 75 of file encoders.c.
+ +size_t _cbor_encode_uint8 | +( | +uint8_t | +value, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size, | +
+ | + | uint8_t | +offset | +
+ | ) | ++ |
Definition at line 14 of file encoders.c.
+ +
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
Go to the source code of this file.
++Functions | |
size_t | cbor_encode_uint8 (uint8_t value, unsigned char *buffer, size_t buffer_size) |
size_t | cbor_encode_uint16 (uint16_t value, unsigned char *buffer, size_t buffer_size) |
size_t | cbor_encode_uint32 (uint32_t value, unsigned char *buffer, size_t buffer_size) |
size_t | cbor_encode_uint64 (uint64_t value, unsigned char *buffer, size_t buffer_size) |
size_t | cbor_encode_uint (uint64_t value, unsigned char *buffer, size_t buffer_size) |
size_t | cbor_encode_negint8 (uint8_t value, unsigned char *buffer, size_t buffer_size) |
size_t | cbor_encode_negint16 (uint16_t value, unsigned char *buffer, size_t buffer_size) |
size_t | cbor_encode_negint32 (uint32_t value, unsigned char *buffer, size_t buffer_size) |
size_t | cbor_encode_negint64 (uint64_t value, unsigned char *buffer, size_t buffer_size) |
size_t | cbor_encode_negint (uint64_t value, unsigned char *buffer, size_t buffer_size) |
size_t | cbor_encode_bytestring_start (size_t length, unsigned char *buffer, size_t buffer_size) |
size_t | _cbor_encode_byte (uint8_t value, unsigned char *buffer, size_t buffer_size) |
size_t | cbor_encode_indef_bytestring_start (unsigned char *buffer, size_t buffer_size) |
size_t | cbor_encode_string_start (size_t length, unsigned char *buffer, size_t buffer_size) |
size_t | cbor_encode_indef_string_start (unsigned char *buffer, size_t buffer_size) |
size_t | cbor_encode_array_start (size_t length, unsigned char *buffer, size_t buffer_size) |
size_t | cbor_encode_indef_array_start (unsigned char *buffer, size_t buffer_size) |
size_t | cbor_encode_map_start (size_t length, unsigned char *buffer, size_t buffer_size) |
size_t | cbor_encode_indef_map_start (unsigned char *buffer, size_t buffer_size) |
size_t | cbor_encode_tag (uint64_t value, unsigned char *buffer, size_t buffer_size) |
size_t | cbor_encode_bool (bool value, unsigned char *buffer, size_t buffer_size) |
size_t | cbor_encode_null (unsigned char *buffer, size_t buffer_size) |
size_t | cbor_encode_undef (unsigned char *buffer, size_t buffer_size) |
size_t | cbor_encode_half (float value, unsigned char *buffer, size_t buffer_size) |
Encodes a half-precision float. More... | |
size_t | cbor_encode_single (float value, unsigned char *buffer, size_t buffer_size) |
size_t | cbor_encode_double (double value, unsigned char *buffer, size_t buffer_size) |
size_t | cbor_encode_break (unsigned char *buffer, size_t buffer_size) |
size_t | cbor_encode_ctrl (uint8_t value, unsigned char *buffer, size_t buffer_size) |
size_t _cbor_encode_byte | +( | +uint8_t | +value, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size | +
+ | ) | ++ |
Definition at line 67 of file encoding.c.
+ +size_t cbor_encode_array_start | +( | +size_t | +length, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size | +
+ | ) | ++ |
Definition at line 91 of file encoding.c.
+ +size_t cbor_encode_bool | +( | +bool | +value, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size | +
+ | ) | ++ |
Definition at line 116 of file encoding.c.
+ +size_t cbor_encode_break | +( | +unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size | +
+ | ) | ++ |
Definition at line 178 of file encoding.c.
+ +size_t cbor_encode_bytestring_start | +( | +size_t | +length, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size | +
+ | ) | ++ |
Definition at line 62 of file encoding.c.
+ +size_t cbor_encode_ctrl | +( | +uint8_t | +value, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size | +
+ | ) | ++ |
Definition at line 183 of file encoding.c.
+ +size_t cbor_encode_double | +( | +double | +value, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size | +
+ | ) | ++ |
Definition at line 173 of file encoding.c.
+ +size_t cbor_encode_half | +( | +float | +, | +
+ | + | unsigned char * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Encodes a half-precision float.
+Since there is no native representation or semantics for half floats in the language, we use single-precision floats, as every value that can be expressed as a half-float can also be expressed as a float.
+This however means that not all floats passed to this function can be unambiguously encoded. The behavior is as follows:
value | |
buffer | Target buffer |
buffer_size | Available space in the buffer |
Definition at line 131 of file encoding.c.
+ +size_t cbor_encode_indef_array_start | +( | +unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size | +
+ | ) | ++ |
Definition at line 96 of file encoding.c.
+ +size_t cbor_encode_indef_bytestring_start | +( | +unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size | +
+ | ) | ++ |
Definition at line 76 of file encoding.c.
+ +size_t cbor_encode_indef_map_start | +( | +unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size | +
+ | ) | ++ |
Definition at line 106 of file encoding.c.
+ +size_t cbor_encode_indef_string_start | +( | +unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size | +
+ | ) | ++ |
Definition at line 86 of file encoding.c.
+ +size_t cbor_encode_map_start | +( | +size_t | +length, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size | +
+ | ) | ++ |
Definition at line 101 of file encoding.c.
+ +size_t cbor_encode_negint | +( | +uint64_t | +value, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size | +
+ | ) | ++ |
Definition at line 57 of file encoding.c.
+ +size_t cbor_encode_negint16 | +( | +uint16_t | +value, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size | +
+ | ) | ++ |
Definition at line 42 of file encoding.c.
+ +size_t cbor_encode_negint32 | +( | +uint32_t | +value, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size | +
+ | ) | ++ |
Definition at line 47 of file encoding.c.
+ +size_t cbor_encode_negint64 | +( | +uint64_t | +value, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size | +
+ | ) | ++ |
Definition at line 52 of file encoding.c.
+ +size_t cbor_encode_negint8 | +( | +uint8_t | +value, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size | +
+ | ) | ++ |
Definition at line 37 of file encoding.c.
+ +size_t cbor_encode_null | +( | +unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size | +
+ | ) | ++ |
Definition at line 121 of file encoding.c.
+ +size_t cbor_encode_single | +( | +float | +value, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size | +
+ | ) | ++ |
Definition at line 167 of file encoding.c.
+ +size_t cbor_encode_string_start | +( | +size_t | +length, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size | +
+ | ) | ++ |
Definition at line 81 of file encoding.c.
+ +size_t cbor_encode_tag | +( | +uint64_t | +value, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size | +
+ | ) | ++ |
Definition at line 111 of file encoding.c.
+ +size_t cbor_encode_uint | +( | +uint64_t | +value, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size | +
+ | ) | ++ |
Definition at line 31 of file encoding.c.
+ +size_t cbor_encode_uint16 | +( | +uint16_t | +value, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size | +
+ | ) | ++ |
Definition at line 16 of file encoding.c.
+ +size_t cbor_encode_uint32 | +( | +uint32_t | +value, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size | +
+ | ) | ++ |
Definition at line 21 of file encoding.c.
+ +size_t cbor_encode_uint64 | +( | +uint64_t | +value, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size | +
+ | ) | ++ |
Definition at line 26 of file encoding.c.
+ +size_t cbor_encode_uint8 | +( | +uint8_t | +value, | +
+ | + | unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size | +
+ | ) | ++ |
Definition at line 11 of file encoding.c.
+ +size_t cbor_encode_undef | +( | +unsigned char * | +buffer, | +
+ | + | size_t | +buffer_size | +
+ | ) | ++ |
Definition at line 126 of file encoding.c.
+ +
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
#include "cbor/common.h"
Go to the source code of this file.
++Functions | |
size_t | cbor_encode_uint8 (uint8_t, unsigned char *, size_t) |
size_t | cbor_encode_uint16 (uint16_t, unsigned char *, size_t) |
size_t | cbor_encode_uint32 (uint32_t, unsigned char *, size_t) |
size_t | cbor_encode_uint64 (uint64_t, unsigned char *, size_t) |
size_t | cbor_encode_uint (uint64_t, unsigned char *, size_t) |
size_t | cbor_encode_negint8 (uint8_t, unsigned char *, size_t) |
size_t | cbor_encode_negint16 (uint16_t, unsigned char *, size_t) |
size_t | cbor_encode_negint32 (uint32_t, unsigned char *, size_t) |
size_t | cbor_encode_negint64 (uint64_t, unsigned char *, size_t) |
size_t | cbor_encode_negint (uint64_t, unsigned char *, size_t) |
size_t | cbor_encode_bytestring_start (size_t, unsigned char *, size_t) |
size_t | cbor_encode_indef_bytestring_start (unsigned char *, size_t) |
size_t | cbor_encode_string_start (size_t, unsigned char *, size_t) |
size_t | cbor_encode_indef_string_start (unsigned char *, size_t) |
size_t | cbor_encode_array_start (size_t, unsigned char *, size_t) |
size_t | cbor_encode_indef_array_start (unsigned char *, size_t) |
size_t | cbor_encode_map_start (size_t, unsigned char *, size_t) |
size_t | cbor_encode_indef_map_start (unsigned char *, size_t) |
size_t | cbor_encode_tag (uint64_t, unsigned char *, size_t) |
size_t | cbor_encode_bool (bool, unsigned char *, size_t) |
size_t | cbor_encode_null (unsigned char *, size_t) |
size_t | cbor_encode_undef (unsigned char *, size_t) |
size_t | cbor_encode_half (float, unsigned char *, size_t) |
Encodes a half-precision float. More... | |
size_t | cbor_encode_single (float, unsigned char *, size_t) |
size_t | cbor_encode_double (double, unsigned char *, size_t) |
size_t | cbor_encode_break (unsigned char *, size_t) |
size_t | cbor_encode_ctrl (uint8_t, unsigned char *, size_t) |
size_t cbor_encode_array_start | +( | +size_t | +, | +
+ | + | unsigned char * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 91 of file encoding.c.
+ +size_t cbor_encode_bool | +( | +bool | +, | +
+ | + | unsigned char * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 116 of file encoding.c.
+ +size_t cbor_encode_break | +( | +unsigned char * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 178 of file encoding.c.
+ +size_t cbor_encode_bytestring_start | +( | +size_t | +, | +
+ | + | unsigned char * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 62 of file encoding.c.
+ +size_t cbor_encode_ctrl | +( | +uint8_t | +, | +
+ | + | unsigned char * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 183 of file encoding.c.
+ +size_t cbor_encode_double | +( | +double | +, | +
+ | + | unsigned char * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 173 of file encoding.c.
+ +size_t cbor_encode_half | +( | +float | +, | +
+ | + | unsigned char * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Encodes a half-precision float.
+Since there is no native representation or semantics for half floats in the language, we use single-precision floats, as every value that can be expressed as a half-float can also be expressed as a float.
+This however means that not all floats passed to this function can be unambiguously encoded. The behavior is as follows:
value | |
buffer | Target buffer |
buffer_size | Available space in the buffer |
Definition at line 131 of file encoding.c.
+ +size_t cbor_encode_indef_array_start | +( | +unsigned char * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 96 of file encoding.c.
+ +size_t cbor_encode_indef_bytestring_start | +( | +unsigned char * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 76 of file encoding.c.
+ +size_t cbor_encode_indef_map_start | +( | +unsigned char * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 106 of file encoding.c.
+ +size_t cbor_encode_indef_string_start | +( | +unsigned char * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 86 of file encoding.c.
+ +size_t cbor_encode_map_start | +( | +size_t | +, | +
+ | + | unsigned char * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 101 of file encoding.c.
+ +size_t cbor_encode_negint | +( | +uint64_t | +, | +
+ | + | unsigned char * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 57 of file encoding.c.
+ +size_t cbor_encode_negint16 | +( | +uint16_t | +, | +
+ | + | unsigned char * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 42 of file encoding.c.
+ +size_t cbor_encode_negint32 | +( | +uint32_t | +, | +
+ | + | unsigned char * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 47 of file encoding.c.
+ +size_t cbor_encode_negint64 | +( | +uint64_t | +, | +
+ | + | unsigned char * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 52 of file encoding.c.
+ +size_t cbor_encode_negint8 | +( | +uint8_t | +, | +
+ | + | unsigned char * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 37 of file encoding.c.
+ +size_t cbor_encode_null | +( | +unsigned char * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 121 of file encoding.c.
+ +size_t cbor_encode_single | +( | +float | +, | +
+ | + | unsigned char * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 167 of file encoding.c.
+ +size_t cbor_encode_string_start | +( | +size_t | +, | +
+ | + | unsigned char * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 81 of file encoding.c.
+ +size_t cbor_encode_tag | +( | +uint64_t | +, | +
+ | + | unsigned char * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 111 of file encoding.c.
+ +size_t cbor_encode_uint | +( | +uint64_t | +, | +
+ | + | unsigned char * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 31 of file encoding.c.
+ +size_t cbor_encode_uint16 | +( | +uint16_t | +, | +
+ | + | unsigned char * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 16 of file encoding.c.
+ +size_t cbor_encode_uint32 | +( | +uint32_t | +, | +
+ | + | unsigned char * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 21 of file encoding.c.
+ +size_t cbor_encode_uint64 | +( | +uint64_t | +, | +
+ | + | unsigned char * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 26 of file encoding.c.
+ +size_t cbor_encode_uint8 | +( | +uint8_t | +, | +
+ | + | unsigned char * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 11 of file encoding.c.
+ +size_t cbor_encode_undef | +( | +unsigned char * | +, | +
+ | + | size_t | ++ |
+ | ) | ++ |
Definition at line 126 of file encoding.c.
+ +
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
▼ src | |
▼ cbor | |
▼ internal | |
builder_callbacks.c | |
builder_callbacks.h | |
encoders.c | |
encoders.h | |
loaders.c | |
loaders.h | |
memory_utils.c | |
memory_utils.h | |
stack.c | |
stack.h | |
unicode.c | |
unicode.h | |
arrays.c | |
arrays.h | |
bytestrings.c | |
bytestrings.h | |
callbacks.c | |
callbacks.h | |
common.c | |
common.h | |
data.h | |
encoding.c | |
encoding.h | |
floats_ctrls.c | |
floats_ctrls.h | |
ints.c | |
ints.h | |
maps.c | |
maps.h | |
serialization.c | |
serialization.h | |
streaming.c | |
streaming.h | |
strings.c | |
strings.h | |
tags.c | |
tags.h | |
allocators.c | |
cbor.c | |
cbor.h |
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
Go to the source code of this file.
++Functions | |
cbor_float_width | cbor_float_get_width (const cbor_item_t *item) |
Get the float width. More... | |
uint8_t | cbor_ctrl_value (const cbor_item_t *item) |
Reads the control value. More... | |
bool | cbor_float_ctrl_is_ctrl (const cbor_item_t *item) |
Is this a ctrl value? More... | |
float | cbor_float_get_float2 (const cbor_item_t *item) |
Get a half precision float. More... | |
float | cbor_float_get_float4 (const cbor_item_t *item) |
Get a single precision float. More... | |
double | cbor_float_get_float8 (const cbor_item_t *item) |
Get a double precision float. More... | |
double | cbor_float_get_float (const cbor_item_t *item) |
Get the float value represented as double. More... | |
void | cbor_set_float2 (cbor_item_t *item, float value) |
Assigns a float value. More... | |
void | cbor_set_float4 (cbor_item_t *item, float value) |
Assigns a float value. More... | |
void | cbor_set_float8 (cbor_item_t *item, double value) |
Assigns a float value. More... | |
void | cbor_set_ctrl (cbor_item_t *item, uint8_t value) |
Assign a control value. More... | |
bool | cbor_ctrl_is_bool (const cbor_item_t *item) |
Is this ctrl item a boolean? More... | |
cbor_item_t * | cbor_new_ctrl () |
Constructs a new ctrl item. More... | |
cbor_item_t * | cbor_new_float2 () |
Constructs a new float item. More... | |
cbor_item_t * | cbor_new_float4 () |
Constructs a new float item. More... | |
cbor_item_t * | cbor_new_float8 () |
Constructs a new float item. More... | |
cbor_item_t * | cbor_new_null () |
Constructs new null ctrl item. More... | |
cbor_item_t * | cbor_new_undef () |
Constructs new under ctrl item. More... | |
cbor_item_t * | cbor_build_bool (bool value) |
Constructs new boolean ctrl item. More... | |
cbor_item_t * | cbor_build_float2 (float value) |
Constructs a new float. More... | |
cbor_item_t * | cbor_build_float4 (float value) |
Constructs a new float. More... | |
cbor_item_t * | cbor_build_float8 (double value) |
Constructs a new float. More... | |
cbor_item_t * | cbor_build_ctrl (uint8_t value) |
Constructs a ctrl item. More... | |
cbor_item_t* cbor_build_bool | +( | +bool | +value | ) | ++ |
Constructs new boolean ctrl item.
+value | The value to use |
Definition at line 160 of file floats_ctrls.c.
+ +cbor_item_t* cbor_build_ctrl | +( | +uint8_t | +value | ) | ++ |
Constructs a ctrl item.
+value | the value to use |
Definition at line 186 of file floats_ctrls.c.
+ +cbor_item_t* cbor_build_float2 | +( | +float | +value | ) | ++ |
Constructs a new float.
+value | the value to use |
Definition at line 165 of file floats_ctrls.c.
+ +cbor_item_t* cbor_build_float4 | +( | +float | +value | ) | ++ |
Constructs a new float.
+value | the value to use |
Definition at line 172 of file floats_ctrls.c.
+ +cbor_item_t* cbor_build_float8 | +( | +double | +value | ) | ++ |
Constructs a new float.
+value | the value to use |
Definition at line 179 of file floats_ctrls.c.
+ +bool cbor_ctrl_is_bool | +( | +const cbor_item_t * | +item | ) | ++ |
Is this ctrl item a boolean?
+item[borrow] | A ctrl item |
Definition at line 92 of file floats_ctrls.c.
+ +uint8_t cbor_ctrl_value | +( | +const cbor_item_t * | +item | ) | ++ |
Reads the control value.
+item[borrow] | A ctrl item |
Definition at line 18 of file floats_ctrls.c.
+ +bool cbor_float_ctrl_is_ctrl | +( | +const cbor_item_t * | +item | ) | ++ |
Is this a ctrl value?
+item[borrow] | A float or ctrl item |
Definition at line 25 of file floats_ctrls.c.
+ +double cbor_float_get_float | +( | +const cbor_item_t * | +item | ) | ++ |
Get the float value represented as double.
+Can be used regardless of the width.
+Definition at line 52 of file floats_ctrls.c.
+ +float cbor_float_get_float2 | +( | +const cbor_item_t * | +item | ) | ++ |
Get a half precision float.
+The item must have the corresponding width
+Definition at line 31 of file floats_ctrls.c.
+ +float cbor_float_get_float4 | +( | +const cbor_item_t * | +item | ) | ++ |
Get a single precision float.
+The item must have the corresponding width
+Definition at line 38 of file floats_ctrls.c.
+ +double cbor_float_get_float8 | +( | +const cbor_item_t * | +item | ) | ++ |
Get a double precision float.
+The item must have the corresponding width
+Definition at line 45 of file floats_ctrls.c.
+ +cbor_float_width cbor_float_get_width | +( | +const cbor_item_t * | +item | ) | ++ |
Get the float width.
+item[borrow] | A float or ctrl item |
Definition at line 12 of file floats_ctrls.c.
+ +cbor_item_t* cbor_new_ctrl | +( | +) | ++ |
Constructs a new ctrl item.
+The width cannot be changed once the item is created
+Definition at line 98 of file floats_ctrls.c.
+ +cbor_item_t* cbor_new_float2 | +( | +) | ++ |
Constructs a new float item.
+The width cannot be changed once the item is created
+Definition at line 110 of file floats_ctrls.c.
+ +cbor_item_t* cbor_new_float4 | +( | +) | ++ |
Constructs a new float item.
+The width cannot be changed once the item is created
+Definition at line 122 of file floats_ctrls.c.
+ +cbor_item_t* cbor_new_float8 | +( | +) | ++ |
Constructs a new float item.
+The width cannot be changed once the item is created
+Definition at line 134 of file floats_ctrls.c.
+ +cbor_item_t* cbor_new_null | +( | +) | ++ |
Constructs new null ctrl item.
+Definition at line 146 of file floats_ctrls.c.
+ +cbor_item_t* cbor_new_undef | +( | +) | ++ |
Constructs new under ctrl item.
+Definition at line 153 of file floats_ctrls.c.
+ +void cbor_set_ctrl | +( | +cbor_item_t * | +item, | +
+ | + | uint8_t | +value | +
+ | ) | ++ |
Assign a control value.
+embed:rst:leading-asterisk +* .. warning:: It is possible to produce an invalid CBOR value by assigning a invalid value using this mechanism. Please consult the standard before use. +*
item[borrow] | A ctrl item |
value | The simple value to assign. Please consult the standard for allowed values |
Definition at line 85 of file floats_ctrls.c.
+ +void cbor_set_float2 | +( | +cbor_item_t * | +item, | +
+ | + | float | +value | +
+ | ) | ++ |
Assigns a float value.
+item[borrow] | A half precision float |
value | The value to assign |
Definition at line 64 of file floats_ctrls.c.
+ +void cbor_set_float4 | +( | +cbor_item_t * | +item, | +
+ | + | float | +value | +
+ | ) | ++ |
Assigns a float value.
+item[borrow] | A single precision float |
value | The value to assign |
Definition at line 71 of file floats_ctrls.c.
+ +void cbor_set_float8 | +( | +cbor_item_t * | +item, | +
+ | + | double | +value | +
+ | ) | ++ |
Assigns a float value.
+item[borrow] | A double precision float |
value | The value to assign |
Definition at line 78 of file floats_ctrls.c.
+ +
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
#include "cbor/common.h"
Go to the source code of this file.
++Functions | |
bool | cbor_float_ctrl_is_ctrl (const cbor_item_t *item) |
Is this a ctrl value? More... | |
cbor_float_width | cbor_float_get_width (const cbor_item_t *item) |
Get the float width. More... | |
float | cbor_float_get_float2 (const cbor_item_t *item) |
Get a half precision float. More... | |
float | cbor_float_get_float4 (const cbor_item_t *item) |
Get a single precision float. More... | |
double | cbor_float_get_float8 (const cbor_item_t *item) |
Get a double precision float. More... | |
double | cbor_float_get_float (const cbor_item_t *item) |
Get the float value represented as double. More... | |
cbor_item_t * | cbor_new_ctrl () |
Constructs a new ctrl item. More... | |
cbor_item_t * | cbor_new_float2 () |
Constructs a new float item. More... | |
cbor_item_t * | cbor_new_float4 () |
Constructs a new float item. More... | |
cbor_item_t * | cbor_new_float8 () |
Constructs a new float item. More... | |
cbor_item_t * | cbor_new_null () |
Constructs new null ctrl item. More... | |
cbor_item_t * | cbor_new_undef () |
Constructs new under ctrl item. More... | |
cbor_item_t * | cbor_build_bool (bool value) |
Constructs new boolean ctrl item. More... | |
void | cbor_set_ctrl (cbor_item_t *item, uint8_t value) |
Assign a control value. More... | |
void | cbor_set_float2 (cbor_item_t *item, float value) |
Assigns a float value. More... | |
void | cbor_set_float4 (cbor_item_t *item, float value) |
Assigns a float value. More... | |
void | cbor_set_float8 (cbor_item_t *item, double value) |
Assigns a float value. More... | |
uint8_t | cbor_ctrl_value (const cbor_item_t *item) |
Reads the control value. More... | |
bool | cbor_ctrl_is_bool (const cbor_item_t *item) |
Is this ctrl item a boolean? More... | |
cbor_item_t * | cbor_build_float2 (float value) |
Constructs a new float. More... | |
cbor_item_t * | cbor_build_float4 (float value) |
Constructs a new float. More... | |
cbor_item_t * | cbor_build_float8 (double value) |
Constructs a new float. More... | |
cbor_item_t * | cbor_build_ctrl (uint8_t value) |
Constructs a ctrl item. More... | |
cbor_item_t* cbor_build_bool | +( | +bool | +value | ) | ++ |
Constructs new boolean ctrl item.
+value | The value to use |
Definition at line 160 of file floats_ctrls.c.
+ +cbor_item_t* cbor_build_ctrl | +( | +uint8_t | +value | ) | ++ |
Constructs a ctrl item.
+value | the value to use |
Definition at line 186 of file floats_ctrls.c.
+ +cbor_item_t* cbor_build_float2 | +( | +float | +value | ) | ++ |
Constructs a new float.
+value | the value to use |
Definition at line 165 of file floats_ctrls.c.
+ +cbor_item_t* cbor_build_float4 | +( | +float | +value | ) | ++ |
Constructs a new float.
+value | the value to use |
Definition at line 172 of file floats_ctrls.c.
+ +cbor_item_t* cbor_build_float8 | +( | +double | +value | ) | ++ |
Constructs a new float.
+value | the value to use |
Definition at line 179 of file floats_ctrls.c.
+ +bool cbor_ctrl_is_bool | +( | +const cbor_item_t * | +item | ) | ++ |
Is this ctrl item a boolean?
+item[borrow] | A ctrl item |
Definition at line 92 of file floats_ctrls.c.
+ +uint8_t cbor_ctrl_value | +( | +const cbor_item_t * | +item | ) | ++ |
Reads the control value.
+item[borrow] | A ctrl item |
Definition at line 18 of file floats_ctrls.c.
+ +bool cbor_float_ctrl_is_ctrl | +( | +const cbor_item_t * | +item | ) | ++ |
Is this a ctrl value?
+item[borrow] | A float or ctrl item |
Definition at line 25 of file floats_ctrls.c.
+ +double cbor_float_get_float | +( | +const cbor_item_t * | +item | ) | ++ |
Get the float value represented as double.
+Can be used regardless of the width.
+Definition at line 52 of file floats_ctrls.c.
+ +float cbor_float_get_float2 | +( | +const cbor_item_t * | +item | ) | ++ |
Get a half precision float.
+The item must have the corresponding width
+Definition at line 31 of file floats_ctrls.c.
+ +float cbor_float_get_float4 | +( | +const cbor_item_t * | +item | ) | ++ |
Get a single precision float.
+The item must have the corresponding width
+Definition at line 38 of file floats_ctrls.c.
+ +double cbor_float_get_float8 | +( | +const cbor_item_t * | +item | ) | ++ |
Get a double precision float.
+The item must have the corresponding width
+Definition at line 45 of file floats_ctrls.c.
+ +cbor_float_width cbor_float_get_width | +( | +const cbor_item_t * | +item | ) | ++ |
Get the float width.
+item[borrow] | A float or ctrl item |
Definition at line 12 of file floats_ctrls.c.
+ +cbor_item_t* cbor_new_ctrl | +( | +) | ++ |
Constructs a new ctrl item.
+The width cannot be changed once the item is created
+Definition at line 98 of file floats_ctrls.c.
+ +cbor_item_t* cbor_new_float2 | +( | +) | ++ |
Constructs a new float item.
+The width cannot be changed once the item is created
+Definition at line 110 of file floats_ctrls.c.
+ +cbor_item_t* cbor_new_float4 | +( | +) | ++ |
Constructs a new float item.
+The width cannot be changed once the item is created
+Definition at line 122 of file floats_ctrls.c.
+ +cbor_item_t* cbor_new_float8 | +( | +) | ++ |
Constructs a new float item.
+The width cannot be changed once the item is created
+Definition at line 134 of file floats_ctrls.c.
+ +cbor_item_t* cbor_new_null | +( | +) | ++ |
Constructs new null ctrl item.
+Definition at line 146 of file floats_ctrls.c.
+ +cbor_item_t* cbor_new_undef | +( | +) | ++ |
Constructs new under ctrl item.
+Definition at line 153 of file floats_ctrls.c.
+ +void cbor_set_ctrl | +( | +cbor_item_t * | +item, | +
+ | + | uint8_t | +value | +
+ | ) | ++ |
Assign a control value.
+embed:rst:leading-asterisk +* .. warning:: It is possible to produce an invalid CBOR value by assigning a invalid value using this mechanism. Please consult the standard before use. +*
item[borrow] | A ctrl item |
value | The simple value to assign. Please consult the standard for allowed values |
Definition at line 85 of file floats_ctrls.c.
+ +void cbor_set_float2 | +( | +cbor_item_t * | +item, | +
+ | + | float | +value | +
+ | ) | ++ |
Assigns a float value.
+item[borrow] | A half precision float |
value | The value to assign |
Definition at line 64 of file floats_ctrls.c.
+ +void cbor_set_float4 | +( | +cbor_item_t * | +item, | +
+ | + | float | +value | +
+ | ) | ++ |
Assigns a float value.
+item[borrow] | A single precision float |
value | The value to assign |
Definition at line 71 of file floats_ctrls.c.
+ +void cbor_set_float8 | +( | +cbor_item_t * | +item, | +
+ | + | double | +value | +
+ | ) | ++ |
Assigns a float value.
+item[borrow] | A double precision float |
value | The value to assign |
Definition at line 78 of file floats_ctrls.c.
+ +
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
This is the development reference of libcbor. If you are looking for the user documentation, you should probably head to the homepage.
+A couple of pointers for you to start with: 0x00000000
, 0xDEADBEEF
.
If you just want to peek under the hood, have a look at:
+If you want to implement your own decoder or see how the default one is made:
+For details on encoding and packing (could be useful when porting to exotic platforms):
+Streaming driver:
+Manipulation routines for particular types:
Please refer to the repository
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
#include "ints.h"
Go to the source code of this file.
++Functions | |
cbor_int_width | cbor_int_get_width (const cbor_item_t *item) |
Queries the integer width. More... | |
uint8_t | cbor_get_uint8 (const cbor_item_t *item) |
Extracts the integer value. More... | |
uint16_t | cbor_get_uint16 (const cbor_item_t *item) |
Extracts the integer value. More... | |
uint32_t | cbor_get_uint32 (const cbor_item_t *item) |
Extracts the integer value. More... | |
uint64_t | cbor_get_uint64 (const cbor_item_t *item) |
Extracts the integer value. More... | |
uint64_t | cbor_get_int (const cbor_item_t *item) |
Extracts the integer value. More... | |
void | cbor_set_uint8 (cbor_item_t *item, uint8_t value) |
Assigns the integer value. More... | |
void | cbor_set_uint16 (cbor_item_t *item, uint16_t value) |
Assigns the integer value. More... | |
void | cbor_set_uint32 (cbor_item_t *item, uint32_t value) |
Assigns the integer value. More... | |
void | cbor_set_uint64 (cbor_item_t *item, uint64_t value) |
Assigns the integer value. More... | |
void | cbor_mark_uint (cbor_item_t *item) |
Marks the integer item as a positive integer. More... | |
void | cbor_mark_negint (cbor_item_t *item) |
Marks the integer item as a negative integer. More... | |
cbor_item_t * | cbor_new_int8 () |
Allocates new integer with 1B width. More... | |
cbor_item_t * | cbor_new_int16 () |
Allocates new integer with 2B width. More... | |
cbor_item_t * | cbor_new_int32 () |
Allocates new integer with 4B width. More... | |
cbor_item_t * | cbor_new_int64 () |
Allocates new integer with 8B width. More... | |
cbor_item_t * | cbor_build_uint8 (uint8_t value) |
Constructs a new positive integer. More... | |
cbor_item_t * | cbor_build_uint16 (uint16_t value) |
Constructs a new positive integer. More... | |
cbor_item_t * | cbor_build_uint32 (uint32_t value) |
Constructs a new positive integer. More... | |
cbor_item_t * | cbor_build_uint64 (uint64_t value) |
Constructs a new positive integer. More... | |
cbor_item_t * | cbor_build_negint8 (uint8_t value) |
Constructs a new negative integer. More... | |
cbor_item_t * | cbor_build_negint16 (uint16_t value) |
Constructs a new negative integer. More... | |
cbor_item_t * | cbor_build_negint32 (uint32_t value) |
Constructs a new negative integer. More... | |
cbor_item_t * | cbor_build_negint64 (uint64_t value) |
Constructs a new negative integer. More... | |
cbor_item_t* cbor_build_negint16 | +( | +uint16_t | +value | ) | ++ |
cbor_item_t* cbor_build_negint32 | +( | +uint32_t | +value | ) | ++ |
cbor_item_t* cbor_build_negint64 | +( | +uint64_t | +value | ) | ++ |
cbor_item_t* cbor_build_negint8 | +( | +uint8_t | +value | ) | ++ |
cbor_item_t* cbor_build_uint16 | +( | +uint16_t | +value | ) | ++ |
cbor_item_t* cbor_build_uint32 | +( | +uint32_t | +value | ) | ++ |
cbor_item_t* cbor_build_uint64 | +( | +uint64_t | +value | ) | ++ |
cbor_item_t* cbor_build_uint8 | +( | +uint8_t | +value | ) | ++ |
uint64_t cbor_get_int | +( | +const cbor_item_t * | +item | ) | ++ |
uint16_t cbor_get_uint16 | +( | +const cbor_item_t * | +item | ) | ++ |
uint32_t cbor_get_uint32 | +( | +const cbor_item_t * | +item | ) | ++ |
uint64_t cbor_get_uint64 | +( | +const cbor_item_t * | +item | ) | ++ |
uint8_t cbor_get_uint8 | +( | +const cbor_item_t * | +item | ) | ++ |
cbor_int_width cbor_int_get_width | +( | +const cbor_item_t * | +item | ) | ++ |
void cbor_mark_negint | +( | +cbor_item_t * | +item | ) | ++ |
void cbor_mark_uint | +( | +cbor_item_t * | +item | ) | ++ |
cbor_item_t* cbor_new_int16 | +( | +) | ++ |
cbor_item_t* cbor_new_int32 | +( | +) | ++ |
cbor_item_t* cbor_new_int64 | +( | +) | ++ |
cbor_item_t* cbor_new_int8 | +( | +) | ++ |
void cbor_set_uint16 | +( | +cbor_item_t * | +item, | +
+ | + | uint16_t | +value | +
+ | ) | ++ |
void cbor_set_uint32 | +( | +cbor_item_t * | +item, | +
+ | + | uint32_t | +value | +
+ | ) | ++ |
void cbor_set_uint64 | +( | +cbor_item_t * | +item, | +
+ | + | uint64_t | +value | +
+ | ) | ++ |
void cbor_set_uint8 | +( | +cbor_item_t * | +item, | +
+ | + | uint8_t | +value | +
+ | ) | ++ |
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
#include "cbor/common.h"
Go to the source code of this file.
++Functions | |
uint8_t | cbor_get_uint8 (const cbor_item_t *item) |
Extracts the integer value. More... | |
uint16_t | cbor_get_uint16 (const cbor_item_t *item) |
Extracts the integer value. More... | |
uint32_t | cbor_get_uint32 (const cbor_item_t *item) |
Extracts the integer value. More... | |
uint64_t | cbor_get_uint64 (const cbor_item_t *item) |
Extracts the integer value. More... | |
uint64_t | cbor_get_int (const cbor_item_t *item) |
Extracts the integer value. More... | |
void | cbor_set_uint8 (cbor_item_t *item, uint8_t value) |
Assigns the integer value. More... | |
void | cbor_set_uint16 (cbor_item_t *item, uint16_t value) |
Assigns the integer value. More... | |
void | cbor_set_uint32 (cbor_item_t *item, uint32_t value) |
Assigns the integer value. More... | |
void | cbor_set_uint64 (cbor_item_t *item, uint64_t value) |
Assigns the integer value. More... | |
cbor_int_width | cbor_int_get_width (const cbor_item_t *item) |
Queries the integer width. More... | |
void | cbor_mark_uint (cbor_item_t *item) |
Marks the integer item as a positive integer. More... | |
void | cbor_mark_negint (cbor_item_t *item) |
Marks the integer item as a negative integer. More... | |
cbor_item_t * | cbor_new_int8 () |
Allocates new integer with 1B width. More... | |
cbor_item_t * | cbor_new_int16 () |
Allocates new integer with 2B width. More... | |
cbor_item_t * | cbor_new_int32 () |
Allocates new integer with 4B width. More... | |
cbor_item_t * | cbor_new_int64 () |
Allocates new integer with 8B width. More... | |
cbor_item_t * | cbor_build_uint8 (uint8_t value) |
Constructs a new positive integer. More... | |
cbor_item_t * | cbor_build_uint16 (uint16_t value) |
Constructs a new positive integer. More... | |
cbor_item_t * | cbor_build_uint32 (uint32_t value) |
Constructs a new positive integer. More... | |
cbor_item_t * | cbor_build_uint64 (uint64_t value) |
Constructs a new positive integer. More... | |
cbor_item_t * | cbor_build_negint8 (uint8_t value) |
Constructs a new negative integer. More... | |
cbor_item_t * | cbor_build_negint16 (uint16_t value) |
Constructs a new negative integer. More... | |
cbor_item_t * | cbor_build_negint32 (uint32_t value) |
Constructs a new negative integer. More... | |
cbor_item_t * | cbor_build_negint64 (uint64_t value) |
Constructs a new negative integer. More... | |
cbor_item_t* cbor_build_negint16 | +( | +uint16_t | +value | ) | ++ |
cbor_item_t* cbor_build_negint32 | +( | +uint32_t | +value | ) | ++ |
cbor_item_t* cbor_build_negint64 | +( | +uint64_t | +value | ) | ++ |
cbor_item_t* cbor_build_negint8 | +( | +uint8_t | +value | ) | ++ |
cbor_item_t* cbor_build_uint16 | +( | +uint16_t | +value | ) | ++ |
cbor_item_t* cbor_build_uint32 | +( | +uint32_t | +value | ) | ++ |
cbor_item_t* cbor_build_uint64 | +( | +uint64_t | +value | ) | ++ |
cbor_item_t* cbor_build_uint8 | +( | +uint8_t | +value | ) | ++ |
uint64_t cbor_get_int | +( | +const cbor_item_t * | +item | ) | ++ |
uint16_t cbor_get_uint16 | +( | +const cbor_item_t * | +item | ) | ++ |
uint32_t cbor_get_uint32 | +( | +const cbor_item_t * | +item | ) | ++ |
uint64_t cbor_get_uint64 | +( | +const cbor_item_t * | +item | ) | ++ |
uint8_t cbor_get_uint8 | +( | +const cbor_item_t * | +item | ) | ++ |
cbor_int_width cbor_int_get_width | +( | +const cbor_item_t * | +item | ) | ++ |
void cbor_mark_negint | +( | +cbor_item_t * | +item | ) | ++ |
void cbor_mark_uint | +( | +cbor_item_t * | +item | ) | ++ |
cbor_item_t* cbor_new_int16 | +( | +) | ++ |
cbor_item_t* cbor_new_int32 | +( | +) | ++ |
cbor_item_t* cbor_new_int64 | +( | +) | ++ |
cbor_item_t* cbor_new_int8 | +( | +) | ++ |
void cbor_set_uint16 | +( | +cbor_item_t * | +item, | +
+ | + | uint16_t | +value | +
+ | ) | ++ |
void cbor_set_uint32 | +( | +cbor_item_t * | +item, | +
+ | + | uint32_t | +value | +
+ | ) | ++ |
void cbor_set_uint64 | +( | +cbor_item_t * | +item, | +
+ | + | uint64_t | +value | +
+ | ) | ++ |
void cbor_set_uint8 | +( | +cbor_item_t * | +item, | +
+ | + | uint8_t | +value | +
+ | ) | ++ |
+ libcbor
+ 0.5.0
+
+ libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+ |
+
t |