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: src/allocators.c File Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+Functions | +Variables
+
+
allocators.c File Reference
+
+
+
#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
 
+

Function Documentation

+ +

§ cbor_set_allocs()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
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
+* 
Parameters
+ + + + +
custom_mallocmalloc implementation
custom_reallocrealloc implementation
custom_freefree implementation
+
+
+ +

Definition at line 14 of file allocators.c.

+ +
+
+

Variable Documentation

+ +

§ _cbor_free

+ +
+
+ + + + +
_cbor_free_t _cbor_free = free
+
+ +

Definition at line 12 of file allocators.c.

+ +
+
+ +

§ _cbor_malloc

+ +
+
+ + + + +
_cbor_malloc_t _cbor_malloc = malloc
+
+ +

Definition at line 10 of file allocators.c.

+ +
+
+ +

§ _cbor_realloc

+ +
+
+ + + + +
_cbor_realloc_t _cbor_realloc = realloc
+
+ +

Definition at line 11 of file allocators.c.

+ +
+
+
+ + + + diff --git a/docs/doxygen/allocators_8c_source.html b/docs/doxygen/allocators_8c_source.html new file mode 100644 index 00000000..d10610c5 --- /dev/null +++ b/docs/doxygen/allocators_8c_source.html @@ -0,0 +1,88 @@ + + + + + + + +libcbor: src/allocators.c Source File + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
allocators.c
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 #include "cbor/common.h"
9 
13 
14 void cbor_set_allocs(_cbor_malloc_t custom_malloc, _cbor_realloc_t custom_realloc, _cbor_free_t custom_free)
15 {
16  _cbor_malloc = custom_malloc;
17  _cbor_realloc = custom_realloc;
18  _cbor_free = custom_free;
19 }
void(* _cbor_free_t)(void *)
Definition: common.h:63
+
void *(* _cbor_realloc_t)(void *, size_t)
Definition: common.h:62
+
_cbor_malloc_t _cbor_malloc
Definition: allocators.c:10
+
_cbor_realloc_t _cbor_realloc
Definition: allocators.c:11
+
void *(* _cbor_malloc_t)(size_t)
Definition: common.h:61
+ +
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.
Definition: allocators.c:14
+
_cbor_free_t _cbor_free
Definition: allocators.c:12
+
+ + + + diff --git a/docs/doxygen/annotated.html b/docs/doxygen/annotated.html new file mode 100644 index 00000000..1c0f3d35 --- /dev/null +++ b/docs/doxygen/annotated.html @@ -0,0 +1,101 @@ + + + + + + + +libcbor: Data Structures + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
Data Structures
+
+
+
Here are the data structures with brief descriptions:
+ + + + + + + + + + + + + + + + + + + + + + +
 C_cbor_array_metadataArrays specific metadata
 C_cbor_bytestring_metadataBytestrings specific metadata
 C_cbor_decoder_contextHigh-level decoding context
 C_cbor_double_helperRaw memory casts helper
 C_cbor_float_ctrl_metadataFloats specific metadata - includes CTRL values
 C_cbor_float_helperRaw memory casts helper
 C_cbor_int_metadataIntegers specific metadata
 C_cbor_map_metadataMaps specific metadata
 C_cbor_stackStack handle - contents and size
 C_cbor_stack_recordSimple stack record for the parser
 C_cbor_string_metadataStrings specific metadata
 C_cbor_tag_metadataArrays specific metadata
 C_cbor_unicode_statusSignals unicode validation error and possibly its location
 Ccbor_callbacksCallback bundle – passed to the decoder
 Ccbor_decoder_resultStreaming decoder result
 Ccbor_errorHigh-level decoding error
 Ccbor_indefinite_string_dataDefines cbor_item_t::data structure for indefinite strings and bytestrings
 Ccbor_item_metadataUnion of metadata across all possible types - discriminated in cbor_item_t
 Ccbor_item_tThe item handle
 Ccbor_load_resultHigh-level decoding result
 Ccbor_pairSimple pair of items for use in maps
+
+
+ + + + diff --git a/docs/doxygen/arrays_8c.html b/docs/doxygen/arrays_8c.html new file mode 100644 index 00000000..d5898f8e --- /dev/null +++ b/docs/doxygen/arrays_8c.html @@ -0,0 +1,499 @@ + + + + + + + +libcbor: src/cbor/arrays.c File Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+Functions
+
+
arrays.c File Reference
+
+
+
#include <string.h>
+#include "arrays.h"
+#include "internal/memory_utils.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_tcbor_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_tcbor_new_definite_array (size_t size)
 Create new definite array. More...
 
cbor_item_tcbor_new_indefinite_array ()
 Create new indefinite array. More...
 
+

Function Documentation

+ +

§ cbor_array_allocated()

+ +
+
+ + + + + + + + +
size_t cbor_array_allocated (const cbor_item_titem)
+
+ +

Get the size of the allocated storage.

+
Parameters
+ + +
item[borrow]An array
+
+
+
Returns
The size of the allocated storage (number of items)
+ +

Definition at line 18 of file arrays.c.

+ +
+
+ +

§ cbor_array_get()

+ +
+
+ + + + + + + + + + + + + + + + + + +
cbor_item_t* cbor_array_get (const cbor_item_titem,
size_t index 
)
+
+ +

Get item by index.

+
Parameters
+ + + +
item[borrow]An array
indexThe index
+
+
+
Returns
incref The item, or NULL in case of boundary violation
+ +

Definition at line 25 of file arrays.c.

+ +
+
+ +

§ cbor_array_handle()

+ +
+
+ + + + + + + + +
cbor_item_t** cbor_array_handle (const cbor_item_titem)
+
+ +

Get the array contents.

+

The items may be reordered and modified as long as references remain consistent.

+
Parameters
+ + +
item[borrow]An array
+
+
+
Returns
cbor_array_size items
+ +

Definition at line 100 of file arrays.c.

+ +
+
+ +

§ cbor_array_is_definite()

+ +
+
+ + + + + + + + +
bool cbor_array_is_definite (const cbor_item_titem)
+
+ +

Is the array definite?

+
Parameters
+ + +
item[borrow]An array
+
+
+
Returns
Is the array definite?
+ +

Definition at line 88 of file arrays.c.

+ +
+
+ +

§ cbor_array_is_indefinite()

+ +
+
+ + + + + + + + +
bool cbor_array_is_indefinite (const cbor_item_titem)
+
+ +

Is the array indefinite?

+
Parameters
+ + +
item[borrow]An array
+
+
+
Returns
Is the array indefinite?
+ +

Definition at line 94 of file arrays.c.

+ +
+
+ +

§ cbor_array_push()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool cbor_array_push (cbor_item_tarray,
cbor_item_tpushee 
)
+
+ +

Append to the end.

+

For indefinite items, storage may be realloacted. For definite items, only the preallocated capacity is available.

+
Parameters
+ + + +
array[borrow]An array
pushee[incref]The item to push
+
+
+
Returns
true on success, false on failure
+ +

Definition at line 52 of file arrays.c.

+ +
+
+ +

§ cbor_array_replace()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool cbor_array_replace (cbor_item_titem,
size_t index,
cbor_item_tvalue 
)
+
+ +

Replace item at an index.

+

The item being replace will be cbor_decref 'ed.

+
Parameters
+ + + + +
item[borrow]An array
value[incref]The item to assign
indexThe index, first item is 0.
+
+
+
Returns
true on success, false on allocation failure.
+ +

Definition at line 42 of file arrays.c.

+ +
+
+ +

§ cbor_array_set()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool cbor_array_set (cbor_item_titem,
size_t index,
cbor_item_tvalue 
)
+
+ +

Set item by index.

+

Creating arrays with holes is not possible

+
Parameters
+ + + + +
item[borrow]An array
value[incref]The item to assign
indexThe index, first item is 0.
+
+
+
Returns
true on success, false on allocation failure.
+ +

Definition at line 30 of file arrays.c.

+ +
+
+ +

§ cbor_array_size()

+ +
+
+ + + + + + + + +
size_t cbor_array_size (const cbor_item_titem)
+
+ +

Get the number of members.

+
Parameters
+ + +
item[borrow]An array
+
+
+
Returns
The number of members
+ +

Definition at line 12 of file arrays.c.

+ +
+
+ +

§ cbor_new_definite_array()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_new_definite_array (size_t size)
+
+ +

Create new definite array.

+
Parameters
+ + +
sizeNumber of slots to preallocate
+
+
+
Returns
new array or NULL upon malloc failure
+ +

Definition at line 106 of file arrays.c.

+ +
+
+ +

§ cbor_new_indefinite_array()

+ +
+
+ + + + + + + +
cbor_item_t* cbor_new_indefinite_array ()
+
+ +

Create new indefinite array.

+
Returns
new array or NULL upon malloc failure
+ +

Definition at line 138 of file arrays.c.

+ +
+
+
+ + + + diff --git a/docs/doxygen/arrays_8c_source.html b/docs/doxygen/arrays_8c_source.html new file mode 100644 index 00000000..9a56316f --- /dev/null +++ b/docs/doxygen/arrays_8c_source.html @@ -0,0 +1,115 @@ + + + + + + + +libcbor: src/cbor/arrays.c Source File + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
arrays.c
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 #include <string.h>
9 #include "arrays.h"
10 #include "internal/memory_utils.h"
11 
12 size_t cbor_array_size(const cbor_item_t *item)
13 {
14  assert(cbor_isa_array(item));
15  return item->metadata.array_metadata.end_ptr;
16 }
17 
18 size_t cbor_array_allocated(const cbor_item_t * item)
19 {
20  assert(cbor_isa_array(item));
21  return item->metadata.array_metadata.allocated;
22 }
23 
24 
25 cbor_item_t * cbor_array_get(const cbor_item_t * item, size_t index)
26 {
27  return cbor_incref(((cbor_item_t **) item->data)[index]);
28 }
29 
30 bool cbor_array_set(cbor_item_t * item, size_t index, cbor_item_t * value)
31 {
32  if (index == item->metadata.array_metadata.end_ptr) {
33  return cbor_array_push(item, value);
34  } else if (index < item->metadata.array_metadata.end_ptr) {
35  return cbor_array_replace(item, index, value);
36  } else {
37  return false;
38  }
39  return true;
40 }
41 
42 bool cbor_array_replace(cbor_item_t * item, size_t index, cbor_item_t * value)
43 {
44  if (index >= item->metadata.array_metadata.end_ptr)
45  return false;
46  /* We cannot use cbor_array_get as that would increase the refcount */
47  cbor_intermediate_decref(((cbor_item_t **) item->data)[index]);
48  ((cbor_item_t **) item->data)[index] = cbor_incref(value);
49  return true;
50 }
51 
53 {
54  assert(cbor_isa_array(array));
55  struct _cbor_array_metadata *metadata = (struct _cbor_array_metadata *) &array->metadata;
56  cbor_item_t **data = (cbor_item_t **) array->data;
57  if (cbor_array_is_definite(array)) {
58  /* Do not reallocate definite arrays */
59  if (metadata->end_ptr >= metadata->allocated) {
60  return false;
61  }
62  data[metadata->end_ptr++] = pushee;
63  } else {
64  /* Exponential realloc */
65  if (metadata->end_ptr >= metadata->allocated) {
66  // Check for overflows first
67  if (!_cbor_safe_to_multiply(CBOR_BUFFER_GROWTH, metadata->allocated)) {
68  return false;
69  }
70 
71  size_t new_allocation = metadata->allocated == 0 ? 1 : CBOR_BUFFER_GROWTH * metadata->allocated;
72 
73  unsigned char * new_data = _cbor_realloc_multiple(array->data, sizeof(cbor_item_t *), new_allocation);
74  if (new_data == NULL) {
75  return false;
76  }
77 
78  array->data = new_data;
79  metadata->allocated = new_allocation;
80  }
81  ((cbor_item_t **)array->data)[metadata->end_ptr++] = pushee;
82  }
83  cbor_incref(pushee);
84  return true;
85 }
86 
87 
89 {
90  assert(cbor_isa_array(item));
92 }
93 
95 {
96  assert(cbor_isa_array(item));
98 }
99 
101 {
102  assert(cbor_isa_array(item));
103  return (cbor_item_t **) item->data;
104 }
105 
107 {
108  cbor_item_t *item = _CBOR_MALLOC(sizeof(cbor_item_t));
109  if (item == NULL) {
110  return NULL;
111  }
112 
113  cbor_item_t ** data = _cbor_alloc_multiple(sizeof(cbor_item_t *), size);
114  if (data == NULL) {
115  _CBOR_FREE(item);
116  return NULL;
117  }
118 
119  for (size_t i = 0; i < size; i++)
120  data[i] = NULL;
121 
122  *item = (cbor_item_t) {
123  .refcount = 1,
124  .type = CBOR_TYPE_ARRAY,
125  .metadata = {
126  .array_metadata = {
127  .type = _CBOR_METADATA_DEFINITE,
128  .allocated = size,
129  .end_ptr = 0
130  }
131  },
132  .data = (unsigned char *)data
133  };
134 
135  return item;
136 }
137 
139 {
140  cbor_item_t *item = _CBOR_MALLOC(sizeof(cbor_item_t));
141  if (item == NULL)
142  return NULL;
143 
144  *item = (cbor_item_t) {
145  .refcount = 1,
146  .type = CBOR_TYPE_ARRAY,
147  .metadata = {
148  .array_metadata = {
150  .allocated = 0,
151  .end_ptr = 0
152  }
153  },
154  .data = NULL /* Can be safely realloc-ed */
155  };
156  return item;
157 }
struct cbor_item_t cbor_item_t
The item handle.
+
size_t end_ptr
Definition: data.h:97
+
union cbor_item_metadata metadata
Discriminated by type.
Definition: data.h:151
+
void cbor_intermediate_decref(cbor_item_t *item)
Decreases the reference count by one, deallocating the item if needed.
Definition: common.c:174
+
bool cbor_array_replace(cbor_item_t *item, size_t index, cbor_item_t *value)
Replace item at an index.
Definition: arrays.c:42
+
void * _cbor_realloc_multiple(void *pointer, size_t item_size, size_t item_count)
Overflow-proof contiguous array reallocation.
Definition: memory_utils.c:39
+
cbor_item_t * value
Definition: data.h:180
+
size_t allocated
Definition: data.h:96
+
struct _cbor_array_metadata array_metadata
Definition: data.h:142
+
_cbor_dst_metadata type
Definition: data.h:98
+
4 - arrays
Definition: data.h:29
+
void * _cbor_alloc_multiple(size_t item_size, size_t item_count)
Overflow-proof contiguous array allocation.
Definition: memory_utils.c:30
+
cbor_item_t * cbor_new_indefinite_array()
Create new indefinite array.
Definition: arrays.c:138
+
#define _CBOR_FREE
Definition: common.h:86
+
#define _CBOR_MALLOC
Definition: common.h:84
+ +
bool cbor_array_set(cbor_item_t *item, size_t index, cbor_item_t *value)
Set item by index.
Definition: arrays.c:30
+
size_t refcount
Reference count - initialize to 0.
Definition: data.h:153
+
bool cbor_array_is_definite(const cbor_item_t *item)
Is the array definite?
Definition: arrays.c:88
+ +
bool cbor_array_push(cbor_item_t *array, cbor_item_t *pushee)
Append to the end.
Definition: arrays.c:52
+
size_t cbor_array_size(const cbor_item_t *item)
Get the number of members.
Definition: arrays.c:12
+
cbor_item_t * cbor_incref(cbor_item_t *item)
Increases the reference count by one.
Definition: common.c:93
+
Arrays specific metadata.
Definition: data.h:95
+
bool cbor_isa_array(const cbor_item_t *item)
Does the item have the appropriate major type?
Definition: common.c:38
+ + +
cbor_item_t * cbor_new_definite_array(size_t size)
Create new definite array.
Definition: arrays.c:106
+
unsigned char * data
Raw data block - interpretation depends on metadata.
Definition: data.h:157
+
bool _cbor_safe_to_multiply(size_t a, size_t b)
Can a and b be multiplied without overflowing size_t?
Definition: memory_utils.c:25
+
The item handle.
Definition: data.h:149
+
size_t cbor_array_allocated(const cbor_item_t *item)
Get the size of the allocated storage.
Definition: arrays.c:18
+
cbor_item_t * cbor_array_get(const cbor_item_t *item, size_t index)
Get item by index.
Definition: arrays.c:25
+
bool cbor_array_is_indefinite(const cbor_item_t *item)
Is the array indefinite?
Definition: arrays.c:94
+
cbor_item_t ** cbor_array_handle(const cbor_item_t *item)
Get the array contents.
Definition: arrays.c:100
+
+ + + + diff --git a/docs/doxygen/arrays_8h.html b/docs/doxygen/arrays_8h.html new file mode 100644 index 00000000..a0860cc1 --- /dev/null +++ b/docs/doxygen/arrays_8h.html @@ -0,0 +1,497 @@ + + + + + + + +libcbor: src/cbor/arrays.h File Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+Functions
+
+
arrays.h File Reference
+
+
+
#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_tcbor_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_tcbor_new_definite_array (size_t size)
 Create new definite array. More...
 
cbor_item_tcbor_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...
 
+

Function Documentation

+ +

§ cbor_array_allocated()

+ +
+
+ + + + + + + + +
size_t cbor_array_allocated (const cbor_item_titem)
+
+ +

Get the size of the allocated storage.

+
Parameters
+ + +
item[borrow]An array
+
+
+
Returns
The size of the allocated storage (number of items)
+ +

Definition at line 18 of file arrays.c.

+ +
+
+ +

§ cbor_array_get()

+ +
+
+ + + + + + + + + + + + + + + + + + +
cbor_item_t* cbor_array_get (const cbor_item_titem,
size_t index 
)
+
+ +

Get item by index.

+
Parameters
+ + + +
item[borrow]An array
indexThe index
+
+
+
Returns
incref The item, or NULL in case of boundary violation
+ +

Definition at line 25 of file arrays.c.

+ +
+
+ +

§ cbor_array_handle()

+ +
+
+ + + + + + + + +
cbor_item_t** cbor_array_handle (const cbor_item_titem)
+
+ +

Get the array contents.

+

The items may be reordered and modified as long as references remain consistent.

+
Parameters
+ + +
item[borrow]An array
+
+
+
Returns
cbor_array_size items
+ +

Definition at line 100 of file arrays.c.

+ +
+
+ +

§ cbor_array_is_definite()

+ +
+
+ + + + + + + + +
bool cbor_array_is_definite (const cbor_item_titem)
+
+ +

Is the array definite?

+
Parameters
+ + +
item[borrow]An array
+
+
+
Returns
Is the array definite?
+ +

Definition at line 88 of file arrays.c.

+ +
+
+ +

§ cbor_array_is_indefinite()

+ +
+
+ + + + + + + + +
bool cbor_array_is_indefinite (const cbor_item_titem)
+
+ +

Is the array indefinite?

+
Parameters
+ + +
item[borrow]An array
+
+
+
Returns
Is the array indefinite?
+ +

Definition at line 94 of file arrays.c.

+ +
+
+ +

§ cbor_array_push()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool cbor_array_push (cbor_item_tarray,
cbor_item_tpushee 
)
+
+ +

Append to the end.

+

For indefinite items, storage may be realloacted. For definite items, only the preallocated capacity is available.

+
Parameters
+ + + +
array[borrow]An array
pushee[incref]The item to push
+
+
+
Returns
true on success, false on failure
+ +

Definition at line 52 of file arrays.c.

+ +
+
+ +

§ cbor_array_replace()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool cbor_array_replace (cbor_item_titem,
size_t index,
cbor_item_tvalue 
)
+
+ +

Replace item at an index.

+

The item being replace will be cbor_decref 'ed.

+
Parameters
+ + + + +
item[borrow]An array
value[incref]The item to assign
indexThe index, first item is 0.
+
+
+
Returns
true on success, false on allocation failure.
+ +

Definition at line 42 of file arrays.c.

+ +
+
+ +

§ cbor_array_set()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool cbor_array_set (cbor_item_titem,
size_t index,
cbor_item_tvalue 
)
+
+ +

Set item by index.

+

Creating arrays with holes is not possible

+
Parameters
+ + + + +
item[borrow]An array
value[incref]The item to assign
indexThe index, first item is 0.
+
+
+
Returns
true on success, false on allocation failure.
+ +

Definition at line 30 of file arrays.c.

+ +
+
+ +

§ cbor_array_size()

+ +
+
+ + + + + + + + +
size_t cbor_array_size (const cbor_item_titem)
+
+ +

Get the number of members.

+
Parameters
+ + +
item[borrow]An array
+
+
+
Returns
The number of members
+ +

Definition at line 12 of file arrays.c.

+ +
+
+ +

§ cbor_new_definite_array()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_new_definite_array (size_t size)
+
+ +

Create new definite array.

+
Parameters
+ + +
sizeNumber of slots to preallocate
+
+
+
Returns
new array or NULL upon malloc failure
+ +

Definition at line 106 of file arrays.c.

+ +
+
+ +

§ cbor_new_indefinite_array()

+ +
+
+ + + + + + + +
cbor_item_t* cbor_new_indefinite_array ()
+
+ +

Create new indefinite array.

+
Returns
new array or NULL upon malloc failure
+ +

Definition at line 138 of file arrays.c.

+ +
+
+
+ + + + diff --git a/docs/doxygen/arrays_8h_source.html b/docs/doxygen/arrays_8h_source.html new file mode 100644 index 00000000..de6fb124 --- /dev/null +++ b/docs/doxygen/arrays_8h_source.html @@ -0,0 +1,93 @@ + + + + + + + +libcbor: src/cbor/arrays.h Source File + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
arrays.h
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 #ifndef LIBCBOR_ARRAYS_H
9 #define LIBCBOR_ARRAYS_H
10 
11 #include "cbor/common.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
22 size_t cbor_array_size(const cbor_item_t * item);
23 
29 size_t cbor_array_allocated(const cbor_item_t * item);
30 
37 cbor_item_t * cbor_array_get(const cbor_item_t * item, size_t index);
38 
48 bool cbor_array_set(cbor_item_t * item, size_t index, cbor_item_t * value);
49 
59 bool cbor_array_replace(cbor_item_t * item, size_t index, cbor_item_t * value);
60 
66 bool cbor_array_is_definite(const cbor_item_t * item);
67 
73 bool cbor_array_is_indefinite(const cbor_item_t * item);
74 
83 
90 
96 
106 bool cbor_array_push(cbor_item_t * array, cbor_item_t * pushee);
107 
108 #ifdef __cplusplus
109 }
110 #endif
111 
112 #endif //LIBCBOR_ARRAYS_H
cbor_item_t * cbor_new_definite_array(size_t size)
Create new definite array.
Definition: arrays.c:106
+
bool cbor_array_replace(cbor_item_t *item, size_t index, cbor_item_t *value)
Replace item at an index.
Definition: arrays.c:42
+
size_t cbor_array_allocated(const cbor_item_t *item)
Get the size of the allocated storage.
Definition: arrays.c:18
+
cbor_item_t * cbor_new_indefinite_array()
Create new indefinite array.
Definition: arrays.c:138
+
cbor_item_t * cbor_array_get(const cbor_item_t *item, size_t index)
Get item by index.
Definition: arrays.c:25
+
bool cbor_array_is_indefinite(const cbor_item_t *item)
Is the array indefinite?
Definition: arrays.c:94
+
size_t cbor_array_size(const cbor_item_t *item)
Get the number of members.
Definition: arrays.c:12
+
bool cbor_array_is_definite(const cbor_item_t *item)
Is the array definite?
Definition: arrays.c:88
+
bool cbor_array_push(cbor_item_t *array, cbor_item_t *pushee)
Append to the end.
Definition: arrays.c:52
+
bool cbor_array_set(cbor_item_t *item, size_t index, cbor_item_t *value)
Set item by index.
Definition: arrays.c:30
+ +
The item handle.
Definition: data.h:149
+
cbor_item_t ** cbor_array_handle(const cbor_item_t *item)
Get the array contents.
Definition: arrays.c:100
+
+ + + + diff --git a/docs/doxygen/bc_s.png b/docs/doxygen/bc_s.png new file mode 100644 index 00000000..224b29aa Binary files /dev/null and b/docs/doxygen/bc_s.png differ diff --git a/docs/doxygen/bdwn.png b/docs/doxygen/bdwn.png new file mode 100644 index 00000000..940a0b95 Binary files /dev/null and b/docs/doxygen/bdwn.png differ diff --git a/docs/doxygen/builder__callbacks_8c.html b/docs/doxygen/builder__callbacks_8c.html new file mode 100644 index 00000000..e1e4e69e --- /dev/null +++ b/docs/doxygen/builder__callbacks_8c.html @@ -0,0 +1,864 @@ + + + + + + + +libcbor: src/cbor/internal/builder_callbacks.c File Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+Macros | +Functions
+
+
builder_callbacks.c File Reference
+
+
+
#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)
 
+

Macro Definition Documentation

+ +

§ CHECK_RES

+ +
+
+ + + + +
#define CHECK_RES   do { if (res == NULL) { ctx->creation_failed = true; return; } } while (0)
+
+ +

Definition at line 84 of file builder_callbacks.c.

+ +
+
+

Function Documentation

+ +

§ _cbor_builder_append()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void _cbor_builder_append (cbor_item_titem,
struct _cbor_decoder_contextctx 
)
+
+ +

Definition at line 19 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_array_start_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_array_start_callback (void * context,
size_t size 
)
+
+ +

Definition at line 251 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_boolean_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_boolean_callback (void * context,
bool value 
)
+
+ +

Definition at line 345 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_byte_string_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void cbor_builder_byte_string_callback (void * context,
cbor_data data,
size_t length 
)
+
+ +

Definition at line 165 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_byte_string_start_callback()

+ +
+
+ + + + + + + + +
void cbor_builder_byte_string_start_callback (void * context)
+
+ +

Definition at line 197 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_float2_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_float2_callback (void * context,
float value 
)
+
+ +

Definition at line 303 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_float4_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_float4_callback (void * context,
float value 
)
+
+ +

Definition at line 311 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_float8_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_float8_callback (void * context,
double value 
)
+
+ +

Definition at line 320 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_indef_array_start_callback()

+ +
+
+ + + + + + + + +
void cbor_builder_indef_array_start_callback (void * context)
+
+ +

Definition at line 263 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_indef_break_callback()

+ +
+
+ + + + + + + + +
void cbor_builder_indef_break_callback (void * context)
+
+ +

Definition at line 291 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_indef_map_start_callback()

+ +
+
+ + + + + + + + +
void cbor_builder_indef_map_start_callback (void * context)
+
+ +

Definition at line 271 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_map_start_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_map_start_callback (void * context,
size_t size 
)
+
+ +

Definition at line 279 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_negint16_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_negint16_callback (void * context,
uint16_t value 
)
+
+ +

Definition at line 136 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_negint32_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_negint32_callback (void * context,
uint32_t value 
)
+
+ +

Definition at line 145 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_negint64_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_negint64_callback (void * context,
uint64_t value 
)
+
+ +

Definition at line 155 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_negint8_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_negint8_callback (void * context,
uint8_t value 
)
+
+ +

Definition at line 126 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_null_callback()

+ +
+
+ + + + + + + + +
void cbor_builder_null_callback (void * context)
+
+ +

Definition at line 329 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_string_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void cbor_builder_string_callback (void * context,
cbor_data data,
size_t length 
)
+
+ +

Definition at line 206 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_string_start_callback()

+ +
+
+ + + + + + + + +
void cbor_builder_string_start_callback (void * context)
+
+ +

Definition at line 243 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_tag_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_tag_callback (void * context,
uint64_t value 
)
+
+ +

Definition at line 353 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_uint16_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_uint16_callback (void * context,
uint16_t value 
)
+
+ +

Definition at line 96 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_uint32_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_uint32_callback (void * context,
uint32_t value 
)
+
+ +

Definition at line 106 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_uint64_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_uint64_callback (void * context,
uint64_t value 
)
+
+ +

Definition at line 116 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_uint8_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_uint8_callback (void * context,
uint8_t value 
)
+
+ +

Definition at line 86 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_undefined_callback()

+ +
+
+ + + + + + + + +
void cbor_builder_undefined_callback (void * context)
+
+ +

Definition at line 337 of file builder_callbacks.c.

+ +
+
+
+ + + + diff --git a/docs/doxygen/builder__callbacks_8c_source.html b/docs/doxygen/builder__callbacks_8c_source.html new file mode 100644 index 00000000..5b35a69e --- /dev/null +++ b/docs/doxygen/builder__callbacks_8c_source.html @@ -0,0 +1,178 @@ + + + + + + + +libcbor: src/cbor/internal/builder_callbacks.c Source File + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
builder_callbacks.c
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 #include "builder_callbacks.h"
9 #include "unicode.h"
10 #include <string.h>
11 #include "../arrays.h"
12 #include "../bytestrings.h"
13 #include "../floats_ctrls.h"
14 #include "../ints.h"
15 #include "../maps.h"
16 #include "../strings.h"
17 #include "../tags.h"
18 
20 {
21  if (ctx->stack->size == 0) {
22  /* Top level item */
23  ctx->root = item;
24  } else {
25  /* Part of a bigger structure */
26  switch (ctx->stack->top->item->type) {
27  case CBOR_TYPE_ARRAY: {
28  if (cbor_array_is_definite(ctx->stack->top->item)) {
29  assert(ctx->stack->top->subitems > 0);
30  cbor_array_push(ctx->stack->top->item, item);
31  ctx->stack->top->subitems--;
32  if (ctx->stack->top->subitems == 0) {
33  cbor_item_t *item = ctx->stack->top->item;
34  _cbor_stack_pop(ctx->stack);
35  _cbor_builder_append(item, ctx);
36  }
37  cbor_decref(&item);
38  } else {
39  /* Indefinite array, don't bother with subitems */
40  cbor_array_push(ctx->stack->top->item, item);
41  cbor_decref(&item);
42  }
43  break;
44  }
45  case CBOR_TYPE_MAP: {
46  /* We use 0 and 1 subitems to distinguish between keys and values in indefinite items */
47  if (ctx->stack->top->subitems % 2) {
48  /* Odd record, this is a value */
50  } else {
51  /* Even record, this is a key */
52  _cbor_map_add_key(ctx->stack->top->item, cbor_move(item));
53  }
54  if (cbor_map_is_definite(ctx->stack->top->item)) {
55  ctx->stack->top->subitems--;
56  if (ctx->stack->top->subitems == 0) {
57  cbor_item_t *item = ctx->stack->top->item;
58  _cbor_stack_pop(ctx->stack);
59  _cbor_builder_append(item, ctx);
60  }
61  } else {
62  ctx->stack->top->subitems ^= 1; /* Flip the indicator for indefinite items */
63  }
64  break;
65  }
66  case CBOR_TYPE_TAG: {
67  assert(ctx->stack->top->subitems == 1);
68  cbor_tag_set_item(ctx->stack->top->item, item);
69  cbor_decref(&item); /* Give up on our reference */
70  cbor_item_t *item = ctx->stack->top->item;
71  _cbor_stack_pop(ctx->stack);
72  _cbor_builder_append(item, ctx);
73  break;
74  }
75  default: {
76  cbor_decref(&item);
77  ctx->syntax_error = true;
78  }
79  }
80  }
81 }
82 
83 
84 #define CHECK_RES do { if (res == NULL) { ctx->creation_failed = true; return; } } while (0)
85 
86 void cbor_builder_uint8_callback(void *context, uint8_t value)
87 {
88  struct _cbor_decoder_context *ctx = context;
89  cbor_item_t *res = cbor_new_int8();
90  CHECK_RES;
91  cbor_mark_uint(res);
92  cbor_set_uint8(res, value);
93  _cbor_builder_append(res, ctx);
94 }
95 
96 void cbor_builder_uint16_callback(void *context, uint16_t value)
97 {
98  struct _cbor_decoder_context *ctx = context;
99  cbor_item_t *res = cbor_new_int16();
100  CHECK_RES;
101  cbor_mark_uint(res);
102  cbor_set_uint16(res, value);
103  _cbor_builder_append(res, ctx);
104 }
105 
106 void cbor_builder_uint32_callback(void *context, uint32_t value)
107 {
108  struct _cbor_decoder_context *ctx = context;
109  cbor_item_t *res = cbor_new_int32();
110  CHECK_RES;
111  cbor_mark_uint(res);
112  cbor_set_uint32(res, value);
113  _cbor_builder_append(res, ctx);
114 }
115 
116 void cbor_builder_uint64_callback(void *context, uint64_t value)
117 {
118  struct _cbor_decoder_context *ctx = context;
119  cbor_item_t *res = cbor_new_int64();
120  CHECK_RES;
121  cbor_mark_uint(res);
122  cbor_set_uint64(res, value);
123  _cbor_builder_append(res, ctx);
124 }
125 
126 void cbor_builder_negint8_callback(void *context, uint8_t value)
127 {
128  struct _cbor_decoder_context *ctx = context;
129  cbor_item_t *res = cbor_new_int8();
130  CHECK_RES;
131  cbor_mark_negint(res);
132  cbor_set_uint8(res, value);
133  _cbor_builder_append(res, ctx);
134 }
135 
136 void cbor_builder_negint16_callback(void *context, uint16_t value)
137 {
138  struct _cbor_decoder_context *ctx = context;
139  cbor_item_t *res = cbor_new_int16();
140  cbor_mark_negint(res);
141  cbor_set_uint16(res, value);
142  _cbor_builder_append(res, ctx);
143 }
144 
145 void cbor_builder_negint32_callback(void *context, uint32_t value)
146 {
147  struct _cbor_decoder_context *ctx = context;
148  cbor_item_t *res = cbor_new_int32();
149  CHECK_RES;
150  cbor_mark_negint(res);
151  cbor_set_uint32(res, value);
152  _cbor_builder_append(res, ctx);
153 }
154 
155 void cbor_builder_negint64_callback(void *context, uint64_t value)
156 {
157  struct _cbor_decoder_context *ctx = context;
158  cbor_item_t *res = cbor_new_int64();
159  CHECK_RES;
160  cbor_mark_negint(res);
161  cbor_set_uint64(res, value);
162  _cbor_builder_append(res, ctx);
163 }
164 
165 void cbor_builder_byte_string_callback(void *context, cbor_data data, size_t length)
166 {
167  struct _cbor_decoder_context *ctx = context;
168  unsigned char *new_handle = _CBOR_MALLOC(length);
169  if (new_handle == NULL) {
170  ctx->creation_failed = true;
171  return;
172  }
173 
174  memcpy(new_handle, data, length);
176 
177  if (res == NULL) {
178  _CBOR_FREE(new_handle);
179  ctx->creation_failed = true;
180  return;
181  }
182 
183  cbor_bytestring_set_handle(res, new_handle, length);
184 
185  if (ctx->stack->size > 0 && cbor_isa_bytestring(ctx->stack->top->item)) {
188  } else {
189  cbor_decref(&res);
190  ctx->syntax_error = true;
191  }
192  } else {
193  _cbor_builder_append(res, ctx);
194  }
195 }
196 
198 {
199  struct _cbor_decoder_context *ctx = context;
201  CHECK_RES;
202  _cbor_stack_push(ctx->stack, res, 0);
203 }
204 
205 
206 void cbor_builder_string_callback(void *context, cbor_data data, size_t length)
207 {
208  struct _cbor_decoder_context *ctx = context;
209  struct _cbor_unicode_status unicode_status;
210 
211  size_t codepoint_count = _cbor_unicode_codepoint_count(data, length, &unicode_status);
212 
213  if (unicode_status.status == _CBOR_UNICODE_BADCP) {
214  ctx->syntax_error = true;
215  return;
216  }
217 
218  unsigned char *new_handle = _CBOR_MALLOC(length);
219 
220  if (new_handle == NULL) {
221  ctx->creation_failed = true;
222  return;
223  }
224 
225  memcpy(new_handle, data, length);
227  cbor_string_set_handle(res, new_handle, length);
228  res->metadata.string_metadata.codepoint_count = codepoint_count;
229 
230  /* Careful here: order matters */
231  if (ctx->stack->size > 0 && cbor_isa_string(ctx->stack->top->item)) {
232  if (cbor_string_is_indefinite(ctx->stack->top->item)) {
234  } else {
235  cbor_decref(&res);
236  ctx->syntax_error = true;
237  }
238  } else {
239  _cbor_builder_append(res, ctx);
240  }
241 }
242 
244 {
245  struct _cbor_decoder_context *ctx = context;
247  CHECK_RES;
248  _cbor_stack_push(ctx->stack, res, 0);
249 }
250 
251 void cbor_builder_array_start_callback(void *context, size_t size)
252 {
253  struct _cbor_decoder_context *ctx = context;
255  CHECK_RES;
256  if (size > 0) {
257  _cbor_stack_push(ctx->stack, res, size);
258  } else {
259  _cbor_builder_append(res, ctx);
260  }
261 }
262 
264 {
265  struct _cbor_decoder_context *ctx = context;
267  CHECK_RES;
268  _cbor_stack_push(ctx->stack, res, 0);
269 }
270 
272 {
273  struct _cbor_decoder_context *ctx = context;
275  CHECK_RES;
276  _cbor_stack_push(ctx->stack, res, 0);
277 }
278 
279 void cbor_builder_map_start_callback(void *context, size_t size)
280 {
281  struct _cbor_decoder_context *ctx = context;
282  cbor_item_t *res = cbor_new_definite_map(size);
283  CHECK_RES;
284  if (size > 0) {
285  _cbor_stack_push(ctx->stack, res, size * 2);
286  } else {
287  _cbor_builder_append(res, ctx);
288  }
289 }
290 
292 {
293  struct _cbor_decoder_context *ctx = context;
294  if (ctx->stack->size == 0) {
295  // TODO complain
296  } else {
297  cbor_item_t *item = ctx->stack->top->item;
298  _cbor_stack_pop(ctx->stack);
299  _cbor_builder_append(item, ctx);
300  }
301 }
302 
303 void cbor_builder_float2_callback(void *context, float value)
304 {
305  struct _cbor_decoder_context *ctx = context;
306  cbor_item_t *res = cbor_new_float2();
307  cbor_set_float2(res, value);
308  _cbor_builder_append(res, ctx);
309 }
310 
311 void cbor_builder_float4_callback(void *context, float value)
312 {
313  struct _cbor_decoder_context *ctx = context;
314  cbor_item_t *res = cbor_new_float4();
315  CHECK_RES;
316  cbor_set_float4(res, value);
317  _cbor_builder_append(res, ctx);
318 }
319 
320 void cbor_builder_float8_callback(void *context, double value)
321 {
322  struct _cbor_decoder_context *ctx = context;
323  cbor_item_t *res = cbor_new_float8();
324  CHECK_RES;
325  cbor_set_float8(res, value);
326  _cbor_builder_append(res, ctx);
327 }
328 
329 void cbor_builder_null_callback(void *context)
330 {
331  struct _cbor_decoder_context *ctx = context;
332  cbor_item_t *res = cbor_new_null();
333  CHECK_RES;
334  _cbor_builder_append(res, ctx);
335 }
336 
338 {
339  struct _cbor_decoder_context *ctx = context;
340  cbor_item_t *res = cbor_new_undef();
341  CHECK_RES;
342  _cbor_builder_append(res, ctx);
343 }
344 
345 void cbor_builder_boolean_callback(void *context, bool value)
346 {
347  struct _cbor_decoder_context *ctx = context;
348  cbor_item_t *res = cbor_build_bool(value);
349  CHECK_RES;
350  _cbor_builder_append(res, ctx);
351 }
352 
353 void cbor_builder_tag_callback(void *context, uint64_t value)
354 {
355  struct _cbor_decoder_context *ctx = context;
356  cbor_item_t *res = cbor_new_tag(value);
357  CHECK_RES;
358  _cbor_stack_push(ctx->stack, res, 1);
359 }
+
void cbor_builder_float4_callback(void *context, float value)
+
void cbor_set_float4(cbor_item_t *item, float value)
Assigns a float value.
Definition: floats_ctrls.c:71
+
cbor_item_t * cbor_new_int64()
Allocates new integer with 8B width.
Definition: ints.c:133
+
void cbor_set_float2(cbor_item_t *item, float value)
Assigns a float value.
Definition: floats_ctrls.c:64
+
size_t size
Definition: stack.h:27
+
size_t subitems
Definition: stack.h:21
+
bool syntax_error
Stack expectation mismatch.
+
6 - tags
Definition: data.h:31
+
void cbor_string_set_handle(cbor_item_t *item, cbor_mutable_data CBOR_RESTRICT_POINTER data, size_t length)
Set the handle to the underlying string.
Definition: strings.c:59
+
union cbor_item_metadata metadata
Discriminated by type.
Definition: data.h:151
+
void cbor_set_uint16(cbor_item_t *item, uint16_t value)
Assigns the integer value.
Definition: ints.c:63
+
void cbor_builder_byte_string_callback(void *context, cbor_data data, size_t length)
+
void cbor_builder_uint32_callback(void *context, uint32_t value)
+
cbor_item_t * cbor_new_int8()
Allocates new integer with 1B width.
Definition: ints.c:97
+
cbor_item_t * cbor_new_indefinite_bytestring()
Creates a new indefinite byte string.
Definition: bytestrings.c:46
+
cbor_item_t * cbor_new_indefinite_string()
Creates a new indefinite string.
Definition: strings.c:23
+
void cbor_builder_uint8_callback(void *context, uint8_t value)
+
void cbor_decref(cbor_item_t **item_ref)
Decreases the reference count by one, deallocating the item if needed.
Definition: common.c:99
+
bool cbor_isa_string(const cbor_item_t *item)
Does the item have the appropriate major type?
Definition: common.c:33
+
void cbor_builder_uint64_callback(void *context, uint64_t value)
+
void cbor_builder_tag_callback(void *context, uint64_t value)
+
cbor_item_t * cbor_new_definite_bytestring()
Creates a new definite byte string.
Definition: bytestrings.c:35
+
bool cbor_isa_bytestring(const cbor_item_t *item)
Does the item have the appropriate major type?
Definition: common.c:28
+
void cbor_builder_float2_callback(void *context, float value)
+
void cbor_builder_indef_break_callback(void *context)
+
cbor_item_t * cbor_new_undef()
Constructs new under ctrl item.
Definition: floats_ctrls.c:153
+
void cbor_builder_negint8_callback(void *context, uint8_t value)
+
#define CHECK_RES
+
bool cbor_bytestring_is_indefinite(const cbor_item_t *item)
Is the byte string indefinite?
Definition: bytestrings.c:30
+
cbor_item_t * cbor_build_bool(bool value)
Constructs new boolean ctrl item.
Definition: floats_ctrls.c:160
+
4 - arrays
Definition: data.h:29
+
cbor_item_t * cbor_new_tag(uint64_t value)
Create a new tag.
Definition: tags.c:10
+
void cbor_set_uint8(cbor_item_t *item, uint8_t value)
Assigns the integer value.
Definition: ints.c:56
+
enum _cbor_unicode_status_error status
Definition: unicode.h:24
+
bool _cbor_map_add_key(cbor_item_t *item, cbor_item_t *key)
Add a key to the map.
Definition: maps.c:66
+
cbor_item_t * cbor_new_indefinite_array()
Create new indefinite array.
Definition: arrays.c:138
+
cbor_type type
Major type discriminator.
Definition: data.h:155
+
void cbor_builder_negint16_callback(void *context, uint16_t value)
+
void cbor_mark_negint(cbor_item_t *item)
Marks the integer item as a negative integer.
Definition: ints.c:91
+
High-level decoding context.
+
#define _CBOR_FREE
Definition: common.h:86
+
#define _CBOR_MALLOC
Definition: common.h:84
+
void cbor_builder_undefined_callback(void *context)
+ +
cbor_item_t * cbor_new_definite_string()
Creates a new definite string.
Definition: strings.c:12
+
void _cbor_stack_pop(struct _cbor_stack *stack)
Definition: stack.c:15
+
bool cbor_array_is_definite(const cbor_item_t *item)
Is the array definite?
Definition: arrays.c:88
+
void cbor_builder_null_callback(void *context)
+
bool cbor_array_push(cbor_item_t *array, cbor_item_t *pushee)
Append to the end.
Definition: arrays.c:52
+
void cbor_builder_string_start_callback(void *context)
+
void cbor_builder_array_start_callback(void *context, size_t size)
+
void cbor_set_uint32(cbor_item_t *item, uint32_t value)
Assigns the integer value.
Definition: ints.c:71
+
void cbor_builder_string_callback(void *context, cbor_data data, size_t length)
+
cbor_item_t * cbor_new_float4()
Constructs a new float item.
Definition: floats_ctrls.c:122
+
bool cbor_bytestring_add_chunk(cbor_item_t *item, cbor_item_t *chunk)
Appends a chunk to the bytestring.
Definition: bytestrings.c:95
+
Signals unicode validation error and possibly its location.
Definition: unicode.h:23
+
size_t codepoint_count
Definition: data.h:90
+
void cbor_builder_indef_array_start_callback(void *context)
+
cbor_item_t * cbor_new_float8()
Constructs a new float item.
Definition: floats_ctrls.c:134
+
const unsigned char * cbor_data
Definition: data.h:20
+
size_t _cbor_unicode_codepoint_count(cbor_data source, size_t source_length, struct _cbor_unicode_status *status)
Definition: unicode.c:43
+
void cbor_mark_uint(cbor_item_t *item)
Marks the integer item as a positive integer.
Definition: ints.c:85
+
struct _cbor_stack * stack
+
void cbor_set_float8(cbor_item_t *item, double value)
Assigns a float value.
Definition: floats_ctrls.c:78
+
bool cbor_map_is_definite(const cbor_item_t *item)
Is this map definite?
Definition: maps.c:126
+
cbor_item_t * cbor_move(cbor_item_t *item)
Provides CPP-like move construct.
Definition: common.c:184
+
cbor_item_t * cbor_new_null()
Constructs new null ctrl item.
Definition: floats_ctrls.c:146
+
void cbor_builder_negint32_callback(void *context, uint32_t value)
+
struct _cbor_string_metadata string_metadata
Definition: data.h:141
+
void cbor_builder_negint64_callback(void *context, uint64_t value)
+
cbor_item_t * cbor_new_float2()
Constructs a new float item.
Definition: floats_ctrls.c:110
+
bool _cbor_map_add_value(cbor_item_t *item, cbor_item_t *value)
Add a value to the map.
Definition: maps.c:106
+
void cbor_tag_set_item(cbor_item_t *item, cbor_item_t *tagged_item)
Set the tagged item.
Definition: tags.c:34
+
void cbor_builder_float8_callback(void *context, double value)
+
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.
Definition: bytestrings.c:72
+
bool cbor_string_add_chunk(cbor_item_t *item, cbor_item_t *chunk)
Appends a chunk to the string.
Definition: strings.c:82
+
cbor_item_t * cbor_new_definite_array(size_t size)
Create new definite array.
Definition: arrays.c:106
+
cbor_item_t * cbor_new_int32()
Allocates new integer with 4B width.
Definition: ints.c:121
+ +
void _cbor_builder_append(cbor_item_t *item, struct _cbor_decoder_context *ctx)
+
void cbor_builder_map_start_callback(void *context, size_t size)
+
struct _cbor_stack_record * _cbor_stack_push(struct _cbor_stack *stack, cbor_item_t *item, size_t subitems)
Definition: stack.c:23
+
void cbor_builder_boolean_callback(void *context, bool value)
+
cbor_item_t * item
Definition: stack.h:20
+
cbor_item_t * cbor_new_indefinite_map()
Create a new indefinite map.
Definition: maps.c:46
+
void cbor_builder_uint16_callback(void *context, uint16_t value)
+
The item handle.
Definition: data.h:149
+
void cbor_builder_byte_string_start_callback(void *context)
+ +
cbor_item_t * cbor_new_definite_map(size_t size)
Create a new definite map.
Definition: maps.c:23
+
void cbor_builder_indef_map_start_callback(void *context)
+
void cbor_set_uint64(cbor_item_t *item, uint64_t value)
Assigns the integer value.
Definition: ints.c:78
+
cbor_item_t * cbor_new_int16()
Allocates new integer with 2B width.
Definition: ints.c:109
+
struct _cbor_stack_record * top
Definition: stack.h:26
+
5 - maps
Definition: data.h:30
+
bool cbor_string_is_indefinite(const cbor_item_t *item)
Is the string indefinite?
Definition: strings.c:130
+
bool creation_failed
Callback creating the last item has failed.
+
+ + + + diff --git a/docs/doxygen/builder__callbacks_8h.html b/docs/doxygen/builder__callbacks_8h.html new file mode 100644 index 00000000..58c0293d --- /dev/null +++ b/docs/doxygen/builder__callbacks_8h.html @@ -0,0 +1,809 @@ + + + + + + + +libcbor: src/cbor/internal/builder_callbacks.h File Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+Data Structures | +Functions
+
+
builder_callbacks.h File Reference
+
+
+
#include "cbor/common.h"
+#include "../callbacks.h"
+#include "stack.h"
+
+

Go to the source code of this file.

+ + + + + +

+Data Structures

struct  _cbor_decoder_context
 High-level decoding context. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

void cbor_builder_uint8_callback (void *, uint8_t)
 
void cbor_builder_uint16_callback (void *, uint16_t)
 
void cbor_builder_uint32_callback (void *, uint32_t)
 
void cbor_builder_uint64_callback (void *, uint64_t)
 
void cbor_builder_negint8_callback (void *, uint8_t)
 
void cbor_builder_negint16_callback (void *, uint16_t)
 
void cbor_builder_negint32_callback (void *, uint32_t)
 
void cbor_builder_negint64_callback (void *, uint64_t)
 
void cbor_builder_string_callback (void *, cbor_data, size_t)
 
void cbor_builder_string_start_callback (void *)
 
void cbor_builder_byte_string_callback (void *, cbor_data, size_t)
 
void cbor_builder_byte_string_start_callback (void *)
 
void cbor_builder_array_start_callback (void *, size_t)
 
void cbor_builder_indef_array_start_callback (void *)
 
void cbor_builder_map_start_callback (void *, size_t)
 
void cbor_builder_indef_map_start_callback (void *)
 
void cbor_builder_tag_callback (void *, uint64_t)
 
void cbor_builder_float2_callback (void *, float)
 
void cbor_builder_float4_callback (void *, float)
 
void cbor_builder_float8_callback (void *, double)
 
void cbor_builder_null_callback (void *)
 
void cbor_builder_undefined_callback (void *)
 
void cbor_builder_boolean_callback (void *, bool)
 
void cbor_builder_indef_break_callback (void *)
 
+

Function Documentation

+ +

§ cbor_builder_array_start_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_array_start_callback (void * ,
size_t  
)
+
+ +

Definition at line 251 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_boolean_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_boolean_callback (void * ,
bool  
)
+
+ +

Definition at line 345 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_byte_string_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void cbor_builder_byte_string_callback (void * ,
cbor_data ,
size_t  
)
+
+ +

Definition at line 165 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_byte_string_start_callback()

+ +
+
+ + + + + + + + +
void cbor_builder_byte_string_start_callback (void * )
+
+ +

Definition at line 197 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_float2_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_float2_callback (void * ,
float  
)
+
+ +

Definition at line 303 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_float4_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_float4_callback (void * ,
float  
)
+
+ +

Definition at line 311 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_float8_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_float8_callback (void * ,
double  
)
+
+ +

Definition at line 320 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_indef_array_start_callback()

+ +
+
+ + + + + + + + +
void cbor_builder_indef_array_start_callback (void * )
+
+ +

Definition at line 263 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_indef_break_callback()

+ +
+
+ + + + + + + + +
void cbor_builder_indef_break_callback (void * )
+
+ +

Definition at line 291 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_indef_map_start_callback()

+ +
+
+ + + + + + + + +
void cbor_builder_indef_map_start_callback (void * )
+
+ +

Definition at line 271 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_map_start_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_map_start_callback (void * ,
size_t  
)
+
+ +

Definition at line 279 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_negint16_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_negint16_callback (void * ,
uint16_t  
)
+
+ +

Definition at line 136 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_negint32_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_negint32_callback (void * ,
uint32_t  
)
+
+ +

Definition at line 145 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_negint64_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_negint64_callback (void * ,
uint64_t  
)
+
+ +

Definition at line 155 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_negint8_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_negint8_callback (void * ,
uint8_t  
)
+
+ +

Definition at line 126 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_null_callback()

+ +
+
+ + + + + + + + +
void cbor_builder_null_callback (void * )
+
+ +

Definition at line 329 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_string_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void cbor_builder_string_callback (void * ,
cbor_data ,
size_t  
)
+
+ +

Definition at line 206 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_string_start_callback()

+ +
+
+ + + + + + + + +
void cbor_builder_string_start_callback (void * )
+
+ +

Definition at line 243 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_tag_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_tag_callback (void * ,
uint64_t  
)
+
+ +

Definition at line 353 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_uint16_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_uint16_callback (void * ,
uint16_t  
)
+
+ +

Definition at line 96 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_uint32_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_uint32_callback (void * ,
uint32_t  
)
+
+ +

Definition at line 106 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_uint64_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_uint64_callback (void * ,
uint64_t  
)
+
+ +

Definition at line 116 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_uint8_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_builder_uint8_callback (void * ,
uint8_t  
)
+
+ +

Definition at line 86 of file builder_callbacks.c.

+ +
+
+ +

§ cbor_builder_undefined_callback()

+ +
+
+ + + + + + + + +
void cbor_builder_undefined_callback (void * )
+
+ +

Definition at line 337 of file builder_callbacks.c.

+ +
+
+
+ + + + diff --git a/docs/doxygen/builder__callbacks_8h_source.html b/docs/doxygen/builder__callbacks_8h_source.html new file mode 100644 index 00000000..d095fa09 --- /dev/null +++ b/docs/doxygen/builder__callbacks_8h_source.html @@ -0,0 +1,114 @@ + + + + + + + +libcbor: src/cbor/internal/builder_callbacks.h Source File + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
builder_callbacks.h
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 #ifndef LIBCBOR_BUILDER_CALLBACKS_H
9 #define LIBCBOR_BUILDER_CALLBACKS_H
10 
11 #include "cbor/common.h"
12 #include "../callbacks.h"
13 #include "stack.h"
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
26  struct _cbor_stack *stack;
27 };
28 
29 void cbor_builder_uint8_callback(void *, uint8_t);
30 
31 void cbor_builder_uint16_callback(void *, uint16_t);
32 
33 void cbor_builder_uint32_callback(void *, uint32_t);
34 
35 void cbor_builder_uint64_callback(void *, uint64_t);
36 
37 void cbor_builder_negint8_callback(void *, uint8_t);
38 
39 void cbor_builder_negint16_callback(void *, uint16_t);
40 
41 void cbor_builder_negint32_callback(void *, uint32_t);
42 
43 void cbor_builder_negint64_callback(void *, uint64_t);
44 
45 void cbor_builder_string_callback(void *, cbor_data, size_t);
46 
48 
49 void cbor_builder_byte_string_callback(void *, cbor_data, size_t);
50 
52 
53 void cbor_builder_array_start_callback(void *, size_t);
54 
56 
57 void cbor_builder_map_start_callback(void *, size_t);
58 
60 
61 void cbor_builder_tag_callback(void *, uint64_t);
62 
63 void cbor_builder_float2_callback(void *, float);
64 
65 void cbor_builder_float4_callback(void *, float);
66 
67 void cbor_builder_float8_callback(void *, double);
68 
69 void cbor_builder_null_callback(void *);
70 
72 
73 void cbor_builder_boolean_callback(void *, bool);
74 
76 
77 #ifdef __cplusplus
78 }
79 #endif
80 
81 #endif //LIBCBOR_BUILDER_CALLBACKS_H
void cbor_builder_negint64_callback(void *, uint64_t)
+
void cbor_builder_negint32_callback(void *, uint32_t)
+
bool syntax_error
Stack expectation mismatch.
+
void cbor_builder_null_callback(void *)
+
Stack handle - contents and size.
Definition: stack.h:25
+
void cbor_builder_array_start_callback(void *, size_t)
+
void cbor_builder_uint32_callback(void *, uint32_t)
+
void cbor_builder_indef_array_start_callback(void *)
+
void cbor_builder_indef_break_callback(void *)
+
void cbor_builder_tag_callback(void *, uint64_t)
+
void cbor_builder_uint16_callback(void *, uint16_t)
+
High-level decoding context.
+ +
void cbor_builder_string_start_callback(void *)
+
void cbor_builder_indef_map_start_callback(void *)
+
void cbor_builder_float2_callback(void *, float)
+
void cbor_builder_byte_string_callback(void *, cbor_data, size_t)
+
void cbor_builder_byte_string_start_callback(void *)
+
void cbor_builder_float8_callback(void *, double)
+
void cbor_builder_undefined_callback(void *)
+
const unsigned char * cbor_data
Definition: data.h:20
+
struct _cbor_stack * stack
+
void cbor_builder_string_callback(void *, cbor_data, size_t)
+
void cbor_builder_uint8_callback(void *, uint8_t)
+
void cbor_builder_negint16_callback(void *, uint16_t)
+
void cbor_builder_boolean_callback(void *, bool)
+
void cbor_builder_map_start_callback(void *, size_t)
+
void cbor_builder_float4_callback(void *, float)
+ +
The item handle.
Definition: data.h:149
+
void cbor_builder_uint64_callback(void *, uint64_t)
+ +
void cbor_builder_negint8_callback(void *, uint8_t)
+
bool creation_failed
Callback creating the last item has failed.
+
+ + + + diff --git a/docs/doxygen/bytestrings_8c.html b/docs/doxygen/bytestrings_8c.html new file mode 100644 index 00000000..26702f65 --- /dev/null +++ b/docs/doxygen/bytestrings_8c.html @@ -0,0 +1,477 @@ + + + + + + + +libcbor: src/cbor/bytestrings.c File Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+Functions
+
+
bytestrings.c File Reference
+
+
+
#include <string.h>
+#include "bytestrings.h"
+#include "internal/memory_utils.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...
 
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_tcbor_new_definite_bytestring ()
 Creates a new definite byte string. More...
 
cbor_item_tcbor_new_indefinite_bytestring ()
 Creates a new indefinite byte string. More...
 
cbor_item_tcbor_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...
 
+

Function Documentation

+ +

§ cbor_build_bytestring()

+ +
+
+ + + + + + + + + + + + + + + + + + +
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

+
Parameters
+ + + +
handleBlock of binary data
lengthLength of data
+
+
+
Returns
A new byte string with content handle. NULL on malloc failure.
+ +

Definition at line 63 of file bytestrings.c.

+ +
+
+ +

§ cbor_bytestring_add_chunk()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool cbor_bytestring_add_chunk (cbor_item_titem,
cbor_item_tchunk 
)
+
+ +

Appends a chunk to the bytestring.

+

Indefinite byte strings only.

+

May realloc the chunk storage.

+
Parameters
+ + + +
item[borrow]An indefinite byte string
item[incref]A definite byte string
+
+
+
Returns
true on success, false on realloc failure. In that case, the refcount of chunk is not increased and the item is left intact.
+ +

Definition at line 95 of file bytestrings.c.

+ +
+
+ +

§ cbor_bytestring_chunk_count()

+ +
+
+ + + + + + + + +
size_t cbor_bytestring_chunk_count (const cbor_item_titem)
+
+ +

Get the number of chunks this string consist of.

+
Parameters
+ + +
item[borrow]A indefinite bytestring
+
+
+
Returns
The chunk count. 0 for freshly created items.
+ +

Definition at line 87 of file bytestrings.c.

+ +
+
+ +

§ cbor_bytestring_chunks_handle()

+ +
+
+ + + + + + + + +
cbor_item_t** cbor_bytestring_chunks_handle (const cbor_item_titem)
+
+ +

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.

+
Parameters
+ + +
item[borrow]A indefinite byte string
+
+
+
Returns
array of cbor_bytestring_chunk_count definite bytestrings
+ +

Definition at line 80 of file bytestrings.c.

+ +
+
+ +

§ cbor_bytestring_handle()

+ +
+
+ + + + + + + + +
unsigned char* cbor_bytestring_handle (const cbor_item_titem)
+
+ +

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

+
Parameters
+ + +
item[borrow]A definite byte string
+
+
+
Returns
The address of the binary data. NULL if no data have been assigned yet.
+ +

Definition at line 18 of file bytestrings.c.

+ +
+
+ +

§ cbor_bytestring_is_definite()

+ +
+
+ + + + + + + + +
bool cbor_bytestring_is_definite (const cbor_item_titem)
+
+ +

Is the byte string definite?

+
Parameters
+ + +
item[borrow]a byte string
+
+
+
Returns
Is the byte string definite?
+ +

Definition at line 24 of file bytestrings.c.

+ +
+
+ +

§ cbor_bytestring_is_indefinite()

+ +
+
+ + + + + + + + +
bool cbor_bytestring_is_indefinite (const cbor_item_titem)
+
+ +

Is the byte string indefinite?

+
Parameters
+ + +
item[borrow]a byte string
+
+
+
Returns
Is the byte string indefinite?
+ +

Definition at line 30 of file bytestrings.c.

+ +
+
+ +

§ cbor_bytestring_length()

+ +
+
+ + + + + + + + +
size_t cbor_bytestring_length (const cbor_item_titem)
+
+ +

Returns the length of the binary data.

+

For definite byte strings only

+
Parameters
+ + +
item[borrow]a definite bytestring
+
+
+
Returns
length of the binary data. Zero if no chunk has been attached yet
+ +

Definition at line 12 of file bytestrings.c.

+ +
+
+ +

§ cbor_bytestring_set_handle()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void cbor_bytestring_set_handle (cbor_item_titem,
cbor_mutable_data CBOR_RESTRICT_POINTER data,
size_t length 
)
+
+ +

Set the handle to the binary data.

+
Parameters
+ + + + +
item[borrow]A definite byte string
dataThe memory block. The caller gives up the ownership of the block. libcbor will deallocate it when appropriate using its free function
lengthLength of the data block
+
+
+ +

Definition at line 72 of file bytestrings.c.

+ +
+
+ +

§ cbor_new_definite_bytestring()

+ +
+
+ + + + + + + +
cbor_item_t* cbor_new_definite_bytestring ()
+
+ +

Creates a new definite byte string.

+

The handle is initialized to NULL and length to 0

+
Returns
new definite bytestring. NULL on malloc failure.
+ +

Definition at line 35 of file bytestrings.c.

+ +
+
+ +

§ cbor_new_indefinite_bytestring()

+ +
+
+ + + + + + + +
cbor_item_t* cbor_new_indefinite_bytestring ()
+
+ +

Creates a new indefinite byte string.

+

The chunks array is initialized to NULL and chunkcount to 0

+
Returns
new indefinite bytestring. NULL on malloc failure.
+ +

Definition at line 46 of file bytestrings.c.

+ +
+
+
+ + + + diff --git a/docs/doxygen/bytestrings_8c_source.html b/docs/doxygen/bytestrings_8c_source.html new file mode 100644 index 00000000..37ea9478 --- /dev/null +++ b/docs/doxygen/bytestrings_8c_source.html @@ -0,0 +1,116 @@ + + + + + + + +libcbor: src/cbor/bytestrings.c Source File + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
bytestrings.c
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 #include <string.h>
9 #include "bytestrings.h"
10 #include "internal/memory_utils.h"
11 
13 {
14  assert(cbor_isa_bytestring(item));
15  return item->metadata.bytestring_metadata.length;
16 }
17 
18 unsigned char *cbor_bytestring_handle(const cbor_item_t *item)
19 {
20  assert(cbor_isa_bytestring(item));
21  return item->data;
22 }
23 
25 {
26  assert(cbor_isa_bytestring(item));
28 }
29 
31 {
32  return !cbor_bytestring_is_definite(item);
33 }
34 
36 {
37  cbor_item_t *item = _CBOR_MALLOC(sizeof(cbor_item_t));
38  *item = (cbor_item_t) {
39  .refcount = 1,
40  .type = CBOR_TYPE_BYTESTRING,
41  .metadata = {.bytestring_metadata = {_CBOR_METADATA_DEFINITE, 0}}
42  };
43  return item;
44 }
45 
47 {
48  cbor_item_t *item = _CBOR_MALLOC(sizeof(cbor_item_t));
49  *item = (cbor_item_t) {
50  .refcount = 1,
51  .type = CBOR_TYPE_BYTESTRING,
52  .metadata = {.bytestring_metadata = {.type = _CBOR_METADATA_INDEFINITE, .length = 0}},
53  .data = _CBOR_MALLOC(sizeof(struct cbor_indefinite_string_data))
54  };
55  *((struct cbor_indefinite_string_data *) item->data) = (struct cbor_indefinite_string_data) {
56  .chunk_count = 0,
57  .chunk_capacity = 0,
58  .chunks = NULL,
59  };
60  return item;
61 }
62 
64 {
66  void * content = _CBOR_MALLOC(length);
67  memcpy(content, handle, length);
68  cbor_bytestring_set_handle(res, content, length);
69  return res;
70 }
71 
73 {
74  assert(cbor_isa_bytestring(item));
75  assert(cbor_bytestring_is_definite(item));
76  item->data = data;
77  item->metadata.bytestring_metadata.length = length;
78 }
79 
81 {
82  assert(cbor_isa_bytestring(item));
83  assert(cbor_bytestring_is_indefinite(item));
84  return ((struct cbor_indefinite_string_data *) item->data)->chunks;
85 }
86 
88 {
89  assert(cbor_isa_bytestring(item));
90  assert(cbor_bytestring_is_indefinite(item));
91  return ((struct cbor_indefinite_string_data *) item->data)->chunk_count;
92 
93 }
94 
96 {
97  assert(cbor_isa_bytestring(item));
98  assert(cbor_bytestring_is_indefinite(item));
99  struct cbor_indefinite_string_data *data = (struct cbor_indefinite_string_data *) item->data;
100  if (data->chunk_count == data->chunk_capacity) {
101  /* We need more space */
102  if (!_cbor_safe_to_multiply(CBOR_BUFFER_GROWTH, data->chunk_capacity)) {
103  return false;
104  }
105 
106  data->chunk_capacity = data->chunk_capacity == 0 ? 1 : CBOR_BUFFER_GROWTH * (data->chunk_capacity);
107 
108  cbor_item_t **new_chunks_data = _cbor_realloc_multiple(data->chunks, sizeof(cbor_item_t *), data->chunk_capacity);
109 
110  if (new_chunks_data == NULL) {
111  return false;
112  }
113 
114  data->chunks = new_chunks_data;
115  }
116  data->chunks[data->chunk_count++] = cbor_incref(chunk);
117  return true;
118 }
struct cbor_item_t cbor_item_t
The item handle.
+
bool cbor_bytestring_is_definite(const cbor_item_t *item)
Is the byte string definite?
Definition: bytestrings.c:24
+
cbor_item_t ** chunks
Definition: data.h:167
+
union cbor_item_metadata metadata
Discriminated by type.
Definition: data.h:151
+
2 - byte strings
Definition: data.h:27
+
cbor_item_t * cbor_new_indefinite_bytestring()
Creates a new indefinite byte string.
Definition: bytestrings.c:46
+
void * _cbor_realloc_multiple(void *pointer, size_t item_size, size_t item_count)
Overflow-proof contiguous array reallocation.
Definition: memory_utils.c:39
+ +
size_t cbor_bytestring_chunk_count(const cbor_item_t *item)
Get the number of chunks this string consist of.
Definition: bytestrings.c:87
+
cbor_item_t * cbor_new_definite_bytestring()
Creates a new definite byte string.
Definition: bytestrings.c:35
+
struct _cbor_bytestring_metadata bytestring_metadata
Definition: data.h:140
+
bool cbor_isa_bytestring(const cbor_item_t *item)
Does the item have the appropriate major type?
Definition: common.c:28
+
_cbor_dst_metadata type
Definition: data.h:84
+
#define CBOR_RESTRICT_POINTER
Definition: common.h:33
+
cbor_item_t ** cbor_bytestring_chunks_handle(const cbor_item_t *item)
Get the handle to the array of chunks.
Definition: bytestrings.c:80
+
bool cbor_bytestring_is_indefinite(const cbor_item_t *item)
Is the byte string indefinite?
Definition: bytestrings.c:30
+ +
#define _CBOR_MALLOC
Definition: common.h:84
+ +
size_t refcount
Reference count - initialize to 0.
Definition: data.h:153
+ +
unsigned char * cbor_mutable_data
Definition: data.h:21
+
bool cbor_bytestring_add_chunk(cbor_item_t *item, cbor_item_t *chunk)
Appends a chunk to the bytestring.
Definition: bytestrings.c:95
+
cbor_item_t * cbor_incref(cbor_item_t *item)
Increases the reference count by one.
Definition: common.c:93
+
Defines cbor_item_t::data structure for indefinite strings and bytestrings.
Definition: data.h:164
+
const unsigned char * cbor_data
Definition: data.h:20
+ + + +
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.
Definition: bytestrings.c:72
+
unsigned char * cbor_bytestring_handle(const cbor_item_t *item)
Get the handle to the binary data.
Definition: bytestrings.c:18
+
unsigned char * data
Raw data block - interpretation depends on metadata.
Definition: data.h:157
+
bool _cbor_safe_to_multiply(size_t a, size_t b)
Can a and b be multiplied without overflowing size_t?
Definition: memory_utils.c:25
+
The item handle.
Definition: data.h:149
+
cbor_item_t * cbor_build_bytestring(cbor_data handle, size_t length)
Creates a new byte string and initializes it.
Definition: bytestrings.c:63
+
size_t cbor_bytestring_length(const cbor_item_t *item)
Returns the length of the binary data.
Definition: bytestrings.c:12
+
+ + + + diff --git a/docs/doxygen/bytestrings_8h.html b/docs/doxygen/bytestrings_8h.html new file mode 100644 index 00000000..e59ddb8e --- /dev/null +++ b/docs/doxygen/bytestrings_8h.html @@ -0,0 +1,475 @@ + + + + + + + +libcbor: src/cbor/bytestrings.h File Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+Functions
+
+
bytestrings.h File Reference
+
+
+
#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_tcbor_new_definite_bytestring ()
 Creates a new definite byte string. More...
 
cbor_item_tcbor_new_indefinite_bytestring ()
 Creates a new indefinite byte string. More...
 
cbor_item_tcbor_build_bytestring (cbor_data handle, size_t length)
 Creates a new byte string and initializes it. More...
 
+

Function Documentation

+ +

§ cbor_build_bytestring()

+ +
+
+ + + + + + + + + + + + + + + + + + +
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

+
Parameters
+ + + +
handleBlock of binary data
lengthLength of data
+
+
+
Returns
A new byte string with content handle. NULL on malloc failure.
+ +

Definition at line 63 of file bytestrings.c.

+ +
+
+ +

§ cbor_bytestring_add_chunk()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool cbor_bytestring_add_chunk (cbor_item_titem,
cbor_item_tchunk 
)
+
+ +

Appends a chunk to the bytestring.

+

Indefinite byte strings only.

+

May realloc the chunk storage.

+
Parameters
+ + + +
item[borrow]An indefinite byte string
item[incref]A definite byte string
+
+
+
Returns
true on success, false on realloc failure. In that case, the refcount of chunk is not increased and the item is left intact.
+ +

Definition at line 95 of file bytestrings.c.

+ +
+
+ +

§ cbor_bytestring_chunk_count()

+ +
+
+ + + + + + + + +
size_t cbor_bytestring_chunk_count (const cbor_item_titem)
+
+ +

Get the number of chunks this string consist of.

+
Parameters
+ + +
item[borrow]A indefinite bytestring
+
+
+
Returns
The chunk count. 0 for freshly created items.
+ +

Definition at line 87 of file bytestrings.c.

+ +
+
+ +

§ cbor_bytestring_chunks_handle()

+ +
+
+ + + + + + + + +
cbor_item_t** cbor_bytestring_chunks_handle (const cbor_item_titem)
+
+ +

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.

+
Parameters
+ + +
item[borrow]A indefinite byte string
+
+
+
Returns
array of cbor_bytestring_chunk_count definite bytestrings
+ +

Definition at line 80 of file bytestrings.c.

+ +
+
+ +

§ cbor_bytestring_handle()

+ +
+
+ + + + + + + + +
cbor_mutable_data cbor_bytestring_handle (const cbor_item_titem)
+
+ +

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

+
Parameters
+ + +
item[borrow]A definite byte string
+
+
+
Returns
The address of the binary data. NULL if no data have been assigned yet.
+ +

Definition at line 18 of file bytestrings.c.

+ +
+
+ +

§ cbor_bytestring_is_definite()

+ +
+
+ + + + + + + + +
bool cbor_bytestring_is_definite (const cbor_item_titem)
+
+ +

Is the byte string definite?

+
Parameters
+ + +
item[borrow]a byte string
+
+
+
Returns
Is the byte string definite?
+ +

Definition at line 24 of file bytestrings.c.

+ +
+
+ +

§ cbor_bytestring_is_indefinite()

+ +
+
+ + + + + + + + +
bool cbor_bytestring_is_indefinite (const cbor_item_titem)
+
+ +

Is the byte string indefinite?

+
Parameters
+ + +
item[borrow]a byte string
+
+
+
Returns
Is the byte string indefinite?
+ +

Definition at line 30 of file bytestrings.c.

+ +
+
+ +

§ cbor_bytestring_length()

+ +
+
+ + + + + + + + +
size_t cbor_bytestring_length (const cbor_item_titem)
+
+ +

Returns the length of the binary data.

+

For definite byte strings only

+
Parameters
+ + +
item[borrow]a definite bytestring
+
+
+
Returns
length of the binary data. Zero if no chunk has been attached yet
+ +

Definition at line 12 of file bytestrings.c.

+ +
+
+ +

§ cbor_bytestring_set_handle()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void cbor_bytestring_set_handle (cbor_item_titem,
cbor_mutable_data CBOR_RESTRICT_POINTER data,
size_t length 
)
+
+ +

Set the handle to the binary data.

+
Parameters
+ + + + +
item[borrow]A definite byte string
dataThe memory block. The caller gives up the ownership of the block. libcbor will deallocate it when appropriate using its free function
lengthLength of the data block
+
+
+ +

Definition at line 72 of file bytestrings.c.

+ +
+
+ +

§ cbor_new_definite_bytestring()

+ +
+
+ + + + + + + +
cbor_item_t* cbor_new_definite_bytestring ()
+
+ +

Creates a new definite byte string.

+

The handle is initialized to NULL and length to 0

+
Returns
new definite bytestring. NULL on malloc failure.
+ +

Definition at line 35 of file bytestrings.c.

+ +
+
+ +

§ cbor_new_indefinite_bytestring()

+ +
+
+ + + + + + + +
cbor_item_t* cbor_new_indefinite_bytestring ()
+
+ +

Creates a new indefinite byte string.

+

The chunks array is initialized to NULL and chunkcount to 0

+
Returns
new indefinite bytestring. NULL on malloc failure.
+ +

Definition at line 46 of file bytestrings.c.

+ +
+
+
+ + + + diff --git a/docs/doxygen/bytestrings_8h_source.html b/docs/doxygen/bytestrings_8h_source.html new file mode 100644 index 00000000..f32a7f34 --- /dev/null +++ b/docs/doxygen/bytestrings_8h_source.html @@ -0,0 +1,96 @@ + + + + + + + +libcbor: src/cbor/bytestrings.h Source File + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
bytestrings.h
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 #ifndef LIBCBOR_BYTESTRINGS_H
9 #define LIBCBOR_BYTESTRINGS_H
10 
11 #include "cbor/common.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 /*
18 * ============================================================================
19 * Byte string manipulation
20 * ============================================================================
21 */
22 
30 size_t cbor_bytestring_length(const cbor_item_t *item);
31 
38 
45 
55 
63 
72 
78 size_t cbor_bytestring_chunk_count(const cbor_item_t *item);
79 
91 
99 
107 
116 cbor_item_t *cbor_build_bytestring(cbor_data handle, size_t length);
117 
118 #ifdef __cplusplus
119 }
120 #endif
121 
122 
123 #endif //LIBCBOR_BYTESTRINGS_H
cbor_item_t * cbor_build_bytestring(cbor_data handle, size_t length)
Creates a new byte string and initializes it.
Definition: bytestrings.c:63
+
bool cbor_bytestring_add_chunk(cbor_item_t *item, cbor_item_t *chunk)
Appends a chunk to the bytestring.
Definition: bytestrings.c:95
+
size_t cbor_bytestring_chunk_count(const cbor_item_t *item)
Get the number of chunks this string consist of.
Definition: bytestrings.c:87
+
bool cbor_bytestring_is_indefinite(const cbor_item_t *item)
Is the byte string indefinite?
Definition: bytestrings.c:30
+
#define CBOR_RESTRICT_POINTER
Definition: common.h:33
+
cbor_item_t * cbor_new_indefinite_bytestring()
Creates a new indefinite byte string.
Definition: bytestrings.c:46
+
unsigned char * cbor_mutable_data
Definition: data.h:21
+
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.
Definition: bytestrings.c:72
+
const unsigned char * cbor_data
Definition: data.h:20
+
bool cbor_bytestring_is_definite(const cbor_item_t *item)
Is the byte string definite?
Definition: bytestrings.c:24
+
cbor_item_t ** cbor_bytestring_chunks_handle(const cbor_item_t *item)
Get the handle to the array of chunks.
Definition: bytestrings.c:80
+
size_t cbor_bytestring_length(const cbor_item_t *item)
Returns the length of the binary data.
Definition: bytestrings.c:12
+ +
cbor_item_t * cbor_new_definite_bytestring()
Creates a new definite byte string.
Definition: bytestrings.c:35
+
The item handle.
Definition: data.h:149
+
cbor_mutable_data cbor_bytestring_handle(const cbor_item_t *item)
Get the handle to the binary data.
Definition: bytestrings.c:18
+
+ + + + diff --git a/docs/doxygen/callbacks_8c.html b/docs/doxygen/callbacks_8c.html new file mode 100644 index 00000000..39948ead --- /dev/null +++ b/docs/doxygen/callbacks_8c.html @@ -0,0 +1,462 @@ + + + + + + + +libcbor: src/cbor/callbacks.c File Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+Macros | +Functions | +Variables
+
+
callbacks.c File Reference
+
+
+
#include "callbacks.h"
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define CBOR_DUMMY_CALLBACK   { }
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

void cbor_null_uint8_callback (void *_ctx, uint8_t _val) CBOR_DUMMY_CALLBACK void cbor_null_uint16_callback(void *_ctx
 Dummy callback implementation - does nothing. More...
 
void uint16_t _val CBOR_DUMMY_CALLBACK void cbor_null_uint32_callback (void *_ctx, uint32_t _val) CBOR_DUMMY_CALLBACK void cbor_null_uint64_callback(void *_ctx
 Dummy callback implementation - does nothing. More...
 
void uint16_t _val CBOR_DUMMY_CALLBACK void uint64_t _val CBOR_DUMMY_CALLBACK void cbor_null_negint8_callback (void *_ctx, uint8_t _val) CBOR_DUMMY_CALLBACK void cbor_null_negint16_callback(void *_ctx
 Dummy callback implementation - does nothing. More...
 
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) CBOR_DUMMY_CALLBACK void cbor_null_negint64_callback(void *_ctx
 Dummy callback implementation - does nothing. More...
 
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) CBOR_DUMMY_CALLBACK void cbor_null_string_start_callback(void *_ctx) CBOR_DUMMY_CALLBACK void cbor_null_byte_string_callback(void *_ctx
 Dummy callback implementation - does nothing. More...
 
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) CBOR_DUMMY_CALLBACK void cbor_null_array_start_callback(void *_ctx
 Dummy callback implementation - does nothing. More...
 
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) CBOR_DUMMY_CALLBACK void cbor_null_map_start_callback(void *_ctx
 Dummy callback implementation - does nothing. More...
 
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) CBOR_DUMMY_CALLBACK void cbor_null_tag_callback(void *_ctx
 Dummy callback implementation - does nothing. More...
 
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) CBOR_DUMMY_CALLBACK void cbor_null_float4_callback(void *_ctx
 Dummy callback implementation - does nothing. More...
 
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) CBOR_DUMMY_CALLBACK void cbor_null_null_callback(void *_ctx) CBOR_DUMMY_CALLBACK void cbor_null_undefined_callback(void *_ctx) CBOR_DUMMY_CALLBACK void cbor_null_boolean_callback(void *_ctx
 Dummy callback implementation - does nothing. More...
 
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) CBOR_DUMMY_CALLBACK const struct cbor_callbacks cbor_empty_callbacks
 
+ + + +

+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
 
+

Macro Definition Documentation

+ +

§ CBOR_DUMMY_CALLBACK

+ +
+
+ + + + +
#define CBOR_DUMMY_CALLBACK   { }
+
+ +

Definition at line 10 of file callbacks.c.

+ +
+
+

Function Documentation

+ +

§ cbor_null_byte_string_start_callback()

+ +
+
+ + + + + + + + +
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.

+ +
+
+ +

§ cbor_null_float2_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
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.

+ +
+
+ +

§ cbor_null_float8_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
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.

+ +
+
+ +

§ cbor_null_indef_array_start_callback()

+ +
+
+ + + + + + + + +
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.

+ +
+
+ +

§ cbor_null_indef_break_callback()

+ +
+
+ + + + + + + + +
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
+
+ +
+
+ +

§ cbor_null_indef_map_start_callback()

+ +
+
+ + + + + + + + +
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.

+ +
+
+ +

§ cbor_null_negint32_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
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.

+ +
+
+ +

§ cbor_null_negint8_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
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.

+ +
+
+ +

§ cbor_null_string_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
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.

+ +
+
+ +

§ cbor_null_uint32_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void uint16_t _val CBOR_DUMMY_CALLBACK void cbor_null_uint32_callback (void * _ctx,
uint32_t _val 
)
+
+ +

Dummy callback implementation - does nothing.

+ +
+
+ +

§ cbor_null_uint8_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_null_uint8_callback (void * _ctx,
uint8_t _val 
)
+
+ +

Dummy callback implementation - does nothing.

+ +
+
+

Variable Documentation

+ +

§ _val

+ +
+
+ + + + +
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.

+ +
+
+
+ + + + diff --git a/docs/doxygen/callbacks_8c_source.html b/docs/doxygen/callbacks_8c_source.html new file mode 100644 index 00000000..c77e184b --- /dev/null +++ b/docs/doxygen/callbacks_8c_source.html @@ -0,0 +1,111 @@ + + + + + + + +libcbor: src/cbor/callbacks.c Source File + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
callbacks.c
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 #include "callbacks.h"
9 
10 #define CBOR_DUMMY_CALLBACK { }
11 
12 void cbor_null_uint8_callback(void *_ctx, uint8_t _val) CBOR_DUMMY_CALLBACK
13 
14 void cbor_null_uint16_callback(void *_ctx, uint16_t _val) CBOR_DUMMY_CALLBACK
15 
16 void cbor_null_uint32_callback(void *_ctx, uint32_t _val) CBOR_DUMMY_CALLBACK
17 
18 void cbor_null_uint64_callback(void *_ctx, uint64_t _val) CBOR_DUMMY_CALLBACK
19 
20 void cbor_null_negint8_callback(void *_ctx, uint8_t _val) CBOR_DUMMY_CALLBACK
21 
22 void cbor_null_negint16_callback(void *_ctx, uint16_t _val) CBOR_DUMMY_CALLBACK
23 
24 void cbor_null_negint32_callback(void *_ctx, uint32_t _val) CBOR_DUMMY_CALLBACK
25 
26 void cbor_null_negint64_callback(void *_ctx, uint64_t _val) CBOR_DUMMY_CALLBACK
27 
28 void cbor_null_string_callback(void *_ctx, cbor_data _val, size_t _val2) CBOR_DUMMY_CALLBACK
29 
31 
33 
35 
37 
39 
41 
43 
44 void cbor_null_tag_callback(void *_ctx, uint64_t _val) CBOR_DUMMY_CALLBACK
45 
47 
49 
50 void cbor_null_float8_callback(void *_ctx, double _val) CBOR_DUMMY_CALLBACK
51 
53 
55 
57 
59 
60 const struct cbor_callbacks cbor_empty_callbacks = {
61  /* Type 0 - Unsigned integers */
63  .uint16 = cbor_null_uint16_callback,
64  .uint32 = cbor_null_uint32_callback,
65  .uint64 = cbor_null_uint64_callback,
66 
67  /* Type 1 - Negative integers */
68  .negint8 = cbor_null_negint8_callback,
69  .negint16 = cbor_null_negint16_callback,
70  .negint32 = cbor_null_negint32_callback,
71  .negint64 = cbor_null_negint64_callback,
72 
73  /* Type 2 - Byte strings */
74  .byte_string_start = cbor_null_byte_string_start_callback,
75  .byte_string = cbor_null_byte_string_callback,
76 
77  /* Type 3 - Strings */
78  .string_start = cbor_null_string_start_callback,
79  .string = cbor_null_string_callback,
80 
81  /* Type 4 - Arrays */
82  .indef_array_start = cbor_null_indef_array_start_callback,
83  .array_start = cbor_null_array_start_callback,
84 
85  /* Type 5 - Maps */
86  .indef_map_start = cbor_null_indef_map_start_callback,
87  .map_start = cbor_null_map_start_callback,
88 
89  /* Type 6 - Tags */
91 
92  /* Type 7 - Floats & misc */
93  /* Type names cannot be member names */
94  .float2 = cbor_null_float2_callback,
95  /* 2B float is not supported in standard C */
96  .float4 = cbor_null_float4_callback,
97  .float8 = cbor_null_float8_callback,
98  .undefined = cbor_null_undefined_callback,
100  .boolean = cbor_null_boolean_callback,
101 
102  /* Shared indefinites */
103  .indef_break = cbor_null_indef_break_callback,
104 };
void cbor_null_tag_callback(void *, uint64_t)
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) CBOR_DUMMY_CALLBACK void cbor_null_negint16_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 _val
Definition: callbacks.c:32
+
void cbor_null_null_callback(void *)
Dummy callback implementation - does nothing.
+
cbor_int8_callback uint8
Unsigned int.
Definition: callbacks.h:50
+
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) CBOR_DUMMY_CALLBACK void cbor_null_map_start_callback(void *_ctx
Dummy callback implementation - does nothing.
+
void cbor_null_float4_callback(void *, float)
Dummy callback implementation - does nothing.
+
void cbor_null_negint64_callback(void *, uint64_t)
Dummy callback implementation - does nothing.
+
void cbor_null_uint8_callback(void *_ctx, uint8_t _val) CBOR_DUMMY_CALLBACK void cbor_null_uint16_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) CBOR_DUMMY_CALLBACK void cbor_null_float4_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 cbor_null_float8_callback(void *_ctx, double _val) CBOR_DUMMY_CALLBACK void cbor_null_null_callback(void *_ctx) CBOR_DUMMY_CALLBACK void cbor_null_undefined_callback(void *_ctx) CBOR_DUMMY_CALLBACK void cbor_null_boolean_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) CBOR_DUMMY_CALLBACK const struct cbor_callbacks cbor_empty_callbacks
+
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) CBOR_DUMMY_CALLBACK void cbor_null_array_start_callback(void *_ctx
Dummy callback implementation - does nothing.
+
void cbor_null_map_start_callback(void *, size_t)
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) CBOR_DUMMY_CALLBACK void cbor_null_string_start_callback(void *_ctx) CBOR_DUMMY_CALLBACK void cbor_null_byte_string_callback(void *_ctx
Dummy callback implementation - does nothing.
+
void cbor_null_undefined_callback(void *)
Dummy callback implementation - does nothing.
+
const unsigned char * cbor_data
Definition: data.h:20
+
void cbor_null_array_start_callback(void *, size_t)
Dummy callback implementation - does nothing.
+
void cbor_null_uint64_callback(void *, uint64_t)
Dummy callback implementation - does nothing.
+
const struct cbor_callbacks cbor_empty_callbacks
Dummy callback bundle - does nothing.
+
void cbor_null_boolean_callback(void *, bool)
Dummy callback implementation - does nothing.
+
void cbor_null_negint16_callback(void *, uint16_t)
Dummy callback implementation - does nothing.
+
Callback bundle – passed to the decoder.
Definition: callbacks.h:48
+
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) CBOR_DUMMY_CALLBACK void cbor_null_negint64_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 cbor_null_indef_map_start_callback(void *_ctx) CBOR_DUMMY_CALLBACK void cbor_null_tag_callback(void *_ctx
Dummy callback implementation - does nothing.
+
void cbor_null_uint16_callback(void *, uint16_t)
Dummy callback implementation - does nothing.
+
void uint16_t _val CBOR_DUMMY_CALLBACK void cbor_null_uint32_callback(void *_ctx, uint32_t _val) CBOR_DUMMY_CALLBACK void cbor_null_uint64_callback(void *_ctx
Dummy callback implementation - does nothing.
+
void cbor_null_byte_string_callback(void *, cbor_data, size_t)
Dummy callback implementation - does nothing.
+ +
void cbor_null_string_start_callback(void *)
Dummy callback implementation - does nothing.
+
#define CBOR_DUMMY_CALLBACK
Definition: callbacks.c:10
+
+ + + + diff --git a/docs/doxygen/callbacks_8h.html b/docs/doxygen/callbacks_8h.html new file mode 100644 index 00000000..593f1411 --- /dev/null +++ b/docs/doxygen/callbacks_8h.html @@ -0,0 +1,1070 @@ + + + + + + + +libcbor: src/cbor/callbacks.h File Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+Data Structures | +Typedefs | +Functions | +Variables
+
+
callbacks.h File Reference
+
+
+
#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 Documentation

+ +

§ cbor_bool_callback

+ +
+
+ + + + +
typedef void(* cbor_bool_callback) (void *, bool)
+
+ +

Callback prototype.

+ +

Definition at line 45 of file callbacks.h.

+ +
+
+ +

§ cbor_collection_callback

+ +
+
+ + + + +
typedef void(* cbor_collection_callback) (void *, size_t)
+
+ +

Callback prototype.

+ +

Definition at line 36 of file callbacks.h.

+ +
+
+ +

§ cbor_double_callback

+ +
+
+ + + + +
typedef void(* cbor_double_callback) (void *, double)
+
+ +

Callback prototype.

+ +

Definition at line 42 of file callbacks.h.

+ +
+
+ +

§ cbor_float_callback

+ +
+
+ + + + +
typedef void(* cbor_float_callback) (void *, float)
+
+ +

Callback prototype.

+ +

Definition at line 39 of file callbacks.h.

+ +
+
+ +

§ cbor_int16_callback

+ +
+
+ + + + +
typedef void(* cbor_int16_callback) (void *, uint16_t)
+
+ +

Callback prototype.

+ +

Definition at line 21 of file callbacks.h.

+ +
+
+ +

§ cbor_int32_callback

+ +
+
+ + + + +
typedef void(* cbor_int32_callback) (void *, uint32_t)
+
+ +

Callback prototype.

+ +

Definition at line 24 of file callbacks.h.

+ +
+
+ +

§ cbor_int64_callback

+ +
+
+ + + + +
typedef void(* cbor_int64_callback) (void *, uint64_t)
+
+ +

Callback prototype.

+ +

Definition at line 27 of file callbacks.h.

+ +
+
+ +

§ cbor_int8_callback

+ +
+
+ + + + +
typedef void(* cbor_int8_callback) (void *, uint8_t)
+
+ +

Callback prototype.

+ +

Definition at line 18 of file callbacks.h.

+ +
+
+ +

§ cbor_simple_callback

+ +
+
+ + + + +
typedef void(* cbor_simple_callback) (void *)
+
+ +

Callback prototype.

+ +

Definition at line 30 of file callbacks.h.

+ +
+
+ +

§ cbor_string_callback

+ +
+
+ + + + +
typedef void(* cbor_string_callback) (void *, cbor_data, size_t)
+
+ +

Callback prototype.

+ +

Definition at line 33 of file callbacks.h.

+ +
+
+

Function Documentation

+ +

§ cbor_null_array_start_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_null_array_start_callback (void * ,
size_t  
)
+
+ +

Dummy callback implementation - does nothing.

+ +
+
+ +

§ cbor_null_boolean_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_null_boolean_callback (void * ,
bool  
)
+
+ +

Dummy callback implementation - does nothing.

+ +
+
+ +

§ cbor_null_byte_string_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void cbor_null_byte_string_callback (void * ,
cbor_data ,
size_t  
)
+
+ +

Dummy callback implementation - does nothing.

+ +
+
+ +

§ cbor_null_byte_string_start_callback()

+ +
+
+ + + + + + + + +
void cbor_null_byte_string_start_callback (void * )
+
+ +

Dummy callback implementation - does nothing.

+ +
+
+ +

§ cbor_null_float2_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_null_float2_callback (void * ,
float  
)
+
+ +

Dummy callback implementation - does nothing.

+ +
+
+ +

§ cbor_null_float4_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_null_float4_callback (void * ,
float  
)
+
+ +

Dummy callback implementation - does nothing.

+ +
+
+ +

§ cbor_null_float8_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_null_float8_callback (void * ,
double  
)
+
+ +

Dummy callback implementation - does nothing.

+ +
+
+ +

§ cbor_null_indef_array_start_callback()

+ +
+
+ + + + + + + + +
void cbor_null_indef_array_start_callback (void * )
+
+ +

Dummy callback implementation - does nothing.

+ +
+
+ +

§ cbor_null_indef_break_callback()

+ +
+
+ + + + + + + + +
void cbor_null_indef_break_callback (void * )
+
+ +

Dummy callback implementation - does nothing.

+ +
+
+ +

§ cbor_null_indef_map_start_callback()

+ +
+
+ + + + + + + + +
void cbor_null_indef_map_start_callback (void * )
+
+ +

Dummy callback implementation - does nothing.

+ +
+
+ +

§ cbor_null_map_start_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_null_map_start_callback (void * ,
size_t  
)
+
+ +

Dummy callback implementation - does nothing.

+ +
+
+ +

§ cbor_null_negint16_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_null_negint16_callback (void * ,
uint16_t  
)
+
+ +

Dummy callback implementation - does nothing.

+ +
+
+ +

§ cbor_null_negint32_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_null_negint32_callback (void * ,
uint32_t  
)
+
+ +

Dummy callback implementation - does nothing.

+ +
+
+ +

§ cbor_null_negint64_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_null_negint64_callback (void * ,
uint64_t  
)
+
+ +

Dummy callback implementation - does nothing.

+ +
+
+ +

§ cbor_null_negint8_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_null_negint8_callback (void * ,
uint8_t  
)
+
+ +

Dummy callback implementation - does nothing.

+ +
+
+ +

§ cbor_null_null_callback()

+ +
+
+ + + + + + + + +
void cbor_null_null_callback (void * )
+
+ +

Dummy callback implementation - does nothing.

+ +
+
+ +

§ cbor_null_string_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void cbor_null_string_callback (void * ,
cbor_data ,
size_t  
)
+
+ +

Dummy callback implementation - does nothing.

+ +
+
+ +

§ cbor_null_string_start_callback()

+ +
+
+ + + + + + + + +
void cbor_null_string_start_callback (void * )
+
+ +

Dummy callback implementation - does nothing.

+ +
+
+ +

§ cbor_null_tag_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_null_tag_callback (void * ,
uint64_t  
)
+
+ +

Dummy callback implementation - does nothing.

+ +
+
+ +

§ cbor_null_uint16_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_null_uint16_callback (void * ,
uint16_t  
)
+
+ +

Dummy callback implementation - does nothing.

+ +
+
+ +

§ cbor_null_uint32_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_null_uint32_callback (void * ,
uint32_t  
)
+
+ +

Dummy callback implementation - does nothing.

+ +
+
+ +

§ cbor_null_uint64_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_null_uint64_callback (void * ,
uint64_t  
)
+
+ +

Dummy callback implementation - does nothing.

+ +
+
+ +

§ cbor_null_uint8_callback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_null_uint8_callback (void * ,
uint8_t  
)
+
+ +

Dummy callback implementation - does nothing.

+ +
+
+ +

§ cbor_null_undefined_callback()

+ +
+
+ + + + + + + + +
void cbor_null_undefined_callback (void * )
+
+ +

Dummy callback implementation - does nothing.

+ +
+
+

Variable Documentation

+ +

§ cbor_empty_callbacks

+ +
+
+ + + + +
const struct cbor_callbacks cbor_empty_callbacks
+
+ +

Dummy callback bundle - does nothing.

+ +
+
+
+ + + + diff --git a/docs/doxygen/callbacks_8h_source.html b/docs/doxygen/callbacks_8h_source.html new file mode 100644 index 00000000..5466c119 --- /dev/null +++ b/docs/doxygen/callbacks_8h_source.html @@ -0,0 +1,142 @@ + + + + + + + +libcbor: src/cbor/callbacks.h Source File + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
callbacks.h
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 #ifndef LIBCBOR_CALLBACKS_H
9 #define LIBCBOR_CALLBACKS_H
10 
11 #include "cbor/common.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
18 typedef void(*cbor_int8_callback)(void *, uint8_t);
19 
21 typedef void(*cbor_int16_callback)(void *, uint16_t);
22 
24 typedef void(*cbor_int32_callback)(void *, uint32_t);
25 
27 typedef void(*cbor_int64_callback)(void *, uint64_t);
28 
30 typedef void(*cbor_simple_callback)(void *);
31 
33 typedef void(*cbor_string_callback)(void *, cbor_data, size_t);
34 
36 typedef void(*cbor_collection_callback)(void *, size_t);
37 
39 typedef void(*cbor_float_callback)(void *, float);
40 
42 typedef void(*cbor_double_callback)(void *, double);
43 
45 typedef void(*cbor_bool_callback)(void *, bool);
46 
57 
66 
71 
76 
81 
86 
89 
102 
105 };
106 
108 void cbor_null_uint8_callback(void *, uint8_t);
109 
111 void cbor_null_uint16_callback(void *, uint16_t);
112 
114 void cbor_null_uint32_callback(void *, uint32_t);
115 
117 void cbor_null_uint64_callback(void *, uint64_t);
118 
120 void cbor_null_negint8_callback(void *, uint8_t);
121 
123 void cbor_null_negint16_callback(void *, uint16_t);
124 
126 void cbor_null_negint32_callback(void *, uint32_t);
127 
129 void cbor_null_negint64_callback(void *, uint64_t);
130 
132 void cbor_null_string_callback(void *, cbor_data, size_t);
133 
136 
138 void cbor_null_byte_string_callback(void *, cbor_data, size_t);
139 
142 
144 void cbor_null_array_start_callback(void *, size_t);
145 
148 
150 void cbor_null_map_start_callback(void *, size_t);
151 
154 
156 void cbor_null_tag_callback(void *, uint64_t);
157 
159 void cbor_null_float2_callback(void *, float);
160 
162 void cbor_null_float4_callback(void *, float);
163 
165 void cbor_null_float8_callback(void *, double);
166 
168 void cbor_null_null_callback(void *);
169 
171 void cbor_null_undefined_callback(void *);
172 
174 void cbor_null_boolean_callback(void *, bool);
175 
177 void cbor_null_indef_break_callback(void *);
178 
180 extern const struct cbor_callbacks cbor_empty_callbacks;
181 
182 #ifdef __cplusplus
183 }
184 #endif
185 
186 
187 #endif //LIBCBOR_CALLBACKS_H
void cbor_null_tag_callback(void *, uint64_t)
Dummy callback implementation - does nothing.
+
cbor_simple_callback indef_array_start
Definite array.
Definition: callbacks.h:78
+
void cbor_null_byte_string_start_callback(void *)
Dummy callback implementation - does nothing.
+
void(* cbor_simple_callback)(void *)
Callback prototype.
Definition: callbacks.h:30
+
void cbor_null_indef_map_start_callback(void *)
Dummy callback implementation - does nothing.
+
void(* cbor_int64_callback)(void *, uint64_t)
Callback prototype.
Definition: callbacks.h:27
+
cbor_string_callback string
Definite string.
Definition: callbacks.h:73
+
void(* cbor_int8_callback)(void *, uint8_t)
Callback prototype.
Definition: callbacks.h:18
+
void cbor_null_negint8_callback(void *, uint8_t)
Dummy callback implementation - does nothing.
+
void cbor_null_null_callback(void *)
Dummy callback implementation - does nothing.
+
cbor_int8_callback uint8
Unsigned int.
Definition: callbacks.h:50
+
void cbor_null_string_callback(void *, cbor_data, size_t)
Dummy callback implementation - does nothing.
+
cbor_int16_callback negint16
Negative int.
Definition: callbacks.h:63
+
cbor_double_callback float8
Double float.
Definition: callbacks.h:95
+
void cbor_null_float4_callback(void *, float)
Dummy callback implementation - does nothing.
+
void cbor_null_negint64_callback(void *, uint64_t)
Dummy callback implementation - does nothing.
+
void(* cbor_double_callback)(void *, double)
Callback prototype.
Definition: callbacks.h:42
+
void(* cbor_float_callback)(void *, float)
Callback prototype.
Definition: callbacks.h:39
+
cbor_collection_callback map_start
Indefinite map.
Definition: callbacks.h:85
+
cbor_simple_callback indef_map_start
Definite map.
Definition: callbacks.h:83
+
cbor_bool_callback boolean
Bool.
Definition: callbacks.h:101
+
void(* cbor_string_callback)(void *, cbor_data, size_t)
Callback prototype.
Definition: callbacks.h:33
+
void cbor_null_float2_callback(void *, float)
Dummy callback implementation - does nothing.
+
cbor_simple_callback byte_string_start
Definite byte string.
Definition: callbacks.h:68
+
void cbor_null_map_start_callback(void *, size_t)
Dummy callback implementation - does nothing.
+
cbor_float_callback float2
Half float.
Definition: callbacks.h:91
+
cbor_int32_callback uint32
Unsigned int.
Definition: callbacks.h:54
+
void(* cbor_bool_callback)(void *, bool)
Callback prototype.
Definition: callbacks.h:45
+
cbor_int64_callback uint64
Unsigned int.
Definition: callbacks.h:56
+
cbor_simple_callback string_start
Indefinite string start.
Definition: callbacks.h:75
+
cbor_simple_callback undefined
Undef.
Definition: callbacks.h:97
+
cbor_int64_callback negint64
Negative int.
Definition: callbacks.h:59
+
cbor_int8_callback negint8
Negative int.
Definition: callbacks.h:65
+
cbor_simple_callback null
Null.
Definition: callbacks.h:99
+
void cbor_null_negint32_callback(void *, uint32_t)
Dummy callback implementation - does nothing.
+
void cbor_null_indef_break_callback(void *)
Dummy callback implementation - does nothing.
+
cbor_float_callback float4
Single float.
Definition: callbacks.h:93
+
void(* cbor_collection_callback)(void *, size_t)
Callback prototype.
Definition: callbacks.h:36
+
void cbor_null_undefined_callback(void *)
Dummy callback implementation - does nothing.
+
cbor_string_callback byte_string
Indefinite byte string start.
Definition: callbacks.h:70
+
void(* cbor_int16_callback)(void *, uint16_t)
Callback prototype.
Definition: callbacks.h:21
+
const unsigned char * cbor_data
Definition: data.h:20
+
void cbor_null_array_start_callback(void *, size_t)
Dummy callback implementation - does nothing.
+
void cbor_null_uint64_callback(void *, uint64_t)
Dummy callback implementation - does nothing.
+
const struct cbor_callbacks cbor_empty_callbacks
Dummy callback bundle - does nothing.
+
cbor_int64_callback tag
Tags.
Definition: callbacks.h:88
+
void cbor_null_boolean_callback(void *, bool)
Dummy callback implementation - does nothing.
+
void cbor_null_negint16_callback(void *, uint16_t)
Dummy callback implementation - does nothing.
+
Callback bundle – passed to the decoder.
Definition: callbacks.h:48
+
void cbor_null_float8_callback(void *, double)
Dummy callback implementation - does nothing.
+
void cbor_null_uint8_callback(void *, uint8_t)
Dummy callback implementation - does nothing.
+
void cbor_null_uint16_callback(void *, uint16_t)
Dummy callback implementation - does nothing.
+
void cbor_null_indef_array_start_callback(void *)
Dummy callback implementation - does nothing.
+
void(* cbor_int32_callback)(void *, uint32_t)
Callback prototype.
Definition: callbacks.h:24
+
cbor_simple_callback indef_break
Indefinite item break.
Definition: callbacks.h:104
+
cbor_collection_callback array_start
Indefinite array.
Definition: callbacks.h:80
+
cbor_int16_callback uint16
Unsigned int.
Definition: callbacks.h:52
+ +
void cbor_null_uint32_callback(void *, uint32_t)
Dummy callback implementation - does nothing.
+
void cbor_null_byte_string_callback(void *, cbor_data, size_t)
Dummy callback implementation - does nothing.
+
cbor_int32_callback negint32
Negative int.
Definition: callbacks.h:61
+
void cbor_null_string_start_callback(void *)
Dummy callback implementation - does nothing.
+
+ + + + diff --git a/docs/doxygen/cbor_8c.html b/docs/doxygen/cbor_8c.html new file mode 100644 index 00000000..2dae0433 --- /dev/null +++ b/docs/doxygen/cbor_8c.html @@ -0,0 +1,175 @@ + + + + + + + +libcbor: src/cbor.c File Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+Functions
+
+
cbor.c File Reference
+
+
+
#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_tcbor_load (cbor_data source, size_t source_size, struct cbor_load_result *result)
 Loads data item from a buffer. More...
 
cbor_item_tcbor_copy (cbor_item_t *item)
 Deep copy of an item. More...
 
+

Function Documentation

+ +

§ cbor_copy()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_copy (cbor_item_titem)
+
+ +

Deep copy of an item.

+

All the reference counts in the new structure are set to one.

+
Parameters
+ + +
item[borrow]item to copy
+
+
+
Returns
new CBOR deep copy
+ +

Definition at line 164 of file cbor.c.

+ +
+
+ +

§ cbor_load()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
cbor_item_t* cbor_load (cbor_data source,
size_t source_size,
struct cbor_load_resultresult 
)
+
+ +

Loads data item from a buffer.

+
Parameters
+ + + + +
sourceThe buffer
source_size
result[out]Result indicator. CBOR_ERR_NONE on success
+
+
+
Returns
new CBOR item or NULL on failure. In that case, result contains location and description of the error.
+ +

Definition at line 12 of file cbor.c.

+ +
+
+
+ + + + diff --git a/docs/doxygen/cbor_8c_source.html b/docs/doxygen/cbor_8c_source.html new file mode 100644 index 00000000..d034a569 --- /dev/null +++ b/docs/doxygen/cbor_8c_source.html @@ -0,0 +1,226 @@ + + + + + + + +libcbor: src/cbor.c Source File + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
cbor.c
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 #include "cbor.h"
10 #include "cbor/internal/loaders.h"
11 
13  size_t source_size,
14  struct cbor_load_result *result)
15 {
16  /* Context stack */
17  static struct cbor_callbacks callbacks = {
22 
24  .negint16 = &cbor_builder_negint16_callback,
25  .negint32 = &cbor_builder_negint32_callback,
26  .negint64 = &cbor_builder_negint64_callback,
27 
28  .byte_string = &cbor_builder_byte_string_callback,
29  .byte_string_start = &cbor_builder_byte_string_start_callback,
30 
32  .string_start = &cbor_builder_string_start_callback,
33 
34  .array_start = &cbor_builder_array_start_callback,
35  .indef_array_start = &cbor_builder_indef_array_start_callback,
36 
37  .map_start = &cbor_builder_map_start_callback,
38  .indef_map_start = &cbor_builder_indef_map_start_callback,
39 
41 
43  .undefined = &cbor_builder_undefined_callback,
48  .indef_break = &cbor_builder_indef_break_callback
49  };
50 
51  if (source_size == 0) {
52  result->error.code = CBOR_ERR_NODATA;
53  return NULL;
54  }
55  struct _cbor_stack stack = _cbor_stack_init();
56 
57  /* Target for callbacks */
58  struct _cbor_decoder_context context = (struct _cbor_decoder_context) {
59  .stack = &stack,
60  .creation_failed = false,
61  .syntax_error = false
62  };
63  struct cbor_decoder_result decode_result;
64  *result = (struct cbor_load_result) {.read = 0, .error = {.code = CBOR_ERR_NONE}};
65 
66  do {
67  if (source_size > result->read) { /* Check for overflows */
68  decode_result = cbor_stream_decode(
69  source + result->read,
70  source_size - result->read,
71  &callbacks,
72  &context);
73  } else {
74  result->error = (struct cbor_error) {
75  .code = CBOR_ERR_NOTENOUGHDATA,
76  .position = result->read
77  };
78  goto error;
79  }
80 
81  switch (decode_result.status) {
83  /* Everything OK */
84  {
85  result->read += decode_result.read;
86  break;
87  }
89  /* Data length doesn't match MTB expectation */
90  {
91  result->error.code = CBOR_ERR_NOTENOUGHDATA;
92  goto error;
93  }
95  /* Fallthrough */
96  case CBOR_DECODER_ERROR:
97  /* Reserved/malformated item */
98  {
99  result->error.code = CBOR_ERR_MALFORMATED;
100  goto error;
101  }
102  }
103 
104  if (context.creation_failed) {
105  /* Most likely unsuccessful allocation - our callback has failed */
106  result->error.code = CBOR_ERR_MEMERROR;
107  goto error;
108  } else if (context.syntax_error) {
109  result->error.code = CBOR_ERR_SYNTAXERROR;
110  goto error;
111  }
112  } while (stack.size > 0);
113 
114  /* Move the result before free */
115  cbor_item_t *result_item = context.root;
116  return result_item;
117 
118  error:
119  result->error.position = result->read;
120  //debug_print("Failed with decoder error %d at %d\n", result->error.code, result->error.position);
121  //cbor_describe(stack.top->item, stdout);
122  /* Free the stack */
123  while (stack.size > 0) {
124  cbor_decref(&stack.top->item);
125  _cbor_stack_pop(&stack);
126  }
127  return NULL;
128 }
129 
130 
131 static cbor_item_t * _cbor_copy_int(cbor_item_t * item, bool negative)
132 {
133  cbor_item_t * res;
134  switch (cbor_int_get_width(item)) {
135  case CBOR_INT_8: res = cbor_build_uint8(cbor_get_uint8(item)); break;
136  case CBOR_INT_16: res = cbor_build_uint16(cbor_get_uint16(item)); break;
137  case CBOR_INT_32: res = cbor_build_uint32(cbor_get_uint32(item)); break;
138  case CBOR_INT_64: res = cbor_build_uint64(cbor_get_uint64(item)); break;
139  default: return NULL;
140  }
141 
142  if (negative)
143  cbor_mark_negint(res);
144 
145  return res;
146 }
147 
148 static cbor_item_t * _cbor_copy_float_ctrl(cbor_item_t * item)
149 {
150  switch (cbor_float_get_width(item)) {
151  case CBOR_FLOAT_0:
152  return cbor_build_ctrl(cbor_ctrl_value(item));
153  case CBOR_FLOAT_16:
155  case CBOR_FLOAT_32:
157  case CBOR_FLOAT_64:
159  }
160 
161  return NULL;
162 }
163 
165 {
166  switch (cbor_typeof(item)) {
167  case CBOR_TYPE_UINT:
168  return _cbor_copy_int(item, false);
169  case CBOR_TYPE_NEGINT:
170  return _cbor_copy_int(item, true);
172  if (cbor_bytestring_is_definite(item)) {
174  } else {
176  for (size_t i = 0; i < cbor_bytestring_chunk_count(item); i++)
178  res,
179  cbor_move(
181  )
182  );
183  return res;
184  }
185  case CBOR_TYPE_STRING:
186  if (cbor_string_is_definite(item)) {
187  return cbor_build_stringn((const char *) cbor_string_handle(item), cbor_string_length(item));
188  } else {
190  for (size_t i = 0; i < cbor_string_chunk_count(item); i++)
192  res,
193  cbor_move(
195  )
196  );
197  return res;
198  }
199  case CBOR_TYPE_ARRAY: {
200  cbor_item_t * res;
201  if (cbor_array_is_definite(item))
203  else
205 
206  for (size_t i = 0; i < cbor_array_size(item); i++)
208  res,
210  );
211  return res;
212  }
213  case CBOR_TYPE_MAP: {
214  cbor_item_t * res;
215  if (cbor_map_is_definite(item))
217  else
218  res = cbor_new_indefinite_map();
219 
220  struct cbor_pair * it = cbor_map_handle(item);
221  for (size_t i = 0; i < cbor_map_size(item); i++)
222  cbor_map_add(res, (struct cbor_pair) {
223  .key = cbor_move(cbor_copy(it[i].key)),
224  .value = cbor_move(cbor_copy(it[i].value))
225  });
226  return res;
227  }
228  case CBOR_TYPE_TAG:
229  return cbor_build_tag(
230  cbor_tag_value(item),
232  );
234  return _cbor_copy_float_ctrl(item);
235  }
236 
237  return NULL;
238 }
239 
240 #if CBOR_PRETTY_PRINTER
241 
242 #include <inttypes.h>
243 #include <wchar.h>
244 #include <locale.h>
245 #include <stdlib.h>
246 
247 #define __STDC_FORMAT_MACROS
248 
249 static int _pow(int b, int ex)
250 {
251  if (ex == 0) return 1;
252  int res = b;
253  while (--ex > 0) res *= b;
254  return res;
255 }
256 
257 static void _cbor_nested_describe(cbor_item_t *item, FILE *out, int indent)
258 {
259  setlocale(LC_ALL, "");
260  switch (cbor_typeof(item)) {
261  case CBOR_TYPE_UINT: {
262  fprintf(out, "%*s[CBOR_TYPE_UINT] ", indent, " ");
263  fprintf(out, "Width: %dB, ", _pow(2, cbor_int_get_width(item)));
264  fprintf(out, "Value: %"PRIu64"\n", cbor_get_int(item));
265  break;
266  };
267  case CBOR_TYPE_NEGINT: {
268  fprintf(out, "%*s[CBOR_TYPE_NEGINT] ", indent, " ");
269  fprintf(out, "Width: %dB, ", _pow(2, cbor_int_get_width(item)));
270  fprintf(out, "Value: -%"PRIu64" -1\n", cbor_get_int(item));
271  break;
272  };
273  case CBOR_TYPE_BYTESTRING: {
274  fprintf(out, "%*s[CBOR_TYPE_BYTESTRING] ", indent, " ");
275  if (cbor_bytestring_is_indefinite(item)) {
276  fprintf(out,
277  "Indefinite, with %zu chunks:\n",
279  for (size_t i = 0; i < cbor_bytestring_chunk_count(item); i++)
280  _cbor_nested_describe(
282  out,
283  indent + 4);
284  } else {
285  fprintf(out,
286  "Definite, length %zuB\n",
287  cbor_bytestring_length(item));
288  }
289  break;
290  };
291  case CBOR_TYPE_STRING: {
292  fprintf(out, "%*s[CBOR_TYPE_STRING] ", indent, " ");
293  if (cbor_string_is_indefinite(item)) {
294  fprintf(out,
295  "Indefinite, with %zu chunks:\n",
297  for (size_t i = 0; i < cbor_string_chunk_count(item); i++)
298  _cbor_nested_describe(
299  cbor_string_chunks_handle(item)[i],
300  out,
301  indent + 4);
302  } else {
303  fprintf(out,
304  "Definite, length %zuB, %zu codepoints\n",
305  cbor_string_length(item),
307  /* Careful - this doesn't support multibyte characters! */
308  /* Printing those is out of the scope of this demo :) */
309  /* libICU is your friend */
310  fprintf(out, "%*s", indent + 4, " ");
311  /* XXX: no null at the end -> confused vprintf */
312  fwrite(cbor_string_handle(item), (int) cbor_string_length(item), 1, out);
313  fprintf(out, "\n");
314  }
315  break;
316  };
317  case CBOR_TYPE_ARRAY: {
318  fprintf(out, "%*s[CBOR_TYPE_ARRAY] ", indent, " ");
319  if (cbor_array_is_definite(item)) {
320  fprintf(out,
321  "Definite, size: %zu\n",
322  cbor_array_size(item));
323  } else {
324  fprintf(out,
325  "Indefinite, size: %zu\n",
326  cbor_array_size(item));
327  }
328 
329  for (size_t i = 0; i < cbor_array_size(item); i++)
330  _cbor_nested_describe(
331  cbor_array_handle(item)[i],
332  out,
333  indent + 4);
334  break;
335  };
336  case CBOR_TYPE_MAP: {
337  fprintf(out, "%*s[CBOR_TYPE_MAP] ", indent, " ");
338  if (cbor_map_is_definite(item)) {
339  fprintf(out,
340  "Definite, size: %zu\n",
341  cbor_map_size(item));
342  } else {
343  fprintf(out,
344  "Indefinite, size: %zu\n",
345  cbor_map_size(item));
346  }
347 
348  for (size_t i = 0; i < cbor_map_size(item); i++) {
349  _cbor_nested_describe(
350  cbor_map_handle(item)[i].key,
351  out,
352  indent + 4);
353  _cbor_nested_describe(
354  cbor_map_handle(item)[i].value,
355  out,
356  indent + 4);
357  }
358  break;
359  };
360  case CBOR_TYPE_TAG: {
361  fprintf(out, "%*s[CBOR_TYPE_TAG] ", indent, " ");
362  fprintf(out, "Value: %"PRIu64"\n", cbor_tag_value(item));
363  _cbor_nested_describe(cbor_tag_item(item), out, indent + 4);
364  break;
365  };
366  case CBOR_TYPE_FLOAT_CTRL: {
367  fprintf(out, "%*s[CBOR_TYPE_FLOAT_CTRL] ", indent, " ");
368  if (cbor_float_ctrl_is_ctrl(item)) {
369  if (cbor_is_bool(item))
370  fprintf(out, "Bool: %s\n", cbor_ctrl_is_bool(item) ? "true" : "false");
371  else if (cbor_is_undef(item))
372  fprintf(out, "Undefined\n");
373  else if (cbor_is_null(item))
374  fprintf(out, "Null\n");
375  else
376  fprintf(out, "Simple value %d\n", cbor_ctrl_value(item));
377  } else {
378  fprintf(out, "Width: %dB, ", _pow(2, cbor_float_get_width(item)));
379  fprintf(out, "value: %lf\n", cbor_float_get_float(item));
380  }
381  break;
382  };
383  }
384 }
385 
386 void cbor_describe(cbor_item_t *item, FILE *out)
387 {
388  _cbor_nested_describe(item, out, 0);
389 }
390 
391 #endif
Malformed or reserved MTB/value.
Definition: data.h:197
+
cbor_item_t * cbor_build_uint8(uint8_t value)
Constructs a new positive integer.
Definition: ints.c:145
+
void cbor_builder_float4_callback(void *context, float value)
+
High-level decoding result.
Definition: data.h:184
+ +
size_t size
Definition: stack.h:27
+
bool cbor_bytestring_is_definite(const cbor_item_t *item)
Is the byte string definite?
Definition: bytestrings.c:24
+
bool syntax_error
Stack expectation mismatch.
+
6 - tags
Definition: data.h:31
+
uint64_t cbor_get_int(const cbor_item_t *item)
Extracts the integer value.
Definition: ints.c:44
+
Stack handle - contents and size.
Definition: stack.h:25
+
double cbor_float_get_float(const cbor_item_t *item)
Get the float value represented as double.
Definition: floats_ctrls.c:52
+
cbor_item_t * cbor_build_stringn(const char *val, size_t length)
Creates a new string and initializes it.
Definition: strings.c:50
+
3 - strings
Definition: data.h:28
+
void cbor_builder_byte_string_callback(void *context, cbor_data data, size_t length)
+
OK, finished.
Definition: data.h:194
+
void cbor_builder_uint32_callback(void *context, uint32_t value)
+
size_t read
Bytes read.
Definition: data.h:203
+
cbor_int_width cbor_int_get_width(const cbor_item_t *item)
Queries the integer width.
Definition: ints.c:10
+
2 - byte strings
Definition: data.h:27
+
Internal use - ctrl and special values.
Definition: data.h:55
+
unsigned char * cbor_string_handle(const cbor_item_t *item)
Get the handle to the underlying string.
Definition: strings.c:112
+
cbor_item_t * cbor_new_indefinite_bytestring()
Creates a new indefinite byte string.
Definition: bytestrings.c:46
+
cbor_item_t * cbor_new_indefinite_string()
Creates a new indefinite string.
Definition: strings.c:23
+
cbor_item_t * value
Definition: data.h:180
+
cbor_item_t * cbor_build_float2(float value)
Constructs a new float.
Definition: floats_ctrls.c:165
+
void cbor_builder_uint8_callback(void *context, uint8_t value)
+
void cbor_decref(cbor_item_t **item_ref)
Decreases the reference count by one, deallocating the item if needed.
Definition: common.c:99
+
cbor_int8_callback uint8
Unsigned int.
Definition: callbacks.h:50
+ +
size_t cbor_bytestring_chunk_count(const cbor_item_t *item)
Get the number of chunks this string consist of.
Definition: bytestrings.c:87
+
cbor_item_t ** cbor_string_chunks_handle(const cbor_item_t *item)
Get the handle to the array of chunks.
Definition: strings.c:67
+
void cbor_builder_uint64_callback(void *context, uint64_t value)
+
void cbor_builder_tag_callback(void *context, uint64_t value)
+
void cbor_builder_float2_callback(void *context, float value)
+
void cbor_builder_indef_break_callback(void *context)
+
void cbor_builder_negint8_callback(void *context, uint8_t value)
+
struct _cbor_stack _cbor_stack_init()
Definition: stack.c:10
+
size_t cbor_map_size(const cbor_item_t *item)
Get the number of pairs.
Definition: maps.c:11
+
cbor_item_t * cbor_build_ctrl(uint8_t value)
Constructs a ctrl item.
Definition: floats_ctrls.c:186
+
cbor_item_t ** cbor_bytestring_chunks_handle(const cbor_item_t *item)
Get the handle to the array of chunks.
Definition: bytestrings.c:80
+
bool cbor_bytestring_is_indefinite(const cbor_item_t *item)
Is the byte string indefinite?
Definition: bytestrings.c:30
+ +
4 - arrays
Definition: data.h:29
+
cbor_item_t * cbor_tag_item(const cbor_item_t *item)
Get the tagged item.
Definition: tags.c:22
+
cbor_item_t * key
Definition: data.h:180
+
cbor_item_t * cbor_new_indefinite_array()
Create new indefinite array.
Definition: arrays.c:138
+
cbor_item_t * cbor_build_tag(uint64_t value, cbor_item_t *item)
Build a new tag.
Definition: tags.c:41
+
void cbor_builder_negint16_callback(void *context, uint16_t value)
+
7 - decimals and special values (true, false, nil, ...)
Definition: data.h:32
+
uint32_t cbor_get_uint32(const cbor_item_t *item)
Extracts the integer value.
Definition: ints.c:30
+
void cbor_mark_negint(cbor_item_t *item)
Marks the integer item as a negative integer.
Definition: ints.c:91
+
High-level decoding context.
+
Simple pair of items for use in maps.
Definition: data.h:179
+
void cbor_builder_undefined_callback(void *context)
+ +
cbor_error_code code
Description.
Definition: data.h:175
+ +
cbor_item_t * cbor_build_uint32(uint32_t value)
Constructs a new positive integer.
Definition: ints.c:161
+
void _cbor_stack_pop(struct _cbor_stack *stack)
Definition: stack.c:15
+
bool cbor_array_is_definite(const cbor_item_t *item)
Is the array definite?
Definition: arrays.c:88
+
cbor_item_t * cbor_build_float4(float value)
Constructs a new float.
Definition: floats_ctrls.c:172
+
void cbor_builder_null_callback(void *context)
+
Double.
Definition: data.h:58
+
High-level decoding error.
Definition: data.h:171
+
uint16_t cbor_get_uint16(const cbor_item_t *item)
Extracts the integer value.
Definition: ints.c:23
+
Half float.
Definition: data.h:56
+
struct cbor_error error
Error indicator.
Definition: data.h:186
+
bool cbor_is_null(const cbor_item_t *item)
Does this item represent null
Definition: common.c:77
+
bool cbor_array_push(cbor_item_t *array, cbor_item_t *pushee)
Append to the end.
Definition: arrays.c:52
+
cbor_item_t * cbor_copy(cbor_item_t *item)
Deep copy of an item.
Definition: cbor.c:164
+
void cbor_builder_string_start_callback(void *context)
+
void cbor_builder_array_start_callback(void *context, size_t size)
+
size_t cbor_string_chunk_count(const cbor_item_t *item)
Get the number of chunks this string consist of.
Definition: strings.c:74
+
void cbor_builder_string_callback(void *context, cbor_data data, size_t length)
+
size_t cbor_array_size(const cbor_item_t *item)
Get the number of members.
Definition: arrays.c:12
+
0 - positive integers
Definition: data.h:25
+
bool cbor_bytestring_add_chunk(cbor_item_t *item, cbor_item_t *chunk)
Appends a chunk to the bytestring.
Definition: bytestrings.c:95
+
cbor_item_t * cbor_build_uint16(uint16_t value)
Constructs a new positive integer.
Definition: ints.c:153
+
uint8_t cbor_get_uint8(const cbor_item_t *item)
Extracts the integer value.
Definition: ints.c:16
+
float cbor_float_get_float4(const cbor_item_t *item)
Get a single precision float.
Definition: floats_ctrls.c:38
+
uint64_t cbor_get_uint64(const cbor_item_t *item)
Extracts the integer value.
Definition: ints.c:37
+
uint8_t cbor_ctrl_value(const cbor_item_t *item)
Reads the control value.
Definition: floats_ctrls.c:18
+
void cbor_builder_indef_array_start_callback(void *context)
+
Streaming decoder result.
Definition: data.h:201
+
uint64_t cbor_tag_value(const cbor_item_t *item)
Get tag value.
Definition: tags.c:28
+
cbor_float_width cbor_float_get_width(const cbor_item_t *item)
Get the float width.
Definition: floats_ctrls.c:12
+
const unsigned char * cbor_data
Definition: data.h:20
+
cbor_item_t * cbor_load(cbor_data source, size_t source_size, struct cbor_load_result *result)
Loads data item from a buffer.
Definition: cbor.c:12
+
struct _cbor_stack * stack
+
cbor_item_t * cbor_build_uint64(uint64_t value)
Constructs a new positive integer.
Definition: ints.c:169
+ +
bool cbor_map_is_definite(const cbor_item_t *item)
Is this map definite?
Definition: maps.c:126
+
float cbor_float_get_float2(const cbor_item_t *item)
Get a half precision float.
Definition: floats_ctrls.c:31
+
cbor_item_t * cbor_build_float8(double value)
Constructs a new float.
Definition: floats_ctrls.c:179
+
cbor_item_t * cbor_move(cbor_item_t *item)
Provides CPP-like move construct.
Definition: common.c:184
+
void cbor_builder_negint32_callback(void *context, uint32_t value)
+
double cbor_float_get_float8(const cbor_item_t *item)
Get a double precision float.
Definition: floats_ctrls.c:45
+
bool cbor_is_bool(const cbor_item_t *item)
Is the item an a boolean?
Definition: common.c:71
+ +
enum cbor_decoder_status status
The result.
Definition: data.h:205
+
void cbor_builder_negint64_callback(void *context, uint64_t value)
+
Callback bundle – passed to the decoder.
Definition: callbacks.h:48
+
bool cbor_is_undef(const cbor_item_t *item)
Does this item represent undefined
Definition: common.c:82
+
void cbor_builder_float8_callback(void *context, double value)
+
cbor_type cbor_typeof(const cbor_item_t *item)
Get the type of the item.
Definition: common.c:59
+ +
Stack parsing algorithm failed.
Definition: data.h:42
+
Not enough data - mismatch with MTB.
Definition: data.h:195
+
size_t cbor_string_codepoint_count(const cbor_item_t *item)
The number of codepoints in this string.
Definition: strings.c:118
+
bool cbor_ctrl_is_bool(const cbor_item_t *item)
Is this ctrl item a boolean?
Definition: floats_ctrls.c:92
+ +
bool cbor_string_add_chunk(cbor_item_t *item, cbor_item_t *chunk)
Appends a chunk to the string.
Definition: strings.c:82
+
bool cbor_string_is_definite(const cbor_item_t *item)
Is the string definite?
Definition: strings.c:124
+
unsigned char * cbor_bytestring_handle(const cbor_item_t *item)
Get the handle to the binary data.
Definition: bytestrings.c:18
+
cbor_item_t * cbor_new_definite_array(size_t size)
Create new definite array.
Definition: arrays.c:106
+ +
void cbor_builder_map_start_callback(void *context, size_t size)
+
void cbor_builder_boolean_callback(void *context, bool value)
+
cbor_item_t * item
Definition: stack.h:20
+
bool cbor_float_ctrl_is_ctrl(const cbor_item_t *item)
Is this a ctrl value?
Definition: floats_ctrls.c:25
+ +
size_t cbor_string_length(const cbor_item_t *item)
Returns the length of the underlying string.
Definition: strings.c:106
+
cbor_item_t * cbor_new_indefinite_map()
Create a new indefinite map.
Definition: maps.c:46
+
void cbor_builder_uint16_callback(void *context, uint16_t value)
+
bool cbor_map_add(cbor_item_t *item, struct cbor_pair pair)
Add a pair to the map.
Definition: maps.c:118
+
The item handle.
Definition: data.h:149
+
cbor_item_t * cbor_build_bytestring(cbor_data handle, size_t length)
Creates a new byte string and initializes it.
Definition: bytestrings.c:63
+
void cbor_builder_byte_string_start_callback(void *context)
+
1 - negative integers
Definition: data.h:26
+
struct cbor_pair * cbor_map_handle(const cbor_item_t *item)
Get the pairs storage.
Definition: maps.c:137
+
cbor_item_t * cbor_new_definite_map(size_t size)
Create a new definite map.
Definition: maps.c:23
+
cbor_item_t * cbor_array_get(const cbor_item_t *item, size_t index)
Get item by index.
Definition: arrays.c:25
+
void cbor_builder_indef_map_start_callback(void *context)
+
size_t cbor_bytestring_length(const cbor_item_t *item)
Returns the length of the binary data.
Definition: bytestrings.c:12
+
Memory error - item allocation failed.
Definition: data.h:41
+
size_t read
Number of bytes read.
Definition: data.h:188
+
Buffer manipulation problem.
Definition: data.h:196
+ +
struct _cbor_stack_record * top
Definition: stack.h:26
+
struct cbor_decoder_result cbor_stream_decode(cbor_data source, size_t source_size, const struct cbor_callbacks *callbacks, void *context)
Stateless decoder.
Definition: streaming.c:26
+
cbor_item_t ** cbor_array_handle(const cbor_item_t *item)
Get the array contents.
Definition: arrays.c:100
+
5 - maps
Definition: data.h:30
+
Single float.
Definition: data.h:57
+
bool cbor_string_is_indefinite(const cbor_item_t *item)
Is the string indefinite?
Definition: strings.c:130
+
bool creation_failed
Callback creating the last item has failed.
+
+ + + + diff --git a/docs/doxygen/cbor_8h.html b/docs/doxygen/cbor_8h.html new file mode 100644 index 00000000..bc674e83 --- /dev/null +++ b/docs/doxygen/cbor_8h.html @@ -0,0 +1,185 @@ + + + + + + + +libcbor: src/cbor.h File Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+Functions
+
+
cbor.h File Reference
+
+
+
#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_tcbor_load (cbor_data source, size_t source_size, struct cbor_load_result *result)
 Loads data item from a buffer. More...
 
cbor_item_tcbor_copy (cbor_item_t *item)
 Deep copy of an item. More...
 
+

Function Documentation

+ +

§ cbor_copy()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_copy (cbor_item_titem)
+
+ +

Deep copy of an item.

+

All the reference counts in the new structure are set to one.

+
Parameters
+ + +
item[borrow]item to copy
+
+
+
Returns
new CBOR deep copy
+ +

Definition at line 164 of file cbor.c.

+ +
+
+ +

§ cbor_load()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
cbor_item_t* cbor_load (cbor_data source,
size_t source_size,
struct cbor_load_resultresult 
)
+
+ +

Loads data item from a buffer.

+
Parameters
+ + + + +
sourceThe buffer
source_size
result[out]Result indicator. CBOR_ERR_NONE on success
+
+
+
Returns
new CBOR item or NULL on failure. In that case, result contains location and description of the error.
+ +

Definition at line 12 of file cbor.c.

+ +
+
+
+ + + + diff --git a/docs/doxygen/cbor_8h_source.html b/docs/doxygen/cbor_8h_source.html new file mode 100644 index 00000000..f3d4ee50 --- /dev/null +++ b/docs/doxygen/cbor_8h_source.html @@ -0,0 +1,98 @@ + + + + + + + +libcbor: src/cbor.h Source File + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
cbor.h
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 
9 #ifndef LIBCBOR_H_
10 #define LIBCBOR_H_
11 
12 #include "cbor/data.h"
13 #include "cbor/common.h"
14 
15 #include "cbor/arrays.h"
16 #include "cbor/bytestrings.h"
17 #include "cbor/floats_ctrls.h"
18 #include "cbor/ints.h"
19 #include "cbor/maps.h"
20 #include "cbor/strings.h"
21 #include "cbor/tags.h"
22 
23 #include "cbor/encoding.h"
24 #include "cbor/serialization.h"
25 #include "cbor/callbacks.h"
26 #include "cbor/streaming.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 /*
33 * ============================================================================
34 * High level decoding
35 * ============================================================================
36 */
37 
46  size_t source_size,
47  struct cbor_load_result * result);
48 
57 
58 #if CBOR_PRETTY_PRINTER
59 #include <stdio.h>
60 
61 void cbor_describe(cbor_item_t * item, FILE * out);
62 #endif
63 
64 #ifdef __cplusplus
65 }
66 #endif
67 
68 #endif //LIBCBOR_H_
High-level decoding result.
Definition: data.h:184
+
cbor_item_t * cbor_load(cbor_data source, size_t source_size, struct cbor_load_result *result)
Loads data item from a buffer.
Definition: cbor.c:12
+ + + + + + + + +
const unsigned char * cbor_data
Definition: data.h:20
+
cbor_item_t * cbor_copy(cbor_item_t *item)
Deep copy of an item.
Definition: cbor.c:164
+ + + + +
The item handle.
Definition: data.h:149
+ +
+ + + + diff --git a/docs/doxygen/classes.html b/docs/doxygen/classes.html new file mode 100644 index 00000000..b6db7848 --- /dev/null +++ b/docs/doxygen/classes.html @@ -0,0 +1,88 @@ + + + + + + + +libcbor: Data Structure Index + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
Data Structure Index
+
+
+
_ | c
+ + + + + + + +
  _  
+
_cbor_double_helper   _cbor_stack   
  c  
+
cbor_indefinite_string_data   
_cbor_float_ctrl_metadata   _cbor_stack_record   cbor_item_metadata   
_cbor_array_metadata   _cbor_float_helper   _cbor_string_metadata   cbor_callbacks   cbor_item_t   
_cbor_bytestring_metadata   _cbor_int_metadata   _cbor_tag_metadata   cbor_decoder_result   cbor_load_result   
_cbor_decoder_context   _cbor_map_metadata   _cbor_unicode_status   cbor_error   cbor_pair   
+
_ | c
+
+ + + + diff --git a/docs/doxygen/closed.png b/docs/doxygen/closed.png new file mode 100644 index 00000000..98cc2c90 Binary files /dev/null and b/docs/doxygen/closed.png differ diff --git a/docs/doxygen/common_8c.html b/docs/doxygen/common_8c.html new file mode 100644 index 00000000..057a6ae0 --- /dev/null +++ b/docs/doxygen/common_8c.html @@ -0,0 +1,716 @@ + + + + + + + +libcbor: src/cbor/common.c File Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+Functions
+
+
common.c File Reference
+
+
+
#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_tcbor_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_tcbor_move (cbor_item_t *item)
 Provides CPP-like move construct. More...
 
+

Function Documentation

+ +

§ cbor_decref()

+ +
+
+ + + + + + + + +
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.

+
Parameters
+ + +
item[take]the item. Set to NULL if deallocated
+
+
+ +

Definition at line 99 of file common.c.

+ +
+
+ +

§ cbor_incref()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_incref (cbor_item_titem)
+
+ +

Increases the reference count by one.

+

No dependent items are affected.

+
Parameters
+ + +
item[incref]item the item
+
+
+
Returns
the input reference
+ +

Definition at line 93 of file common.c.

+ +
+
+ +

§ cbor_intermediate_decref()

+ +
+
+ + + + + + + + +
void cbor_intermediate_decref (cbor_item_titem)
+
+ +

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

+
Parameters
+ + +
item[take]the item
+
+
+ +

Definition at line 174 of file common.c.

+ +
+
+ +

§ cbor_is_bool()

+ +
+
+ + + + + + + + +
bool cbor_is_bool (const cbor_item_titem)
+
+ +

Is the item an a boolean?

+
Parameters
+ + +
item[borrow]the item
+
+
+
Returns
Is the item a boolean?
+ +

Definition at line 71 of file common.c.

+ +
+
+ +

§ cbor_is_float()

+ +
+
+ + + + + + + + +
bool cbor_is_float (const cbor_item_titem)
+
+ +

Is the item an a floating point number?

+
Parameters
+ + +
item[borrow]the item
+
+
+
Returns
Is the item a floating point number?
+ +

Definition at line 87 of file common.c.

+ +
+
+ +

§ cbor_is_int()

+ +
+
+ + + + + + + + +
bool cbor_is_int (const cbor_item_titem)
+
+ +

Is the item an integer, either positive or negative?

+
Parameters
+ + +
item[borrow]the item
+
+
+
Returns
Is the item an integer, either positive or negative?
+ +

Definition at line 65 of file common.c.

+ +
+
+ +

§ cbor_is_null()

+ +
+
+ + + + + + + + +
bool cbor_is_null (const cbor_item_titem)
+
+ +

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.
+* 
Parameters
+ + +
item[borrow]the item
+
+
+
Returns
Is the item (CBOR logical) null?
+ +

Definition at line 77 of file common.c.

+ +
+
+ +

§ cbor_is_undef()

+ +
+
+ + + + + + + + +
bool cbor_is_undef (const cbor_item_titem)
+
+ +

Does this item represent undefined

+
embed:rst:leading-asterisk
+* .. warning:: Care must be taken to distinguish nulls and undefined values in C.
+* 
Parameters
+ + +
item[borrow]the item
+
+
+
Returns
Is the item (CBOR logical) undefined?
+ +

Definition at line 82 of file common.c.

+ +
+
+ +

§ cbor_isa_array()

+ +
+
+ + + + + + + + +
bool cbor_isa_array (const cbor_item_titem)
+
+ +

Does the item have the appropriate major type?

+
Parameters
+ + +
item[borrow]the item
+
+
+
Returns
Is the item an CBOR_TYPE_ARRAY?
+ +

Definition at line 38 of file common.c.

+ +
+
+ +

§ cbor_isa_bytestring()

+ +
+
+ + + + + + + + +
bool cbor_isa_bytestring (const cbor_item_titem)
+
+ +

Does the item have the appropriate major type?

+
Parameters
+ + +
item[borrow]the item
+
+
+
Returns
Is the item a CBOR_TYPE_BYTESTRING?
+ +

Definition at line 28 of file common.c.

+ +
+
+ +

§ cbor_isa_float_ctrl()

+ +
+
+ + + + + + + + +
bool cbor_isa_float_ctrl (const cbor_item_titem)
+
+ +

Does the item have the appropriate major type?

+
Parameters
+ + +
item[borrow]the item
+
+
+
Returns
Is the item a CBOR_TYPE_FLOAT_CTRL?
+ +

Definition at line 53 of file common.c.

+ +
+
+ +

§ cbor_isa_map()

+ +
+
+ + + + + + + + +
bool cbor_isa_map (const cbor_item_titem)
+
+ +

Does the item have the appropriate major type?

+
Parameters
+ + +
item[borrow]the item
+
+
+
Returns
Is the item a CBOR_TYPE_MAP?
+ +

Definition at line 43 of file common.c.

+ +
+
+ +

§ cbor_isa_negint()

+ +
+
+ + + + + + + + +
bool cbor_isa_negint (const cbor_item_titem)
+
+ +

Does the item have the appropriate major type?

+
Parameters
+ + +
item[borrow]the item
+
+
+
Returns
Is the item a CBOR_TYPE_NEGINT?
+ +

Definition at line 23 of file common.c.

+ +
+
+ +

§ cbor_isa_string()

+ +
+
+ + + + + + + + +
bool cbor_isa_string (const cbor_item_titem)
+
+ +

Does the item have the appropriate major type?

+
Parameters
+ + +
item[borrow]the item
+
+
+
Returns
Is the item a CBOR_TYPE_STRING?
+ +

Definition at line 33 of file common.c.

+ +
+
+ +

§ cbor_isa_tag()

+ +
+
+ + + + + + + + +
bool cbor_isa_tag (const cbor_item_titem)
+
+ +

Does the item have the appropriate major type?

+
Parameters
+ + +
item[borrow]the item
+
+
+
Returns
Is the item a CBOR_TYPE_TAG?
+ +

Definition at line 48 of file common.c.

+ +
+
+ +

§ cbor_isa_uint()

+ +
+
+ + + + + + + + +
bool cbor_isa_uint (const cbor_item_titem)
+
+ +

Does the item have the appropriate major type?

+
Parameters
+ + +
item[borrow]the item
+
+
+
Returns
Is the item an CBOR_TYPE_UINT?
+ +

Definition at line 18 of file common.c.

+ +
+
+ +

§ cbor_move()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_move (cbor_item_titem)
+
+ +

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.
+* 
Parameters
+ + +
item[take]the item
+
+
+
Returns
the item with reference count decreased by one
+ +

Definition at line 184 of file common.c.

+ +
+
+ +

§ cbor_refcount()

+ +
+
+ + + + + + + + +
size_t cbor_refcount (const cbor_item_titem)
+
+ +

Get the reference count.

+
embed:rst:leading-asterisk
+* .. warning:: This does *not* account for transitive references.
+* 
Parameters
+ + +
item[borrow]the item
+
+
+
Returns
the reference count
+ +

Definition at line 179 of file common.c.

+ +
+
+ +

§ cbor_typeof()

+ +
+
+ + + + + + + + +
cbor_type cbor_typeof (const cbor_item_titem)
+
+ +

Get the type of the item.

+
Parameters
+ + +
item[borrow]
+
+
+
Returns
The type
+ +

Definition at line 59 of file common.c.

+ +
+
+
+ + + + diff --git a/docs/doxygen/common_8c_source.html b/docs/doxygen/common_8c_source.html new file mode 100644 index 00000000..4c6aaa84 --- /dev/null +++ b/docs/doxygen/common_8c_source.html @@ -0,0 +1,146 @@ + + + + + + + +libcbor: src/cbor/common.c Source File + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
common.c
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 #include "cbor/common.h"
9 #include "arrays.h"
10 #include "bytestrings.h"
11 #include "data.h"
12 #include "floats_ctrls.h"
13 #include "ints.h"
14 #include "maps.h"
15 #include "strings.h"
16 #include "tags.h"
17 
18 bool cbor_isa_uint(const cbor_item_t *item)
19 {
20  return item->type == CBOR_TYPE_UINT;
21 }
22 
23 bool cbor_isa_negint(const cbor_item_t *item)
24 {
25  return item->type == CBOR_TYPE_NEGINT;
26 }
27 
29 {
30  return item->type == CBOR_TYPE_BYTESTRING;
31 }
32 
33 bool cbor_isa_string(const cbor_item_t *item)
34 {
35  return item->type == CBOR_TYPE_STRING;
36 }
37 
38 bool cbor_isa_array(const cbor_item_t *item)
39 {
40  return item->type == CBOR_TYPE_ARRAY;
41 }
42 
43 bool cbor_isa_map(const cbor_item_t *item)
44 {
45  return item->type == CBOR_TYPE_MAP;
46 }
47 
48 bool cbor_isa_tag(const cbor_item_t *item)
49 {
50  return item->type == CBOR_TYPE_TAG;
51 }
52 
54 {
55  return item->type == CBOR_TYPE_FLOAT_CTRL;
56 }
57 
58 
60 {
61  return item->type;
62 }
63 
64 
65 bool cbor_is_int(const cbor_item_t *item)
66 {
67  return cbor_isa_uint(item) || cbor_isa_negint(item);
68 }
69 
70 
71 bool cbor_is_bool(const cbor_item_t *item)
72 {
73  return cbor_isa_float_ctrl(item) &&
75 }
76 
77 bool cbor_is_null(const cbor_item_t *item)
78 {
79  return cbor_isa_float_ctrl(item) && cbor_ctrl_value(item) == CBOR_CTRL_NULL;
80 }
81 
82 bool cbor_is_undef(const cbor_item_t *item)
83 {
84  return cbor_isa_float_ctrl(item) && cbor_ctrl_value(item) == CBOR_CTRL_UNDEF;
85 }
86 
87 bool cbor_is_float(const cbor_item_t *item)
88 {
89  return cbor_isa_float_ctrl(item) && !cbor_float_ctrl_is_ctrl(item);
90 }
91 
92 
94 {
95  item->refcount++;
96  return item;
97 }
98 
99 void cbor_decref(cbor_item_t **item_ref)
100 {
101  cbor_item_t * item = *item_ref;
102  if (--item->refcount == 0) {
103  switch (item->type) {
104  case CBOR_TYPE_UINT:
105  /* Fallthrough */
106  case CBOR_TYPE_NEGINT:
107  /* Combined allocation, freeing the item suffices */
108  {
109  break;
110  }
111  case CBOR_TYPE_BYTESTRING: {
112  if (cbor_bytestring_is_definite(item)) {
113  _CBOR_FREE(item->data);
114  } else {
115  /* We need to decref all chunks */
117  for (size_t i = 0; i < cbor_bytestring_chunk_count(item); i++)
118  cbor_decref(&handle[i]);
119  _CBOR_FREE(((struct cbor_indefinite_string_data *) item->data)->chunks);
120  _CBOR_FREE(item->data);
121  }
122  break;
123  }
124  case CBOR_TYPE_STRING: {
125  if (cbor_string_is_definite(item)) {
126  _CBOR_FREE(item->data);
127  } else {
128  /* We need to decref all chunks */
129  cbor_item_t **handle = cbor_string_chunks_handle(item);
130  for (size_t i = 0; i < cbor_string_chunk_count(item); i++)
131  cbor_decref(&handle[i]);
132  _CBOR_FREE(((struct cbor_indefinite_string_data *) item->data)->chunks);
133  _CBOR_FREE(item->data);
134  }
135  break;
136  }
137  case CBOR_TYPE_ARRAY: {
138  /* Get all items and decref them */
139  cbor_item_t **handle = cbor_array_handle(item);
140  size_t size = cbor_array_size(item);
141  for (size_t i = 0; i < size; i++)
142  if (handle[i] != NULL)
143  cbor_decref(&handle[i]);
144  _CBOR_FREE(item->data);
145  break;
146  }
147  case CBOR_TYPE_MAP: {
148  struct cbor_pair *handle = cbor_map_handle(item);
149  for (size_t i = 0; i < item->metadata.map_metadata.end_ptr; i++, handle++) {
150  cbor_decref(&handle->key);
151  if (handle->value != NULL)
152  cbor_decref(&handle->value);
153  }
154  _CBOR_FREE(item->data);
155  break;
156  };
157  case CBOR_TYPE_TAG: {
158  if (item->metadata.tag_metadata.tagged_item != NULL)
160  _CBOR_FREE(item->data);
161  break;
162  }
163  case CBOR_TYPE_FLOAT_CTRL: {
164  /* Floats have combined allocation */
165  break;
166  }
167  }
168  _CBOR_FREE(item);
169  //TODO
170  *item_ref = NULL;
171  }
172 }
173 
175 {
176  cbor_decref(&item);
177 }
178 
179 size_t cbor_refcount(const cbor_item_t * item)
180 {
181  return item->refcount;
182 }
183 
185 {
186  item->refcount--;
187  return item;
188 }
bool cbor_bytestring_is_definite(const cbor_item_t *item)
Is the byte string definite?
Definition: bytestrings.c:24
+ +
6 - tags
Definition: data.h:31
+ +
3 - strings
Definition: data.h:28
+
union cbor_item_metadata metadata
Discriminated by type.
Definition: data.h:151
+ +
void cbor_intermediate_decref(cbor_item_t *item)
Decreases the reference count by one, deallocating the item if needed.
Definition: common.c:174
+
2 - byte strings
Definition: data.h:27
+
struct _cbor_map_metadata map_metadata
Definition: data.h:143
+
bool cbor_isa_negint(const cbor_item_t *item)
Does the item have the appropriate major type?
Definition: common.c:23
+
cbor_item_t * value
Definition: data.h:180
+
void cbor_decref(cbor_item_t **item_ref)
Decreases the reference count by one, deallocating the item if needed.
Definition: common.c:99
+
bool cbor_isa_string(const cbor_item_t *item)
Does the item have the appropriate major type?
Definition: common.c:33
+ + +
size_t cbor_bytestring_chunk_count(const cbor_item_t *item)
Get the number of chunks this string consist of.
Definition: bytestrings.c:87
+
cbor_item_t ** cbor_string_chunks_handle(const cbor_item_t *item)
Get the handle to the array of chunks.
Definition: strings.c:67
+
bool cbor_is_int(const cbor_item_t *item)
Is the item an integer, either positive or negative?
Definition: common.c:65
+
bool cbor_isa_bytestring(const cbor_item_t *item)
Does the item have the appropriate major type?
Definition: common.c:28
+
cbor_item_t ** cbor_bytestring_chunks_handle(const cbor_item_t *item)
Get the handle to the array of chunks.
Definition: bytestrings.c:80
+
4 - arrays
Definition: data.h:29
+
size_t cbor_refcount(const cbor_item_t *item)
Get the reference count.
Definition: common.c:179
+
cbor_item_t * key
Definition: data.h:180
+ + +
size_t end_ptr
Definition: data.h:104
+
cbor_type type
Major type discriminator.
Definition: data.h:155
+
7 - decimals and special values (true, false, nil, ...)
Definition: data.h:32
+
#define _CBOR_FREE
Definition: common.h:86
+
Simple pair of items for use in maps.
Definition: data.h:179
+
size_t refcount
Reference count - initialize to 0.
Definition: data.h:153
+ +
bool cbor_is_null(const cbor_item_t *item)
Does this item represent null
Definition: common.c:77
+
size_t cbor_string_chunk_count(const cbor_item_t *item)
Get the number of chunks this string consist of.
Definition: strings.c:74
+
size_t cbor_array_size(const cbor_item_t *item)
Get the number of members.
Definition: arrays.c:12
+
0 - positive integers
Definition: data.h:25
+
bool cbor_is_float(const cbor_item_t *item)
Is the item an a floating point number?
Definition: common.c:87
+
cbor_item_t * cbor_incref(cbor_item_t *item)
Increases the reference count by one.
Definition: common.c:93
+
struct _cbor_tag_metadata tag_metadata
Definition: data.h:144
+
uint8_t cbor_ctrl_value(const cbor_item_t *item)
Reads the control value.
Definition: floats_ctrls.c:18
+
Defines cbor_item_t::data structure for indefinite strings and bytestrings.
Definition: data.h:164
+
bool cbor_isa_float_ctrl(const cbor_item_t *item)
Does the item have the appropriate major type?
Definition: common.c:53
+
bool cbor_isa_array(const cbor_item_t *item)
Does the item have the appropriate major type?
Definition: common.c:38
+ +
struct cbor_item_t * tagged_item
Definition: data.h:115
+
bool cbor_isa_map(const cbor_item_t *item)
Does the item have the appropriate major type?
Definition: common.c:43
+
cbor_item_t * cbor_move(cbor_item_t *item)
Provides CPP-like move construct.
Definition: common.c:184
+
bool cbor_isa_uint(const cbor_item_t *item)
Does the item have the appropriate major type?
Definition: common.c:18
+
bool cbor_is_bool(const cbor_item_t *item)
Is the item an a boolean?
Definition: common.c:71
+
bool cbor_isa_tag(const cbor_item_t *item)
Does the item have the appropriate major type?
Definition: common.c:48
+
cbor_type
Specifies the Major type of cbor_item_t.
Definition: data.h:24
+
bool cbor_is_undef(const cbor_item_t *item)
Does this item represent undefined
Definition: common.c:82
+
cbor_type cbor_typeof(const cbor_item_t *item)
Get the type of the item.
Definition: common.c:59
+ +
bool cbor_string_is_definite(const cbor_item_t *item)
Is the string definite?
Definition: strings.c:124
+
unsigned char * data
Raw data block - interpretation depends on metadata.
Definition: data.h:157
+ + +
bool cbor_float_ctrl_is_ctrl(const cbor_item_t *item)
Is this a ctrl value?
Definition: floats_ctrls.c:25
+ +
The item handle.
Definition: data.h:149
+
1 - negative integers
Definition: data.h:26
+
struct cbor_pair * cbor_map_handle(const cbor_item_t *item)
Get the pairs storage.
Definition: maps.c:137
+
cbor_item_t ** cbor_array_handle(const cbor_item_t *item)
Get the array contents.
Definition: arrays.c:100
+
5 - maps
Definition: data.h:30
+
+ + + + diff --git a/docs/doxygen/common_8h.html b/docs/doxygen/common_8h.html new file mode 100644 index 00000000..3b28b0c4 --- /dev/null +++ b/docs/doxygen/common_8h.html @@ -0,0 +1,1074 @@ + + + + + + + +libcbor: src/cbor/common.h File Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+Macros | +Typedefs | +Functions | +Variables
+
+
common.h File Reference
+
+
+
#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_tcbor_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_tcbor_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
 
+

Macro Definition Documentation

+ +

§ _CBOR_FREE

+ +
+
+ + + + +
#define _CBOR_FREE   _cbor_free
+
+ +

Definition at line 86 of file common.h.

+ +
+
+ +

§ _CBOR_MALLOC

+ +
+
+ + + + +
#define _CBOR_MALLOC   _cbor_malloc
+
+ +

Definition at line 84 of file common.h.

+ +
+
+ +

§ _CBOR_REALLOC

+ +
+
+ + + + +
#define _CBOR_REALLOC   _cbor_realloc
+
+ +

Definition at line 85 of file common.h.

+ +
+
+ +

§ CBOR_HEX_VERSION

+ +
+
+ + + + +
#define CBOR_HEX_VERSION   ((CBOR_MAJOR_VERSION << 16) | (CBOR_MINOR_VERSION << 8) | CBOR_PATCH_VERSION)
+
+ +

Definition at line 42 of file common.h.

+ +
+
+ +

§ CBOR_RESTRICT_POINTER

+ +
+
+ + + + +
#define CBOR_RESTRICT_POINTER   CBOR_RESTRICT_SPECIFIER
+
+ +

Definition at line 33 of file common.h.

+ +
+
+ +

§ CBOR_VERSION

+ +
+
+ + + + +
#define CBOR_VERSION   TO_STR(CBOR_MAJOR_VERSION) "." TO_STR(CBOR_MINOR_VERSION) "." TO_STR(CBOR_PATCH_VERSION)
+
+ +

Definition at line 41 of file common.h.

+ +
+
+ +

§ debug_print

+ +
+
+ + + + + + + + + + + + + + + + + + +
#define debug_print( fmt,
 ... 
)   do {} while (0)
+
+ +

Definition at line 53 of file common.h.

+ +
+
+ +

§ TO_STR

+ +
+
+ + + + + + + + +
#define TO_STR( x)   TO_STR_(x) /* enables proper double expansion */
+
+ +

Definition at line 57 of file common.h.

+ +
+
+ +

§ TO_STR_

+ +
+
+ + + + + + + + +
#define TO_STR_( x)   #x
+
+ +

Definition at line 56 of file common.h.

+ +
+
+

Typedef Documentation

+ +

§ _cbor_free_t

+ +
+
+ + + + +
typedef void(* _cbor_free_t) (void *)
+
+ +

Definition at line 63 of file common.h.

+ +
+
+ +

§ _cbor_malloc_t

+ +
+
+ + + + +
typedef void*(* _cbor_malloc_t) (size_t)
+
+ +

Definition at line 61 of file common.h.

+ +
+
+ +

§ _cbor_realloc_t

+ +
+
+ + + + +
typedef void*(* _cbor_realloc_t) (void *, size_t)
+
+ +

Definition at line 62 of file common.h.

+ +
+
+

Function Documentation

+ +

§ cbor_decref()

+ +
+
+ + + + + + + + +
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.

+
Parameters
+ + +
item[take]the item. Set to NULL if deallocated
+
+
+ +

Definition at line 99 of file common.c.

+ +
+
+ +

§ cbor_incref()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_incref (cbor_item_titem)
+
+ +

Increases the reference count by one.

+

No dependent items are affected.

+
Parameters
+ + +
item[incref]item the item
+
+
+
Returns
the input reference
+ +

Definition at line 93 of file common.c.

+ +
+
+ +

§ cbor_intermediate_decref()

+ +
+
+ + + + + + + + +
void cbor_intermediate_decref (cbor_item_titem)
+
+ +

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

+
Parameters
+ + +
item[take]the item
+
+
+ +

Definition at line 174 of file common.c.

+ +
+
+ +

§ cbor_is_bool()

+ +
+
+ + + + + + + + +
bool cbor_is_bool (const cbor_item_titem)
+
+ +

Is the item an a boolean?

+
Parameters
+ + +
item[borrow]the item
+
+
+
Returns
Is the item a boolean?
+ +

Definition at line 71 of file common.c.

+ +
+
+ +

§ cbor_is_float()

+ +
+
+ + + + + + + + +
bool cbor_is_float (const cbor_item_titem)
+
+ +

Is the item an a floating point number?

+
Parameters
+ + +
item[borrow]the item
+
+
+
Returns
Is the item a floating point number?
+ +

Definition at line 87 of file common.c.

+ +
+
+ +

§ cbor_is_int()

+ +
+
+ + + + + + + + +
bool cbor_is_int (const cbor_item_titem)
+
+ +

Is the item an integer, either positive or negative?

+
Parameters
+ + +
item[borrow]the item
+
+
+
Returns
Is the item an integer, either positive or negative?
+ +

Definition at line 65 of file common.c.

+ +
+
+ +

§ cbor_is_null()

+ +
+
+ + + + + + + + +
bool cbor_is_null (const cbor_item_titem)
+
+ +

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.
+* 
Parameters
+ + +
item[borrow]the item
+
+
+
Returns
Is the item (CBOR logical) null?
+ +

Definition at line 77 of file common.c.

+ +
+
+ +

§ cbor_is_undef()

+ +
+
+ + + + + + + + +
bool cbor_is_undef (const cbor_item_titem)
+
+ +

Does this item represent undefined

+
embed:rst:leading-asterisk
+* .. warning:: Care must be taken to distinguish nulls and undefined values in C.
+* 
Parameters
+ + +
item[borrow]the item
+
+
+
Returns
Is the item (CBOR logical) undefined?
+ +

Definition at line 82 of file common.c.

+ +
+
+ +

§ cbor_isa_array()

+ +
+
+ + + + + + + + +
bool cbor_isa_array (const cbor_item_titem)
+
+ +

Does the item have the appropriate major type?

+
Parameters
+ + +
item[borrow]the item
+
+
+
Returns
Is the item an CBOR_TYPE_ARRAY?
+ +

Definition at line 38 of file common.c.

+ +
+
+ +

§ cbor_isa_bytestring()

+ +
+
+ + + + + + + + +
bool cbor_isa_bytestring (const cbor_item_titem)
+
+ +

Does the item have the appropriate major type?

+
Parameters
+ + +
item[borrow]the item
+
+
+
Returns
Is the item a CBOR_TYPE_BYTESTRING?
+ +

Definition at line 28 of file common.c.

+ +
+
+ +

§ cbor_isa_float_ctrl()

+ +
+
+ + + + + + + + +
bool cbor_isa_float_ctrl (const cbor_item_titem)
+
+ +

Does the item have the appropriate major type?

+
Parameters
+ + +
item[borrow]the item
+
+
+
Returns
Is the item a CBOR_TYPE_FLOAT_CTRL?
+ +

Definition at line 53 of file common.c.

+ +
+
+ +

§ cbor_isa_map()

+ +
+
+ + + + + + + + +
bool cbor_isa_map (const cbor_item_titem)
+
+ +

Does the item have the appropriate major type?

+
Parameters
+ + +
item[borrow]the item
+
+
+
Returns
Is the item a CBOR_TYPE_MAP?
+ +

Definition at line 43 of file common.c.

+ +
+
+ +

§ cbor_isa_negint()

+ +
+
+ + + + + + + + +
bool cbor_isa_negint (const cbor_item_titem)
+
+ +

Does the item have the appropriate major type?

+
Parameters
+ + +
item[borrow]the item
+
+
+
Returns
Is the item a CBOR_TYPE_NEGINT?
+ +

Definition at line 23 of file common.c.

+ +
+
+ +

§ cbor_isa_string()

+ +
+
+ + + + + + + + +
bool cbor_isa_string (const cbor_item_titem)
+
+ +

Does the item have the appropriate major type?

+
Parameters
+ + +
item[borrow]the item
+
+
+
Returns
Is the item a CBOR_TYPE_STRING?
+ +

Definition at line 33 of file common.c.

+ +
+
+ +

§ cbor_isa_tag()

+ +
+
+ + + + + + + + +
bool cbor_isa_tag (const cbor_item_titem)
+
+ +

Does the item have the appropriate major type?

+
Parameters
+ + +
item[borrow]the item
+
+
+
Returns
Is the item a CBOR_TYPE_TAG?
+ +

Definition at line 48 of file common.c.

+ +
+
+ +

§ cbor_isa_uint()

+ +
+
+ + + + + + + + +
bool cbor_isa_uint (const cbor_item_titem)
+
+ +

Does the item have the appropriate major type?

+
Parameters
+ + +
item[borrow]the item
+
+
+
Returns
Is the item an CBOR_TYPE_UINT?
+ +

Definition at line 18 of file common.c.

+ +
+
+ +

§ cbor_move()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_move (cbor_item_titem)
+
+ +

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.
+* 
Parameters
+ + +
item[take]the item
+
+
+
Returns
the item with reference count decreased by one
+ +

Definition at line 184 of file common.c.

+ +
+
+ +

§ cbor_refcount()

+ +
+
+ + + + + + + + +
size_t cbor_refcount (const cbor_item_titem)
+
+ +

Get the reference count.

+
embed:rst:leading-asterisk
+* .. warning:: This does *not* account for transitive references.
+* 
Parameters
+ + +
item[borrow]the item
+
+
+
Returns
the reference count
+ +

Definition at line 179 of file common.c.

+ +
+
+ +

§ cbor_set_allocs()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
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
+* 
Parameters
+ + + + +
custom_mallocmalloc implementation
custom_reallocrealloc implementation
custom_freefree implementation
+
+
+ +

Definition at line 14 of file allocators.c.

+ +
+
+ +

§ cbor_typeof()

+ +
+
+ + + + + + + + +
cbor_type cbor_typeof (const cbor_item_titem)
+
+ +

Get the type of the item.

+
Parameters
+ + +
item[borrow]
+
+
+
Returns
The type
+ +

Definition at line 59 of file common.c.

+ +
+
+

Variable Documentation

+ +

§ _cbor_free

+ +
+
+ + + + +
_cbor_free_t _cbor_free
+
+ +

Definition at line 12 of file allocators.c.

+ +
+
+ +

§ _cbor_malloc

+ +
+
+ + + + +
_cbor_malloc_t _cbor_malloc
+
+ +

Definition at line 10 of file allocators.c.

+ +
+
+ +

§ _cbor_realloc

+ +
+
+ + + + +
_cbor_realloc_t _cbor_realloc
+
+ +

Definition at line 11 of file allocators.c.

+ +
+
+
+ + + + diff --git a/docs/doxygen/common_8h_source.html b/docs/doxygen/common_8h_source.html new file mode 100644 index 00000000..e242891c --- /dev/null +++ b/docs/doxygen/common_8h_source.html @@ -0,0 +1,109 @@ + + + + + + + +libcbor: src/cbor/common.h Source File + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
common.h
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2015 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 #ifndef LIBCBOR_COMMON_H
9 #define LIBCBOR_COMMON_H
10 
11 #include <stdlib.h>
12 #include <stddef.h>
13 #include <stdint.h>
14 #include <stdbool.h>
15 #include <assert.h>
16 #include "data.h"
17 #include "cbor/configuration.h"
18 
19 #ifdef __cplusplus
20 extern "C" {
21 
28 #define CBOR_RESTRICT_POINTER
29 
30 #else
31 
32 // MSVC + C++ workaround
33 #define CBOR_RESTRICT_POINTER CBOR_RESTRICT_SPECIFIER
34 
35 #endif
36 
37 static const uint8_t cbor_major_version = CBOR_MAJOR_VERSION;
38 static const uint8_t cbor_minor_version = CBOR_MINOR_VERSION;
39 static const uint8_t cbor_patch_version = CBOR_PATCH_VERSION;
40 
41 #define CBOR_VERSION TO_STR(CBOR_MAJOR_VERSION) "." TO_STR(CBOR_MINOR_VERSION) "." TO_STR(CBOR_PATCH_VERSION)
42 #define CBOR_HEX_VERSION ((CBOR_MAJOR_VERSION << 16) | (CBOR_MINOR_VERSION << 8) | CBOR_PATCH_VERSION)
43 
44 
45 /* http://stackoverflow.com/questions/1644868/c-define-macro-for-debug-printing */
46 #ifdef DEBUG
47 #include <stdio.h>
48 #define debug_print(fmt, ...) do { \
49  if (DEBUG) \
50  fprintf(stderr, "%s:%d:%s(): " fmt, __FILE__, __LINE__, __func__, __VA_ARGS__); \
51  } while (0)
52 #else
53 #define debug_print(fmt, ...) do {} while (0)
54 #endif
55 
56 #define TO_STR_(x) #x
57 #define TO_STR(x) TO_STR_(x) /* enables proper double expansion */
58 
59 #if CBOR_CUSTOM_ALLOC
60 
61 typedef void * (* _cbor_malloc_t)(size_t);
62 typedef void * (* _cbor_realloc_t)(void *, size_t);
63 typedef void (* _cbor_free_t)(void *);
64 
68 
82 void cbor_set_allocs(_cbor_malloc_t custom_malloc, _cbor_realloc_t custom_realloc, _cbor_free_t custom_free);
83 
84 #define _CBOR_MALLOC _cbor_malloc
85 #define _CBOR_REALLOC _cbor_realloc
86 #define _CBOR_FREE _cbor_free
87 
88 #else
89 
90 #define _CBOR_MALLOC malloc
91 #define _CBOR_REALLOC realloc
92 #define _CBOR_FREE free
93 
94 #endif
95 
96 /*
97 * ============================================================================
98 * Type manipulation
99 * ============================================================================
100 */
101 
107 cbor_type cbor_typeof(const cbor_item_t * item); /* Will be inlined iff link-time opt is enabled */
108 
109 /* Standard item types as described by the RFC */
110 
115 bool cbor_isa_uint(const cbor_item_t * item);
116 
121 bool cbor_isa_negint(const cbor_item_t * item);
122 
127 bool cbor_isa_bytestring(const cbor_item_t * item);
128 
133 bool cbor_isa_string(const cbor_item_t * item);
134 
139 bool cbor_isa_array(const cbor_item_t * item);
140 
145 bool cbor_isa_map(const cbor_item_t * item);
146 
151 bool cbor_isa_tag(const cbor_item_t * item);
152 
157 bool cbor_isa_float_ctrl(const cbor_item_t * item);
158 
159 /* Practical types with respect to their semantics (but not tag values) */
160 
165 bool cbor_is_int(const cbor_item_t * item);
166 
171 bool cbor_is_float(const cbor_item_t * item);
172 
177 bool cbor_is_bool(const cbor_item_t * item);
178 
186 bool cbor_is_null(const cbor_item_t * item);
187 
188 
196 bool cbor_is_undef(const cbor_item_t * item);
197 
198 
199 /*
200 * ============================================================================
201 * Memory management
202 * ============================================================================
203 */
204 
213 
221 void cbor_decref(cbor_item_t ** item);
222 
230 
240 size_t cbor_refcount(const cbor_item_t * item);
241 
256 
257 #ifdef __cplusplus
258 }
259 #endif
260 
261 #endif //LIBCBOR_COMMON_H
void(* _cbor_free_t)(void *)
Definition: common.h:63
+
void cbor_decref(cbor_item_t **item)
Decreases the reference count by one, deallocating the item if needed.
Definition: common.c:99
+
void cbor_intermediate_decref(cbor_item_t *item)
Decreases the reference count by one, deallocating the item if needed.
Definition: common.c:174
+
bool cbor_isa_string(const cbor_item_t *item)
Does the item have the appropriate major type?
Definition: common.c:33
+ +
cbor_item_t * cbor_move(cbor_item_t *item)
Provides CPP-like move construct.
Definition: common.c:184
+
bool cbor_is_undef(const cbor_item_t *item)
Does this item represent undefined
Definition: common.c:82
+
bool cbor_isa_negint(const cbor_item_t *item)
Does the item have the appropriate major type?
Definition: common.c:23
+
void *(* _cbor_realloc_t)(void *, size_t)
Definition: common.h:62
+
cbor_item_t * cbor_incref(cbor_item_t *item)
Increases the reference count by one.
Definition: common.c:93
+
_cbor_free_t _cbor_free
Definition: allocators.c:12
+
bool cbor_isa_tag(const cbor_item_t *item)
Does the item have the appropriate major type?
Definition: common.c:48
+
bool cbor_isa_float_ctrl(const cbor_item_t *item)
Does the item have the appropriate major type?
Definition: common.c:53
+
bool cbor_isa_array(const cbor_item_t *item)
Does the item have the appropriate major type?
Definition: common.c:38
+
bool cbor_isa_uint(const cbor_item_t *item)
Does the item have the appropriate major type?
Definition: common.c:18
+
bool cbor_isa_map(const cbor_item_t *item)
Does the item have the appropriate major type?
Definition: common.c:43
+
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.
Definition: allocators.c:14
+
void *(* _cbor_malloc_t)(size_t)
Definition: common.h:61
+
cbor_type
Specifies the Major type of cbor_item_t.
Definition: data.h:24
+
bool cbor_is_bool(const cbor_item_t *item)
Is the item an a boolean?
Definition: common.c:71
+
bool cbor_is_float(const cbor_item_t *item)
Is the item an a floating point number?
Definition: common.c:87
+
_cbor_malloc_t _cbor_malloc
Definition: allocators.c:10
+
bool cbor_is_int(const cbor_item_t *item)
Is the item an integer, either positive or negative?
Definition: common.c:65
+
bool cbor_isa_bytestring(const cbor_item_t *item)
Does the item have the appropriate major type?
Definition: common.c:28
+
cbor_type cbor_typeof(const cbor_item_t *item)
Get the type of the item.
Definition: common.c:59
+
bool cbor_is_null(const cbor_item_t *item)
Does this item represent null
Definition: common.c:77
+
The item handle.
Definition: data.h:149
+
_cbor_realloc_t _cbor_realloc
Definition: allocators.c:11
+
size_t cbor_refcount(const cbor_item_t *item)
Get the reference count.
Definition: common.c:179
+
+ + + + diff --git a/docs/doxygen/customdoxygen.css b/docs/doxygen/customdoxygen.css new file mode 100644 index 00000000..6573a26f --- /dev/null +++ b/docs/doxygen/customdoxygen.css @@ -0,0 +1,1401 @@ +/* The standard CSS for doxygen 1.8.4 */ + +body, table, div, p, dl { + // font: 400 14px/22px Roboto,sans-serif; + font: 13px "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; +} + +/* @group Heading Levels */ + +h1.groupheader { + font-size: 28px; + //font-size: 150%; +} + +.title { + //font: 400 14px/28px Roboto,sans-serif; + font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; + font-size: 24px; + font-weight: normal; + margin: 10px 2px; +} + +h2.groupheader { + //border-bottom: 1px solid #879ECB; + border-bottom: none; + //color: #354C7B; + color: rgb(60, 76, 108); + font-size: 24px; + font-weight: normal; + //margin-top: 1.75em; + margin: 42px 0px 20px 0px; + margin-bottom: 20px; + //padding-top: 8px; + //padding-bottom: 4px; + padding: 0px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + //margin-right: 15px; + //margin: 42px 0px 20px 0px; +} + +h1 { + font-size: 28px; +} + +h2 { + color: rgb(60, 76, 108); + font-size: 24px; + font-weight: normal; + margin: 42px 0px 20px 0px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px cyan; +} + +dt { + font-weight: bold; +} + +div.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; +} + +p.startli, p.startdd, p.starttd { + margin-top: 2px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.qindex, div.navtab{ + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; +} + +div.qindex, div.navpath { + width: 100%; + line-height: 140%; +} + +div.navtab { + margin-right: 15px; +} + +/* @group Link Styling */ + +a { + //color: #3D578C; + color: rgb(51, 102, 204); + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + //color: #4665A2; + color: rgb(51, 102, 204); +} + +a:hover { + text-decoration: underline; +} + +a.qindex { + font-weight: bold; +} + +a.qindexHL { + font-weight: bold; + background-color: #9CAFD4; + color: #ffffff; + border: 1px double #869DCA; +} + +.contents a.qindexHL:visited { + color: #ffffff; +} + +a.el { + //font-family: "Courier New", courier, monospace; + font-family: Courier, Consolas, monospace; + //font-weight: bold; + font-weight: normal; +} + +a.elRef { +} + +a.code, a.code:visited { + //color: #4665A2; + color: rgb(51, 102, 204); +} + +a.codeRef, a.codeRef:visited { + //color: #4665A2; + color: rgb(51, 102, 204); +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +pre.fragment { + //border: 1px solid #C4CFE5; + border: solid 1px rgb(221, 221, 221); + border-radius: 3px; + //background-color: #FBFCFD; + background-color: rgb(248, 248, 248); + //padding: 4px 6px; + padding: 6px 10px; + //margin: 4px 8px 4px 2px; + margin: 15px 0px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + //font-family: monospace, fixed; + font-family: Consolas, "Liberation Mono", Courier, monospace; + font-size: 105%; +} + +div.fragment { + //padding: 0px; + //padding: 4px 6px; + //margin: 0px; + //background-color: #FBFCFD; + //border: 1px solid #C4CFE5; + + padding: 6px 10px; + margin: 15px 0px; + border: solid 1px rgb(221, 221, 221); + border-radius: 3px; + + background-color: rgb(248, 248, 248); +} + +div.line { + //font-family: monospace, fixed; + font-family: Consolas, "Liberation Mono", Courier, monospace; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line.glow { + background-color: cyan; + box-shadow: 0 0 10px cyan; +} + + +span.lineno { + padding-right: 4px; + text-align: right; + border-right: 2px solid #0F0; + background-color: #E8E8E8; + white-space: pre; +} +span.lineno a { + background-color: #D8D8D8; +} + +span.lineno a:hover { + background-color: #C8C8C8; +} + +div.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); +} + +div.groupHeader { + //margin-left: 16px; + //margin-top: 12px; + margin-left: 0px; + margin-top: 9px; + margin-bottom: 4.7px; + + font-size: 19px; + //font-weight: bold; + font-weight: normal; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background-color: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +td.indexkey { + background-color: #EBEFF6; + font-weight: bold; + border: 1px solid #C4CFE5; + margin: 2px 0px 2px 0; + padding: 2px 10px; + white-space: nowrap; + vertical-align: top; +} + +td.indexvalue { + background-color: #EBEFF6; + border: 1px solid #C4CFE5; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #EEF1F7; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #A3B4D7; +} + +th.dirtab { + background: #EBEFF6; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + //border-top: 1px solid #4A6AAA; + border-top: 1px solid #444; +} + +hr.footer { + height: 0px; + border-top: 3px solid #444; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: cyan; + box-shadow: 0 0 15px cyan; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + //background-color: #F9FAFC; + background-color: white; + border: none; + margin: 4px; + padding: 1px 0 0 8px; + + //font-family: "Courier New", courier, monospace; + font-family: Courier, Consolas, monospace; +} + +.mdescLeft, .mdescRight { + //padding: 0px 8px 4px 8px; + padding: 0px 8px 4px 24px; + //color: #555; + color: black; + + font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; + //font-style: italic; + font-style: normal; +} + +.memSeparator { + //border-bottom: 1px solid #DEE4F0; + border-bottom: none; + line-height: 8px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight { + width: 100%; +} + +.memTemplParams { + color: #4665A2; + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtemplate { + font-family: Courier, Consolas, monospace; + font-size: 100%; + //font-size: 80%; + //color: #4665A2; + color: black; + font-weight: normal; + //margin-left: 9px; + margin-left: 1px; +} + +.memnav { + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px cyan; +} + +.memname { + //font-family: "Courier New", courier, monospace; + //font-family: Courier, Consolas, monospace; + font-family: 'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif; + font-weight: 400; + //font-size: 15px; + font-size: 19px; + //font-weight: bold; + //margin-left: 6px; + margin-left: 0px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + margin-top: 1.5em; + border: none; + //border-top: 1px solid #ccc; + //border-top: 1px solid #A8B8D9; + //border-left: 1px solid #A8B8D9; + //border-right: 1px solid #A8B8D9; + border-bottom: 1px solid rgb(172, 172, 172); + //padding: 6px 0px 6px 0px; + //padding: 6px; + padding: 0px; + //color: #253555; + color: black; + //font-family: Courier, Consolas, monospace; + font-weight: bold; + //text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + //text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3); + text-shadow: none; + //background-image:url('nav_f.png'); + background-image: none; + //background-repeat:repeat-x; + //background-color: #E2E8F2; + background-color: rgb(235, 238, 241); + //background-color: #ccc; + //background-color: white; + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + //border-top-right-radius: 4px; + //border-top-left-radius: 4px; + border-top-right-radius: 0px; + border-top-left-radius: 0px; + /* firefox specific markup */ + //-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + //-moz-border-radius-topright: 4px; + //-moz-border-radius-topleft: 4px; + -moz-box-shadow: none; + -moz-border-radius-topright: 0px; + -moz-border-radius-topleft: 0px; + /* webkit specific markup */ + //-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + //-webkit-border-top-right-radius: 4px; + //-webkit-border-top-left-radius: 4px; + -webkit-box-shadow: none; + -webkit-border-top-right-radius: 0px; + -webkit-border-top-left-radius: 0px; +} + +.memdoc, dl.reflist dd { + border: none; + //border-bottom: 1px solid #A8B8D9; + //border-left: 1px solid #A8B8D9; + //border-right: 1px solid #A8B8D9; + padding: 6px; + background-color: #FBFCFD; + border-top-width: 0; + //background-image:url('nav_g.png'); + background-image: none; + //background-repeat:repeat-x; + background-color: #FFFFFF; + /* opera specific markup */ + //border-bottom-left-radius: 4px; + //border-bottom-right-radius: 4px; + //box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-bottom-left-radius: 0px; + border-bottom-right-radius: 0px; + box-shadow: none; + /* firefox specific markup */ + //-moz-border-radius-bottomleft: 4px; + //-moz-border-radius-bottomright: 4px; + //-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-bottomleft: 0px; + -moz-border-radius-bottomright: 0px; + -moz-box-shadow: none; + /* webkit specific markup */ + //-webkit-border-bottom-left-radius: 4px; + //-webkit-border-bottom-right-radius: 4px; + //-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-bottom-left-radius: 0px; + -webkit-border-bottom-right-radius: 0px; + -webkit-box-shadow: none; +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + //color: #602020; + color: rgb(37, 53, 85); + white-space: nowrap; +} +.paramname em { + font-style: italic; + font-weight: normal; + //font-style: normal; +} +.paramname code { + line-height: 14px; +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname { + //font-weight: bold; + //font-family: "Courier New", courier, monospace; + font-family: Courier, Consolas, monospace; + font-style: italic; + font-weight: normal; + text-shadow: rgba(0, 0, 0, 0.3) 0px 1px 1px; +} + +.params .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: middle; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + //background-color: #728DC1; + background-color: rgb(172, 172, 172);; + //border-top:1px solid #5373B4; + //border-left:1px solid #5373B4; + //border-right:1px solid #C4CFE5; + //border-bottom:1px solid #C4CFE5; + border: none; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + //padding: 4px 8px; + //border-radius: 3px; + border-radius: 4px; + //font-size: 7pt; + font-size: 9pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view when not used as main index */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.even { + padding-left: 6px; + background-color: #F7F8FB; +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: #3D578C; +} + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: #2A3D61; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + /*width: 100%;*/ + margin-bottom: 10px; + border: 1px solid #A8B8D9; + border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #A8B8D9; + /*width: 100%;*/ +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + font-size: 90%; + color: #253555; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #A8B8D9; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:#8AA0CC; + border:solid 1px #C2CDE4; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#364D7C; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: #283A5D; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color:#6884BD; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#364D7C; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + //background-image:url('nav_h.png'); + //background-repeat:repeat-x; + //background-color: #F9FAFC; + background-image: none; + background-color: white; + margin: 0px; + //border-bottom: 1px solid #C4CFE5; + border: none; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +dl +{ + padding: 0 0 0 10px; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ +dl.section +{ + margin-left: 0px; + padding-left: 0px; +} + +dl.note +{ + //margin-left:-7px; + margin-left: 0px; + padding: 6px 0px 3px 8px; + //padding-left: 8px; + border-left: 6px solid; + border-color: #D0C000; + background-color: #fff799 +} + +dl.warning, dl.attention +{ + //margin-left:-7px; + //padding-left: 3px; + margin-left: 0px; + padding: 6px 0px 3px 8px; + + //border-left:4px solid; + border-left: 6px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00D000; +} + +dl.deprecated +{ + //margin-left:-7px; + //padding-left: 3px; + margin-left: 0px; + padding: 6px 0px 3px 8px; + //border-left: 4px solid; + border-left: 6px solid; + border-color: #505050; +} + +dl.deprecated dt a.el +{ + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +} + +dl.todo +{ + //margin-left:-7px; + //padding-left: 3px; + margin-left: 0px; + padding: 6px 0px 3px 8px; + border-left:4px solid; + border-color: #00C0E0; +} + +dl.test +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #3030E0; +} + +dl.bug +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectname +{ + font: 300% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font: 120% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 50% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #5373B4; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #90A5CE; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#334975; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; +} + +dl.citelist dd { + margin:2px 0; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: #F4F6FA; + border: 1px solid #D8DFEE; + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 20px 10px 10px; + width: 200px; +} + +div.toc li { + background: url("bdwn.png") no-repeat scroll 0 5px transparent; + font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +div.toc h3 { + font: bold 12px/1.2 Arial,FreeSans,sans-serif; + color: #4665A2; + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 30px; +} + +div.toc li.level4 { + margin-left: 45px; +} + +.inherit_header { + font-weight: bold; + color: gray; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 42px; + margin-bottom: 20px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + + +.tabs, .tabs2, .tabs3 { + background-image: none; + background-color: #2f3a48; + color: white; + +} + + +.tabs2 { + background-color: #51637b; +} + + +.tablist li { + background-image: none; +} + + +.tablist a { + background-image: none; + color: white; + //text-shadow: none; + text-shadow: rgba(0, 0, 0, 0.6) 0px 2px 2px; +} + + +.tablist a:hover { + background-image: none; + text-shadow: none; +} + + +.tablist li.current a { + background-image: none; + //color: #ccc; + text-shadow: none; +} + + +.tabs li.current { + background-color: #51637b; +} + +.tabs2 li.current { + background-color: #888; +} + + +.navpath { + border: none; +} + + +.navpath ul { + background-image: none; + background-color: #888; + border: none; +} + + +.navpath li { + background-image: none; +} + + +.navpath li.navelem a { + background-image: none; + color: white; + text-shadow: none; +} + + +.navpath li.navelem a:hover { + background-image: none; + color: white; + text-shadow: none; +} + diff --git a/docs/doxygen/data_8h.html b/docs/doxygen/data_8h.html new file mode 100644 index 00000000..34e65c3e --- /dev/null +++ b/docs/doxygen/data_8h.html @@ -0,0 +1,479 @@ + + + + + + + +libcbor: src/cbor/data.h File Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+Data Structures | +Typedefs | +Enumerations
+
+
data.h File Reference
+
+
+
#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 Documentation

+ +

§ cbor_data

+ +
+
+ + + + +
typedef const unsigned char* cbor_data
+
+ +

Definition at line 20 of file data.h.

+ +
+
+ +

§ cbor_item_t

+ +
+
+ + + + +
typedef struct cbor_item_t cbor_item_t
+
+ +

The item handle.

+ +
+
+ +

§ cbor_mutable_data

+ +
+
+ + + + +
typedef unsigned char* cbor_mutable_data
+
+ +

Definition at line 21 of file data.h.

+ +
+
+ +

§ cbor_type

+ +
+
+ + + + +
typedef enum cbor_type cbor_type
+
+ +

Specifies the Major type of cbor_item_t.

+ +
+
+

Enumeration Type Documentation

+ +

§ _cbor_ctrl

+ +
+
+ + + + +
enum _cbor_ctrl
+
+ +

Semantic mapping for CTRL simple values.

+ + + + + + +
Enumerator
CBOR_CTRL_NONE 
CBOR_CTRL_FALSE 
CBOR_CTRL_TRUE 
CBOR_CTRL_NULL 
CBOR_CTRL_UNDEF 
+ +

Definition at line 68 of file data.h.

+ +
+
+ +

§ _cbor_dst_metadata

+ +
+
+ + + + +
enum _cbor_dst_metadata
+
+ +

Metadata for dynamically sized types.

+ + + +
Enumerator
_CBOR_METADATA_DEFINITE 
_CBOR_METADATA_INDEFINITE 
+ +

Definition at line 62 of file data.h.

+ +
+
+ +

§ cbor_decoder_status

+ +
+
+ + + + +
enum cbor_decoder_status
+
+ +

Streaming decoder result - status.

+ + + + + +
Enumerator
CBOR_DECODER_FINISHED 

OK, finished.

+
CBOR_DECODER_NEDATA 

Not enough data - mismatch with MTB.

+
CBOR_DECODER_EBUFFER 

Buffer manipulation problem.

+
CBOR_DECODER_ERROR 

Malformed or reserved MTB/value.

+
+ +

Definition at line 193 of file data.h.

+ +
+
+ +

§ cbor_error_code

+ +
+
+ + + + +
enum cbor_error_code
+
+ +

Possible decoding errors.

+ + + + + + + +
Enumerator
CBOR_ERR_NONE 
CBOR_ERR_NOTENOUGHDATA 
CBOR_ERR_NODATA 
CBOR_ERR_MALFORMATED 
CBOR_ERR_MEMERROR 

Memory error - item allocation failed.

+

Is it too big for your allocator?

+
CBOR_ERR_SYNTAXERROR 

Stack parsing algorithm failed.

+
+ +

Definition at line 36 of file data.h.

+ +
+
+ +

§ cbor_float_width

+ +
+
+ + + + +
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.

+
+ +

Definition at line 54 of file data.h.

+ +
+
+ +

§ cbor_int_width

+ +
+
+ + + + +
enum cbor_int_width
+
+ +

Possible widths of CBOR_TYPE_UINT items.

+ + + + + +
Enumerator
CBOR_INT_8 
CBOR_INT_16 
CBOR_INT_32 
CBOR_INT_64 
+ +

Definition at line 46 of file data.h.

+ +
+
+ +

§ cbor_type

+ +
+
+ + + + +
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, ...)

+
+ +

Definition at line 24 of file data.h.

+ +
+
+
+ + + + diff --git a/docs/doxygen/data_8h_source.html b/docs/doxygen/data_8h_source.html new file mode 100644 index 00000000..94f63984 --- /dev/null +++ b/docs/doxygen/data_8h_source.html @@ -0,0 +1,170 @@ + + + + + + + +libcbor: src/cbor/data.h Source File + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
data.h
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 #ifndef LIBCBOR_DATA_H
9 #define LIBCBOR_DATA_H
10 
11 #include <stdlib.h>
12 #include <stddef.h>
13 #include <stdint.h>
14 #include <stdbool.h>
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 typedef const unsigned char * cbor_data;
21 typedef unsigned char * cbor_mutable_data;
22 
24 typedef enum cbor_type {
33 } cbor_type;
34 
36 typedef enum {
44 
46 typedef enum {
52 
54 typedef enum {
60 
62 typedef enum {
66 
68 typedef enum {
74 } _cbor_ctrl;
75 
78  cbor_int_width width;
79 };
80 
83  size_t length;
84  _cbor_dst_metadata type;
85 };
86 
89  size_t length;
90  size_t codepoint_count; /* Sum of chunks' codepoint_counts for indefinite strings */
91  _cbor_dst_metadata type;
92 };
93 
96  size_t allocated;
97  size_t end_ptr;
98  _cbor_dst_metadata type;
99 };
100 
103  size_t allocated;
104  size_t end_ptr;
105  _cbor_dst_metadata type;
106 };
107 
116  uint64_t value;
117 };
118 
121  cbor_float_width width;
122  uint8_t ctrl;
123 };
124 
127  float as_float;
128  uint32_t as_uint;
129 };
130 
133  double as_double;
134  uint64_t as_uint;
135 };
136 
139  struct _cbor_int_metadata int_metadata;
140  struct _cbor_bytestring_metadata bytestring_metadata;
141  struct _cbor_string_metadata string_metadata;
142  struct _cbor_array_metadata array_metadata;
143  struct _cbor_map_metadata map_metadata;
144  struct _cbor_tag_metadata tag_metadata;
145  struct _cbor_float_ctrl_metadata float_ctrl_metadata;
146 };
147 
149 typedef struct cbor_item_t {
151  union cbor_item_metadata metadata;
153  size_t refcount;
155  cbor_type type;
157  unsigned char * data;
158 } cbor_item_t;
159 
165  size_t chunk_count;
168 };
169 
171 struct cbor_error {
173  size_t position;
175  cbor_error_code code;
176 };
177 
179 struct cbor_pair {
180  cbor_item_t * key, * value;
181 };
182 
186  struct cbor_error error;
188  size_t read;
189 };
190 
191 
198 };
199 
203  size_t read;
205  enum cbor_decoder_status status;
206 };
207 
208 #ifdef __cplusplus
209 }
210 #endif
211 
212 #endif //LIBCBOR_DATA_H
Malformed or reserved MTB/value.
Definition: data.h:197
+
struct cbor_item_t cbor_item_t
The item handle.
+
High-level decoding result.
Definition: data.h:184
+ +
size_t end_ptr
Definition: data.h:97
+
cbor_item_t ** chunks
Definition: data.h:167
+ +
6 - tags
Definition: data.h:31
+ +
cbor_float_width
Possible widths of CBOR_TYPE_FLOAT_CTRL items.
Definition: data.h:54
+
float as_float
Definition: data.h:127
+
3 - strings
Definition: data.h:28
+
OK, finished.
Definition: data.h:194
+
size_t read
Bytes read.
Definition: data.h:203
+
2 - byte strings
Definition: data.h:27
+
Internal use - ctrl and special values.
Definition: data.h:55
+
_cbor_ctrl
Semantic mapping for CTRL simple values.
Definition: data.h:68
+
Integers specific metadata.
Definition: data.h:77
+
cbor_item_t * value
Definition: data.h:180
+
size_t position
Aproximate position.
Definition: data.h:173
+ + +
size_t allocated
Definition: data.h:96
+
cbor_decoder_status
Streaming decoder result - status.
Definition: data.h:193
+
uint32_t as_uint
Definition: data.h:128
+ +
_cbor_dst_metadata type
Definition: data.h:84
+
Floats specific metadata - includes CTRL values.
Definition: data.h:120
+
Union of metadata across all possible types - discriminated in cbor_item_t.
Definition: data.h:138
+
_cbor_dst_metadata type
Definition: data.h:98
+ +
4 - arrays
Definition: data.h:29
+ + +
size_t end_ptr
Definition: data.h:104
+
cbor_type type
Major type discriminator.
Definition: data.h:155
+
7 - decimals and special values (true, false, nil, ...)
Definition: data.h:32
+
Simple pair of items for use in maps.
Definition: data.h:179
+ + + +
size_t refcount
Reference count - initialize to 0.
Definition: data.h:153
+
cbor_error_code code
Description.
Definition: data.h:175
+
Maps specific metadata.
Definition: data.h:102
+
Double.
Definition: data.h:58
+
High-level decoding error.
Definition: data.h:171
+
Half float.
Definition: data.h:56
+ +
unsigned char * cbor_mutable_data
Definition: data.h:21
+
cbor_int_width
Possible widths of CBOR_TYPE_UINT items.
Definition: data.h:46
+
0 - positive integers
Definition: data.h:25
+
Arrays specific metadata.
Definition: data.h:95
+
size_t codepoint_count
Definition: data.h:90
+
cbor_error_code
Possible decoding errors.
Definition: data.h:36
+
Bytestrings specific metadata.
Definition: data.h:82
+
uint64_t as_uint
Definition: data.h:134
+
Streaming decoder result.
Definition: data.h:201
+
Defines cbor_item_t::data structure for indefinite strings and bytestrings.
Definition: data.h:164
+
const unsigned char * cbor_data
Definition: data.h:20
+ +
_cbor_dst_metadata type
Definition: data.h:105
+
struct cbor_item_t * tagged_item
Definition: data.h:115
+ +
Strings specific metadata.
Definition: data.h:88
+
cbor_float_width width
Definition: data.h:121
+ +
uint64_t value
Definition: data.h:116
+
cbor_type
Specifies the Major type of cbor_item_t.
Definition: data.h:24
+
_cbor_dst_metadata
Metadata for dynamically sized types.
Definition: data.h:62
+
Stack parsing algorithm failed.
Definition: data.h:42
+
Not enough data - mismatch with MTB.
Definition: data.h:195
+ +
unsigned char * data
Raw data block - interpretation depends on metadata.
Definition: data.h:157
+
size_t allocated
Definition: data.h:103
+ + +
_cbor_dst_metadata type
Definition: data.h:91
+
cbor_int_width width
Definition: data.h:78
+
The item handle.
Definition: data.h:149
+
double as_double
Definition: data.h:133
+
1 - negative integers
Definition: data.h:26
+
Raw memory casts helper.
Definition: data.h:126
+
Memory error - item allocation failed.
Definition: data.h:41
+
size_t read
Number of bytes read.
Definition: data.h:188
+
Raw memory casts helper.
Definition: data.h:132
+
Buffer manipulation problem.
Definition: data.h:196
+ +
5 - maps
Definition: data.h:30
+
Single float.
Definition: data.h:57
+
Arrays specific metadata.
Definition: data.h:114
+
+ + + + diff --git a/docs/doxygen/dir_3ebe94c85f6786bf802771098c1d09bb.html b/docs/doxygen/dir_3ebe94c85f6786bf802771098c1d09bb.html new file mode 100644 index 00000000..5c3b4a89 --- /dev/null +++ b/docs/doxygen/dir_3ebe94c85f6786bf802771098c1d09bb.html @@ -0,0 +1,108 @@ + + + + + + + +libcbor: src/cbor/internal Directory Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
internal Directory Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+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]
 
+
+ + + + diff --git a/docs/doxygen/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/docs/doxygen/dir_68267d1309a1af8e8297ef4c3efbcdba.html new file mode 100644 index 00000000..987102f8 --- /dev/null +++ b/docs/doxygen/dir_68267d1309a1af8e8297ef4c3efbcdba.html @@ -0,0 +1,95 @@ + + + + + + + +libcbor: src Directory Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
src Directory Reference
+
+
+ + + + +

+Directories

directory  cbor
 
+ + + + + + + +

+Files

file  allocators.c [code]
 
file  cbor.c [code]
 
file  cbor.h [code]
 
+
+ + + + diff --git a/docs/doxygen/dir_cb565ba51d82ea933604984cbab6233d.html b/docs/doxygen/dir_cb565ba51d82ea933604984cbab6233d.html new file mode 100644 index 00000000..4d4e24c2 --- /dev/null +++ b/docs/doxygen/dir_cb565ba51d82ea933604984cbab6233d.html @@ -0,0 +1,139 @@ + + + + + + + +libcbor: src/cbor Directory Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
cbor Directory Reference
+
+
+ + + + +

+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]
 
+
+ + + + diff --git a/docs/doxygen/doc.png b/docs/doxygen/doc.png new file mode 100644 index 00000000..17edabff Binary files /dev/null and b/docs/doxygen/doc.png differ diff --git a/docs/doxygen/doxy__frontpage_8md.html b/docs/doxygen/doxy__frontpage_8md.html new file mode 100644 index 00000000..9e3c58a9 --- /dev/null +++ b/docs/doxygen/doxy__frontpage_8md.html @@ -0,0 +1,78 @@ + + + + + + + +libcbor: doc/doxy_frontpage.md File Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
doc/doxy_frontpage.md File Reference
+
+
+ +

Go to the source code of this file.

+
+ + + + diff --git a/docs/doxygen/doxy__frontpage_8md_source.html b/docs/doxygen/doxy__frontpage_8md_source.html new file mode 100644 index 00000000..bbe96020 --- /dev/null +++ b/docs/doxygen/doxy__frontpage_8md_source.html @@ -0,0 +1,76 @@ + + + + + + + +libcbor: doc/doxy_frontpage.md Source File + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
doc/doxy_frontpage.md
+
+
+Go to the documentation of this file.
1 
2 
3 This is the development reference of [libcbor](http://libcbor.org/). If you are looking for the user documentation, you should probably head to the [homepage](http://libcbor.org/).
4 
5 
6 # Where to start
7 
8 A couple of pointers for you to start with: `0x00000000`, `0xDEADBEEF`.
9 
10 If you just want to peek under the hood, have a look at:
11  - \ref src/cbor/common.h
12  - \ref src/cbor/encoding.h
13  - \ref src/cbor.h
14 
15 If you want to implement your own decoder or see how the default one is made:
16  - \ref src/cbor/internal/builder_callbacks.h
17  - \ref src/cbor/internal/stack.h
18 
19 For details on encoding and packing (could be useful when porting to exotic platforms):
20  - \ref src/cbor/internal/encoders.h
21  - \ref src/cbor/internal/loaders.h
22 
23 Streaming driver:
24  - \ref src/cbor/streaming.h
25 
26 Manipulation routines for particular types:
27  - \ref src/cbor/ints.h
28  - \ref src/cbor/bytestrings.h
29  - \ref src/cbor/strings.h
30  - \ref src/cbor/arrays.h
31  - \ref src/cbor/maps.h
32  - \ref src/cbor/tags.h
33  - \ref src/cbor/floats_ctrls.h
34 
35 # How to contribute
36 
37 Please refer to [the repository](https://github.com/PJK/libcbor)
+ + + + diff --git a/docs/doxygen/doxygen.css b/docs/doxygen/doxygen.css new file mode 100644 index 00000000..a2cf15fa --- /dev/null +++ b/docs/doxygen/doxygen.css @@ -0,0 +1,1508 @@ +/* The standard CSS for doxygen 1.8.12 */ + +body, table, div, p, dl { + font: 400 14px/22px Roboto,sans-serif; +} + +/* @group Heading Levels */ + +h1.groupheader { + font-size: 150%; +} + +.title { + font: 400 14px/28px Roboto,sans-serif; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h2.groupheader { + border-bottom: 1px solid #879ECB; + color: #354C7B; + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px cyan; +} + +dt { + font-weight: bold; +} + +div.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; +} + +p.startli, p.startdd { + margin-top: 2px; +} + +p.starttd { + margin-top: 0px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.qindex, div.navtab{ + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; +} + +div.qindex, div.navpath { + width: 100%; + line-height: 140%; +} + +div.navtab { + margin-right: 15px; +} + +/* @group Link Styling */ + +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #4665A2; +} + +a:hover { + text-decoration: underline; +} + +a.qindex { + font-weight: bold; +} + +a.qindexHL { + font-weight: bold; + background-color: #9CAFD4; + color: #ffffff; + border: 1px double #869DCA; +} + +.contents a.qindexHL:visited { + color: #ffffff; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} + +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} + +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} + +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line:after { + content:"\000A"; + white-space: pre; +} + +div.line.glow { + background-color: cyan; + box-shadow: 0 0 10px cyan; +} + + +span.lineno { + padding-right: 4px; + text-align: right; + border-right: 2px solid #0F0; + background-color: #E8E8E8; + white-space: pre; +} +span.lineno a { + background-color: #D8D8D8; +} + +span.lineno a:hover { + background-color: #C8C8C8; +} + +.lineno { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +div.ah, span.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000 110%); +} + +div.classindex ul { + list-style: none; + padding-left: 0; +} + +div.classindex span.ai { + display: inline-block; +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background-color: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +td.indexkey { + background-color: #EBEFF6; + font-weight: bold; + border: 1px solid #C4CFE5; + margin: 2px 0px 2px 0; + padding: 2px 10px; + white-space: nowrap; + vertical-align: top; +} + +td.indexvalue { + background-color: #EBEFF6; + border: 1px solid #C4CFE5; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #EEF1F7; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #A3B4D7; +} + +th.dirtab { + background: #EBEFF6; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: cyan; + box-shadow: 0 0 15px cyan; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #F9FAFC; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memSeparator { + border-bottom: 1px solid #DEE4F0; + line-height: 1px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight { + width: 100%; +} + +.memTemplParams { + color: #4665A2; + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtitle { + padding: 8px; + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + border-top-right-radius: 4px; + border-top-left-radius: 4px; + margin-bottom: -1px; + background-image: url('nav_f.png'); + background-repeat: repeat-x; + background-color: #E2E8F2; + line-height: 1.25; + font-weight: 300; + float:left; +} + +.permalink +{ + font-size: 65%; + display: inline-block; + vertical-align: middle; +} + +.memtemplate { + font-size: 80%; + color: #4665A2; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px cyan; +} + +.memname { + font-weight: 400; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 0px 6px 0px; + color: #253555; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + background-color: #DFE5F1; + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 4px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 4px; + +} + +.overload { + font-family: "courier new",courier,monospace; + font-size: 65%; +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 10px 2px 10px; + background-color: #FBFCFD; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: #FFFFFF; + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} +.paramname code { + line-height: 14px; +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: #728DC1; + border-top:1px solid #5373B4; + border-left:1px solid #5373B4; + border-right:1px solid #C4CFE5; + border-bottom:1px solid #C4CFE5; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view inside a (index) page */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid #9CAFD4; + border-bottom: 1px solid #9CAFD4; + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.even { + padding-left: 6px; + background-color: #F7F8FB; +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: #3D578C; +} + +.arrow { + color: #9CAFD4; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + font-size: 80%; + display: inline-block; + width: 16px; + height: 22px; +} + +.icon { + font-family: Arial, Helvetica; + font-weight: bold; + font-size: 12px; + height: 14px; + width: 16px; + display: inline-block; + background-color: #728DC1; + color: white; + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; +} + +.icona { + width: 24px; + height: 22px; + display: inline-block; +} + +.iconfopen { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderopen.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.iconfclosed { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderclosed.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.icondoc { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('doc.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +table.directory { + font: 400 14px Roboto,sans-serif; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: #2A3D61; +} + +table.doxtable caption { + caption-side: top; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + /*width: 100%;*/ + margin-bottom: 10px; + border: 1px solid #A8B8D9; + border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #A8B8D9; + /*width: 100%;*/ +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + font-size: 90%; + color: #253555; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + font-weight: 400; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #A8B8D9; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:#8AA0CC; + border:solid 1px #C2CDE4; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#364D7C; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: #283A5D; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color:#6884BD; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#364D7C; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +table.classindex +{ + margin: 10px; + white-space: nowrap; + margin-left: 3%; + margin-right: 3%; + width: 94%; + border: 0; + border-spacing: 0; + padding: 0; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +dl +{ + padding: 0 0 0 10px; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ +dl.section +{ + margin-left: 0px; + padding-left: 0px; +} + +dl.note +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00D000; +} + +dl.deprecated +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #505050; +} + +dl.todo +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00C0E0; +} + +dl.test +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #3030E0; +} + +dl.bug +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectalign +{ + vertical-align: middle; +} + +#projectname +{ + font: 300% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font: 120% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 50% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #5373B4; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.diagraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #90A5CE; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#334975; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; +} + +dl.citelist dd { + margin:2px 0; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: #F4F6FA; + border: 1px solid #D8DFEE; + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 8px 10px 10px; + width: 200px; +} + +div.toc li { + background: url("bdwn.png") no-repeat scroll 0 5px transparent; + font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +div.toc h3 { + font: bold 12px/1.2 Arial,FreeSans,sans-serif; + color: #4665A2; + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 30px; +} + +div.toc li.level4 { + margin-left: 45px; +} + +.inherit_header { + font-weight: bold; + color: gray; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + white-space: nowrap; + background-color: white; + border: 1px solid gray; + border-radius: 4px 4px 4px 4px; + box-shadow: 1px 1px 7px gray; + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: grey; + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: #006318; +} + +#powerTip div { + margin: 0px; + padding: 0px; + font: 12px/16px Roboto,sans-serif; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: #ffffff; + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before { + border-top-color: #808080; + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: #ffffff; + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: #808080; + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: #ffffff; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: #ffffff; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + diff --git a/docs/doxygen/doxygen.png b/docs/doxygen/doxygen.png new file mode 100644 index 00000000..3ff17d80 Binary files /dev/null and b/docs/doxygen/doxygen.png differ diff --git a/docs/doxygen/dynsections.js b/docs/doxygen/dynsections.js new file mode 100644 index 00000000..1e6bf07f --- /dev/null +++ b/docs/doxygen/dynsections.js @@ -0,0 +1,104 @@ +function toggleVisibility(linkObj) +{ + var base = $(linkObj).attr('id'); + var summary = $('#'+base+'-summary'); + var content = $('#'+base+'-content'); + var trigger = $('#'+base+'-trigger'); + var src=$(trigger).attr('src'); + if (content.is(':visible')===true) { + content.hide(); + summary.show(); + $(linkObj).addClass('closed').removeClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + content.show(); + summary.hide(); + $(linkObj).removeClass('closed').addClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); + } + return false; +} + +function updateStripes() +{ + $('table.directory tr'). + removeClass('even').filter(':visible:even').addClass('even'); +} + +function toggleLevel(level) +{ + $('table.directory tr').each(function() { + var l = this.id.split('_').length-1; + var i = $('#img'+this.id.substring(3)); + var a = $('#arr'+this.id.substring(3)); + if (l + + + + + + +libcbor: src/cbor/internal/encoders.c File Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
encoders.c File Reference
+
+
+
#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)
 
+

Function Documentation

+ +

§ _cbor_encode_uint()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
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.

+ +
+
+ +

§ _cbor_encode_uint16()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
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.

+ +
+
+ +

§ _cbor_encode_uint32()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
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.

+ +
+
+ +

§ _cbor_encode_uint64()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
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.

+ +
+
+ +

§ _cbor_encode_uint8()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
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.

+ +
+
+
+ + + + diff --git a/docs/doxygen/encoders_8c_source.html b/docs/doxygen/encoders_8c_source.html new file mode 100644 index 00000000..54927e39 --- /dev/null +++ b/docs/doxygen/encoders_8c_source.html @@ -0,0 +1,86 @@ + + + + + + + +libcbor: src/cbor/internal/encoders.c Source File + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
encoders.c
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 #include "encoders.h"
9 
10 #if HAVE_ENDIAN_H
11 #include <endian.h>
12 #endif
13 
14 size_t _cbor_encode_uint8(uint8_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset)
15 {
16  if (value <= 23) {
17  if (buffer_size >= 1) {
18  buffer[0] = value + offset;
19  return 1;
20  }
21  } else {
22  if (buffer_size >= 2) {
23  buffer[0] = 0x18 + offset;
24  buffer[1] = value;
25  return 2;
26  }
27  }
28  return 0;
29 }
30 
31 size_t _cbor_encode_uint16(uint16_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset)
32 {
33  if (buffer_size >= 3) {
34  buffer[0] = 0x19 + offset;
35 
36 #ifdef HAVE_ENDIAN_H
37  *(uint16_t *) &buffer[1] = htobe16(value);
38 #else
39  #ifdef IS_BIG_ENDIAN
40  *(uint16_t *) &buffer[1] = value;
41  #else
42  buffer[1] = value >> 8;
43  buffer[2] = value;
44  #endif
45 #endif
46 
47  return 3;
48  } else
49  return 0;
50 }
51 
52 size_t _cbor_encode_uint32(uint32_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset)
53 {
54  if (buffer_size >= 5) {
55  buffer[0] = 0x1A + offset;
56 
57 #ifdef HAVE_ENDIAN_H
58  *(uint32_t *) &buffer[1] = htobe32(value);
59 #else
60  #ifdef IS_BIG_ENDIAN
61  *(uint32_t *) &buffer[1] = value;
62  #else
63  buffer[1] = value >> 24;
64  buffer[2] = value >> 16;
65  buffer[3] = value >> 8;
66  buffer[4] = value;
67  #endif
68 #endif
69 
70  return 5;
71  } else
72  return 0;
73 }
74 
75 size_t _cbor_encode_uint64(uint64_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset)
76 {
77  if (buffer_size >= 9) {
78  buffer[0] = 0x1B + offset;
79 
80 #ifdef HAVE_ENDIAN_H
81  *(uint64_t *) &buffer[1] = htobe64(value);
82 #else
83  #ifdef IS_BIG_ENDIAN
84  *(uint64_t *) &buffer[1] = value;
85  #else
86  buffer[1] = value >> 56;
87  buffer[2] = value >> 48;
88  buffer[3] = value >> 40;
89  buffer[4] = value >> 32;
90  buffer[5] = value >> 24;
91  buffer[6] = value >> 16;
92  buffer[7] = value >> 8;
93  buffer[8] = value;
94  #endif
95 #endif
96 
97  return 9;
98  } else
99  return 0;
100 }
101 
102 size_t _cbor_encode_uint(uint64_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset)
103 {
104  if (value <= UINT16_MAX) if (value <= UINT8_MAX)
105  return _cbor_encode_uint8((uint8_t) value, buffer, buffer_size, offset);
106  else
107  return _cbor_encode_uint16((uint16_t) value, buffer, buffer_size, offset);
108  else if (value <= UINT32_MAX)
109  return _cbor_encode_uint32((uint32_t) value, buffer, buffer_size, offset);
110  else
111  return _cbor_encode_uint64((uint64_t) value, buffer, buffer_size, offset);
112 }
size_t _cbor_encode_uint16(uint16_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset)
Definition: encoders.c:31
+
size_t _cbor_encode_uint64(uint64_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset)
Definition: encoders.c:75
+
size_t _cbor_encode_uint32(uint32_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset)
Definition: encoders.c:52
+
size_t _cbor_encode_uint(uint64_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset)
Definition: encoders.c:102
+
size_t _cbor_encode_uint8(uint8_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset)
Definition: encoders.c:14
+ +
+ + + + diff --git a/docs/doxygen/encoders_8h.html b/docs/doxygen/encoders_8h.html new file mode 100644 index 00000000..c2567bbf --- /dev/null +++ b/docs/doxygen/encoders_8h.html @@ -0,0 +1,310 @@ + + + + + + + +libcbor: src/cbor/internal/encoders.h File Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
encoders.h File Reference
+
+
+
#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)
 
+

Function Documentation

+ +

§ _cbor_encode_uint()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
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.

+ +
+
+ +

§ _cbor_encode_uint16()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
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.

+ +
+
+ +

§ _cbor_encode_uint32()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
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.

+ +
+
+ +

§ _cbor_encode_uint64()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
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.

+ +
+
+ +

§ _cbor_encode_uint8()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
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.

+ +
+
+
+ + + + diff --git a/docs/doxygen/encoders_8h_source.html b/docs/doxygen/encoders_8h_source.html new file mode 100644 index 00000000..55378f87 --- /dev/null +++ b/docs/doxygen/encoders_8h_source.html @@ -0,0 +1,86 @@ + + + + + + + +libcbor: src/cbor/internal/encoders.h Source File + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
encoders.h
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 #ifndef LIBCBOR_ENCODERS_H
9 #define LIBCBOR_ENCODERS_H
10 
11 #include "cbor/common.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 
18 size_t _cbor_encode_uint8(uint8_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset);
19 
20 size_t _cbor_encode_uint16(uint16_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset);
21 
22 size_t _cbor_encode_uint32(uint32_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset);
23 
24 size_t _cbor_encode_uint64(uint64_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset);
25 
26 size_t _cbor_encode_uint(uint64_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset);
27 
28 #ifdef __cplusplus
29 }
30 #endif
31 
32 #endif //LIBCBOR_ENCODERS_H
size_t _cbor_encode_uint64(uint64_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset)
Definition: encoders.c:75
+
size_t _cbor_encode_uint8(uint8_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset)
Definition: encoders.c:14
+
size_t _cbor_encode_uint(uint64_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset)
Definition: encoders.c:102
+
size_t _cbor_encode_uint16(uint16_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset)
Definition: encoders.c:31
+
size_t _cbor_encode_uint32(uint32_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset)
Definition: encoders.c:52
+ +
+ + + + diff --git a/docs/doxygen/encoding_8c.html b/docs/doxygen/encoding_8c.html new file mode 100644 index 00000000..4f627aba --- /dev/null +++ b/docs/doxygen/encoding_8c.html @@ -0,0 +1,1137 @@ + + + + + + + +libcbor: src/cbor/encoding.c File Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
encoding.c File Reference
+
+
+
#include "encoding.h"
+#include "internal/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)
 
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)
 
+

Function Documentation

+ +

§ _cbor_encode_byte()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t _cbor_encode_byte (uint8_t value,
unsigned char * buffer,
size_t buffer_size 
)
+
+ +

Definition at line 67 of file encoding.c.

+ +
+
+ +

§ cbor_encode_array_start()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_array_start (size_t length,
unsigned char * buffer,
size_t buffer_size 
)
+
+ +

Definition at line 91 of file encoding.c.

+ +
+
+ +

§ cbor_encode_bool()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_bool (bool value,
unsigned char * buffer,
size_t buffer_size 
)
+
+ +

Definition at line 116 of file encoding.c.

+ +
+
+ +

§ cbor_encode_break()

+ +
+
+ + + + + + + + + + + + + + + + + + +
size_t cbor_encode_break (unsigned char * buffer,
size_t buffer_size 
)
+
+ +

Definition at line 178 of file encoding.c.

+ +
+
+ +

§ cbor_encode_bytestring_start()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_bytestring_start (size_t length,
unsigned char * buffer,
size_t buffer_size 
)
+
+ +

Definition at line 62 of file encoding.c.

+ +
+
+ +

§ cbor_encode_ctrl()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_ctrl (uint8_t value,
unsigned char * buffer,
size_t buffer_size 
)
+
+ +

Definition at line 183 of file encoding.c.

+ +
+
+ +

§ cbor_encode_double()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_double (double value,
unsigned char * buffer,
size_t buffer_size 
)
+
+ +

Definition at line 173 of file encoding.c.

+ +
+
+ +

§ cbor_encode_half()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
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:

    +
  • Infinity, NaN are preserved
  • +
  • Zero is preserved
  • +
  • Denormalized numbers keep their sign bit and 10 most significant bit of the significand
  • +
  • All other numbers
      +
    • If the logical value of the exponent is < -24, the output is zero
    • +
    • If the logical value of the exponent is between -23 and -14, the output is cut off to represent the 'magnitude' of the input, by which we mean (-1)^{signbit} x 1.0e{exponent}. The value in the significand is lost.
    • +
    • In all other cases, the sign bit, the exponent, and 10 most significant bits of the significand are kept
    • +
    +
  • +
+
Parameters
+ + + + +
value
bufferTarget buffer
buffer_sizeAvailable space in the buffer
+
+
+
Returns
number of bytes written
+ +

Definition at line 131 of file encoding.c.

+ +
+
+ +

§ cbor_encode_indef_array_start()

+ +
+
+ + + + + + + + + + + + + + + + + + +
size_t cbor_encode_indef_array_start (unsigned char * buffer,
size_t buffer_size 
)
+
+ +

Definition at line 96 of file encoding.c.

+ +
+
+ +

§ cbor_encode_indef_bytestring_start()

+ +
+
+ + + + + + + + + + + + + + + + + + +
size_t cbor_encode_indef_bytestring_start (unsigned char * buffer,
size_t buffer_size 
)
+
+ +

Definition at line 76 of file encoding.c.

+ +
+
+ +

§ cbor_encode_indef_map_start()

+ +
+
+ + + + + + + + + + + + + + + + + + +
size_t cbor_encode_indef_map_start (unsigned char * buffer,
size_t buffer_size 
)
+
+ +

Definition at line 106 of file encoding.c.

+ +
+
+ +

§ cbor_encode_indef_string_start()

+ +
+
+ + + + + + + + + + + + + + + + + + +
size_t cbor_encode_indef_string_start (unsigned char * buffer,
size_t buffer_size 
)
+
+ +

Definition at line 86 of file encoding.c.

+ +
+
+ +

§ cbor_encode_map_start()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_map_start (size_t length,
unsigned char * buffer,
size_t buffer_size 
)
+
+ +

Definition at line 101 of file encoding.c.

+ +
+
+ +

§ cbor_encode_negint()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_negint (uint64_t value,
unsigned char * buffer,
size_t buffer_size 
)
+
+ +

Definition at line 57 of file encoding.c.

+ +
+
+ +

§ cbor_encode_negint16()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_negint16 (uint16_t value,
unsigned char * buffer,
size_t buffer_size 
)
+
+ +

Definition at line 42 of file encoding.c.

+ +
+
+ +

§ cbor_encode_negint32()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_negint32 (uint32_t value,
unsigned char * buffer,
size_t buffer_size 
)
+
+ +

Definition at line 47 of file encoding.c.

+ +
+
+ +

§ cbor_encode_negint64()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_negint64 (uint64_t value,
unsigned char * buffer,
size_t buffer_size 
)
+
+ +

Definition at line 52 of file encoding.c.

+ +
+
+ +

§ cbor_encode_negint8()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_negint8 (uint8_t value,
unsigned char * buffer,
size_t buffer_size 
)
+
+ +

Definition at line 37 of file encoding.c.

+ +
+
+ +

§ cbor_encode_null()

+ +
+
+ + + + + + + + + + + + + + + + + + +
size_t cbor_encode_null (unsigned char * buffer,
size_t buffer_size 
)
+
+ +

Definition at line 121 of file encoding.c.

+ +
+
+ +

§ cbor_encode_single()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_single (float value,
unsigned char * buffer,
size_t buffer_size 
)
+
+ +

Definition at line 167 of file encoding.c.

+ +
+
+ +

§ cbor_encode_string_start()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_string_start (size_t length,
unsigned char * buffer,
size_t buffer_size 
)
+
+ +

Definition at line 81 of file encoding.c.

+ +
+
+ +

§ cbor_encode_tag()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_tag (uint64_t value,
unsigned char * buffer,
size_t buffer_size 
)
+
+ +

Definition at line 111 of file encoding.c.

+ +
+
+ +

§ cbor_encode_uint()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_uint (uint64_t value,
unsigned char * buffer,
size_t buffer_size 
)
+
+ +

Definition at line 31 of file encoding.c.

+ +
+
+ +

§ cbor_encode_uint16()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_uint16 (uint16_t value,
unsigned char * buffer,
size_t buffer_size 
)
+
+ +

Definition at line 16 of file encoding.c.

+ +
+
+ +

§ cbor_encode_uint32()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_uint32 (uint32_t value,
unsigned char * buffer,
size_t buffer_size 
)
+
+ +

Definition at line 21 of file encoding.c.

+ +
+
+ +

§ cbor_encode_uint64()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_uint64 (uint64_t value,
unsigned char * buffer,
size_t buffer_size 
)
+
+ +

Definition at line 26 of file encoding.c.

+ +
+
+ +

§ cbor_encode_uint8()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_uint8 (uint8_t value,
unsigned char * buffer,
size_t buffer_size 
)
+
+ +

Definition at line 11 of file encoding.c.

+ +
+
+ +

§ cbor_encode_undef()

+ +
+
+ + + + + + + + + + + + + + + + + + +
size_t cbor_encode_undef (unsigned char * buffer,
size_t buffer_size 
)
+
+ +

Definition at line 126 of file encoding.c.

+ +
+
+
+ + + + diff --git a/docs/doxygen/encoding_8c_source.html b/docs/doxygen/encoding_8c_source.html new file mode 100644 index 00000000..e27450b4 --- /dev/null +++ b/docs/doxygen/encoding_8c_source.html @@ -0,0 +1,118 @@ + + + + + + + +libcbor: src/cbor/encoding.c Source File + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
encoding.c
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 #include "encoding.h"
9 #include "internal/encoders.h"
10 
11 size_t cbor_encode_uint8(uint8_t value, unsigned char *buffer, size_t buffer_size)
12 {
13  return _cbor_encode_uint8(value, buffer, buffer_size, 0x00);
14 }
15 
16 size_t cbor_encode_uint16(uint16_t value, unsigned char *buffer, size_t buffer_size)
17 {
18  return _cbor_encode_uint16(value, buffer, buffer_size, 0x00);
19 }
20 
21 size_t cbor_encode_uint32(uint32_t value, unsigned char *buffer, size_t buffer_size)
22 {
23  return _cbor_encode_uint32(value, buffer, buffer_size, 0x00);
24 }
25 
26 size_t cbor_encode_uint64(uint64_t value, unsigned char *buffer, size_t buffer_size)
27 {
28  return _cbor_encode_uint64(value, buffer, buffer_size, 0x00);
29 }
30 
31 size_t cbor_encode_uint(uint64_t value, unsigned char *buffer, size_t buffer_size)
32 {
33  return _cbor_encode_uint(value, buffer, buffer_size, 0x00);
34 }
35 
36 
37 size_t cbor_encode_negint8(uint8_t value, unsigned char *buffer, size_t buffer_size)
38 {
39  return _cbor_encode_uint8(value, buffer, buffer_size, 0x20);
40 }
41 
42 size_t cbor_encode_negint16(uint16_t value, unsigned char *buffer, size_t buffer_size)
43 {
44  return _cbor_encode_uint16(value, buffer, buffer_size, 0x20);
45 }
46 
47 size_t cbor_encode_negint32(uint32_t value, unsigned char *buffer, size_t buffer_size)
48 {
49  return _cbor_encode_uint32(value, buffer, buffer_size, 0x20);
50 }
51 
52 size_t cbor_encode_negint64(uint64_t value, unsigned char *buffer, size_t buffer_size)
53 {
54  return _cbor_encode_uint64(value, buffer, buffer_size, 0x20);
55 }
56 
57 size_t cbor_encode_negint(uint64_t value, unsigned char *buffer, size_t buffer_size)
58 {
59  return _cbor_encode_uint(value, buffer, buffer_size, 0x20);
60 }
61 
62 size_t cbor_encode_bytestring_start(size_t length, unsigned char *buffer, size_t buffer_size)
63 {
64  return _cbor_encode_uint((size_t) length, buffer, buffer_size, 0x40);
65 }
66 
67 size_t _cbor_encode_byte(uint8_t value, unsigned char *buffer, size_t buffer_size)
68 {
69  if (buffer_size >= 1) {
70  buffer[0] = value;
71  return 1;
72  } else
73  return 0;
74 }
75 
76 size_t cbor_encode_indef_bytestring_start(unsigned char *buffer, size_t buffer_size)
77 {
78  return _cbor_encode_byte(0x5F, buffer, buffer_size);
79 }
80 
81 size_t cbor_encode_string_start(size_t length, unsigned char *buffer, size_t buffer_size)
82 {
83  return _cbor_encode_uint((size_t) length, buffer, buffer_size, 0x60);
84 }
85 
86 size_t cbor_encode_indef_string_start(unsigned char *buffer, size_t buffer_size)
87 {
88  return _cbor_encode_byte(0x7F, buffer, buffer_size);
89 }
90 
91 size_t cbor_encode_array_start(size_t length, unsigned char *buffer, size_t buffer_size)
92 {
93  return _cbor_encode_uint((size_t) length, buffer, buffer_size, 0x80);
94 }
95 
96 size_t cbor_encode_indef_array_start(unsigned char *buffer, size_t buffer_size)
97 {
98  return _cbor_encode_byte(0x9F, buffer, buffer_size);
99 }
100 
101 size_t cbor_encode_map_start(size_t length, unsigned char *buffer, size_t buffer_size)
102 {
103  return _cbor_encode_uint((size_t) length, buffer, buffer_size, 0xA0);
104 }
105 
106 size_t cbor_encode_indef_map_start(unsigned char *buffer, size_t buffer_size)
107 {
108  return _cbor_encode_byte(0xBF, buffer, buffer_size);
109 }
110 
111 size_t cbor_encode_tag(uint64_t value, unsigned char *buffer, size_t buffer_size)
112 {
113  return _cbor_encode_uint(value, buffer, buffer_size, 0xC0);
114 }
115 
116 size_t cbor_encode_bool(bool value, unsigned char *buffer, size_t buffer_size)
117 {
118  return value ? _cbor_encode_byte(0xF5, buffer, buffer_size) : _cbor_encode_byte(0xF4, buffer, buffer_size);
119 }
120 
121 size_t cbor_encode_null(unsigned char *buffer, size_t buffer_size)
122 {
123  return _cbor_encode_byte(0xF6, buffer, buffer_size);
124 }
125 
126 size_t cbor_encode_undef(unsigned char *buffer, size_t buffer_size)
127 {
128  return _cbor_encode_byte(0xF7, buffer, buffer_size);
129 }
130 
131 size_t cbor_encode_half(float value, unsigned char *buffer, size_t buffer_size)
132 {
133  /* Assuming value is normalized */
134  uint32_t val = ((union _cbor_float_helper) {.as_float = value}).as_uint;
135  uint16_t res;
136  uint8_t exp = (uint8_t) ((val & 0x7F800000) >> 23); /* 0b0111_1111_1000_0000_0000_0000_0000_0000 */
137  uint32_t mant = val & 0x7FFFFF; /* 0b0000_0000_0111_1111_1111_1111_1111_1111 */
138  if (exp == 0xFF) { /* Infinity or NaNs */
139  if (value != value) {
140  res = (uint16_t) 0x00e700; /* Not IEEE semantics - required by CBOR [s. 3.9] */
141  } else {
142  res = (uint16_t) ((val & 0x80000000) >> 16 | 0x7C00 | (mant ? 1 : 0) << 15);
143  }
144  } else if (exp == 0x00) { /* Zeroes or subnorms */
145  res = (uint16_t) ((val & 0x80000000) >> 16 | mant >> 13);
146  } else { /* Normal numbers */
147  int8_t logical_exp = (int8_t) (exp - 127);
148  assert(logical_exp == exp - 127);
149 
150  // Now we know that 2^exp <= 0 logically
151  if (logical_exp < -24) {
152  /* No unambiguous representation exists, this float is not a half float and is too small to
153  be represented using a half, round off to zero. Consistent with the reference implementation. */
154  res = 0;
155  } else if (logical_exp < -14) {
156  /* Offset the remaining decimal places by shifting the significand, the value is lost.
157  This is an implementation decision that works around the absence of standard half-float
158  in the language. */
159  res = (uint16_t) (val & 0x80000000) >> 16 | (uint16_t) (1 << (24 + logical_exp));
160  } else {
161  res = (uint16_t) ((val & 0x80000000) >> 16 | ((((uint8_t) logical_exp) + 15) << 10) | (uint16_t) (mant >> 13));
162  }
163  }
164  return _cbor_encode_uint16(res, buffer, buffer_size, 0xE0);
165 }
166 
167 size_t cbor_encode_single(float value, unsigned char *buffer, size_t buffer_size)
168 {
169 
170  return _cbor_encode_uint32(((union _cbor_float_helper) {.as_float = value}).as_uint, buffer, buffer_size, 0xE0);
171 }
172 
173 size_t cbor_encode_double(double value, unsigned char *buffer, size_t buffer_size)
174 {
175  return _cbor_encode_uint64(((union _cbor_double_helper) {.as_double = value}).as_uint, buffer, buffer_size, 0xE0);
176 }
177 
178 size_t cbor_encode_break(unsigned char *buffer, size_t buffer_size)
179 {
180  return _cbor_encode_byte(0xFF, buffer, buffer_size);
181 }
182 
183 size_t cbor_encode_ctrl(uint8_t value, unsigned char * buffer, size_t buffer_size)
184 {
185  return _cbor_encode_uint8(value, buffer, buffer_size, 0xE0);
186 }
size_t cbor_encode_map_start(size_t length, unsigned char *buffer, size_t buffer_size)
Definition: encoding.c:101
+
size_t cbor_encode_break(unsigned char *buffer, size_t buffer_size)
Definition: encoding.c:178
+
size_t cbor_encode_half(float value, unsigned char *buffer, size_t buffer_size)
Encodes a half-precision float.
Definition: encoding.c:131
+
size_t cbor_encode_indef_array_start(unsigned char *buffer, size_t buffer_size)
Definition: encoding.c:96
+
size_t cbor_encode_string_start(size_t length, unsigned char *buffer, size_t buffer_size)
Definition: encoding.c:81
+
size_t cbor_encode_negint32(uint32_t value, unsigned char *buffer, size_t buffer_size)
Definition: encoding.c:47
+
uint32_t as_uint
Definition: data.h:128
+
size_t cbor_encode_ctrl(uint8_t value, unsigned char *buffer, size_t buffer_size)
Definition: encoding.c:183
+
size_t _cbor_encode_uint16(uint16_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset)
Definition: encoders.c:31
+
size_t _cbor_encode_uint64(uint64_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset)
Definition: encoders.c:75
+
size_t cbor_encode_negint8(uint8_t value, unsigned char *buffer, size_t buffer_size)
Definition: encoding.c:37
+
size_t cbor_encode_uint64(uint64_t value, unsigned char *buffer, size_t buffer_size)
Definition: encoding.c:26
+
size_t _cbor_encode_byte(uint8_t value, unsigned char *buffer, size_t buffer_size)
Definition: encoding.c:67
+
size_t cbor_encode_single(float value, unsigned char *buffer, size_t buffer_size)
Definition: encoding.c:167
+
size_t cbor_encode_null(unsigned char *buffer, size_t buffer_size)
Definition: encoding.c:121
+
size_t cbor_encode_bool(bool value, unsigned char *buffer, size_t buffer_size)
Definition: encoding.c:116
+
size_t cbor_encode_indef_map_start(unsigned char *buffer, size_t buffer_size)
Definition: encoding.c:106
+
size_t _cbor_encode_uint32(uint32_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset)
Definition: encoders.c:52
+
size_t cbor_encode_double(double value, unsigned char *buffer, size_t buffer_size)
Definition: encoding.c:173
+ +
size_t _cbor_encode_uint(uint64_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset)
Definition: encoders.c:102
+
size_t cbor_encode_array_start(size_t length, unsigned char *buffer, size_t buffer_size)
Definition: encoding.c:91
+
size_t cbor_encode_uint8(uint8_t value, unsigned char *buffer, size_t buffer_size)
Definition: encoding.c:11
+
size_t cbor_encode_uint16(uint16_t value, unsigned char *buffer, size_t buffer_size)
Definition: encoding.c:16
+
size_t cbor_encode_negint64(uint64_t value, unsigned char *buffer, size_t buffer_size)
Definition: encoding.c:52
+
size_t cbor_encode_uint32(uint32_t value, unsigned char *buffer, size_t buffer_size)
Definition: encoding.c:21
+
size_t cbor_encode_undef(unsigned char *buffer, size_t buffer_size)
Definition: encoding.c:126
+
size_t cbor_encode_negint(uint64_t value, unsigned char *buffer, size_t buffer_size)
Definition: encoding.c:57
+
size_t cbor_encode_indef_string_start(unsigned char *buffer, size_t buffer_size)
Definition: encoding.c:86
+
size_t cbor_encode_uint(uint64_t value, unsigned char *buffer, size_t buffer_size)
Definition: encoding.c:31
+
size_t _cbor_encode_uint8(uint8_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset)
Definition: encoders.c:14
+ +
size_t cbor_encode_bytestring_start(size_t length, unsigned char *buffer, size_t buffer_size)
Definition: encoding.c:62
+
size_t cbor_encode_indef_bytestring_start(unsigned char *buffer, size_t buffer_size)
Definition: encoding.c:76
+
size_t cbor_encode_negint16(uint16_t value, unsigned char *buffer, size_t buffer_size)
Definition: encoding.c:42
+
Raw memory casts helper.
Definition: data.h:126
+
Raw memory casts helper.
Definition: data.h:132
+
size_t cbor_encode_tag(uint64_t value, unsigned char *buffer, size_t buffer_size)
Definition: encoding.c:111
+
+ + + + diff --git a/docs/doxygen/encoding_8h.html b/docs/doxygen/encoding_8h.html new file mode 100644 index 00000000..a3f31990 --- /dev/null +++ b/docs/doxygen/encoding_8h.html @@ -0,0 +1,1098 @@ + + + + + + + +libcbor: src/cbor/encoding.h File Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
encoding.h File Reference
+
+
+
#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)
 
+

Function Documentation

+ +

§ cbor_encode_array_start()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_array_start (size_t ,
unsigned char * ,
size_t  
)
+
+ +

Definition at line 91 of file encoding.c.

+ +
+
+ +

§ cbor_encode_bool()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_bool (bool ,
unsigned char * ,
size_t  
)
+
+ +

Definition at line 116 of file encoding.c.

+ +
+
+ +

§ cbor_encode_break()

+ +
+
+ + + + + + + + + + + + + + + + + + +
size_t cbor_encode_break (unsigned char * ,
size_t  
)
+
+ +

Definition at line 178 of file encoding.c.

+ +
+
+ +

§ cbor_encode_bytestring_start()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_bytestring_start (size_t ,
unsigned char * ,
size_t  
)
+
+ +

Definition at line 62 of file encoding.c.

+ +
+
+ +

§ cbor_encode_ctrl()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_ctrl (uint8_t ,
unsigned char * ,
size_t  
)
+
+ +

Definition at line 183 of file encoding.c.

+ +
+
+ +

§ cbor_encode_double()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_double (double ,
unsigned char * ,
size_t  
)
+
+ +

Definition at line 173 of file encoding.c.

+ +
+
+ +

§ cbor_encode_half()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
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:

    +
  • Infinity, NaN are preserved
  • +
  • Zero is preserved
  • +
  • Denormalized numbers keep their sign bit and 10 most significant bit of the significand
  • +
  • All other numbers
      +
    • If the logical value of the exponent is < -24, the output is zero
    • +
    • If the logical value of the exponent is between -23 and -14, the output is cut off to represent the 'magnitude' of the input, by which we mean (-1)^{signbit} x 1.0e{exponent}. The value in the significand is lost.
    • +
    • In all other cases, the sign bit, the exponent, and 10 most significant bits of the significand are kept
    • +
    +
  • +
+
Parameters
+ + + + +
value
bufferTarget buffer
buffer_sizeAvailable space in the buffer
+
+
+
Returns
number of bytes written
+ +

Definition at line 131 of file encoding.c.

+ +
+
+ +

§ cbor_encode_indef_array_start()

+ +
+
+ + + + + + + + + + + + + + + + + + +
size_t cbor_encode_indef_array_start (unsigned char * ,
size_t  
)
+
+ +

Definition at line 96 of file encoding.c.

+ +
+
+ +

§ cbor_encode_indef_bytestring_start()

+ +
+
+ + + + + + + + + + + + + + + + + + +
size_t cbor_encode_indef_bytestring_start (unsigned char * ,
size_t  
)
+
+ +

Definition at line 76 of file encoding.c.

+ +
+
+ +

§ cbor_encode_indef_map_start()

+ +
+
+ + + + + + + + + + + + + + + + + + +
size_t cbor_encode_indef_map_start (unsigned char * ,
size_t  
)
+
+ +

Definition at line 106 of file encoding.c.

+ +
+
+ +

§ cbor_encode_indef_string_start()

+ +
+
+ + + + + + + + + + + + + + + + + + +
size_t cbor_encode_indef_string_start (unsigned char * ,
size_t  
)
+
+ +

Definition at line 86 of file encoding.c.

+ +
+
+ +

§ cbor_encode_map_start()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_map_start (size_t ,
unsigned char * ,
size_t  
)
+
+ +

Definition at line 101 of file encoding.c.

+ +
+
+ +

§ cbor_encode_negint()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_negint (uint64_t ,
unsigned char * ,
size_t  
)
+
+ +

Definition at line 57 of file encoding.c.

+ +
+
+ +

§ cbor_encode_negint16()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_negint16 (uint16_t ,
unsigned char * ,
size_t  
)
+
+ +

Definition at line 42 of file encoding.c.

+ +
+
+ +

§ cbor_encode_negint32()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_negint32 (uint32_t ,
unsigned char * ,
size_t  
)
+
+ +

Definition at line 47 of file encoding.c.

+ +
+
+ +

§ cbor_encode_negint64()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_negint64 (uint64_t ,
unsigned char * ,
size_t  
)
+
+ +

Definition at line 52 of file encoding.c.

+ +
+
+ +

§ cbor_encode_negint8()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_negint8 (uint8_t ,
unsigned char * ,
size_t  
)
+
+ +

Definition at line 37 of file encoding.c.

+ +
+
+ +

§ cbor_encode_null()

+ +
+
+ + + + + + + + + + + + + + + + + + +
size_t cbor_encode_null (unsigned char * ,
size_t  
)
+
+ +

Definition at line 121 of file encoding.c.

+ +
+
+ +

§ cbor_encode_single()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_single (float ,
unsigned char * ,
size_t  
)
+
+ +

Definition at line 167 of file encoding.c.

+ +
+
+ +

§ cbor_encode_string_start()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_string_start (size_t ,
unsigned char * ,
size_t  
)
+
+ +

Definition at line 81 of file encoding.c.

+ +
+
+ +

§ cbor_encode_tag()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_tag (uint64_t ,
unsigned char * ,
size_t  
)
+
+ +

Definition at line 111 of file encoding.c.

+ +
+
+ +

§ cbor_encode_uint()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_uint (uint64_t ,
unsigned char * ,
size_t  
)
+
+ +

Definition at line 31 of file encoding.c.

+ +
+
+ +

§ cbor_encode_uint16()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_uint16 (uint16_t ,
unsigned char * ,
size_t  
)
+
+ +

Definition at line 16 of file encoding.c.

+ +
+
+ +

§ cbor_encode_uint32()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_uint32 (uint32_t ,
unsigned char * ,
size_t  
)
+
+ +

Definition at line 21 of file encoding.c.

+ +
+
+ +

§ cbor_encode_uint64()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_uint64 (uint64_t ,
unsigned char * ,
size_t  
)
+
+ +

Definition at line 26 of file encoding.c.

+ +
+
+ +

§ cbor_encode_uint8()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t cbor_encode_uint8 (uint8_t ,
unsigned char * ,
size_t  
)
+
+ +

Definition at line 11 of file encoding.c.

+ +
+
+ +

§ cbor_encode_undef()

+ +
+
+ + + + + + + + + + + + + + + + + + +
size_t cbor_encode_undef (unsigned char * ,
size_t  
)
+
+ +

Definition at line 126 of file encoding.c.

+ +
+
+
+ + + + diff --git a/docs/doxygen/encoding_8h_source.html b/docs/doxygen/encoding_8h_source.html new file mode 100644 index 00000000..0d278e0b --- /dev/null +++ b/docs/doxygen/encoding_8h_source.html @@ -0,0 +1,108 @@ + + + + + + + +libcbor: src/cbor/encoding.h Source File + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
encoding.h
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 #ifndef LIBCBOR_ENCODING_H
9 #define LIBCBOR_ENCODING_H
10 
11 #include "cbor/common.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 
18 /*
19 * ============================================================================
20 * Primitives encoding
21 * ============================================================================
22 */
23 
24 size_t cbor_encode_uint8(uint8_t, unsigned char *, size_t);
25 
26 size_t cbor_encode_uint16(uint16_t, unsigned char *, size_t);
27 
28 size_t cbor_encode_uint32(uint32_t, unsigned char *, size_t);
29 
30 size_t cbor_encode_uint64(uint64_t, unsigned char *, size_t);
31 
32 size_t cbor_encode_uint(uint64_t, unsigned char *, size_t);
33 
34 size_t cbor_encode_negint8(uint8_t, unsigned char *, size_t);
35 
36 size_t cbor_encode_negint16(uint16_t, unsigned char *, size_t);
37 
38 size_t cbor_encode_negint32(uint32_t, unsigned char *, size_t);
39 
40 size_t cbor_encode_negint64(uint64_t, unsigned char *, size_t);
41 
42 size_t cbor_encode_negint(uint64_t, unsigned char *, size_t);
43 
44 size_t cbor_encode_bytestring_start(size_t, unsigned char *, size_t);
45 
46 size_t cbor_encode_indef_bytestring_start(unsigned char *, size_t);
47 
48 size_t cbor_encode_string_start(size_t, unsigned char *, size_t);
49 
50 size_t cbor_encode_indef_string_start(unsigned char *, size_t);
51 
52 size_t cbor_encode_array_start(size_t, unsigned char *, size_t);
53 
54 size_t cbor_encode_indef_array_start(unsigned char *, size_t);
55 
56 size_t cbor_encode_map_start(size_t, unsigned char *, size_t);
57 
58 size_t cbor_encode_indef_map_start(unsigned char *, size_t);
59 
60 size_t cbor_encode_tag(uint64_t, unsigned char *, size_t);
61 
62 size_t cbor_encode_bool(bool, unsigned char *, size_t);
63 
64 size_t cbor_encode_null(unsigned char *, size_t);
65 
66 size_t cbor_encode_undef(unsigned char *, size_t);
67 
92 size_t cbor_encode_half(float, unsigned char *, size_t);
93 
94 size_t cbor_encode_single(float, unsigned char *, size_t);
95 
96 size_t cbor_encode_double(double, unsigned char *, size_t);
97 
98 size_t cbor_encode_break(unsigned char *, size_t);
99 
100 size_t cbor_encode_ctrl(uint8_t, unsigned char *, size_t);
101 
102 #ifdef __cplusplus
103 }
104 #endif
105 
106 
107 #endif //LIBCBOR_ENCODING_H
size_t cbor_encode_indef_map_start(unsigned char *, size_t)
Definition: encoding.c:106
+
size_t cbor_encode_uint(uint64_t, unsigned char *, size_t)
Definition: encoding.c:31
+
size_t cbor_encode_negint(uint64_t, unsigned char *, size_t)
Definition: encoding.c:57
+
size_t cbor_encode_negint8(uint8_t, unsigned char *, size_t)
Definition: encoding.c:37
+
size_t cbor_encode_uint16(uint16_t, unsigned char *, size_t)
Definition: encoding.c:16
+
size_t cbor_encode_null(unsigned char *, size_t)
Definition: encoding.c:121
+
size_t cbor_encode_uint32(uint32_t, unsigned char *, size_t)
Definition: encoding.c:21
+
size_t cbor_encode_half(float, unsigned char *, size_t)
Encodes a half-precision float.
Definition: encoding.c:131
+
size_t cbor_encode_undef(unsigned char *, size_t)
Definition: encoding.c:126
+
size_t cbor_encode_bytestring_start(size_t, unsigned char *, size_t)
Definition: encoding.c:62
+
size_t cbor_encode_indef_string_start(unsigned char *, size_t)
Definition: encoding.c:86
+
size_t cbor_encode_map_start(size_t, unsigned char *, size_t)
Definition: encoding.c:101
+
size_t cbor_encode_uint8(uint8_t, unsigned char *, size_t)
Definition: encoding.c:11
+
size_t cbor_encode_break(unsigned char *, size_t)
Definition: encoding.c:178
+
size_t cbor_encode_bool(bool, unsigned char *, size_t)
Definition: encoding.c:116
+
size_t cbor_encode_negint16(uint16_t, unsigned char *, size_t)
Definition: encoding.c:42
+
size_t cbor_encode_uint64(uint64_t, unsigned char *, size_t)
Definition: encoding.c:26
+
size_t cbor_encode_array_start(size_t, unsigned char *, size_t)
Definition: encoding.c:91
+
size_t cbor_encode_ctrl(uint8_t, unsigned char *, size_t)
Definition: encoding.c:183
+
size_t cbor_encode_indef_bytestring_start(unsigned char *, size_t)
Definition: encoding.c:76
+
size_t cbor_encode_single(float, unsigned char *, size_t)
Definition: encoding.c:167
+
size_t cbor_encode_negint64(uint64_t, unsigned char *, size_t)
Definition: encoding.c:52
+
size_t cbor_encode_negint32(uint32_t, unsigned char *, size_t)
Definition: encoding.c:47
+
size_t cbor_encode_string_start(size_t, unsigned char *, size_t)
Definition: encoding.c:81
+
size_t cbor_encode_tag(uint64_t, unsigned char *, size_t)
Definition: encoding.c:111
+ +
size_t cbor_encode_indef_array_start(unsigned char *, size_t)
Definition: encoding.c:96
+
size_t cbor_encode_double(double, unsigned char *, size_t)
Definition: encoding.c:173
+
+ + + + diff --git a/docs/doxygen/files.html b/docs/doxygen/files.html new file mode 100644 index 00000000..4016b467 --- /dev/null +++ b/docs/doxygen/files.html @@ -0,0 +1,123 @@ + + + + + + + +libcbor: File List + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
File List
+
+
+
Here is a list of all files with brief descriptions:
+
+ + + + diff --git a/docs/doxygen/floats__ctrls_8c.html b/docs/doxygen/floats__ctrls_8c.html new file mode 100644 index 00000000..8d146a9b --- /dev/null +++ b/docs/doxygen/floats__ctrls_8c.html @@ -0,0 +1,832 @@ + + + + + + + +libcbor: src/cbor/floats_ctrls.c File Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
floats_ctrls.c File Reference
+
+
+
#include "floats_ctrls.h"
+#include "assert.h"
+#include <math.h>
+
+

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_tcbor_new_ctrl ()
 Constructs a new ctrl item. More...
 
cbor_item_tcbor_new_float2 ()
 Constructs a new float item. More...
 
cbor_item_tcbor_new_float4 ()
 Constructs a new float item. More...
 
cbor_item_tcbor_new_float8 ()
 Constructs a new float item. More...
 
cbor_item_tcbor_new_null ()
 Constructs new null ctrl item. More...
 
cbor_item_tcbor_new_undef ()
 Constructs new under ctrl item. More...
 
cbor_item_tcbor_build_bool (bool value)
 Constructs new boolean ctrl item. More...
 
cbor_item_tcbor_build_float2 (float value)
 Constructs a new float. More...
 
cbor_item_tcbor_build_float4 (float value)
 Constructs a new float. More...
 
cbor_item_tcbor_build_float8 (double value)
 Constructs a new float. More...
 
cbor_item_tcbor_build_ctrl (uint8_t value)
 Constructs a ctrl item. More...
 
+

Function Documentation

+ +

§ cbor_build_bool()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_build_bool (bool value)
+
+ +

Constructs new boolean ctrl item.

+
Parameters
+ + +
valueThe value to use
+
+
+
Returns
new boolen ctrl item
+ +

Definition at line 160 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_build_ctrl()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_build_ctrl (uint8_t value)
+
+ +

Constructs a ctrl item.

+
Parameters
+ + +
valuethe value to use
+
+
+
Returns
new ctrl item
+ +

Definition at line 186 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_build_float2()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_build_float2 (float value)
+
+ +

Constructs a new float.

+
Parameters
+ + +
valuethe value to use
+
+
+
Returns
new float
+ +

Definition at line 165 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_build_float4()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_build_float4 (float value)
+
+ +

Constructs a new float.

+
Parameters
+ + +
valuethe value to use
+
+
+
Returns
new float
+ +

Definition at line 172 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_build_float8()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_build_float8 (double value)
+
+ +

Constructs a new float.

+
Parameters
+ + +
valuethe value to use
+
+
+
Returns
new float
+ +

Definition at line 179 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_ctrl_is_bool()

+ +
+
+ + + + + + + + +
bool cbor_ctrl_is_bool (const cbor_item_titem)
+
+ +

Is this ctrl item a boolean?

+
Parameters
+ + +
item[borrow]A ctrl item
+
+
+
Returns
Is this ctrl item a boolean?
+ +

Definition at line 92 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_ctrl_value()

+ +
+
+ + + + + + + + +
uint8_t cbor_ctrl_value (const cbor_item_titem)
+
+ +

Reads the control value.

+
Parameters
+ + +
item[borrow]A ctrl item
+
+
+
Returns
the simple value
+ +

Definition at line 18 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_float_ctrl_is_ctrl()

+ +
+
+ + + + + + + + +
bool cbor_float_ctrl_is_ctrl (const cbor_item_titem)
+
+ +

Is this a ctrl value?

+
Parameters
+ + +
item[borrow]A float or ctrl item
+
+
+
Returns
Is this a ctrl value?
+ +

Definition at line 25 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_float_get_float()

+ +
+
+ + + + + + + + +
double cbor_float_get_float (const cbor_item_titem)
+
+ +

Get the float value represented as double.

+

Can be used regardless of the width.

+
Parameters
+ + +
+
+
+ +

Definition at line 52 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_float_get_float2()

+ +
+
+ + + + + + + + +
float cbor_float_get_float2 (const cbor_item_titem)
+
+ +

Get a half precision float.

+

The item must have the corresponding width

+
Parameters
+ + +
+
+
+ +

Definition at line 31 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_float_get_float4()

+ +
+
+ + + + + + + + +
float cbor_float_get_float4 (const cbor_item_titem)
+
+ +

Get a single precision float.

+

The item must have the corresponding width

+
Parameters
+ + +
+
+
+ +

Definition at line 38 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_float_get_float8()

+ +
+
+ + + + + + + + +
double cbor_float_get_float8 (const cbor_item_titem)
+
+ +

Get a double precision float.

+

The item must have the corresponding width

+
Parameters
+ + +
+
+
+ +

Definition at line 45 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_float_get_width()

+ +
+
+ + + + + + + + +
cbor_float_width cbor_float_get_width (const cbor_item_titem)
+
+ +

Get the float width.

+
Parameters
+ + +
item[borrow]A float or ctrl item
+
+
+
Returns
The width.
+ +

Definition at line 12 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_new_ctrl()

+ +
+
+ + + + + + + +
cbor_item_t* cbor_new_ctrl ()
+
+ +

Constructs a new ctrl item.

+

The width cannot be changed once the item is created

+
Returns
new 1B ctrl
+ +

Definition at line 98 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_new_float2()

+ +
+
+ + + + + + + +
cbor_item_t* cbor_new_float2 ()
+
+ +

Constructs a new float item.

+

The width cannot be changed once the item is created

+
Returns
new 2B float
+ +

Definition at line 110 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_new_float4()

+ +
+
+ + + + + + + +
cbor_item_t* cbor_new_float4 ()
+
+ +

Constructs a new float item.

+

The width cannot be changed once the item is created

+
Returns
new 4B float
+ +

Definition at line 122 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_new_float8()

+ +
+
+ + + + + + + +
cbor_item_t* cbor_new_float8 ()
+
+ +

Constructs a new float item.

+

The width cannot be changed once the item is created

+
Returns
new 8B float
+ +

Definition at line 134 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_new_null()

+ +
+
+ + + + + + + +
cbor_item_t* cbor_new_null ()
+
+ +

Constructs new null ctrl item.

+
Returns
new null ctrl item
+ +

Definition at line 146 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_new_undef()

+ +
+
+ + + + + + + +
cbor_item_t* cbor_new_undef ()
+
+ +

Constructs new under ctrl item.

+
Returns
new under ctrl item
+ +

Definition at line 153 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_set_ctrl()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_set_ctrl (cbor_item_titem,
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.
+* 
Parameters
+ + + +
item[borrow]A ctrl item
valueThe simple value to assign. Please consult the standard for allowed values
+
+
+ +

Definition at line 85 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_set_float2()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_set_float2 (cbor_item_titem,
float value 
)
+
+ +

Assigns a float value.

+
Parameters
+ + + +
item[borrow]A half precision float
valueThe value to assign
+
+
+ +

Definition at line 64 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_set_float4()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_set_float4 (cbor_item_titem,
float value 
)
+
+ +

Assigns a float value.

+
Parameters
+ + + +
item[borrow]A single precision float
valueThe value to assign
+
+
+ +

Definition at line 71 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_set_float8()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_set_float8 (cbor_item_titem,
double value 
)
+
+ +

Assigns a float value.

+
Parameters
+ + + +
item[borrow]A double precision float
valueThe value to assign
+
+
+ +

Definition at line 78 of file floats_ctrls.c.

+ +
+
+
+ + + + diff --git a/docs/doxygen/floats__ctrls_8c_source.html b/docs/doxygen/floats__ctrls_8c_source.html new file mode 100644 index 00000000..30d9953f --- /dev/null +++ b/docs/doxygen/floats__ctrls_8c_source.html @@ -0,0 +1,128 @@ + + + + + + + +libcbor: src/cbor/floats_ctrls.c Source File + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
floats_ctrls.c
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 #include "floats_ctrls.h"
9 #include "assert.h"
10 #include <math.h>
11 
13 {
14  assert(cbor_isa_float_ctrl(item));
15  return item->metadata.float_ctrl_metadata.width;
16 }
17 
18 uint8_t cbor_ctrl_value(const cbor_item_t *item)
19 {
20  assert(cbor_isa_float_ctrl(item));
21  assert(cbor_float_get_width(item) == CBOR_FLOAT_0);
22  return item->metadata.float_ctrl_metadata.ctrl;
23 }
24 
26 {
27  assert(cbor_isa_float_ctrl(item));
28  return cbor_float_get_width(item) == CBOR_FLOAT_0;
29 }
30 
32 {
33  assert(cbor_is_float(item));
34  assert(cbor_float_get_width(item) == CBOR_FLOAT_16);
35  return *(float *) item->data;
36 }
37 
39 {
40  assert(cbor_is_float(item));
41  assert(cbor_float_get_width(item) == CBOR_FLOAT_32);
42  return *(float *) item->data;
43 }
44 
46 {
47  assert(cbor_is_float(item));
48  assert(cbor_float_get_width(item) == CBOR_FLOAT_64);
49  return *(double *) item->data;
50 }
51 
52 double cbor_float_get_float(const cbor_item_t * item)
53 {
54  assert(cbor_is_float(item));
55  switch(cbor_float_get_width(item)) {
56  case CBOR_FLOAT_0: return NAN;
57  case CBOR_FLOAT_16: return cbor_float_get_float2(item);
58  case CBOR_FLOAT_32: return cbor_float_get_float4(item);
59  case CBOR_FLOAT_64: return cbor_float_get_float8(item);
60  }
61  return NAN; /* Compiler complaints */
62 }
63 
64 void cbor_set_float2(cbor_item_t *item, float value)
65 {
66  assert(cbor_is_float(item));
67  assert(cbor_float_get_width(item) == CBOR_FLOAT_16);
68  *((float *) item->data) = value;
69 }
70 
71 void cbor_set_float4(cbor_item_t *item, float value)
72 {
73  assert(cbor_is_float(item));
74  assert(cbor_float_get_width(item) == CBOR_FLOAT_32);
75  *((float *) item->data) = value;
76 }
77 
78 void cbor_set_float8(cbor_item_t *item, double value)
79 {
80  assert(cbor_is_float(item));
81  assert(cbor_float_get_width(item) == CBOR_FLOAT_64);
82  *((double *) item->data) = value;
83 }
84 
85 void cbor_set_ctrl(cbor_item_t *item, uint8_t value)
86 {
87  assert(cbor_isa_float_ctrl(item));
88  assert(cbor_float_get_width(item) == CBOR_FLOAT_0);
89  item->metadata.float_ctrl_metadata.ctrl = value;
90 }
91 
92 bool cbor_ctrl_is_bool(const cbor_item_t *item)
93 {
94  assert(cbor_is_bool(item));
96 }
97 
99 {
100  cbor_item_t *item = _CBOR_MALLOC(sizeof(cbor_item_t));
101  *item = (cbor_item_t) {
103  .data = NULL,
104  .refcount = 1,
105  .metadata = {.float_ctrl_metadata = {.width = CBOR_FLOAT_0, .ctrl = CBOR_CTRL_NONE}}
106  };
107  return item;
108 }
109 
111 {
112  cbor_item_t *item = _CBOR_MALLOC(sizeof(cbor_item_t) + 4);
113  *item = (cbor_item_t) {
115  .data = (unsigned char *) item + sizeof(cbor_item_t),
116  .refcount = 1,
117  .metadata = {.float_ctrl_metadata = {.width = CBOR_FLOAT_16}}
118  };
119  return item;
120 }
121 
123 {
124  cbor_item_t *item = _CBOR_MALLOC(sizeof(cbor_item_t) + 4);
125  *item = (cbor_item_t) {
127  .data = (unsigned char *) item + sizeof(cbor_item_t),
128  .refcount = 1,
129  .metadata = {.float_ctrl_metadata = {.width = CBOR_FLOAT_32}}
130  };
131  return item;
132 }
133 
135 {
136  cbor_item_t *item = _CBOR_MALLOC(sizeof(cbor_item_t) + 8);
137  *item = (cbor_item_t) {
139  .data = (unsigned char *) item + sizeof(cbor_item_t),
140  .refcount = 1,
141  .metadata = {.float_ctrl_metadata = {.width = CBOR_FLOAT_64}}
142  };
143  return item;
144 }
145 
147 {
148  cbor_item_t *item = cbor_new_ctrl();
150  return item;
151 }
152 
154 {
155  cbor_item_t *item = cbor_new_ctrl();
157  return item;
158 }
159 
161 {
163 }
164 
166 {
167  cbor_item_t *item = cbor_new_float2();
168  cbor_set_float2(item, value);
169  return item;
170 }
171 
173 {
174  cbor_item_t *item = cbor_new_float4();
175  cbor_set_float4(item, value);
176  return item;
177 }
178 
180 {
181  cbor_item_t *item = cbor_new_float8();
182  cbor_set_float8(item, value);
183  return item;
184 }
185 
187 {
188  cbor_item_t *item = cbor_new_ctrl();
189  cbor_set_ctrl(item, value);
190  return item;
191 }
struct cbor_item_t cbor_item_t
The item handle.
+
void cbor_set_float4(cbor_item_t *item, float value)
Assigns a float value.
Definition: floats_ctrls.c:71
+
void cbor_set_float2(cbor_item_t *item, float value)
Assigns a float value.
Definition: floats_ctrls.c:64
+
struct _cbor_float_ctrl_metadata float_ctrl_metadata
Definition: data.h:145
+ + +
cbor_float_width
Possible widths of CBOR_TYPE_FLOAT_CTRL items.
Definition: data.h:54
+
double cbor_float_get_float(const cbor_item_t *item)
Get the float value represented as double.
Definition: floats_ctrls.c:52
+
union cbor_item_metadata metadata
Discriminated by type.
Definition: data.h:151
+
Internal use - ctrl and special values.
Definition: data.h:55
+
cbor_item_t * cbor_build_float2(float value)
Constructs a new float.
Definition: floats_ctrls.c:165
+ +
cbor_item_t * cbor_new_undef()
Constructs new under ctrl item.
Definition: floats_ctrls.c:153
+
cbor_item_t * cbor_build_ctrl(uint8_t value)
Constructs a ctrl item.
Definition: floats_ctrls.c:186
+
cbor_item_t * cbor_build_bool(bool value)
Constructs new boolean ctrl item.
Definition: floats_ctrls.c:160
+ + +
cbor_type type
Major type discriminator.
Definition: data.h:155
+
7 - decimals and special values (true, false, nil, ...)
Definition: data.h:32
+
#define _CBOR_MALLOC
Definition: common.h:84
+
size_t refcount
Reference count - initialize to 0.
Definition: data.h:153
+
void cbor_set_ctrl(cbor_item_t *item, uint8_t value)
Assign a control value.
Definition: floats_ctrls.c:85
+
cbor_item_t * cbor_build_float4(float value)
Constructs a new float.
Definition: floats_ctrls.c:172
+
Double.
Definition: data.h:58
+
Half float.
Definition: data.h:56
+
cbor_item_t * cbor_new_ctrl()
Constructs a new ctrl item.
Definition: floats_ctrls.c:98
+
cbor_item_t * cbor_new_float4()
Constructs a new float item.
Definition: floats_ctrls.c:122
+
bool cbor_is_float(const cbor_item_t *item)
Is the item an a floating point number?
Definition: common.c:87
+
float cbor_float_get_float4(const cbor_item_t *item)
Get a single precision float.
Definition: floats_ctrls.c:38
+
uint8_t cbor_ctrl_value(const cbor_item_t *item)
Reads the control value.
Definition: floats_ctrls.c:18
+
cbor_item_t * cbor_new_float8()
Constructs a new float item.
Definition: floats_ctrls.c:134
+
cbor_float_width cbor_float_get_width(const cbor_item_t *item)
Get the float width.
Definition: floats_ctrls.c:12
+
bool cbor_isa_float_ctrl(const cbor_item_t *item)
Does the item have the appropriate major type?
Definition: common.c:53
+ +
void cbor_set_float8(cbor_item_t *item, double value)
Assigns a float value.
Definition: floats_ctrls.c:78
+
float cbor_float_get_float2(const cbor_item_t *item)
Get a half precision float.
Definition: floats_ctrls.c:31
+
cbor_item_t * cbor_build_float8(double value)
Constructs a new float.
Definition: floats_ctrls.c:179
+
cbor_item_t * cbor_new_null()
Constructs new null ctrl item.
Definition: floats_ctrls.c:146
+
cbor_float_width width
Definition: data.h:121
+
double cbor_float_get_float8(const cbor_item_t *item)
Get a double precision float.
Definition: floats_ctrls.c:45
+
bool cbor_is_bool(const cbor_item_t *item)
Is the item an a boolean?
Definition: common.c:71
+
cbor_item_t * cbor_new_float2()
Constructs a new float item.
Definition: floats_ctrls.c:110
+
bool cbor_ctrl_is_bool(const cbor_item_t *item)
Is this ctrl item a boolean?
Definition: floats_ctrls.c:92
+
unsigned char * data
Raw data block - interpretation depends on metadata.
Definition: data.h:157
+
bool cbor_float_ctrl_is_ctrl(const cbor_item_t *item)
Is this a ctrl value?
Definition: floats_ctrls.c:25
+ +
The item handle.
Definition: data.h:149
+
Single float.
Definition: data.h:57
+
+ + + + diff --git a/docs/doxygen/floats__ctrls_8h.html b/docs/doxygen/floats__ctrls_8h.html new file mode 100644 index 00000000..673a61db --- /dev/null +++ b/docs/doxygen/floats__ctrls_8h.html @@ -0,0 +1,830 @@ + + + + + + + +libcbor: src/cbor/floats_ctrls.h File Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
floats_ctrls.h File Reference
+
+
+
#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_tcbor_new_ctrl ()
 Constructs a new ctrl item. More...
 
cbor_item_tcbor_new_float2 ()
 Constructs a new float item. More...
 
cbor_item_tcbor_new_float4 ()
 Constructs a new float item. More...
 
cbor_item_tcbor_new_float8 ()
 Constructs a new float item. More...
 
cbor_item_tcbor_new_null ()
 Constructs new null ctrl item. More...
 
cbor_item_tcbor_new_undef ()
 Constructs new under ctrl item. More...
 
cbor_item_tcbor_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_tcbor_build_float2 (float value)
 Constructs a new float. More...
 
cbor_item_tcbor_build_float4 (float value)
 Constructs a new float. More...
 
cbor_item_tcbor_build_float8 (double value)
 Constructs a new float. More...
 
cbor_item_tcbor_build_ctrl (uint8_t value)
 Constructs a ctrl item. More...
 
+

Function Documentation

+ +

§ cbor_build_bool()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_build_bool (bool value)
+
+ +

Constructs new boolean ctrl item.

+
Parameters
+ + +
valueThe value to use
+
+
+
Returns
new boolen ctrl item
+ +

Definition at line 160 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_build_ctrl()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_build_ctrl (uint8_t value)
+
+ +

Constructs a ctrl item.

+
Parameters
+ + +
valuethe value to use
+
+
+
Returns
new ctrl item
+ +

Definition at line 186 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_build_float2()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_build_float2 (float value)
+
+ +

Constructs a new float.

+
Parameters
+ + +
valuethe value to use
+
+
+
Returns
new float
+ +

Definition at line 165 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_build_float4()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_build_float4 (float value)
+
+ +

Constructs a new float.

+
Parameters
+ + +
valuethe value to use
+
+
+
Returns
new float
+ +

Definition at line 172 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_build_float8()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_build_float8 (double value)
+
+ +

Constructs a new float.

+
Parameters
+ + +
valuethe value to use
+
+
+
Returns
new float
+ +

Definition at line 179 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_ctrl_is_bool()

+ +
+
+ + + + + + + + +
bool cbor_ctrl_is_bool (const cbor_item_titem)
+
+ +

Is this ctrl item a boolean?

+
Parameters
+ + +
item[borrow]A ctrl item
+
+
+
Returns
Is this ctrl item a boolean?
+ +

Definition at line 92 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_ctrl_value()

+ +
+
+ + + + + + + + +
uint8_t cbor_ctrl_value (const cbor_item_titem)
+
+ +

Reads the control value.

+
Parameters
+ + +
item[borrow]A ctrl item
+
+
+
Returns
the simple value
+ +

Definition at line 18 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_float_ctrl_is_ctrl()

+ +
+
+ + + + + + + + +
bool cbor_float_ctrl_is_ctrl (const cbor_item_titem)
+
+ +

Is this a ctrl value?

+
Parameters
+ + +
item[borrow]A float or ctrl item
+
+
+
Returns
Is this a ctrl value?
+ +

Definition at line 25 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_float_get_float()

+ +
+
+ + + + + + + + +
double cbor_float_get_float (const cbor_item_titem)
+
+ +

Get the float value represented as double.

+

Can be used regardless of the width.

+
Parameters
+ + +
+
+
+ +

Definition at line 52 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_float_get_float2()

+ +
+
+ + + + + + + + +
float cbor_float_get_float2 (const cbor_item_titem)
+
+ +

Get a half precision float.

+

The item must have the corresponding width

+
Parameters
+ + +
+
+
+ +

Definition at line 31 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_float_get_float4()

+ +
+
+ + + + + + + + +
float cbor_float_get_float4 (const cbor_item_titem)
+
+ +

Get a single precision float.

+

The item must have the corresponding width

+
Parameters
+ + +
+
+
+ +

Definition at line 38 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_float_get_float8()

+ +
+
+ + + + + + + + +
double cbor_float_get_float8 (const cbor_item_titem)
+
+ +

Get a double precision float.

+

The item must have the corresponding width

+
Parameters
+ + +
+
+
+ +

Definition at line 45 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_float_get_width()

+ +
+
+ + + + + + + + +
cbor_float_width cbor_float_get_width (const cbor_item_titem)
+
+ +

Get the float width.

+
Parameters
+ + +
item[borrow]A float or ctrl item
+
+
+
Returns
The width.
+ +

Definition at line 12 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_new_ctrl()

+ +
+
+ + + + + + + +
cbor_item_t* cbor_new_ctrl ()
+
+ +

Constructs a new ctrl item.

+

The width cannot be changed once the item is created

+
Returns
new 1B ctrl
+ +

Definition at line 98 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_new_float2()

+ +
+
+ + + + + + + +
cbor_item_t* cbor_new_float2 ()
+
+ +

Constructs a new float item.

+

The width cannot be changed once the item is created

+
Returns
new 2B float
+ +

Definition at line 110 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_new_float4()

+ +
+
+ + + + + + + +
cbor_item_t* cbor_new_float4 ()
+
+ +

Constructs a new float item.

+

The width cannot be changed once the item is created

+
Returns
new 4B float
+ +

Definition at line 122 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_new_float8()

+ +
+
+ + + + + + + +
cbor_item_t* cbor_new_float8 ()
+
+ +

Constructs a new float item.

+

The width cannot be changed once the item is created

+
Returns
new 8B float
+ +

Definition at line 134 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_new_null()

+ +
+
+ + + + + + + +
cbor_item_t* cbor_new_null ()
+
+ +

Constructs new null ctrl item.

+
Returns
new null ctrl item
+ +

Definition at line 146 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_new_undef()

+ +
+
+ + + + + + + +
cbor_item_t* cbor_new_undef ()
+
+ +

Constructs new under ctrl item.

+
Returns
new under ctrl item
+ +

Definition at line 153 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_set_ctrl()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_set_ctrl (cbor_item_titem,
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.
+* 
Parameters
+ + + +
item[borrow]A ctrl item
valueThe simple value to assign. Please consult the standard for allowed values
+
+
+ +

Definition at line 85 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_set_float2()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_set_float2 (cbor_item_titem,
float value 
)
+
+ +

Assigns a float value.

+
Parameters
+ + + +
item[borrow]A half precision float
valueThe value to assign
+
+
+ +

Definition at line 64 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_set_float4()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_set_float4 (cbor_item_titem,
float value 
)
+
+ +

Assigns a float value.

+
Parameters
+ + + +
item[borrow]A single precision float
valueThe value to assign
+
+
+ +

Definition at line 71 of file floats_ctrls.c.

+ +
+
+ +

§ cbor_set_float8()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_set_float8 (cbor_item_titem,
double value 
)
+
+ +

Assigns a float value.

+
Parameters
+ + + +
item[borrow]A double precision float
valueThe value to assign
+
+
+ +

Definition at line 78 of file floats_ctrls.c.

+ +
+
+
+ + + + diff --git a/docs/doxygen/floats__ctrls_8h_source.html b/docs/doxygen/floats__ctrls_8h_source.html new file mode 100644 index 00000000..a213ecdb --- /dev/null +++ b/docs/doxygen/floats__ctrls_8h_source.html @@ -0,0 +1,106 @@ + + + + + + + +libcbor: src/cbor/floats_ctrls.h Source File + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
floats_ctrls.h
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 #ifndef LIBCBOR_FLOATS_CTRLS_H
9 #define LIBCBOR_FLOATS_CTRLS_H
10 
11 #include "cbor/common.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 /*
18 * ============================================================================
19 * Float manipulation
20 * ============================================================================
21 */
22 
28 bool cbor_float_ctrl_is_ctrl(const cbor_item_t * item);
29 
36 
44 float cbor_float_get_float2(const cbor_item_t * item);
45 
53 float cbor_float_get_float4(const cbor_item_t * item);
54 
62 double cbor_float_get_float8(const cbor_item_t * item);
63 
71 double cbor_float_get_float(const cbor_item_t * item);
72 
80 
88 
96 
104 
110 
116 
122 cbor_item_t * cbor_build_bool(bool value);
123 
133 void cbor_set_ctrl(cbor_item_t * item, uint8_t value);
134 
140 void cbor_set_float2(cbor_item_t * item, float value);
141 
147 void cbor_set_float4(cbor_item_t * item, float value);
148 
154 void cbor_set_float8(cbor_item_t * item, double value);
155 
161 uint8_t cbor_ctrl_value(const cbor_item_t * item);
162 
168 bool cbor_ctrl_is_bool(const cbor_item_t * item);
169 
175 cbor_item_t *cbor_build_float2(float value);
176 
182 cbor_item_t *cbor_build_float4(float value);
183 
189 cbor_item_t *cbor_build_float8(double value);
190 
196 cbor_item_t *cbor_build_ctrl(uint8_t value);
197 
198 
199 #ifdef __cplusplus
200 }
201 #endif
202 
203 #endif //LIBCBOR_FLOATS_CTRLS_H
uint8_t cbor_ctrl_value(const cbor_item_t *item)
Reads the control value.
Definition: floats_ctrls.c:18
+
void cbor_set_ctrl(cbor_item_t *item, uint8_t value)
Assign a control value.
Definition: floats_ctrls.c:85
+
bool cbor_float_ctrl_is_ctrl(const cbor_item_t *item)
Is this a ctrl value?
Definition: floats_ctrls.c:25
+
cbor_float_width
Possible widths of CBOR_TYPE_FLOAT_CTRL items.
Definition: data.h:54
+
void cbor_set_float8(cbor_item_t *item, double value)
Assigns a float value.
Definition: floats_ctrls.c:78
+
cbor_item_t * cbor_build_float8(double value)
Constructs a new float.
Definition: floats_ctrls.c:179
+
cbor_item_t * cbor_new_ctrl()
Constructs a new ctrl item.
Definition: floats_ctrls.c:98
+
bool cbor_ctrl_is_bool(const cbor_item_t *item)
Is this ctrl item a boolean?
Definition: floats_ctrls.c:92
+
cbor_item_t * cbor_build_float4(float value)
Constructs a new float.
Definition: floats_ctrls.c:172
+
cbor_float_width cbor_float_get_width(const cbor_item_t *item)
Get the float width.
Definition: floats_ctrls.c:12
+
cbor_item_t * cbor_new_null()
Constructs new null ctrl item.
Definition: floats_ctrls.c:146
+
cbor_item_t * cbor_new_float8()
Constructs a new float item.
Definition: floats_ctrls.c:134
+
void cbor_set_float2(cbor_item_t *item, float value)
Assigns a float value.
Definition: floats_ctrls.c:64
+
double cbor_float_get_float8(const cbor_item_t *item)
Get a double precision float.
Definition: floats_ctrls.c:45
+
cbor_item_t * cbor_build_bool(bool value)
Constructs new boolean ctrl item.
Definition: floats_ctrls.c:160
+
void cbor_set_float4(cbor_item_t *item, float value)
Assigns a float value.
Definition: floats_ctrls.c:71
+
cbor_item_t * cbor_build_ctrl(uint8_t value)
Constructs a ctrl item.
Definition: floats_ctrls.c:186
+
cbor_item_t * cbor_build_float2(float value)
Constructs a new float.
Definition: floats_ctrls.c:165
+ +
float cbor_float_get_float4(const cbor_item_t *item)
Get a single precision float.
Definition: floats_ctrls.c:38
+
double cbor_float_get_float(const cbor_item_t *item)
Get the float value represented as double.
Definition: floats_ctrls.c:52
+
cbor_item_t * cbor_new_undef()
Constructs new under ctrl item.
Definition: floats_ctrls.c:153
+
The item handle.
Definition: data.h:149
+
float cbor_float_get_float2(const cbor_item_t *item)
Get a half precision float.
Definition: floats_ctrls.c:31
+
cbor_item_t * cbor_new_float2()
Constructs a new float item.
Definition: floats_ctrls.c:110
+
cbor_item_t * cbor_new_float4()
Constructs a new float item.
Definition: floats_ctrls.c:122
+
+ + + + diff --git a/docs/doxygen/folderclosed.png b/docs/doxygen/folderclosed.png new file mode 100644 index 00000000..bb8ab35e Binary files /dev/null and b/docs/doxygen/folderclosed.png differ diff --git a/docs/doxygen/folderopen.png b/docs/doxygen/folderopen.png new file mode 100644 index 00000000..d6c7f676 Binary files /dev/null and b/docs/doxygen/folderopen.png differ diff --git a/docs/doxygen/functions.html b/docs/doxygen/functions.html new file mode 100644 index 00000000..6b3c40f3 --- /dev/null +++ b/docs/doxygen/functions.html @@ -0,0 +1,351 @@ + + + + + + + +libcbor: Data Fields + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all struct and union fields with links to the structures/unions they belong to:
+ +

- a -

+ + +

- b -

+ + +

- c -

+ + +

- d -

+ + +

- e -

+ + +

- f -

+ + +

- i -

+ + +

- k -

+ + +

- l -

+ + +

- m -

+ + +

- n -

+ + +

- p -

+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- u -

+ + +

- v -

+ + +

- w -

+
+ + + + diff --git a/docs/doxygen/functions_vars.html b/docs/doxygen/functions_vars.html new file mode 100644 index 00000000..af7bac01 --- /dev/null +++ b/docs/doxygen/functions_vars.html @@ -0,0 +1,351 @@ + + + + + + + +libcbor: Data Fields - Variables + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- a -

+ + +

- b -

+ + +

- c -

+ + +

- d -

+ + +

- e -

+ + +

- f -

+ + +

- i -

+ + +

- k -

+ + +

- l -

+ + +

- m -

+ + +

- n -

+ + +

- p -

+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- u -

+ + +

- v -

+ + +

- w -

+
+ + + + diff --git a/docs/doxygen/globals.html b/docs/doxygen/globals.html new file mode 100644 index 00000000..aa7a3ebd --- /dev/null +++ b/docs/doxygen/globals.html @@ -0,0 +1,229 @@ + + + + + + + +libcbor: Globals + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- _ -

+
+ + + + diff --git a/docs/doxygen/globals_c.html b/docs/doxygen/globals_c.html new file mode 100644 index 00000000..a3990834 --- /dev/null +++ b/docs/doxygen/globals_c.html @@ -0,0 +1,1040 @@ + + + + + + + +libcbor: Globals + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- c -

+
+ + + + diff --git a/docs/doxygen/globals_d.html b/docs/doxygen/globals_d.html new file mode 100644 index 00000000..cca974ff --- /dev/null +++ b/docs/doxygen/globals_d.html @@ -0,0 +1,79 @@ + + + + + + + +libcbor: Globals + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- d -

+
+ + + + diff --git a/docs/doxygen/globals_defs.html b/docs/doxygen/globals_defs.html new file mode 100644 index 00000000..88f5cb73 --- /dev/null +++ b/docs/doxygen/globals_defs.html @@ -0,0 +1,113 @@ + + + + + + + +libcbor: Globals + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+ + + + diff --git a/docs/doxygen/globals_enum.html b/docs/doxygen/globals_enum.html new file mode 100644 index 00000000..9aa39782 --- /dev/null +++ b/docs/doxygen/globals_enum.html @@ -0,0 +1,98 @@ + + + + + + + +libcbor: Globals + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+ + + + diff --git a/docs/doxygen/globals_eval.html b/docs/doxygen/globals_eval.html new file mode 100644 index 00000000..a5ca90bb --- /dev/null +++ b/docs/doxygen/globals_eval.html @@ -0,0 +1,185 @@ + + + + + + + +libcbor: Globals + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- _ -

+ + +

- c -

+
+ + + + diff --git a/docs/doxygen/globals_func.html b/docs/doxygen/globals_func.html new file mode 100644 index 00000000..5e4773a7 --- /dev/null +++ b/docs/doxygen/globals_func.html @@ -0,0 +1,175 @@ + + + + + + + +libcbor: Globals + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- _ -

+
+ + + + diff --git a/docs/doxygen/globals_func_c.html b/docs/doxygen/globals_func_c.html new file mode 100644 index 00000000..4555bb41 --- /dev/null +++ b/docs/doxygen/globals_func_c.html @@ -0,0 +1,875 @@ + + + + + + + +libcbor: Globals + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- c -

+
+ + + + diff --git a/docs/doxygen/globals_t.html b/docs/doxygen/globals_t.html new file mode 100644 index 00000000..d58ebb10 --- /dev/null +++ b/docs/doxygen/globals_t.html @@ -0,0 +1,82 @@ + + + + + + + +libcbor: Globals + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- t -

+
+ + + + diff --git a/docs/doxygen/globals_type.html b/docs/doxygen/globals_type.html new file mode 100644 index 00000000..d10efec2 --- /dev/null +++ b/docs/doxygen/globals_type.html @@ -0,0 +1,125 @@ + + + + + + + +libcbor: Globals + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+ + + + diff --git a/docs/doxygen/globals_u.html b/docs/doxygen/globals_u.html new file mode 100644 index 00000000..a9ebd166 --- /dev/null +++ b/docs/doxygen/globals_u.html @@ -0,0 +1,82 @@ + + + + + + + +libcbor: Globals + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- u -

+
+ + + + diff --git a/docs/doxygen/globals_vars.html b/docs/doxygen/globals_vars.html new file mode 100644 index 00000000..36694b78 --- /dev/null +++ b/docs/doxygen/globals_vars.html @@ -0,0 +1,92 @@ + + + + + + + +libcbor: Globals + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+ + + + diff --git a/docs/doxygen/index.html b/docs/doxygen/index.html new file mode 100644 index 00000000..1b76f6d0 --- /dev/null +++ b/docs/doxygen/index.html @@ -0,0 +1,106 @@ + + + + + + + +libcbor: Main Page + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
libcbor Documentation
+
+
+

This is the development reference of libcbor. If you are looking for the user documentation, you should probably head to the homepage.

+

Where to start

+

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:

+

How to contribute

+

Please refer to the repository

+
+ + + + diff --git a/docs/doxygen/ints_8c.html b/docs/doxygen/ints_8c.html new file mode 100644 index 00000000..7a0cbb52 --- /dev/null +++ b/docs/doxygen/ints_8c.html @@ -0,0 +1,874 @@ + + + + + + + +libcbor: src/cbor/ints.c File Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
ints.c File Reference
+
+
+
#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_tcbor_new_int8 ()
 Allocates new integer with 1B width. More...
 
cbor_item_tcbor_new_int16 ()
 Allocates new integer with 2B width. More...
 
cbor_item_tcbor_new_int32 ()
 Allocates new integer with 4B width. More...
 
cbor_item_tcbor_new_int64 ()
 Allocates new integer with 8B width. More...
 
cbor_item_tcbor_build_uint8 (uint8_t value)
 Constructs a new positive integer. More...
 
cbor_item_tcbor_build_uint16 (uint16_t value)
 Constructs a new positive integer. More...
 
cbor_item_tcbor_build_uint32 (uint32_t value)
 Constructs a new positive integer. More...
 
cbor_item_tcbor_build_uint64 (uint64_t value)
 Constructs a new positive integer. More...
 
cbor_item_tcbor_build_negint8 (uint8_t value)
 Constructs a new negative integer. More...
 
cbor_item_tcbor_build_negint16 (uint16_t value)
 Constructs a new negative integer. More...
 
cbor_item_tcbor_build_negint32 (uint32_t value)
 Constructs a new negative integer. More...
 
cbor_item_tcbor_build_negint64 (uint64_t value)
 Constructs a new negative integer. More...
 
+

Function Documentation

+ +

§ cbor_build_negint16()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_build_negint16 (uint16_t value)
+
+ +

Constructs a new negative integer.

+
Parameters
+ + +
valuethe value to use
+
+
+
Returns
new negative integer
+ +

Definition at line 185 of file ints.c.

+ +
+
+ +

§ cbor_build_negint32()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_build_negint32 (uint32_t value)
+
+ +

Constructs a new negative integer.

+
Parameters
+ + +
valuethe value to use
+
+
+
Returns
new negative integer
+ +

Definition at line 193 of file ints.c.

+ +
+
+ +

§ cbor_build_negint64()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_build_negint64 (uint64_t value)
+
+ +

Constructs a new negative integer.

+
Parameters
+ + +
valuethe value to use
+
+
+
Returns
new negative integer
+ +

Definition at line 201 of file ints.c.

+ +
+
+ +

§ cbor_build_negint8()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_build_negint8 (uint8_t value)
+
+ +

Constructs a new negative integer.

+
Parameters
+ + +
valuethe value to use
+
+
+
Returns
new negative integer
+ +

Definition at line 177 of file ints.c.

+ +
+
+ +

§ cbor_build_uint16()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_build_uint16 (uint16_t value)
+
+ +

Constructs a new positive integer.

+
Parameters
+ + +
valuethe value to use
+
+
+
Returns
new positive integer
+ +

Definition at line 153 of file ints.c.

+ +
+
+ +

§ cbor_build_uint32()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_build_uint32 (uint32_t value)
+
+ +

Constructs a new positive integer.

+
Parameters
+ + +
valuethe value to use
+
+
+
Returns
new positive integer
+ +

Definition at line 161 of file ints.c.

+ +
+
+ +

§ cbor_build_uint64()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_build_uint64 (uint64_t value)
+
+ +

Constructs a new positive integer.

+
Parameters
+ + +
valuethe value to use
+
+
+
Returns
new positive integer
+ +

Definition at line 169 of file ints.c.

+ +
+
+ +

§ cbor_build_uint8()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_build_uint8 (uint8_t value)
+
+ +

Constructs a new positive integer.

+
Parameters
+ + +
valuethe value to use
+
+
+
Returns
new positive integer
+ +

Definition at line 145 of file ints.c.

+ +
+
+ +

§ cbor_get_int()

+ +
+
+ + + + + + + + +
uint64_t cbor_get_int (const cbor_item_titem)
+
+ +

Extracts the integer value.

+
Parameters
+ + +
item[borrow]positive or negative integer
+
+
+
Returns
the value, extended to uint64_t
+ +

Definition at line 44 of file ints.c.

+ +
+
+ +

§ cbor_get_uint16()

+ +
+
+ + + + + + + + +
uint16_t cbor_get_uint16 (const cbor_item_titem)
+
+ +

Extracts the integer value.

+
Parameters
+ + +
item[borrow]positive or negative integer
+
+
+
Returns
the value
+ +

Definition at line 23 of file ints.c.

+ +
+
+ +

§ cbor_get_uint32()

+ +
+
+ + + + + + + + +
uint32_t cbor_get_uint32 (const cbor_item_titem)
+
+ +

Extracts the integer value.

+
Parameters
+ + +
item[borrow]positive or negative integer
+
+
+
Returns
the value
+ +

Definition at line 30 of file ints.c.

+ +
+
+ +

§ cbor_get_uint64()

+ +
+
+ + + + + + + + +
uint64_t cbor_get_uint64 (const cbor_item_titem)
+
+ +

Extracts the integer value.

+
Parameters
+ + +
item[borrow]positive or negative integer
+
+
+
Returns
the value
+ +

Definition at line 37 of file ints.c.

+ +
+
+ +

§ cbor_get_uint8()

+ +
+
+ + + + + + + + +
uint8_t cbor_get_uint8 (const cbor_item_titem)
+
+ +

Extracts the integer value.

+
Parameters
+ + +
item[borrow]positive or negative integer
+
+
+
Returns
the value
+ +

Definition at line 16 of file ints.c.

+ +
+
+ +

§ cbor_int_get_width()

+ +
+
+ + + + + + + + +
cbor_int_width cbor_int_get_width (const cbor_item_titem)
+
+ +

Queries the integer width.

+
Parameters
+ + +
item[borrow]positive or negative integer item
+
+
+
Returns
the width
+ +

Definition at line 10 of file ints.c.

+ +
+
+ +

§ cbor_mark_negint()

+ +
+
+ + + + + + + + +
void cbor_mark_negint (cbor_item_titem)
+
+ +

Marks the integer item as a negative integer.

+

The data value is not changed

+
Parameters
+ + +
item[borrow]positive or negative integer item
+
+
+ +

Definition at line 91 of file ints.c.

+ +
+
+ +

§ cbor_mark_uint()

+ +
+
+ + + + + + + + +
void cbor_mark_uint (cbor_item_titem)
+
+ +

Marks the integer item as a positive integer.

+

The data value is not changed

+
Parameters
+ + +
item[borrow]positive or negative integer item
+
+
+ +

Definition at line 85 of file ints.c.

+ +
+
+ +

§ cbor_new_int16()

+ +
+
+ + + + + + + +
cbor_item_t* cbor_new_int16 ()
+
+ +

Allocates new integer with 2B width.

+

The width cannot be changed once allocated

+
Returns
new positive integer. The value is not initialized.
+ +

Definition at line 109 of file ints.c.

+ +
+
+ +

§ cbor_new_int32()

+ +
+
+ + + + + + + +
cbor_item_t* cbor_new_int32 ()
+
+ +

Allocates new integer with 4B width.

+

The width cannot be changed once allocated

+
Returns
new positive integer. The value is not initialized.
+ +

Definition at line 121 of file ints.c.

+ +
+
+ +

§ cbor_new_int64()

+ +
+
+ + + + + + + +
cbor_item_t* cbor_new_int64 ()
+
+ +

Allocates new integer with 8B width.

+

The width cannot be changed once allocated

+
Returns
new positive integer. The value is not initialized.
+ +

Definition at line 133 of file ints.c.

+ +
+
+ +

§ cbor_new_int8()

+ +
+
+ + + + + + + +
cbor_item_t* cbor_new_int8 ()
+
+ +

Allocates new integer with 1B width.

+

The width cannot be changed once allocated

+
Returns
new positive integer. The value is not initialized.
+ +

Definition at line 97 of file ints.c.

+ +
+
+ +

§ cbor_set_uint16()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_set_uint16 (cbor_item_titem,
uint16_t value 
)
+
+ +

Assigns the integer value.

+
Parameters
+ + + +
item[borrow]positive or negative integer item
valuethe value to assign. For negative integer, the logical value is -value - 1
+
+
+ +

Definition at line 63 of file ints.c.

+ +
+
+ +

§ cbor_set_uint32()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_set_uint32 (cbor_item_titem,
uint32_t value 
)
+
+ +

Assigns the integer value.

+
Parameters
+ + + +
item[borrow]positive or negative integer item
valuethe value to assign. For negative integer, the logical value is -value - 1
+
+
+ +

Definition at line 71 of file ints.c.

+ +
+
+ +

§ cbor_set_uint64()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_set_uint64 (cbor_item_titem,
uint64_t value 
)
+
+ +

Assigns the integer value.

+
Parameters
+ + + +
item[borrow]positive or negative integer item
valuethe value to assign. For negative integer, the logical value is -value - 1
+
+
+ +

Definition at line 78 of file ints.c.

+ +
+
+ +

§ cbor_set_uint8()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_set_uint8 (cbor_item_titem,
uint8_t value 
)
+
+ +

Assigns the integer value.

+
Parameters
+ + + +
item[borrow]positive or negative integer item
valuethe value to assign. For negative integer, the logical value is -value - 1
+
+
+ +

Definition at line 56 of file ints.c.

+ +
+
+
+ + + + diff --git a/docs/doxygen/ints_8c_source.html b/docs/doxygen/ints_8c_source.html new file mode 100644 index 00000000..f01a0f9b --- /dev/null +++ b/docs/doxygen/ints_8c_source.html @@ -0,0 +1,122 @@ + + + + + + + +libcbor: src/cbor/ints.c Source File + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ints.c
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 #include "ints.h"
9 
11 {
12  assert(cbor_is_int(item));
13  return item->metadata.int_metadata.width;
14 }
15 
16 uint8_t cbor_get_uint8(const cbor_item_t *item)
17 {
18  assert(cbor_is_int(item));
19  assert(cbor_int_get_width(item) == CBOR_INT_8);
20  return *item->data;
21 }
22 
23 uint16_t cbor_get_uint16(const cbor_item_t *item)
24 {
25  assert(cbor_is_int(item));
26  assert(cbor_int_get_width(item) == CBOR_INT_16);
27  return *(uint16_t *) item->data;
28 }
29 
30 uint32_t cbor_get_uint32(const cbor_item_t *item)
31 {
32  assert(cbor_is_int(item));
33  assert(cbor_int_get_width(item) == CBOR_INT_32);
34  return *(uint32_t *) item->data;
35 }
36 
37 uint64_t cbor_get_uint64(const cbor_item_t *item)
38 {
39  assert(cbor_is_int(item));
40  assert(cbor_int_get_width(item) == CBOR_INT_64);
41  return *(uint64_t *) item->data;
42 }
43 
44 uint64_t cbor_get_int(const cbor_item_t * item)
45 {
46  assert(cbor_is_int(item));
47  switch(cbor_int_get_width(item)) {
48  case CBOR_INT_8: return cbor_get_uint8(item);
49  case CBOR_INT_16: return cbor_get_uint16(item);
50  case CBOR_INT_32: return cbor_get_uint32(item);
51  case CBOR_INT_64: return cbor_get_uint64(item);
52  }
53  return 0xDEADBEEF; /* Compiler complaints */
54 }
55 
56 void cbor_set_uint8(cbor_item_t *item, uint8_t value)
57 {
58  assert(cbor_is_int(item));
59  assert(cbor_int_get_width(item) == CBOR_INT_8);
60  *item->data = value;
61 }
62 
63 void cbor_set_uint16(cbor_item_t *item, uint16_t value)
64 {
65  assert(cbor_is_int(item));
66  assert(cbor_int_get_width(item) == CBOR_INT_16);
67  *(uint16_t *) item->data = value;
68 }
69 
70 
71 void cbor_set_uint32(cbor_item_t *item, uint32_t value)
72 {
73  assert(cbor_is_int(item));
74  assert(cbor_int_get_width(item) == CBOR_INT_32);
75  *(uint32_t *) item->data = value;
76 }
77 
78 void cbor_set_uint64(cbor_item_t *item, uint64_t value)
79 {
80  assert(cbor_is_int(item));
81  assert(cbor_int_get_width(item) == CBOR_INT_64);
82  *(uint64_t *) item->data = value;
83 }
84 
86 {
87  assert(cbor_is_int(item));
88  item->type = CBOR_TYPE_UINT;
89 }
90 
92 {
93  assert(cbor_is_int(item));
94  item->type = CBOR_TYPE_NEGINT;
95 }
96 
98 {
99  cbor_item_t *item = _CBOR_MALLOC(sizeof(cbor_item_t) + 1);
100  *item = (cbor_item_t) {
101  .data = (unsigned char *) item + sizeof(cbor_item_t),
102  .refcount = 1,
103  .metadata = {.int_metadata = {.width = CBOR_INT_8}},
104  .type = CBOR_TYPE_UINT
105  };
106  return item;
107 }
108 
110 {
111  cbor_item_t *item = _CBOR_MALLOC(sizeof(cbor_item_t) + 2);
112  *item = (cbor_item_t) {
113  .data = (unsigned char *) item + sizeof(cbor_item_t),
114  .refcount = 1,
115  .metadata = {.int_metadata = {.width = CBOR_INT_16}},
116  .type = CBOR_TYPE_UINT
117  };
118  return item;
119 }
120 
122 {
123  cbor_item_t *item = _CBOR_MALLOC(sizeof(cbor_item_t) + 4);
124  *item = (cbor_item_t) {
125  .data = (unsigned char *) item + sizeof(cbor_item_t),
126  .refcount = 1,
127  .metadata = {.int_metadata = {.width = CBOR_INT_32}},
128  .type = CBOR_TYPE_UINT
129  };
130  return item;
131 }
132 
134 {
135  cbor_item_t *item = _CBOR_MALLOC(sizeof(cbor_item_t) + 8);
136  *item = (cbor_item_t) {
137  .data = (unsigned char *) item + sizeof(cbor_item_t),
138  .refcount = 1,
139  .metadata = {.int_metadata = {.width = CBOR_INT_64}},
140  .type = CBOR_TYPE_UINT
141  };
142  return item;
143 }
144 
146 {
147  cbor_item_t *item = cbor_new_int8();
148  cbor_set_uint8(item, value);
149  cbor_mark_uint(item);
150  return item;
151 }
152 
154 {
155  cbor_item_t *item = cbor_new_int16();
156  cbor_set_uint16(item, value);
157  cbor_mark_uint(item);
158  return item;
159 }
160 
162 {
163  cbor_item_t *item = cbor_new_int32();
164  cbor_set_uint32(item, value);
165  cbor_mark_uint(item);
166  return item;
167 }
168 
170 {
171  cbor_item_t *item = cbor_new_int64();
172  cbor_set_uint64(item, value);
173  cbor_mark_uint(item);
174  return item;
175 }
176 
178 {
179  cbor_item_t *item = cbor_new_int8();
180  cbor_set_uint8(item, value);
181  cbor_mark_negint(item);
182  return item;
183 }
184 
186 {
187  cbor_item_t *item = cbor_new_int16();
188  cbor_set_uint16(item, value);
189  cbor_mark_negint(item);
190  return item;
191 }
192 
194 {
195  cbor_item_t *item = cbor_new_int32();
196  cbor_set_uint32(item, value);
197  cbor_mark_negint(item);
198  return item;
199 }
200 
202 {
203  cbor_item_t *item = cbor_new_int64();
204  cbor_set_uint64(item, value);
205  cbor_mark_negint(item);
206  return item;
207 }
cbor_item_t * cbor_build_uint8(uint8_t value)
Constructs a new positive integer.
Definition: ints.c:145
+
struct cbor_item_t cbor_item_t
The item handle.
+
cbor_item_t * cbor_build_negint64(uint64_t value)
Constructs a new negative integer.
Definition: ints.c:201
+ +
cbor_item_t * cbor_new_int64()
Allocates new integer with 8B width.
Definition: ints.c:133
+
uint64_t cbor_get_int(const cbor_item_t *item)
Extracts the integer value.
Definition: ints.c:44
+
union cbor_item_metadata metadata
Discriminated by type.
Definition: data.h:151
+
void cbor_set_uint16(cbor_item_t *item, uint16_t value)
Assigns the integer value.
Definition: ints.c:63
+
cbor_int_width cbor_int_get_width(const cbor_item_t *item)
Queries the integer width.
Definition: ints.c:10
+
cbor_item_t * cbor_new_int8()
Allocates new integer with 1B width.
Definition: ints.c:97
+
bool cbor_is_int(const cbor_item_t *item)
Is the item an integer, either positive or negative?
Definition: common.c:65
+
cbor_item_t * cbor_build_negint16(uint16_t value)
Constructs a new negative integer.
Definition: ints.c:185
+
cbor_item_t * cbor_build_negint32(uint32_t value)
Constructs a new negative integer.
Definition: ints.c:193
+ +
void cbor_set_uint8(cbor_item_t *item, uint8_t value)
Assigns the integer value.
Definition: ints.c:56
+
cbor_type type
Major type discriminator.
Definition: data.h:155
+
uint32_t cbor_get_uint32(const cbor_item_t *item)
Extracts the integer value.
Definition: ints.c:30
+
void cbor_mark_negint(cbor_item_t *item)
Marks the integer item as a negative integer.
Definition: ints.c:91
+
#define _CBOR_MALLOC
Definition: common.h:84
+ +
size_t refcount
Reference count - initialize to 0.
Definition: data.h:153
+
cbor_item_t * cbor_build_uint32(uint32_t value)
Constructs a new positive integer.
Definition: ints.c:161
+
uint16_t cbor_get_uint16(const cbor_item_t *item)
Extracts the integer value.
Definition: ints.c:23
+
cbor_int_width
Possible widths of CBOR_TYPE_UINT items.
Definition: data.h:46
+
void cbor_set_uint32(cbor_item_t *item, uint32_t value)
Assigns the integer value.
Definition: ints.c:71
+
0 - positive integers
Definition: data.h:25
+
cbor_item_t * cbor_build_uint16(uint16_t value)
Constructs a new positive integer.
Definition: ints.c:153
+
uint8_t cbor_get_uint8(const cbor_item_t *item)
Extracts the integer value.
Definition: ints.c:16
+
uint64_t cbor_get_uint64(const cbor_item_t *item)
Extracts the integer value.
Definition: ints.c:37
+
void cbor_mark_uint(cbor_item_t *item)
Marks the integer item as a positive integer.
Definition: ints.c:85
+
cbor_item_t * cbor_build_uint64(uint64_t value)
Constructs a new positive integer.
Definition: ints.c:169
+ + +
struct _cbor_int_metadata int_metadata
Definition: data.h:139
+
unsigned char * data
Raw data block - interpretation depends on metadata.
Definition: data.h:157
+
cbor_item_t * cbor_new_int32()
Allocates new integer with 4B width.
Definition: ints.c:121
+
cbor_item_t * cbor_build_negint8(uint8_t value)
Constructs a new negative integer.
Definition: ints.c:177
+
cbor_int_width width
Definition: data.h:78
+
The item handle.
Definition: data.h:149
+
1 - negative integers
Definition: data.h:26
+
void cbor_set_uint64(cbor_item_t *item, uint64_t value)
Assigns the integer value.
Definition: ints.c:78
+
cbor_item_t * cbor_new_int16()
Allocates new integer with 2B width.
Definition: ints.c:109
+
+ + + + diff --git a/docs/doxygen/ints_8h.html b/docs/doxygen/ints_8h.html new file mode 100644 index 00000000..e85b7164 --- /dev/null +++ b/docs/doxygen/ints_8h.html @@ -0,0 +1,874 @@ + + + + + + + +libcbor: src/cbor/ints.h File Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
ints.h File Reference
+
+
+
#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_tcbor_new_int8 ()
 Allocates new integer with 1B width. More...
 
cbor_item_tcbor_new_int16 ()
 Allocates new integer with 2B width. More...
 
cbor_item_tcbor_new_int32 ()
 Allocates new integer with 4B width. More...
 
cbor_item_tcbor_new_int64 ()
 Allocates new integer with 8B width. More...
 
cbor_item_tcbor_build_uint8 (uint8_t value)
 Constructs a new positive integer. More...
 
cbor_item_tcbor_build_uint16 (uint16_t value)
 Constructs a new positive integer. More...
 
cbor_item_tcbor_build_uint32 (uint32_t value)
 Constructs a new positive integer. More...
 
cbor_item_tcbor_build_uint64 (uint64_t value)
 Constructs a new positive integer. More...
 
cbor_item_tcbor_build_negint8 (uint8_t value)
 Constructs a new negative integer. More...
 
cbor_item_tcbor_build_negint16 (uint16_t value)
 Constructs a new negative integer. More...
 
cbor_item_tcbor_build_negint32 (uint32_t value)
 Constructs a new negative integer. More...
 
cbor_item_tcbor_build_negint64 (uint64_t value)
 Constructs a new negative integer. More...
 
+

Function Documentation

+ +

§ cbor_build_negint16()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_build_negint16 (uint16_t value)
+
+ +

Constructs a new negative integer.

+
Parameters
+ + +
valuethe value to use
+
+
+
Returns
new negative integer
+ +

Definition at line 185 of file ints.c.

+ +
+
+ +

§ cbor_build_negint32()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_build_negint32 (uint32_t value)
+
+ +

Constructs a new negative integer.

+
Parameters
+ + +
valuethe value to use
+
+
+
Returns
new negative integer
+ +

Definition at line 193 of file ints.c.

+ +
+
+ +

§ cbor_build_negint64()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_build_negint64 (uint64_t value)
+
+ +

Constructs a new negative integer.

+
Parameters
+ + +
valuethe value to use
+
+
+
Returns
new negative integer
+ +

Definition at line 201 of file ints.c.

+ +
+
+ +

§ cbor_build_negint8()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_build_negint8 (uint8_t value)
+
+ +

Constructs a new negative integer.

+
Parameters
+ + +
valuethe value to use
+
+
+
Returns
new negative integer
+ +

Definition at line 177 of file ints.c.

+ +
+
+ +

§ cbor_build_uint16()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_build_uint16 (uint16_t value)
+
+ +

Constructs a new positive integer.

+
Parameters
+ + +
valuethe value to use
+
+
+
Returns
new positive integer
+ +

Definition at line 153 of file ints.c.

+ +
+
+ +

§ cbor_build_uint32()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_build_uint32 (uint32_t value)
+
+ +

Constructs a new positive integer.

+
Parameters
+ + +
valuethe value to use
+
+
+
Returns
new positive integer
+ +

Definition at line 161 of file ints.c.

+ +
+
+ +

§ cbor_build_uint64()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_build_uint64 (uint64_t value)
+
+ +

Constructs a new positive integer.

+
Parameters
+ + +
valuethe value to use
+
+
+
Returns
new positive integer
+ +

Definition at line 169 of file ints.c.

+ +
+
+ +

§ cbor_build_uint8()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_build_uint8 (uint8_t value)
+
+ +

Constructs a new positive integer.

+
Parameters
+ + +
valuethe value to use
+
+
+
Returns
new positive integer
+ +

Definition at line 145 of file ints.c.

+ +
+
+ +

§ cbor_get_int()

+ +
+
+ + + + + + + + +
uint64_t cbor_get_int (const cbor_item_titem)
+
+ +

Extracts the integer value.

+
Parameters
+ + +
item[borrow]positive or negative integer
+
+
+
Returns
the value, extended to uint64_t
+ +

Definition at line 44 of file ints.c.

+ +
+
+ +

§ cbor_get_uint16()

+ +
+
+ + + + + + + + +
uint16_t cbor_get_uint16 (const cbor_item_titem)
+
+ +

Extracts the integer value.

+
Parameters
+ + +
item[borrow]positive or negative integer
+
+
+
Returns
the value
+ +

Definition at line 23 of file ints.c.

+ +
+
+ +

§ cbor_get_uint32()

+ +
+
+ + + + + + + + +
uint32_t cbor_get_uint32 (const cbor_item_titem)
+
+ +

Extracts the integer value.

+
Parameters
+ + +
item[borrow]positive or negative integer
+
+
+
Returns
the value
+ +

Definition at line 30 of file ints.c.

+ +
+
+ +

§ cbor_get_uint64()

+ +
+
+ + + + + + + + +
uint64_t cbor_get_uint64 (const cbor_item_titem)
+
+ +

Extracts the integer value.

+
Parameters
+ + +
item[borrow]positive or negative integer
+
+
+
Returns
the value
+ +

Definition at line 37 of file ints.c.

+ +
+
+ +

§ cbor_get_uint8()

+ +
+
+ + + + + + + + +
uint8_t cbor_get_uint8 (const cbor_item_titem)
+
+ +

Extracts the integer value.

+
Parameters
+ + +
item[borrow]positive or negative integer
+
+
+
Returns
the value
+ +

Definition at line 16 of file ints.c.

+ +
+
+ +

§ cbor_int_get_width()

+ +
+
+ + + + + + + + +
cbor_int_width cbor_int_get_width (const cbor_item_titem)
+
+ +

Queries the integer width.

+
Parameters
+ + +
item[borrow]positive or negative integer item
+
+
+
Returns
the width
+ +

Definition at line 10 of file ints.c.

+ +
+
+ +

§ cbor_mark_negint()

+ +
+
+ + + + + + + + +
void cbor_mark_negint (cbor_item_titem)
+
+ +

Marks the integer item as a negative integer.

+

The data value is not changed

+
Parameters
+ + +
item[borrow]positive or negative integer item
+
+
+ +

Definition at line 91 of file ints.c.

+ +
+
+ +

§ cbor_mark_uint()

+ +
+
+ + + + + + + + +
void cbor_mark_uint (cbor_item_titem)
+
+ +

Marks the integer item as a positive integer.

+

The data value is not changed

+
Parameters
+ + +
item[borrow]positive or negative integer item
+
+
+ +

Definition at line 85 of file ints.c.

+ +
+
+ +

§ cbor_new_int16()

+ +
+
+ + + + + + + +
cbor_item_t* cbor_new_int16 ()
+
+ +

Allocates new integer with 2B width.

+

The width cannot be changed once allocated

+
Returns
new positive integer. The value is not initialized.
+ +

Definition at line 109 of file ints.c.

+ +
+
+ +

§ cbor_new_int32()

+ +
+
+ + + + + + + +
cbor_item_t* cbor_new_int32 ()
+
+ +

Allocates new integer with 4B width.

+

The width cannot be changed once allocated

+
Returns
new positive integer. The value is not initialized.
+ +

Definition at line 121 of file ints.c.

+ +
+
+ +

§ cbor_new_int64()

+ +
+
+ + + + + + + +
cbor_item_t* cbor_new_int64 ()
+
+ +

Allocates new integer with 8B width.

+

The width cannot be changed once allocated

+
Returns
new positive integer. The value is not initialized.
+ +

Definition at line 133 of file ints.c.

+ +
+
+ +

§ cbor_new_int8()

+ +
+
+ + + + + + + +
cbor_item_t* cbor_new_int8 ()
+
+ +

Allocates new integer with 1B width.

+

The width cannot be changed once allocated

+
Returns
new positive integer. The value is not initialized.
+ +

Definition at line 97 of file ints.c.

+ +
+
+ +

§ cbor_set_uint16()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_set_uint16 (cbor_item_titem,
uint16_t value 
)
+
+ +

Assigns the integer value.

+
Parameters
+ + + +
item[borrow]positive or negative integer item
valuethe value to assign. For negative integer, the logical value is -value - 1
+
+
+ +

Definition at line 63 of file ints.c.

+ +
+
+ +

§ cbor_set_uint32()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_set_uint32 (cbor_item_titem,
uint32_t value 
)
+
+ +

Assigns the integer value.

+
Parameters
+ + + +
item[borrow]positive or negative integer item
valuethe value to assign. For negative integer, the logical value is -value - 1
+
+
+ +

Definition at line 71 of file ints.c.

+ +
+
+ +

§ cbor_set_uint64()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_set_uint64 (cbor_item_titem,
uint64_t value 
)
+
+ +

Assigns the integer value.

+
Parameters
+ + + +
item[borrow]positive or negative integer item
valuethe value to assign. For negative integer, the logical value is -value - 1
+
+
+ +

Definition at line 78 of file ints.c.

+ +
+
+ +

§ cbor_set_uint8()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbor_set_uint8 (cbor_item_titem,
uint8_t value 
)
+
+ +

Assigns the integer value.

+
Parameters
+ + + +
item[borrow]positive or negative integer item
valuethe value to assign. For negative integer, the logical value is -value - 1
+
+
+ +

Definition at line 56 of file ints.c.

+ +
+
+
+ + + + diff --git a/docs/doxygen/ints_8h_source.html b/docs/doxygen/ints_8h_source.html new file mode 100644 index 00000000..bda9a67f --- /dev/null +++ b/docs/doxygen/ints_8h_source.html @@ -0,0 +1,107 @@ + + + + + + + +libcbor: src/cbor/ints.h Source File + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ints.h
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 #ifndef LIBCBOR_INTS_H
9 #define LIBCBOR_INTS_H
10 
11 #include "cbor/common.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 /*
18 * ============================================================================
19 * Integer (uints and negints) manipulation
20 * ============================================================================
21 */
22 
28 uint8_t cbor_get_uint8(const cbor_item_t *item);
29 
35 uint16_t cbor_get_uint16(const cbor_item_t *item);
36 
42 uint32_t cbor_get_uint32(const cbor_item_t *item);
43 
49 uint64_t cbor_get_uint64(const cbor_item_t *item);
50 
56 uint64_t cbor_get_int(const cbor_item_t *item);
57 
63 void cbor_set_uint8(cbor_item_t *item, uint8_t value);
64 
70 void cbor_set_uint16(cbor_item_t *item, uint16_t value);
71 
77 void cbor_set_uint32(cbor_item_t *item, uint32_t value);
78 
84 void cbor_set_uint64(cbor_item_t *item, uint64_t value);
85 
92 
99 void cbor_mark_uint(cbor_item_t *item);
100 
107 void cbor_mark_negint(cbor_item_t *item);
108 
116 
124 
132 
140 
146 cbor_item_t *cbor_build_uint8(uint8_t value);
147 
153 cbor_item_t *cbor_build_uint16(uint16_t value);
154 
160 cbor_item_t *cbor_build_uint32(uint32_t value);
161 
167 cbor_item_t *cbor_build_uint64(uint64_t value);
168 
174 cbor_item_t *cbor_build_negint8(uint8_t value);
175 
181 cbor_item_t *cbor_build_negint16(uint16_t value);
182 
188 cbor_item_t *cbor_build_negint32(uint32_t value);
189 
195 cbor_item_t *cbor_build_negint64(uint64_t value);
196 
197 
198 
199 #ifdef __cplusplus
200 }
201 #endif
202 
203 #endif //LIBCBOR_INTS_H
cbor_item_t * cbor_new_int32()
Allocates new integer with 4B width.
Definition: ints.c:121
+
void cbor_mark_uint(cbor_item_t *item)
Marks the integer item as a positive integer.
Definition: ints.c:85
+
cbor_int_width cbor_int_get_width(const cbor_item_t *item)
Queries the integer width.
Definition: ints.c:10
+
cbor_item_t * cbor_build_negint64(uint64_t value)
Constructs a new negative integer.
Definition: ints.c:201
+
cbor_item_t * cbor_new_int64()
Allocates new integer with 8B width.
Definition: ints.c:133
+
cbor_item_t * cbor_build_negint16(uint16_t value)
Constructs a new negative integer.
Definition: ints.c:185
+
uint16_t cbor_get_uint16(const cbor_item_t *item)
Extracts the integer value.
Definition: ints.c:23
+
cbor_item_t * cbor_build_negint32(uint32_t value)
Constructs a new negative integer.
Definition: ints.c:193
+
uint32_t cbor_get_uint32(const cbor_item_t *item)
Extracts the integer value.
Definition: ints.c:30
+
uint64_t cbor_get_int(const cbor_item_t *item)
Extracts the integer value.
Definition: ints.c:44
+
void cbor_mark_negint(cbor_item_t *item)
Marks the integer item as a negative integer.
Definition: ints.c:91
+
void cbor_set_uint8(cbor_item_t *item, uint8_t value)
Assigns the integer value.
Definition: ints.c:56
+
cbor_item_t * cbor_build_uint64(uint64_t value)
Constructs a new positive integer.
Definition: ints.c:169
+
cbor_int_width
Possible widths of CBOR_TYPE_UINT items.
Definition: data.h:46
+
uint64_t cbor_get_uint64(const cbor_item_t *item)
Extracts the integer value.
Definition: ints.c:37
+
cbor_item_t * cbor_build_uint32(uint32_t value)
Constructs a new positive integer.
Definition: ints.c:161
+
void cbor_set_uint16(cbor_item_t *item, uint16_t value)
Assigns the integer value.
Definition: ints.c:63
+
void cbor_set_uint32(cbor_item_t *item, uint32_t value)
Assigns the integer value.
Definition: ints.c:71
+
cbor_item_t * cbor_new_int16()
Allocates new integer with 2B width.
Definition: ints.c:109
+
cbor_item_t * cbor_new_int8()
Allocates new integer with 1B width.
Definition: ints.c:97
+
void cbor_set_uint64(cbor_item_t *item, uint64_t value)
Assigns the integer value.
Definition: ints.c:78
+
cbor_item_t * cbor_build_uint16(uint16_t value)
Constructs a new positive integer.
Definition: ints.c:153
+ +
The item handle.
Definition: data.h:149
+
cbor_item_t * cbor_build_negint8(uint8_t value)
Constructs a new negative integer.
Definition: ints.c:177
+
cbor_item_t * cbor_build_uint8(uint8_t value)
Constructs a new positive integer.
Definition: ints.c:145
+
uint8_t cbor_get_uint8(const cbor_item_t *item)
Extracts the integer value.
Definition: ints.c:16
+
+ + + + diff --git a/docs/doxygen/jquery.js b/docs/doxygen/jquery.js new file mode 100644 index 00000000..f5343eda --- /dev/null +++ b/docs/doxygen/jquery.js @@ -0,0 +1,87 @@ +/*! + * jQuery JavaScript Library v1.7.1 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Mon Nov 21 21:11:03 2011 -0500 + */ +(function(bb,L){var av=bb.document,bu=bb.navigator,bl=bb.location;var b=(function(){var bF=function(b0,b1){return new bF.fn.init(b0,b1,bD)},bU=bb.jQuery,bH=bb.$,bD,bY=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bE=/\s+$/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bB=/-([a-z]|[0-9])/ig,bZ=/^-ms-/,bT=function(b0,b1){return(b1+"").toUpperCase()},bX=bu.userAgent,bV,bC,e,bL=Object.prototype.toString,bG=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bF.fn=bF.prototype={constructor:bF,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this}if(b0==="body"&&!b4&&av.body){this.context=av;this[0]=av.body;this.selector=b0;this.length=1;return this}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null]}else{b2=bY.exec(b0)}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof bF?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:av);b1=bA.exec(b0);if(b1){if(bF.isPlainObject(b4)){b0=[av.createElement(b1[1])];bF.fn.attr.call(b0,b4,true)}else{b0=[b6.createElement(b1[1])]}}else{b1=bF.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?bF.clone(b1.fragment):b1.fragment).childNodes}return bF.merge(this,b0)}else{b5=av.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0)}this.length=1;this[0]=b5}this.context=av;this.selector=b0;return this}}else{if(!b4||b4.jquery){return(b4||b3).find(b0)}else{return this.constructor(b4).find(b0)}}}else{if(bF.isFunction(b0)){return b3.ready(b0)}}if(b0.selector!==L){this.selector=b0.selector;this.context=b0.context}return bF.makeArray(b0,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0])},pushStack:function(b1,b3,b0){var b2=this.constructor();if(bF.isArray(b1)){bz.apply(b2,b1)}else{bF.merge(b2,b1)}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")"}}return b2},each:function(b1,b0){return bF.each(this,b1,b0)},ready:function(b0){bF.bindReady();bC.add(b0);return this},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","))},map:function(b0){return this.pushStack(bF.map(this,function(b2,b1){return b0.call(b2,b1,b2)}))},end:function(){return this.prevObject||this.constructor(null)},push:bz,sort:[].sort,splice:[].splice};bF.fn.init.prototype=bF.fn;bF.extend=bF.fn.extend=function(){var b9,b2,b0,b1,b6,b7,b5=arguments[0]||{},b4=1,b3=arguments.length,b8=false;if(typeof b5==="boolean"){b8=b5;b5=arguments[1]||{};b4=2}if(typeof b5!=="object"&&!bF.isFunction(b5)){b5={}}if(b3===b4){b5=this;--b4}for(;b40){return}bC.fireWith(av,[bF]);if(bF.fn.trigger){bF(av).trigger("ready").off("ready")}}},bindReady:function(){if(bC){return}bC=bF.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bF.ready,1)}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bb.addEventListener("load",bF.ready,false)}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bb.attachEvent("onload",bF.ready);var b0=false;try{b0=bb.frameElement==null}catch(b1){}if(av.documentElement.doScroll&&b0){bw()}}}},isFunction:function(b0){return bF.type(b0)==="function"},isArray:Array.isArray||function(b0){return bF.type(b0)==="array"},isWindow:function(b0){return b0&&typeof b0==="object"&&"setInterval" in b0},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0)},type:function(b0){return b0==null?String(b0):bx[bL.call(b0)]||"object"},isPlainObject:function(b2){if(!b2||bF.type(b2)!=="object"||b2.nodeType||bF.isWindow(b2)){return false}try{if(b2.constructor&&!bG.call(b2,"constructor")&&!bG.call(b2.constructor.prototype,"isPrototypeOf")){return false}}catch(b1){return false}var b0;for(b0 in b2){}return b0===L||bG.call(b2,b0)},isEmptyObject:function(b1){for(var b0 in b1){return false}return true},error:function(b0){throw new Error(b0)},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null}b0=bF.trim(b0);if(bb.JSON&&bb.JSON.parse){return bb.JSON.parse(b0)}if(bN.test(b0.replace(bW,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+b0))()}bF.error("Invalid JSON: "+b0)},parseXML:function(b2){var b0,b1;try{if(bb.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml")}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2)}}catch(b3){b0=L}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){bF.error("Invalid XML: "+b2)}return b0},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(bb.execScript||function(b1){bb["eval"].call(bb,b1)})(b0)}},camelCase:function(b0){return b0.replace(bZ,"ms-").replace(bB,bT)},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase()},each:function(b3,b6,b2){var b1,b4=0,b5=b3.length,b0=b5===L||bF.isFunction(b3);if(b2){if(b0){for(b1 in b3){if(b6.apply(b3[b1],b2)===false){break}}}else{for(;b40&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b21?aJ.call(arguments,0):bG;if(!(--bw)){bC.resolveWith(bC,bx)}}}function bz(bF){return function(bG){bB[bF]=arguments.length>1?aJ.call(arguments,0):bG;bC.notifyWith(bE,bB)}}if(e>1){for(;bv
a";bI=bv.getElementsByTagName("*");bF=bv.getElementsByTagName("a")[0];if(!bI||!bI.length||!bF){return{}}bG=av.createElement("select");bx=bG.appendChild(av.createElement("option"));bE=bv.getElementsByTagName("input")[0];bJ={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bF.getAttribute("style")),hrefNormalized:(bF.getAttribute("href")==="/a"),opacity:/^0.55/.test(bF.style.opacity),cssFloat:!!bF.style.cssFloat,checkOn:(bE.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!av.createElement("form").enctype,html5Clone:av.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bE.checked=true;bJ.noCloneChecked=bE.cloneNode(true).checked;bG.disabled=true;bJ.optDisabled=!bx.disabled;try{delete bv.test}catch(bC){bJ.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bJ.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick")}bE=av.createElement("input");bE.value="t";bE.setAttribute("type","radio");bJ.radioValue=bE.value==="t";bE.setAttribute("checked","checked");bv.appendChild(bE);bD=av.createDocumentFragment();bD.appendChild(bv.lastChild);bJ.checkClone=bD.cloneNode(true).cloneNode(true).lastChild.checked;bJ.appendChecked=bE.checked;bD.removeChild(bE);bD.appendChild(bv);bv.innerHTML="";if(bb.getComputedStyle){bA=av.createElement("div");bA.style.width="0";bA.style.marginRight="0";bv.style.width="2px";bv.appendChild(bA);bJ.reliableMarginRight=(parseInt((bb.getComputedStyle(bA,null)||{marginRight:0}).marginRight,10)||0)===0}if(bv.attachEvent){for(by in {submit:1,change:1,focusin:1}){bB="on"+by;bw=(bB in bv);if(!bw){bv.setAttribute(bB,"return;");bw=(typeof bv[bB]==="function")}bJ[by+"Bubbles"]=bw}}bD.removeChild(bv);bD=bG=bx=bA=bv=bE=null;b(function(){var bM,bU,bV,bT,bN,bO,bL,bS,bR,e,bP,bQ=av.getElementsByTagName("body")[0];if(!bQ){return}bL=1;bS="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";bR="visibility:hidden;border:0;";e="style='"+bS+"border:5px solid #000;padding:0;'";bP="
";bM=av.createElement("div");bM.style.cssText=bR+"width:0;height:0;position:static;top:0;margin-top:"+bL+"px";bQ.insertBefore(bM,bQ.firstChild);bv=av.createElement("div");bM.appendChild(bv);bv.innerHTML="
t
";bz=bv.getElementsByTagName("td");bw=(bz[0].offsetHeight===0);bz[0].style.display="";bz[1].style.display="none";bJ.reliableHiddenOffsets=bw&&(bz[0].offsetHeight===0);bv.innerHTML="";bv.style.width=bv.style.paddingLeft="1px";b.boxModel=bJ.boxModel=bv.offsetWidth===2;if(typeof bv.style.zoom!=="undefined"){bv.style.display="inline";bv.style.zoom=1;bJ.inlineBlockNeedsLayout=(bv.offsetWidth===2);bv.style.display="";bv.innerHTML="
";bJ.shrinkWrapBlocks=(bv.offsetWidth!==2)}bv.style.cssText=bS+bR;bv.innerHTML=bP;bU=bv.firstChild;bV=bU.firstChild;bN=bU.nextSibling.firstChild.firstChild;bO={doesNotAddBorder:(bV.offsetTop!==5),doesAddBorderForTableAndCells:(bN.offsetTop===5)};bV.style.position="fixed";bV.style.top="20px";bO.fixedPosition=(bV.offsetTop===20||bV.offsetTop===15);bV.style.position=bV.style.top="";bU.style.overflow="hidden";bU.style.position="relative";bO.subtractsBorderForOverflowNotVisible=(bV.offsetTop===-5);bO.doesNotIncludeMarginInBodyOffset=(bQ.offsetTop!==bL);bQ.removeChild(bM);bv=bM=null;b.extend(bJ,bO)});return bJ})();var aS=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!S(e)},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return}var bG,bA,bD,bE=b.expando,bC=typeof bv==="string",bF=bx.nodeType,e=bF?b.cache:bx,bw=bF?bx[bE]:bx[bE]&&bE,bB=bv==="events";if((!bw||!e[bw]||(!bB&&!by&&!e[bw].data))&&bC&&bz===L){return}if(!bw){if(bF){bx[bE]=bw=++b.uuid}else{bw=bE}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=b.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw]=b.extend(e[bw],bv)}else{e[bw].data=b.extend(e[bw].data,bv)}}bG=bA=e[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==L){bA[b.camelCase(bv)]=bz}if(bB&&!bA[bv]){return bG.events}if(bC){bD=bA[bv];if(bD==null){bD=bA[b.camelCase(bv)]}}else{bD=bA}return bD},removeData:function(bx,bv,by){if(!b.acceptData(bx)){return}var bB,bA,bz,bC=b.expando,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[bC]:bC;if(!e[bw]){return}if(bv){bB=by?e[bw]:e[bw].data;if(bB){if(!b.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=b.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA-1){return true}}return false},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.nodeName.toLowerCase()]||b.valHooks[bw.type];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aU,""):bv==null?"":bv}return}by=b.isFunction(bx);return this.each(function(bA){var bz=b(this),bB;if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB}})}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(e){var bA,bv,bz,bx,by=e.selectedIndex,bB=[],bC=e.options,bw=e.type==="select-one";if(by<0){return null}bv=bw?by:0;bz=bw?by+1:bC.length;for(;bv=0});if(!e.length){bv.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,bx,bB,bz){var bw,e,by,bv=bA.nodeType;if(!bA||bv===3||bv===8||bv===2){return}if(bz&&bx in b.attrFn){return b(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return b.prop(bA,bx,bB)}by=bv!==1||!b.isXMLDoc(bA);if(by){bx=bx.toLowerCase();e=b.attrHooks[bx]||(ao.test(bx)?aY:be)}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw}else{bA.setAttribute(bx,""+bB);return bB}}}else{if(e&&"get" in e&&by&&(bw=e.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?L:bw}}},removeAttr:function(bx,bz){var by,bA,bv,e,bw=0;if(bz&&bx.nodeType===1){bA=bz.toLowerCase().split(af);e=bA.length;for(;bw=0)}}})});var bd=/^(?:textarea|input|select)$/i,n=/^([^\.]*)?(?:\.(.+))?$/,J=/\bhover(\.\S+)?\b/,aO=/^key/,bf=/^(?:mouse|contextmenu)|click/,T=/^(?:focusinfocus|focusoutblur)$/,U=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Y=function(e){var bv=U.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)")}return bv},j=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)))},bt=function(e){return b.event.special.hover?e:e.replace(J,"mouseenter$1 mouseleave$1")};b.event={add:function(bx,bC,bJ,bA,by){var bD,bB,bK,bI,bH,bF,e,bG,bv,bz,bw,bE;if(bx.nodeType===3||bx.nodeType===8||!bC||!bJ||!(bD=b._data(bx))){return}if(bJ.handler){bv=bJ;bJ=bv.handler}if(!bJ.guid){bJ.guid=b.guid++}bK=bD.events;if(!bK){bD.events=bK={}}bB=bD.handle;if(!bB){bD.handle=bB=function(bL){return typeof b!=="undefined"&&(!bL||b.event.triggered!==bL.type)?b.event.dispatch.apply(bB.elem,arguments):L};bB.elem=bx}bC=b.trim(bt(bC)).split(" ");for(bI=0;bI=0){bG=bG.slice(0,-1);bw=true}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort()}if((!bA||b.event.customEvent[bG])&&!b.event.global[bG]){return}bv=typeof bv==="object"?bv[b.expando]?bv:new b.Event(bG,bv):new b.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bw;bv.namespace=bx.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){e=b.cache;for(bC in e){if(e[bC].events&&e[bC].events[bG]){b.event.trigger(bv,bD,e[bC].handle.elem,true)}}return}bv.result=L;if(!bv.target){bv.target=bA}bD=bD!=null?b.makeArray(bD):[];bD.unshift(bv);bF=b.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bD)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!b.isWindow(bA)){bI=bF.delegateType||bG;bH=T.test(bI+bG)?bA:bA.parentNode;bz=null;for(;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz&&bz===bA.ownerDocument){bB.push([bz.defaultView||bz.parentWindow||bb,bI])}}for(bC=0;bCbA){bH.push({elem:this,matches:bz.slice(bA)})}for(bC=0;bC0?this.on(e,null,bx,bw):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}if(aO.test(e)){b.event.fixHooks[e]=b.event.keyHooks}if(bf.test(e)){b.event.fixHooks[e]=b.event.mouseHooks}}); +/*! + * Sizzle CSS Selector Engine + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){var bH=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bC="sizcache"+(Math.random()+"").replace(".",""),bI=0,bL=Object.prototype.toString,bB=false,bA=true,bK=/\\/g,bO=/\r\n/g,bQ=/\W/;[0,0].sort(function(){bA=false;return 0});var by=function(bV,e,bY,bZ){bY=bY||[];e=e||av;var b1=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bV||typeof bV!=="string"){return bY}var bS,b3,b6,bR,b2,b5,b4,bX,bU=true,bT=by.isXML(e),bW=[],b0=bV;do{bH.exec("");bS=bH.exec(b0);if(bS){b0=bS[3];bW.push(bS[1]);if(bS[2]){bR=bS[3];break}}}while(bS);if(bW.length>1&&bD.exec(bV)){if(bW.length===2&&bE.relative[bW[0]]){b3=bM(bW[0]+bW[1],e,bZ)}else{b3=bE.relative[bW[0]]?[e]:by(bW.shift(),e);while(bW.length){bV=bW.shift();if(bE.relative[bV]){bV+=bW.shift()}b3=bM(bV,b3,bZ)}}}else{if(!bZ&&bW.length>1&&e.nodeType===9&&!bT&&bE.match.ID.test(bW[0])&&!bE.match.ID.test(bW[bW.length-1])){b2=by.find(bW.shift(),e,bT);e=b2.expr?by.filter(b2.expr,b2.set)[0]:b2.set[0]}if(e){b2=bZ?{expr:bW.pop(),set:bF(bZ)}:by.find(bW.pop(),bW.length===1&&(bW[0]==="~"||bW[0]==="+")&&e.parentNode?e.parentNode:e,bT);b3=b2.expr?by.filter(b2.expr,b2.set):b2.set;if(bW.length>0){b6=bF(b3)}else{bU=false}while(bW.length){b5=bW.pop();b4=b5;if(!bE.relative[b5]){b5=""}else{b4=bW.pop()}if(b4==null){b4=e}bE.relative[b5](b6,b4,bT)}}else{b6=bW=[]}}if(!b6){b6=b3}if(!b6){by.error(b5||bV)}if(bL.call(b6)==="[object Array]"){if(!bU){bY.push.apply(bY,b6)}else{if(e&&e.nodeType===1){for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&(b6[bX]===true||b6[bX].nodeType===1&&by.contains(e,b6[bX]))){bY.push(b3[bX])}}}else{for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&b6[bX].nodeType===1){bY.push(b3[bX])}}}}}else{bF(b6,bY)}if(bR){by(bR,b1,bY,bZ);by.uniqueSort(bY)}return bY};by.uniqueSort=function(bR){if(bJ){bB=bA;bR.sort(bJ);if(bB){for(var e=1;e0};by.find=function(bX,e,bY){var bW,bS,bU,bT,bV,bR;if(!bX){return[]}for(bS=0,bU=bE.order.length;bS":function(bW,bR){var bV,bU=typeof bR==="string",bS=0,e=bW.length;if(bU&&!bQ.test(bR)){bR=bR.toLowerCase();for(;bS=0)){if(!bS){e.push(bV)}}else{if(bS){bR[bU]=false}}}}return false},ID:function(e){return e[1].replace(bK,"")},TAG:function(bR,e){return bR[1].replace(bK,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){by.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bR=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bR[1]+(bR[2]||1))-0;e[3]=bR[3]-0}else{if(e[2]){by.error(e[0])}}e[0]=bI++;return e},ATTR:function(bU,bR,bS,e,bV,bW){var bT=bU[1]=bU[1].replace(bK,"");if(!bW&&bE.attrMap[bT]){bU[1]=bE.attrMap[bT]}bU[4]=(bU[4]||bU[5]||"").replace(bK,"");if(bU[2]==="~="){bU[4]=" "+bU[4]+" "}return bU},PSEUDO:function(bU,bR,bS,e,bV){if(bU[1]==="not"){if((bH.exec(bU[3])||"").length>1||/^\w/.test(bU[3])){bU[3]=by(bU[3],null,null,bR)}else{var bT=by.filter(bU[3],bR,bS,true^bV);if(!bS){e.push.apply(e,bT)}return false}}else{if(bE.match.POS.test(bU[0])||bE.match.CHILD.test(bU[0])){return true}}return bU},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bS,bR,e){return !!by(e[3],bS).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bS){var e=bS.getAttribute("type"),bR=bS.type;return bS.nodeName.toLowerCase()==="input"&&"text"===bR&&(e===bR||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bR.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bR.type},button:function(bR){var e=bR.nodeName.toLowerCase();return e==="input"&&"button"===bR.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(bR,e){return e===0},last:function(bS,bR,e,bT){return bR===bT.length-1},even:function(bR,e){return e%2===0},odd:function(bR,e){return e%2===1},lt:function(bS,bR,e){return bRe[3]-0},nth:function(bS,bR,e){return e[3]-0===bR},eq:function(bS,bR,e){return e[3]-0===bR}},filter:{PSEUDO:function(bS,bX,bW,bY){var e=bX[1],bR=bE.filters[e];if(bR){return bR(bS,bW,bX,bY)}else{if(e==="contains"){return(bS.textContent||bS.innerText||bw([bS])||"").indexOf(bX[3])>=0}else{if(e==="not"){var bT=bX[3];for(var bV=0,bU=bT.length;bV=0)}}},ID:function(bR,e){return bR.nodeType===1&&bR.getAttribute("id")===e},TAG:function(bR,e){return(e==="*"&&bR.nodeType===1)||!!bR.nodeName&&bR.nodeName.toLowerCase()===e},CLASS:function(bR,e){return(" "+(bR.className||bR.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bV,bT){var bS=bT[1],e=by.attr?by.attr(bV,bS):bE.attrHandle[bS]?bE.attrHandle[bS](bV):bV[bS]!=null?bV[bS]:bV.getAttribute(bS),bW=e+"",bU=bT[2],bR=bT[4];return e==null?bU==="!=":!bU&&by.attr?e!=null:bU==="="?bW===bR:bU==="*="?bW.indexOf(bR)>=0:bU==="~="?(" "+bW+" ").indexOf(bR)>=0:!bR?bW&&e!==false:bU==="!="?bW!==bR:bU==="^="?bW.indexOf(bR)===0:bU==="$="?bW.substr(bW.length-bR.length)===bR:bU==="|="?bW===bR||bW.substr(0,bR.length+1)===bR+"-":false},POS:function(bU,bR,bS,bV){var e=bR[2],bT=bE.setFilters[e];if(bT){return bT(bU,bS,bR,bV)}}}};var bD=bE.match.POS,bx=function(bR,e){return"\\"+(e-0+1)};for(var bz in bE.match){bE.match[bz]=new RegExp(bE.match[bz].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bE.leftMatch[bz]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bE.match[bz].source.replace(/\\(\d+)/g,bx))}var bF=function(bR,e){bR=Array.prototype.slice.call(bR,0);if(e){e.push.apply(e,bR);return e}return bR};try{Array.prototype.slice.call(av.documentElement.childNodes,0)[0].nodeType}catch(bP){bF=function(bU,bT){var bS=0,bR=bT||[];if(bL.call(bU)==="[object Array]"){Array.prototype.push.apply(bR,bU)}else{if(typeof bU.length==="number"){for(var e=bU.length;bS";e.insertBefore(bR,e.firstChild);if(av.getElementById(bS)){bE.find.ID=function(bU,bV,bW){if(typeof bV.getElementById!=="undefined"&&!bW){var bT=bV.getElementById(bU[1]);return bT?bT.id===bU[1]||typeof bT.getAttributeNode!=="undefined"&&bT.getAttributeNode("id").nodeValue===bU[1]?[bT]:L:[]}};bE.filter.ID=function(bV,bT){var bU=typeof bV.getAttributeNode!=="undefined"&&bV.getAttributeNode("id");return bV.nodeType===1&&bU&&bU.nodeValue===bT}}e.removeChild(bR);e=bR=null})();(function(){var e=av.createElement("div");e.appendChild(av.createComment(""));if(e.getElementsByTagName("*").length>0){bE.find.TAG=function(bR,bV){var bU=bV.getElementsByTagName(bR[1]);if(bR[1]==="*"){var bT=[];for(var bS=0;bU[bS];bS++){if(bU[bS].nodeType===1){bT.push(bU[bS])}}bU=bT}return bU}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bE.attrHandle.href=function(bR){return bR.getAttribute("href",2)}}e=null})();if(av.querySelectorAll){(function(){var e=by,bT=av.createElement("div"),bS="__sizzle__";bT.innerHTML="

";if(bT.querySelectorAll&&bT.querySelectorAll(".TEST").length===0){return}by=function(b4,bV,bZ,b3){bV=bV||av;if(!b3&&!by.isXML(bV)){var b2=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b4);if(b2&&(bV.nodeType===1||bV.nodeType===9)){if(b2[1]){return bF(bV.getElementsByTagName(b4),bZ)}else{if(b2[2]&&bE.find.CLASS&&bV.getElementsByClassName){return bF(bV.getElementsByClassName(b2[2]),bZ)}}}if(bV.nodeType===9){if(b4==="body"&&bV.body){return bF([bV.body],bZ)}else{if(b2&&b2[3]){var bY=bV.getElementById(b2[3]);if(bY&&bY.parentNode){if(bY.id===b2[3]){return bF([bY],bZ)}}else{return bF([],bZ)}}}try{return bF(bV.querySelectorAll(b4),bZ)}catch(b0){}}else{if(bV.nodeType===1&&bV.nodeName.toLowerCase()!=="object"){var bW=bV,bX=bV.getAttribute("id"),bU=bX||bS,b6=bV.parentNode,b5=/^\s*[+~]/.test(b4);if(!bX){bV.setAttribute("id",bU)}else{bU=bU.replace(/'/g,"\\$&")}if(b5&&b6){bV=bV.parentNode}try{if(!b5||b6){return bF(bV.querySelectorAll("[id='"+bU+"'] "+b4),bZ)}}catch(b1){}finally{if(!bX){bW.removeAttribute("id")}}}}}return e(b4,bV,bZ,b3)};for(var bR in e){by[bR]=e[bR]}bT=null})()}(function(){var e=av.documentElement,bS=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bS){var bU=!bS.call(av.createElement("div"),"div"),bR=false;try{bS.call(av.documentElement,"[test!='']:sizzle")}catch(bT){bR=true}by.matchesSelector=function(bW,bY){bY=bY.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!by.isXML(bW)){try{if(bR||!bE.match.PSEUDO.test(bY)&&!/!=/.test(bY)){var bV=bS.call(bW,bY);if(bV||!bU||bW.document&&bW.document.nodeType!==11){return bV}}}catch(bX){}}return by(bY,null,null,[bW]).length>0}}})();(function(){var e=av.createElement("div");e.innerHTML="
";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bE.order.splice(1,0,"CLASS");bE.find.CLASS=function(bR,bS,bT){if(typeof bS.getElementsByClassName!=="undefined"&&!bT){return bS.getElementsByClassName(bR[1])}};e=null})();function bv(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT0){bU=e;break}}}e=e[bR]}bZ[bT]=bU}}}if(av.documentElement.contains){by.contains=function(bR,e){return bR!==e&&(bR.contains?bR.contains(e):true)}}else{if(av.documentElement.compareDocumentPosition){by.contains=function(bR,e){return !!(bR.compareDocumentPosition(e)&16)}}else{by.contains=function(){return false}}}by.isXML=function(e){var bR=(e?e.ownerDocument||e:0).documentElement;return bR?bR.nodeName!=="HTML":false};var bM=function(bS,e,bW){var bV,bX=[],bU="",bY=e.nodeType?[e]:e;while((bV=bE.match.PSEUDO.exec(bS))){bU+=bV[0];bS=bS.replace(bE.match.PSEUDO,"")}bS=bE.relative[bS]?bS+"*":bS;for(var bT=0,bR=bY.length;bT0){for(bB=bA;bB=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(by,bx){var bv=[],bw,e,bz=this[0];if(b.isArray(by)){var bB=1;while(bz&&bz.ownerDocument&&bz!==bx){for(bw=0;bw-1:b.find.matchesSelector(bz,by)){bv.push(bz);break}else{bz=bz.parentNode;if(!bz||!bz.ownerDocument||bz===bx||bz.nodeType===11){break}}}}bv=bv.length>1?b.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return b.inArray(this[0],b(e))}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,bv){var bx=typeof e==="string"?b(e,bv):b.makeArray(e&&e.nodeType?[e]:e),bw=b.merge(this.get(),bx);return this.pushStack(C(bx[0])||C(bw[0])?bw:b.unique(bw))},andSelf:function(){return this.add(this.prevObject)}});function C(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(bv){var e=bv.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(bv,e,bw){return b.dir(bv,"parentNode",bw)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(bv,e,bw){return b.dir(bv,"nextSibling",bw)},prevUntil:function(bv,e,bw){return b.dir(bv,"previousSibling",bw)},siblings:function(e){return b.sibling(e.parentNode.firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,bv){b.fn[e]=function(by,bw){var bx=b.map(this,bv,by);if(!ab.test(e)){bw=by}if(bw&&typeof bw==="string"){bx=b.filter(bw,bx)}bx=this.length>1&&!ay[e]?b.unique(bx):bx;if((this.length>1||a9.test(bw))&&aq.test(e)){bx=bx.reverse()}return this.pushStack(bx,e,P.call(arguments).join(","))}});b.extend({filter:function(bw,e,bv){if(bv){bw=":not("+bw+")"}return e.length===1?b.find.matchesSelector(e[0],bw)?[e[0]]:[]:b.find.matches(bw,e)},dir:function(bw,bv,by){var e=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===L||bx.nodeType!==1||!b(bx).is(by))){if(bx.nodeType===1){e.push(bx)}bx=bx[bv]}return e},nth:function(by,e,bw,bx){e=e||1;var bv=0;for(;by;by=by[bw]){if(by.nodeType===1&&++bv===e){break}}return by},sibling:function(bw,bv){var e=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){e.push(bw)}}return e}});function aG(bx,bw,e){bw=bw||0;if(b.isFunction(bw)){return b.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===e})}else{if(bw.nodeType){return b.grep(bx,function(bz,by){return(bz===bw)===e})}else{if(typeof bw==="string"){var bv=b.grep(bx,function(by){return by.nodeType===1});if(bp.test(bw)){return b.filter(bw,bv,!e)}else{bw=b.filter(bw,bv)}}}}return b.grep(bx,function(bz,by){return(b.inArray(bz,bw)>=0)===e})}function a(e){var bw=aR.split("|"),bv=e.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aR="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ag=/ jQuery\d+="(?:\d+|null)"/g,ar=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,w=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},ac=a(av);ax.optgroup=ax.option;ax.tbody=ax.tfoot=ax.colgroup=ax.caption=ax.thead;ax.th=ax.td;if(!b.support.htmlSerialize){ax._default=[1,"div
","
"]}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bw){var bv=b(this);bv.text(e.call(this,bw,bv.text()))})}if(typeof e!=="object"&&e!==L){return this.empty().append((this[0]&&this[0].ownerDocument||av).createTextNode(e))}return b.text(this)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bw){b(this).wrapAll(e.call(this,bw))})}if(this[0]){var bv=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(bv){b(this).wrapInner(e.call(this,bv))})}return this.each(function(){var bv=b(this),bw=bv.contents();if(bw.length){bw.wrapAll(e)}else{bv.append(e)}})},wrap:function(e){var bv=b.isFunction(e);return this.each(function(bw){b(this).wrapAll(bv?e.call(this,bw):e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}else{if(arguments.length){var e=b.clean(arguments);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b.clean(arguments));return e}}},remove:function(e,bx){for(var bv=0,bw;(bw=this[bv])!=null;bv++){if(!e||b.filter(e,[bw]).length){if(!bx&&bw.nodeType===1){b.cleanData(bw.getElementsByTagName("*"));b.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){for(var e=0,bv;(bv=this[e])!=null;e++){if(bv.nodeType===1){b.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,e){bv=bv==null?false:bv;e=e==null?bv:e;return this.map(function(){return b.clone(this,bv,e)})},html:function(bx){if(bx===L){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ag,""):null}else{if(typeof bx==="string"&&!ae.test(bx)&&(b.support.leadingWhitespace||!ar.test(bx))&&!ax[(d.exec(bx)||["",""])[1].toLowerCase()]){bx=bx.replace(R,"<$1>");try{for(var bw=0,bv=this.length;bw1&&bw0?this.clone(true):this).get();b(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,e,bC.selector)}}});function bg(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function az(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function E(e){var bv=(e.nodeName||"").toLowerCase();if(bv==="input"){az(e)}else{if(bv!=="script"&&typeof e.getElementsByTagName!=="undefined"){b.grep(e.getElementsByTagName("input"),az)}}}function al(e){var bv=av.createElement("div");ac.appendChild(bv);bv.innerHTML=e.outerHTML;return bv.firstChild}b.extend({clone:function(by,bA,bw){var e,bv,bx,bz=b.support.html5Clone||!ah.test("<"+by.nodeName)?by.cloneNode(true):al(by);if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!b.isXMLDoc(by)){ai(by,bz);e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){if(bv[bx]){ai(e[bx],bv[bx])}}}if(bA){t(by,bz);if(bw){e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){t(e[bx],bv[bx])}}}e=bv=null;return bz},clean:function(bw,by,bH,bA){var bF;by=by||av;if(typeof by.createElement==="undefined"){by=by.ownerDocument||by[0]&&by[0].ownerDocument||av}var bI=[],bB;for(var bE=0,bz;(bz=bw[bE])!=null;bE++){if(typeof bz==="number"){bz+=""}if(!bz){continue}if(typeof bz==="string"){if(!W.test(bz)){bz=by.createTextNode(bz)}else{bz=bz.replace(R,"<$1>");var bK=(d.exec(bz)||["",""])[1].toLowerCase(),bx=ax[bK]||ax._default,bD=bx[0],bv=by.createElement("div");if(by===av){ac.appendChild(bv)}else{a(by).appendChild(bv)}bv.innerHTML=bx[1]+bz+bx[2];while(bD--){bv=bv.lastChild}if(!b.support.tbody){var e=w.test(bz),bC=bK==="table"&&!e?bv.firstChild&&bv.firstChild.childNodes:bx[1]===""&&!e?bv.childNodes:[];for(bB=bC.length-1;bB>=0;--bB){if(b.nodeName(bC[bB],"tbody")&&!bC[bB].childNodes.length){bC[bB].parentNode.removeChild(bC[bB])}}}if(!b.support.leadingWhitespace&&ar.test(bz)){bv.insertBefore(by.createTextNode(ar.exec(bz)[0]),bv.firstChild)}bz=bv.childNodes}}var bG;if(!b.support.appendChecked){if(bz[0]&&typeof(bG=bz.length)==="number"){for(bB=0;bB=0){return bx+"px"}}else{return bx}}}});if(!b.support.opacity){b.cssHooks.opacity={get:function(bv,e){return au.test((e&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,e=b.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&b.trim(bw.replace(ak,""))===""){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ak.test(bw)?bw.replace(ak,e):bw+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bw,bv){var e;b.swap(bw,{display:"inline-block"},function(){if(bv){e=Z(bw,"margin-right","marginRight")}else{e=bw.style.marginRight}});return e}}}});if(av.defaultView&&av.defaultView.getComputedStyle){aI=function(by,bw){var bv,bx,e;bw=bw.replace(z,"-$1").toLowerCase();if((bx=by.ownerDocument.defaultView)&&(e=bx.getComputedStyle(by,null))){bv=e.getPropertyValue(bw);if(bv===""&&!b.contains(by.ownerDocument.documentElement,by)){bv=b.style(by,bw)}}return bv}}if(av.documentElement.currentStyle){aX=function(bz,bw){var bA,e,by,bv=bz.currentStyle&&bz.currentStyle[bw],bx=bz.style;if(bv===null&&bx&&(by=bx[bw])){bv=by}if(!bc.test(bv)&&bn.test(bv)){bA=bx.left;e=bz.runtimeStyle&&bz.runtimeStyle.left;if(e){bz.runtimeStyle.left=bz.currentStyle.left}bx.left=bw==="fontSize"?"1em":(bv||0);bv=bx.pixelLeft+"px";bx.left=bA;if(e){bz.runtimeStyle.left=e}}return bv===""?"auto":bv}}Z=aI||aX;function p(by,bw,bv){var bA=bw==="width"?by.offsetWidth:by.offsetHeight,bz=bw==="width"?an:a1,bx=0,e=bz.length;if(bA>0){if(bv!=="border"){for(;bx)<[^<]*)*<\/script>/gi,q=/^(?:select|textarea)/i,h=/\s+/,br=/([?&])_=[^&]*/,K=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,A=b.fn.load,aa={},r={},aE,s,aV=["*/"]+["*"];try{aE=bl.href}catch(aw){aE=av.createElement("a");aE.href="";aE=aE.href}s=K.exec(aE.toLowerCase())||[];function f(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="*"}if(b.isFunction(bA)){var bx=by.toLowerCase().split(h),bw=0,bz=bx.length,bv,bB,bC;for(;bw=0){var e=bw.slice(by,bw.length);bw=bw.slice(0,by)}var bx="GET";if(bz){if(b.isFunction(bz)){bA=bz;bz=L}else{if(typeof bz==="object"){bz=b.param(bz,b.ajaxSettings.traditional);bx="POST"}}}var bv=this;b.ajax({url:bw,type:bx,dataType:"html",data:bz,complete:function(bC,bB,bD){bD=bC.responseText;if(bC.isResolved()){bC.done(function(bE){bD=bE});bv.html(e?b("
").append(bD.replace(a6,"")).find(e):bD)}if(bA){bv.each(bA,[bD,bB,bC])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||q.test(this.nodeName)||aZ.test(this.type))}).map(function(e,bv){var bw=b(this).val();return bw==null?null:b.isArray(bw)?b.map(bw,function(by,bx){return{name:bv.name,value:by.replace(bs,"\r\n")}}):{name:bv.name,value:bw.replace(bs,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bv){b.fn[bv]=function(bw){return this.on(bv,bw)}});b.each(["get","post"],function(e,bv){b[bv]=function(bw,by,bz,bx){if(b.isFunction(by)){bx=bx||bz;bz=by;by=L}return b.ajax({type:bv,url:bw,data:by,success:bz,dataType:bx})}});b.extend({getScript:function(e,bv){return b.get(e,L,bv,"script")},getJSON:function(e,bv,bw){return b.get(e,bv,bw,"json")},ajaxSetup:function(bv,e){if(e){am(bv,b.ajaxSettings)}else{e=bv;bv=b.ajaxSettings}am(bv,e);return bv},ajaxSettings:{url:aE,isLocal:aM.test(s[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aV},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":bb.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(aa),ajaxTransport:f(r),ajax:function(bz,bx){if(typeof bz==="object"){bx=bz;bz=L}bx=bx||{};var bD=b.ajaxSetup({},bx),bS=bD.context||bD,bG=bS!==bD&&(bS.nodeType||bS instanceof b)?b(bS):b.event,bR=b.Deferred(),bN=b.Callbacks("once memory"),bB=bD.statusCode||{},bC,bH={},bO={},bQ,by,bL,bE,bI,bA=0,bw,bK,bJ={readyState:0,setRequestHeader:function(bT,bU){if(!bA){var e=bT.toLowerCase();bT=bO[e]=bO[e]||bT;bH[bT]=bU}return this},getAllResponseHeaders:function(){return bA===2?bQ:null},getResponseHeader:function(bT){var e;if(bA===2){if(!by){by={};while((e=aD.exec(bQ))){by[e[1].toLowerCase()]=e[2]}}e=by[bT.toLowerCase()]}return e===L?null:e},overrideMimeType:function(e){if(!bA){bD.mimeType=e}return this},abort:function(e){e=e||"abort";if(bL){bL.abort(e)}bF(0,e);return this}};function bF(bZ,bU,b0,bW){if(bA===2){return}bA=2;if(bE){clearTimeout(bE)}bL=L;bQ=bW||"";bJ.readyState=bZ>0?4:0;var bT,b4,b3,bX=bU,bY=b0?bj(bD,bJ,b0):L,bV,b2;if(bZ>=200&&bZ<300||bZ===304){if(bD.ifModified){if((bV=bJ.getResponseHeader("Last-Modified"))){b.lastModified[bC]=bV}if((b2=bJ.getResponseHeader("Etag"))){b.etag[bC]=b2}}if(bZ===304){bX="notmodified";bT=true}else{try{b4=G(bD,bY);bX="success";bT=true}catch(b1){bX="parsererror";b3=b1}}}else{b3=bX;if(!bX||bZ){bX="error";if(bZ<0){bZ=0}}}bJ.status=bZ;bJ.statusText=""+(bU||bX);if(bT){bR.resolveWith(bS,[b4,bX,bJ])}else{bR.rejectWith(bS,[bJ,bX,b3])}bJ.statusCode(bB);bB=L;if(bw){bG.trigger("ajax"+(bT?"Success":"Error"),[bJ,bD,bT?b4:b3])}bN.fireWith(bS,[bJ,bX]);if(bw){bG.trigger("ajaxComplete",[bJ,bD]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bR.promise(bJ);bJ.success=bJ.done;bJ.error=bJ.fail;bJ.complete=bN.add;bJ.statusCode=function(bT){if(bT){var e;if(bA<2){for(e in bT){bB[e]=[bB[e],bT[e]]}}else{e=bT[bJ.status];bJ.then(e,e)}}return this};bD.url=((bz||bD.url)+"").replace(bq,"").replace(c,s[1]+"//");bD.dataTypes=b.trim(bD.dataType||"*").toLowerCase().split(h);if(bD.crossDomain==null){bI=K.exec(bD.url.toLowerCase());bD.crossDomain=!!(bI&&(bI[1]!=s[1]||bI[2]!=s[2]||(bI[3]||(bI[1]==="http:"?80:443))!=(s[3]||(s[1]==="http:"?80:443))))}if(bD.data&&bD.processData&&typeof bD.data!=="string"){bD.data=b.param(bD.data,bD.traditional)}aW(aa,bD,bx,bJ);if(bA===2){return false}bw=bD.global;bD.type=bD.type.toUpperCase();bD.hasContent=!aQ.test(bD.type);if(bw&&b.active++===0){b.event.trigger("ajaxStart")}if(!bD.hasContent){if(bD.data){bD.url+=(M.test(bD.url)?"&":"?")+bD.data;delete bD.data}bC=bD.url;if(bD.cache===false){var bv=b.now(),bP=bD.url.replace(br,"$1_="+bv);bD.url=bP+((bP===bD.url)?(M.test(bD.url)?"&":"?")+"_="+bv:"")}}if(bD.data&&bD.hasContent&&bD.contentType!==false||bx.contentType){bJ.setRequestHeader("Content-Type",bD.contentType)}if(bD.ifModified){bC=bC||bD.url;if(b.lastModified[bC]){bJ.setRequestHeader("If-Modified-Since",b.lastModified[bC])}if(b.etag[bC]){bJ.setRequestHeader("If-None-Match",b.etag[bC])}}bJ.setRequestHeader("Accept",bD.dataTypes[0]&&bD.accepts[bD.dataTypes[0]]?bD.accepts[bD.dataTypes[0]]+(bD.dataTypes[0]!=="*"?", "+aV+"; q=0.01":""):bD.accepts["*"]);for(bK in bD.headers){bJ.setRequestHeader(bK,bD.headers[bK])}if(bD.beforeSend&&(bD.beforeSend.call(bS,bJ,bD)===false||bA===2)){bJ.abort();return false}for(bK in {success:1,error:1,complete:1}){bJ[bK](bD[bK])}bL=aW(r,bD,bx,bJ);if(!bL){bF(-1,"No Transport")}else{bJ.readyState=1;if(bw){bG.trigger("ajaxSend",[bJ,bD])}if(bD.async&&bD.timeout>0){bE=setTimeout(function(){bJ.abort("timeout")},bD.timeout)}try{bA=1;bL.send(bH,bF)}catch(bM){if(bA<2){bF(-1,bM)}else{throw bM}}}return bJ},param:function(e,bw){var bv=[],by=function(bz,bA){bA=b.isFunction(bA)?bA():bA;bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===L){bw=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){by(this.name,this.value)})}else{for(var bx in e){v(bx,e[bx],bw,by)}}return bv.join("&").replace(k,"+")}});function v(bw,by,bv,bx){if(b.isArray(by)){b.each(by,function(bA,bz){if(bv||ap.test(bw)){bx(bw,bz)}else{v(bw+"["+(typeof bz==="object"||b.isArray(bz)?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&by!=null&&typeof by==="object"){for(var e in by){v(bw+"["+e+"]",by[e],bv,bx)}}else{bx(bw,by)}}}b.extend({active:0,lastModified:{},etag:{}});function bj(bD,bC,bz){var bv=bD.contents,bB=bD.dataTypes,bw=bD.responseFields,by,bA,bx,e;for(bA in bw){if(bA in bz){bC[bw[bA]]=bz[bA]}}while(bB[0]==="*"){bB.shift();if(by===L){by=bD.mimeType||bC.getResponseHeader("content-type")}}if(by){for(bA in bv){if(bv[bA]&&bv[bA].test(by)){bB.unshift(bA);break}}}if(bB[0] in bz){bx=bB[0]}else{for(bA in bz){if(!bB[0]||bD.converters[bA+" "+bB[0]]){bx=bA;break}if(!e){e=bA}}bx=bx||e}if(bx){if(bx!==bB[0]){bB.unshift(bx)}return bz[bx]}}function G(bH,bz){if(bH.dataFilter){bz=bH.dataFilter(bz,bH.dataType)}var bD=bH.dataTypes,bG={},bA,bE,bw=bD.length,bB,bC=bD[0],bx,by,bF,bv,e;for(bA=1;bA=bw.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bw.animatedProperties[this.prop]=true;for(bA in bw.animatedProperties){if(bw.animatedProperties[bA]!==true){e=false}}if(e){if(bw.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bC,bD){bz.style["overflow"+bD]=bw.overflow[bC]})}if(bw.hide){b(bz).hide()}if(bw.hide||bw.show){for(bA in bw.animatedProperties){b.style(bz,bA,bw.orig[bA]);b.removeData(bz,"fxshow"+bA,true);b.removeData(bz,"toggle"+bA,true)}}bv=bw.complete;if(bv){bw.complete=false;bv.call(bz)}}return false}else{if(bw.duration==Infinity){this.now=bx}else{bB=bx-this.startTime;this.state=bB/bw.duration;this.pos=b.easing[bw.animatedProperties[this.prop]](this.state,bB,0,1,bw.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};b.extend(b.fx,{tick:function(){var bw,bv=b.timers,e=0;for(;e").appendTo(e),bw=bv.css("display");bv.remove();if(bw==="none"||bw===""){if(!a8){a8=av.createElement("iframe");a8.frameBorder=a8.width=a8.height=0}e.appendChild(a8);if(!m||!a8.createElement){m=(a8.contentWindow||a8.contentDocument).document;m.write((av.compatMode==="CSS1Compat"?"":"")+"");m.close()}bv=m.createElement(bx);m.body.appendChild(bv);bw=b.css(bv,"display");e.removeChild(a8)}Q[bx]=bw}return Q[bx]}var V=/^t(?:able|d|h)$/i,ad=/^(?:body|html)$/i;if("getBoundingClientRect" in av.documentElement){b.fn.offset=function(bI){var by=this[0],bB;if(bI){return this.each(function(e){b.offset.setOffset(this,bI,e)})}if(!by||!by.ownerDocument){return null}if(by===by.ownerDocument.body){return b.offset.bodyOffset(by)}try{bB=by.getBoundingClientRect()}catch(bF){}var bH=by.ownerDocument,bw=bH.documentElement;if(!bB||!b.contains(bw,by)){return bB?{top:bB.top,left:bB.left}:{top:0,left:0}}var bC=bH.body,bD=aK(bH),bA=bw.clientTop||bC.clientTop||0,bE=bw.clientLeft||bC.clientLeft||0,bv=bD.pageYOffset||b.support.boxModel&&bw.scrollTop||bC.scrollTop,bz=bD.pageXOffset||b.support.boxModel&&bw.scrollLeft||bC.scrollLeft,bG=bB.top+bv-bA,bx=bB.left+bz-bE;return{top:bG,left:bx}}}else{b.fn.offset=function(bF){var bz=this[0];if(bF){return this.each(function(bG){b.offset.setOffset(this,bF,bG)})}if(!bz||!bz.ownerDocument){return null}if(bz===bz.ownerDocument.body){return b.offset.bodyOffset(bz)}var bC,bw=bz.offsetParent,bv=bz,bE=bz.ownerDocument,bx=bE.documentElement,bA=bE.body,bB=bE.defaultView,e=bB?bB.getComputedStyle(bz,null):bz.currentStyle,bD=bz.offsetTop,by=bz.offsetLeft;while((bz=bz.parentNode)&&bz!==bA&&bz!==bx){if(b.support.fixedPosition&&e.position==="fixed"){break}bC=bB?bB.getComputedStyle(bz,null):bz.currentStyle;bD-=bz.scrollTop;by-=bz.scrollLeft;if(bz===bw){bD+=bz.offsetTop;by+=bz.offsetLeft;if(b.support.doesNotAddBorder&&!(b.support.doesAddBorderForTableAndCells&&V.test(bz.nodeName))){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}bv=bw;bw=bz.offsetParent}if(b.support.subtractsBorderForOverflowNotVisible&&bC.overflow!=="visible"){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}e=bC}if(e.position==="relative"||e.position==="static"){bD+=bA.offsetTop;by+=bA.offsetLeft}if(b.support.fixedPosition&&e.position==="fixed"){bD+=Math.max(bx.scrollTop,bA.scrollTop);by+=Math.max(bx.scrollLeft,bA.scrollLeft)}return{top:bD,left:by}}}b.offset={bodyOffset:function(e){var bw=e.offsetTop,bv=e.offsetLeft;if(b.support.doesNotIncludeMarginInBodyOffset){bw+=parseFloat(b.css(e,"marginTop"))||0;bv+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bw,left:bv}},setOffset:function(bx,bG,bA){var bB=b.css(bx,"position");if(bB==="static"){bx.style.position="relative"}var bz=b(bx),bv=bz.offset(),e=b.css(bx,"top"),bE=b.css(bx,"left"),bF=(bB==="absolute"||bB==="fixed")&&b.inArray("auto",[e,bE])>-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(e)||0;by=parseFloat(bE)||0}if(b.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),e=ad.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(b.css(bw,"marginTop"))||0;bx.left-=parseFloat(b.css(bw,"marginLeft"))||0;e.top+=parseFloat(b.css(bv[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-e.top,left:bx.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||av.body;while(e&&(!ad.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(bv,e){var bw="scroll"+e;b.fn[bw]=function(bz){var bx,by;if(bz===L){bx=this[0];if(!bx){return null}by=aK(bx);return by?("pageXOffset" in by)?by[bv?"pageYOffset":"pageXOffset"]:b.support.boxModel&&by.document.documentElement[bw]||by.document.body[bw]:bx[bw]}return this.each(function(){by=aK(this);if(by){by.scrollTo(!bv?bz:b(by).scrollLeft(),bv?bz:b(by).scrollTop())}else{this[bw]=bz}})}});function aK(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(bv,e){var bw=e.toLowerCase();b.fn["inner"+e]=function(){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,"padding")):this[bw]():null};b.fn["outer"+e]=function(by){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,by?"margin":"border")):this[bw]():null};b.fn[bw]=function(bz){var bA=this[0];if(!bA){return bz==null?null:this}if(b.isFunction(bz)){return this.each(function(bE){var bD=b(this);bD[bw](bz.call(this,bE,bD[bw]()))})}if(b.isWindow(bA)){var bB=bA.document.documentElement["client"+e],bx=bA.document.body;return bA.document.compatMode==="CSS1Compat"&&bB||bx&&bx["client"+e]||bB}else{if(bA.nodeType===9){return Math.max(bA.documentElement["client"+e],bA.body["scroll"+e],bA.documentElement["scroll"+e],bA.body["offset"+e],bA.documentElement["offset"+e])}else{if(bz===L){var bC=b.css(bA,bw),by=parseFloat(bC);return b.isNumeric(by)?by:bC}else{return this.css(bw,typeof bz==="string"?bz:bz+"px")}}}}});bb.jQuery=bb.$=b;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return b})}})(window);/*! + * jQuery UI 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI + */ +(function(a,d){a.ui=a.ui||{};if(a.ui.version){return}a.extend(a.ui,{version:"1.8.18",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(e,f){return typeof e==="number"?this.each(function(){var g=this;setTimeout(function(){a(g).focus();if(f){f.call(g)}},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;if((a.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){e=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(a.curCSS(this,"position",1))&&(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}else{e=this.parents().filter(function(){return(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!e.length?a(document):e},zIndex:function(h){if(h!==d){return this.css("zIndex",h)}if(this.length){var f=a(this[0]),e,g;while(f.length&&f[0]!==document){e=f.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){g=parseInt(f.css("zIndex"),10);if(!isNaN(g)&&g!==0){return g}}f=f.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(g,e){var f=e==="Width"?["Left","Right"]:["Top","Bottom"],h=e.toLowerCase(),k={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};function j(m,l,i,n){a.each(f,function(){l-=parseFloat(a.curCSS(m,"padding"+this,true))||0;if(i){l-=parseFloat(a.curCSS(m,"border"+this+"Width",true))||0}if(n){l-=parseFloat(a.curCSS(m,"margin"+this,true))||0}});return l}a.fn["inner"+e]=function(i){if(i===d){return k["inner"+e].call(this)}return this.each(function(){a(this).css(h,j(this,i)+"px")})};a.fn["outer"+e]=function(i,l){if(typeof i!=="number"){return k["outer"+e].call(this,i)}return this.each(function(){a(this).css(h,j(this,i,true,l)+"px")})}});function c(g,e){var j=g.nodeName.toLowerCase();if("area"===j){var i=g.parentNode,h=i.name,f;if(!g.href||!h||i.nodeName.toLowerCase()!=="map"){return false}f=a("img[usemap=#"+h+"]")[0];return !!f&&b(f)}return(/input|select|textarea|button|object/.test(j)?!g.disabled:"a"==j?g.href||e:e)&&b(g)}function b(e){return !a(e).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.extend(a.expr[":"],{data:function(g,f,e){return !!a.data(g,e[3])},focusable:function(e){return c(e,!isNaN(a.attr(e,"tabindex")))},tabbable:function(g){var e=a.attr(g,"tabindex"),f=isNaN(e);return(f||e>=0)&&c(g,!f)}});a(function(){var e=document.body,f=e.appendChild(f=document.createElement("div"));f.offsetHeight;a.extend(f.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=f.offsetHeight===100;a.support.selectstart="onselectstart" in f;e.removeChild(f).style.display="none"});a.extend(a.ui,{plugin:{add:function(f,g,j){var h=a.ui[f].prototype;for(var e in j){h.plugins[e]=h.plugins[e]||[];h.plugins[e].push([g,j[e]])}},call:function(e,g,f){var j=e.plugins[g];if(!j||!e.element[0].parentNode){return}for(var h=0;h0){return true}h[e]=1;g=(h[e]>0);h[e]=0;return g},isOverAxis:function(f,e,g){return(f>e)&&(f<(e+g))},isOver:function(j,f,i,h,e,g){return a.ui.isOverAxis(j,i,e)&&a.ui.isOverAxis(f,h,g)}})})(jQuery);/*! + * jQuery UI Widget 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Widget + */ +(function(b,d){if(b.cleanData){var c=b.cleanData;b.cleanData=function(f){for(var g=0,h;(h=f[g])!=null;g++){try{b(h).triggerHandler("remove")}catch(j){}}c(f)}}else{var a=b.fn.remove;b.fn.remove=function(e,f){return this.each(function(){if(!f){if(!e||b.filter(e,[this]).length){b("*",this).add([this]).each(function(){try{b(this).triggerHandler("remove")}catch(g){}})}}return a.call(b(this),e,f)})}}b.widget=function(f,h,e){var g=f.split(".")[0],j;f=f.split(".")[1];j=g+"-"+f;if(!e){e=h;h=b.Widget}b.expr[":"][j]=function(k){return !!b.data(k,f)};b[g]=b[g]||{};b[g][f]=function(k,l){if(arguments.length){this._createWidget(k,l)}};var i=new h();i.options=b.extend(true,{},i.options);b[g][f].prototype=b.extend(true,i,{namespace:g,widgetName:f,widgetEventPrefix:b[g][f].prototype.widgetEventPrefix||f,widgetBaseClass:j},e);b.widget.bridge(f,b[g][f])};b.widget.bridge=function(f,e){b.fn[f]=function(i){var g=typeof i==="string",h=Array.prototype.slice.call(arguments,1),j=this;i=!g&&h.length?b.extend.apply(null,[true,i].concat(h)):i;if(g&&i.charAt(0)==="_"){return j}if(g){this.each(function(){var k=b.data(this,f),l=k&&b.isFunction(k[i])?k[i].apply(k,h):k;if(l!==k&&l!==d){j=l;return false}})}else{this.each(function(){var k=b.data(this,f);if(k){k.option(i||{})._init()}else{b.data(this,f,new e(i,this))}})}return j}};b.Widget=function(e,f){if(arguments.length){this._createWidget(e,f)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(f,g){b.data(g,this.widgetName,this);this.element=b(g);this.options=b.extend(true,{},this.options,this._getCreateOptions(),f);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(f,g){var e=f;if(arguments.length===0){return b.extend({},this.options)}if(typeof f==="string"){if(g===d){return this.options[f]}e={};e[f]=g}this._setOptions(e);return this},_setOptions:function(f){var e=this;b.each(f,function(g,h){e._setOption(g,h)});return this},_setOption:function(e,f){this.options[e]=f;if(e==="disabled"){this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",f)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(e,f,g){var j,i,h=this.options[e];g=g||{};f=b.Event(f);f.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase();f.target=this.element[0];i=f.originalEvent;if(i){for(j in i){if(!(j in f)){f[j]=i[j]}}}this.element.trigger(f,g);return !(b.isFunction(h)&&h.call(this.element[0],f,g)===false||f.isDefaultPrevented())}}})(jQuery);/*! + * jQuery UI Mouse 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Mouse + * + * Depends: + * jquery.ui.widget.js + */ +(function(b,c){var a=false;b(document).mouseup(function(d){a=false});b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var d=this;this.element.bind("mousedown."+this.widgetName,function(e){return d._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(true===b.data(e.target,d.widgetName+".preventClickEvent")){b.removeData(e.target,d.widgetName+".preventClickEvent");e.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(f){if(a){return}(this._mouseStarted&&this._mouseUp(f));this._mouseDownEvent=f;var e=this,g=(f.which==1),d=(typeof this.options.cancel=="string"&&f.target.nodeName?b(f.target).closest(this.options.cancel).length:false);if(!g||d||!this._mouseCapture(f)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(f)&&this._mouseDelayMet(f)){this._mouseStarted=(this._mouseStart(f)!==false);if(!this._mouseStarted){f.preventDefault();return true}}if(true===b.data(f.target,this.widgetName+".preventClickEvent")){b.removeData(f.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(h){return e._mouseMove(h)};this._mouseUpDelegate=function(h){return e._mouseUp(h)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);f.preventDefault();a=true;return true},_mouseMove:function(d){if(b.browser.msie&&!(document.documentMode>=9)&&!d.button){return this._mouseUp(d)}if(this._mouseStarted){this._mouseDrag(d);return d.preventDefault()}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,d)!==false);(this._mouseStarted?this._mouseDrag(d):this._mouseUp(d))}return !this._mouseStarted},_mouseUp:function(d){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(d.target==this._mouseDownEvent.target){b.data(d.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(d)}return false},_mouseDistanceMet:function(d){return(Math.max(Math.abs(this._mouseDownEvent.pageX-d.pageX),Math.abs(this._mouseDownEvent.pageY-d.pageY))>=this.options.distance)},_mouseDelayMet:function(d){return this.mouseDelayMet},_mouseStart:function(d){},_mouseDrag:function(d){},_mouseStop:function(d){},_mouseCapture:function(d){return true}})})(jQuery);(function(c,d){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var f=this,k=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(k.aspectRatio),aspectRatio:k.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:k.helper||k.ghost||k.animate?k.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){this.element.wrap(c('
').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=k.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var l=this.handles.split(",");this.handles={};for(var g=0;g
');if(/sw|se|ne|nw/.test(j)){h.css({zIndex:++k.zIndex})}if("se"==j){h.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[j]=".ui-resizable-"+j;this.element.append(h)}}this._renderAxis=function(q){q=q||this.element;for(var n in this.handles){if(this.handles[n].constructor==String){this.handles[n]=c(this.handles[n],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var o=c(this.handles[n],this.element),p=0;p=/sw|ne|nw|se|n|s/.test(n)?o.outerHeight():o.outerWidth();var m=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");q.css(m,p);this._proportionallyResize()}if(!c(this.handles[n]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!f.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}f.axis=i&&i[1]?i[1]:"se"}});if(k.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){if(k.disabled){return}c(this).removeClass("ui-resizable-autohide");f._handles.show()},function(){if(k.disabled){return}if(!f.resizing){c(this).addClass("ui-resizable-autohide");f._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var e=function(g){c(g).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){e(this.element);var f=this.element;f.after(this.originalElement.css({position:f.css("position"),width:f.outerWidth(),height:f.outerHeight(),top:f.css("top"),left:f.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);e(this.originalElement);return this},_mouseCapture:function(f){var g=false;for(var e in this.handles){if(c(this.handles[e])[0]==f.target){g=true}}return !this.options.disabled&&g},_mouseStart:function(g){var j=this.options,f=this.element.position(),e=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(e.is(".ui-draggable")||(/absolute/).test(e.css("position"))){e.css({position:"absolute",top:f.top,left:f.left})}this._renderProxy();var k=b(this.helper.css("left")),h=b(this.helper.css("top"));if(j.containment){k+=c(j.containment).scrollLeft()||0;h+=c(j.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:k,top:h};this.size=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalSize=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalPosition={left:k,top:h};this.sizeDiff={width:e.outerWidth()-e.width(),height:e.outerHeight()-e.height()};this.originalMousePosition={left:g.pageX,top:g.pageY};this.aspectRatio=(typeof j.aspectRatio=="number")?j.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var i=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",i=="auto"?this.axis+"-resize":i);e.addClass("ui-resizable-resizing");this._propagate("start",g);return true},_mouseDrag:function(e){var h=this.helper,g=this.options,m={},q=this,j=this.originalMousePosition,n=this.axis;var r=(e.pageX-j.left)||0,p=(e.pageY-j.top)||0;var i=this._change[n];if(!i){return false}var l=i.apply(this,[e,r,p]),k=c.browser.msie&&c.browser.version<7,f=this.sizeDiff;this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey){l=this._updateRatio(l,e)}l=this._respectSize(l,e);this._propagate("resize",e);h.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(l);this._trigger("resize",e,this.ui());return false},_mouseStop:function(h){this.resizing=false;var i=this.options,m=this;if(this._helper){var g=this._proportionallyResizeElements,e=g.length&&(/textarea/i).test(g[0].nodeName),f=e&&c.ui.hasScroll(g[0],"left")?0:m.sizeDiff.height,k=e?0:m.sizeDiff.width;var n={width:(m.helper.width()-k),height:(m.helper.height()-f)},j=(parseInt(m.element.css("left"),10)+(m.position.left-m.originalPosition.left))||null,l=(parseInt(m.element.css("top"),10)+(m.position.top-m.originalPosition.top))||null;if(!i.animate){this.element.css(c.extend(n,{top:l,left:j}))}m.helper.height(m.size.height);m.helper.width(m.size.width);if(this._helper&&!i.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",h);if(this._helper){this.helper.remove()}return false},_updateVirtualBoundaries:function(g){var j=this.options,i,h,f,k,e;e={minWidth:a(j.minWidth)?j.minWidth:0,maxWidth:a(j.maxWidth)?j.maxWidth:Infinity,minHeight:a(j.minHeight)?j.minHeight:0,maxHeight:a(j.maxHeight)?j.maxHeight:Infinity};if(this._aspectRatio||g){i=e.minHeight*this.aspectRatio;f=e.minWidth/this.aspectRatio;h=e.maxHeight*this.aspectRatio;k=e.maxWidth/this.aspectRatio;if(i>e.minWidth){e.minWidth=i}if(f>e.minHeight){e.minHeight=f}if(hl.width),s=a(l.height)&&i.minHeight&&(i.minHeight>l.height);if(h){l.width=i.minWidth}if(s){l.height=i.minHeight}if(t){l.width=i.maxWidth}if(m){l.height=i.maxHeight}var f=this.originalPosition.left+this.originalSize.width,p=this.position.top+this.size.height;var k=/sw|nw|w/.test(q),e=/nw|ne|n/.test(q);if(h&&k){l.left=f-i.minWidth}if(t&&k){l.left=f-i.maxWidth}if(s&&e){l.top=p-i.minHeight}if(m&&e){l.top=p-i.maxHeight}var n=!l.width&&!l.height;if(n&&!l.left&&l.top){l.top=null}else{if(n&&!l.top&&l.left){l.left=null}}return l},_proportionallyResize:function(){var k=this.options;if(!this._proportionallyResizeElements.length){return}var g=this.helper||this.element;for(var f=0;f');var e=c.browser.msie&&c.browser.version<7,g=(e?1:0),h=(e?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+h,height:this.element.outerHeight()+h,position:"absolute",left:this.elementOffset.left-g+"px",top:this.elementOffset.top-g+"px",zIndex:++i.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(g,f,e){return{width:this.originalSize.width+f}},w:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{left:i.left+f,width:g.width-f}},n:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{top:i.top+e,height:g.height-e}},s:function(g,f,e){return{height:this.originalSize.height+e}},se:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},sw:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[g,f,e]))},ne:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},nw:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[g,f,e]))}},_propagate:function(f,e){c.ui.plugin.call(this,f,[e,this.ui()]);(f!="resize"&&this._trigger(f,e,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});c.extend(c.ui.resizable,{version:"1.8.18"});c.ui.plugin.add("resizable","alsoResize",{start:function(f,g){var e=c(this).data("resizable"),i=e.options;var h=function(j){c(j).each(function(){var k=c(this);k.data("resizable-alsoresize",{width:parseInt(k.width(),10),height:parseInt(k.height(),10),left:parseInt(k.css("left"),10),top:parseInt(k.css("top"),10)})})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.parentNode){if(i.alsoResize.length){i.alsoResize=i.alsoResize[0];h(i.alsoResize)}else{c.each(i.alsoResize,function(j){h(j)})}}else{h(i.alsoResize)}},resize:function(g,i){var f=c(this).data("resizable"),j=f.options,h=f.originalSize,l=f.originalPosition;var k={height:(f.size.height-h.height)||0,width:(f.size.width-h.width)||0,top:(f.position.top-l.top)||0,left:(f.position.left-l.left)||0},e=function(m,n){c(m).each(function(){var q=c(this),r=c(this).data("resizable-alsoresize"),p={},o=n&&n.length?n:q.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];c.each(o,function(s,u){var t=(r[u]||0)+(k[u]||0);if(t&&t>=0){p[u]=t||null}});q.css(p)})};if(typeof(j.alsoResize)=="object"&&!j.alsoResize.nodeType){c.each(j.alsoResize,function(m,n){e(m,n)})}else{e(j.alsoResize)}},stop:function(e,f){c(this).removeData("resizable-alsoresize")}});c.ui.plugin.add("resizable","animate",{stop:function(i,n){var p=c(this).data("resizable"),j=p.options;var h=p._proportionallyResizeElements,e=h.length&&(/textarea/i).test(h[0].nodeName),f=e&&c.ui.hasScroll(h[0],"left")?0:p.sizeDiff.height,l=e?0:p.sizeDiff.width;var g={width:(p.size.width-l),height:(p.size.height-f)},k=(parseInt(p.element.css("left"),10)+(p.position.left-p.originalPosition.left))||null,m=(parseInt(p.element.css("top"),10)+(p.position.top-p.originalPosition.top))||null;p.element.animate(c.extend(g,m&&k?{top:m,left:k}:{}),{duration:j.animateDuration,easing:j.animateEasing,step:function(){var o={width:parseInt(p.element.css("width"),10),height:parseInt(p.element.css("height"),10),top:parseInt(p.element.css("top"),10),left:parseInt(p.element.css("left"),10)};if(h&&h.length){c(h[0]).css({width:o.width,height:o.height})}p._updateCache(o);p._propagate("resize",i)}})}});c.ui.plugin.add("resizable","containment",{start:function(f,r){var t=c(this).data("resizable"),j=t.options,l=t.element;var g=j.containment,k=(g instanceof c)?g.get(0):(/parent/.test(g))?l.parent().get(0):g;if(!k){return}t.containerElement=c(k);if(/document/.test(g)||g==document){t.containerOffset={left:0,top:0};t.containerPosition={left:0,top:0};t.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var n=c(k),i=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){i[p]=b(n.css("padding"+o))});t.containerOffset=n.offset();t.containerPosition=n.position();t.containerSize={height:(n.innerHeight()-i[3]),width:(n.innerWidth()-i[1])};var q=t.containerOffset,e=t.containerSize.height,m=t.containerSize.width,h=(c.ui.hasScroll(k,"left")?k.scrollWidth:m),s=(c.ui.hasScroll(k)?k.scrollHeight:e);t.parentData={element:k,left:q.left,top:q.top,width:h,height:s}}},resize:function(g,q){var t=c(this).data("resizable"),i=t.options,f=t.containerSize,p=t.containerOffset,m=t.size,n=t.position,r=t._aspectRatio||g.shiftKey,e={top:0,left:0},h=t.containerElement;if(h[0]!=document&&(/static/).test(h.css("position"))){e=p}if(n.left<(t._helper?p.left:0)){t.size.width=t.size.width+(t._helper?(t.position.left-p.left):(t.position.left-e.left));if(r){t.size.height=t.size.width/i.aspectRatio}t.position.left=i.helper?p.left:0}if(n.top<(t._helper?p.top:0)){t.size.height=t.size.height+(t._helper?(t.position.top-p.top):t.position.top);if(r){t.size.width=t.size.height*i.aspectRatio}t.position.top=t._helper?p.top:0}t.offset.left=t.parentData.left+t.position.left;t.offset.top=t.parentData.top+t.position.top;var l=Math.abs((t._helper?t.offset.left-e.left:(t.offset.left-e.left))+t.sizeDiff.width),s=Math.abs((t._helper?t.offset.top-e.top:(t.offset.top-p.top))+t.sizeDiff.height);var k=t.containerElement.get(0)==t.element.parent().get(0),j=/relative|absolute/.test(t.containerElement.css("position"));if(k&&j){l-=t.parentData.left}if(l+t.size.width>=t.parentData.width){t.size.width=t.parentData.width-l;if(r){t.size.height=t.size.width/t.aspectRatio}}if(s+t.size.height>=t.parentData.height){t.size.height=t.parentData.height-s;if(r){t.size.width=t.size.height*t.aspectRatio}}},stop:function(f,n){var q=c(this).data("resizable"),g=q.options,l=q.position,m=q.containerOffset,e=q.containerPosition,i=q.containerElement;var j=c(q.helper),r=j.offset(),p=j.outerWidth()-q.sizeDiff.width,k=j.outerHeight()-q.sizeDiff.height;if(q._helper&&!g.animate&&(/relative/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}if(q._helper&&!g.animate&&(/static/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}}});c.ui.plugin.add("resizable","ghost",{start:function(g,h){var e=c(this).data("resizable"),i=e.options,f=e.size;e.ghost=e.originalElement.clone();e.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:"");e.ghost.appendTo(e.helper)},resize:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost){e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})}},stop:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost&&e.helper){e.helper.get(0).removeChild(e.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(e,m){var p=c(this).data("resizable"),h=p.options,k=p.size,i=p.originalSize,j=p.originalPosition,n=p.axis,l=h._aspectRatio||e.shiftKey;h.grid=typeof h.grid=="number"?[h.grid,h.grid]:h.grid;var g=Math.round((k.width-i.width)/(h.grid[0]||1))*(h.grid[0]||1),f=Math.round((k.height-i.height)/(h.grid[1]||1))*(h.grid[1]||1);if(/^(se|s|e)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f}else{if(/^(ne)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f}else{if(/^(sw)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.left=j.left-g}else{p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f;p.position.left=j.left-g}}}}});var b=function(e){return parseInt(e,10)||0};var a=function(e){return !isNaN(parseInt(e,10))}})(jQuery);/*! + * jQuery hashchange event - v1.3 - 7/21/2010 + * http://benalman.com/projects/jquery-hashchange-plugin/ + * + * Copyright (c) 2010 "Cowboy" Ben Alman + * Dual licensed under the MIT and GPL licenses. + * http://benalman.com/about/license/ + */ +(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$(' + + + + +
+ +
+
loaders.c File Reference
+
+
+
#include "loaders.h"
+#include <math.h>
+
+

Go to the source code of this file.

+
+ + + + + + + + + + + + + + + + + +

+Functions

uint8_t _cbor_load_uint8 (cbor_data source)
 
uint16_t _cbor_load_uint16 (const unsigned char *source)
 
uint32_t _cbor_load_uint32 (const unsigned char *source)
 
uint64_t _cbor_load_uint64 (const unsigned char *source)
 
float _cbor_decode_half (unsigned char *halfp)
 
double _cbor_load_half (cbor_data source)
 
float _cbor_load_float (cbor_data source)
 
double _cbor_load_double (cbor_data source)
 
+

Function Documentation

+ +

§ _cbor_decode_half()

+ +
+
+ + + + + + + + +
float _cbor_decode_half (unsigned char * halfp)
+
+ +

Definition at line 71 of file loaders.c.

+ +
+
+ +

§ _cbor_load_double()

+ +
+
+ + + + + + + + +
double _cbor_load_double (cbor_data source)
+
+ +

Definition at line 95 of file loaders.c.

+ +
+
+ +

§ _cbor_load_float()

+ +
+
+ + + + + + + + +
float _cbor_load_float (cbor_data source)
+
+ +

Definition at line 89 of file loaders.c.

+ +
+
+ +

§ _cbor_load_half()

+ +
+
+ + + + + + + + +
double _cbor_load_half (cbor_data source)
+
+ +

Definition at line 83 of file loaders.c.

+ +
+
+ +

§ _cbor_load_uint16()

+ +
+
+ + + + + + + + +
uint16_t _cbor_load_uint16 (const unsigned char * source)
+
+ +

Definition at line 20 of file loaders.c.

+ +
+
+ +

§ _cbor_load_uint32()

+ +
+
+ + + + + + + + +
uint32_t _cbor_load_uint32 (const unsigned char * source)
+
+ +

Definition at line 34 of file loaders.c.

+ +
+
+ +

§ _cbor_load_uint64()

+ +
+
+ + + + + + + + +
uint64_t _cbor_load_uint64 (const unsigned char * source)
+
+ +

Definition at line 50 of file loaders.c.

+ +
+
+ +

§ _cbor_load_uint8()

+ +
+
+ + + + + + + + +
uint8_t _cbor_load_uint8 (cbor_data source)
+
+ +

Definition at line 15 of file loaders.c.

+ +
+
+ + + + + diff --git a/docs/doxygen/loaders_8c_source.html b/docs/doxygen/loaders_8c_source.html new file mode 100644 index 00000000..79422d59 --- /dev/null +++ b/docs/doxygen/loaders_8c_source.html @@ -0,0 +1,96 @@ + + + + + + + +libcbor: src/cbor/internal/loaders.c Source File + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
loaders.c
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 #include "loaders.h"
9 #include <math.h>
10 
11 #ifdef HAVE_ENDIAN_H
12 #include <endian.h>
13 #endif
14 
15 uint8_t _cbor_load_uint8(cbor_data source)
16 {
17  return (uint8_t) *source;
18 }
19 
20 uint16_t _cbor_load_uint16(const unsigned char *source)
21 {
22 #ifdef HAVE_ENDIAN_H
23  return be16toh(*(uint16_t *) source);
24 #else
25  #ifdef IS_BIG_ENDIAN
26  return *(uint16_t *) source;
27  #else
28  return ((uint16_t) *(source + 0) << 8) +
29  (uint8_t) *(source + 1);
30  #endif
31 #endif
32 }
33 
34 uint32_t _cbor_load_uint32(const unsigned char *source)
35 {
36 #ifdef HAVE_ENDIAN_H
37  return be32toh(*(uint32_t *) source);
38 #else
39  #ifdef IS_BIG_ENDIAN
40  return *(uint32_t *) source;
41  #else
42  return ((uint32_t) *(source + 0) << 0x18) +
43  ((uint32_t) *(source + 1) << 0x10) +
44  ((uint16_t) *(source + 2) << 0x08) +
45  (uint8_t) *(source + 3);
46  #endif
47 #endif
48 }
49 
50 uint64_t _cbor_load_uint64(const unsigned char *source)
51 {
52 #ifdef HAVE_ENDIAN_H
53  return be64toh(*(uint64_t *) source);
54 #else
55  #ifdef IS_BIG_ENDIAN
56  return *(uint64_t *) source;
57  #else
58  return ((uint64_t) *(source + 0) << 0x38) +
59  ((uint64_t) *(source + 1) << 0x30) +
60  ((uint64_t) *(source + 2) << 0x28) +
61  ((uint64_t) *(source + 3) << 0x20) +
62  ((uint32_t) *(source + 4) << 0x18) +
63  ((uint32_t) *(source + 5) << 0x10) +
64  ((uint16_t) *(source + 6) << 0x08) +
65  (uint8_t) *(source + 7);
66  #endif
67 #endif
68 }
69 
70 /* As per http://tools.ietf.org/html/rfc7049#appendix-D */
71 float _cbor_decode_half(unsigned char *halfp)
72 {
73  int half = (halfp[0] << 8) + halfp[1];
74  int exp = (half >> 10) & 0x1f;
75  int mant = half & 0x3ff;
76  double val;
77  if (exp == 0) val = ldexp(mant, -24);
78  else if (exp != 31) val = ldexp(mant + 1024, exp - 25);
79  else val = mant == 0 ? INFINITY : NAN;
80  return (float) (half & 0x8000 ? -val : val);
81 }
82 
83 double _cbor_load_half(cbor_data source)
84 {
85  /* Discard const */
86  return _cbor_decode_half((unsigned char *) source);
87 }
88 
90 {
91  union _cbor_float_helper helper = {.as_uint = _cbor_load_uint32(source)};
92  return helper.as_float;
93 }
94 
96 {
97  union _cbor_double_helper helper = {.as_uint = _cbor_load_uint64(source)};
98  return helper.as_double;
99 }
double _cbor_load_double(cbor_data source)
Definition: loaders.c:95
+
float as_float
Definition: data.h:127
+
float _cbor_load_float(cbor_data source)
Definition: loaders.c:89
+
uint32_t as_uint
Definition: data.h:128
+
double _cbor_load_half(cbor_data source)
Definition: loaders.c:83
+
uint16_t _cbor_load_uint16(const unsigned char *source)
Definition: loaders.c:20
+
uint8_t _cbor_load_uint8(cbor_data source)
Definition: loaders.c:15
+
float _cbor_decode_half(unsigned char *halfp)
Definition: loaders.c:71
+
uint32_t _cbor_load_uint32(const unsigned char *source)
Definition: loaders.c:34
+
uint64_t as_uint
Definition: data.h:134
+
const unsigned char * cbor_data
Definition: data.h:20
+ +
double as_double
Definition: data.h:133
+
Raw memory casts helper.
Definition: data.h:126
+
Raw memory casts helper.
Definition: data.h:132
+
uint64_t _cbor_load_uint64(const unsigned char *source)
Definition: loaders.c:50
+
+ + + + diff --git a/docs/doxygen/loaders_8h.html b/docs/doxygen/loaders_8h.html new file mode 100644 index 00000000..2f8bf654 --- /dev/null +++ b/docs/doxygen/loaders_8h.html @@ -0,0 +1,244 @@ + + + + + + + +libcbor: src/cbor/internal/loaders.h File Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
loaders.h File Reference
+
+
+
#include "cbor/common.h"
+
+

Go to the source code of this file.

+ + + + + + + + + + + + + + + + +

+Functions

uint8_t _cbor_load_uint8 (const unsigned char *source)
 
uint16_t _cbor_load_uint16 (const unsigned char *source)
 
uint32_t _cbor_load_uint32 (const unsigned char *source)
 
uint64_t _cbor_load_uint64 (const unsigned char *source)
 
double _cbor_load_half (cbor_data source)
 
float _cbor_load_float (cbor_data source)
 
double _cbor_load_double (cbor_data source)
 
+

Function Documentation

+ +

§ _cbor_load_double()

+ +
+
+ + + + + + + + +
double _cbor_load_double (cbor_data source)
+
+ +

Definition at line 95 of file loaders.c.

+ +
+
+ +

§ _cbor_load_float()

+ +
+
+ + + + + + + + +
float _cbor_load_float (cbor_data source)
+
+ +

Definition at line 89 of file loaders.c.

+ +
+
+ +

§ _cbor_load_half()

+ +
+
+ + + + + + + + +
double _cbor_load_half (cbor_data source)
+
+ +

Definition at line 83 of file loaders.c.

+ +
+
+ +

§ _cbor_load_uint16()

+ +
+
+ + + + + + + + +
uint16_t _cbor_load_uint16 (const unsigned char * source)
+
+ +

Definition at line 20 of file loaders.c.

+ +
+
+ +

§ _cbor_load_uint32()

+ +
+
+ + + + + + + + +
uint32_t _cbor_load_uint32 (const unsigned char * source)
+
+ +

Definition at line 34 of file loaders.c.

+ +
+
+ +

§ _cbor_load_uint64()

+ +
+
+ + + + + + + + +
uint64_t _cbor_load_uint64 (const unsigned char * source)
+
+ +

Definition at line 50 of file loaders.c.

+ +
+
+ +

§ _cbor_load_uint8()

+ +
+
+ + + + + + + + +
uint8_t _cbor_load_uint8 (const unsigned char * source)
+
+ +

Definition at line 15 of file loaders.c.

+ +
+
+
+ + + + diff --git a/docs/doxygen/loaders_8h_source.html b/docs/doxygen/loaders_8h_source.html new file mode 100644 index 00000000..2e87e707 --- /dev/null +++ b/docs/doxygen/loaders_8h_source.html @@ -0,0 +1,89 @@ + + + + + + + +libcbor: src/cbor/internal/loaders.h Source File + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
loaders.h
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 #ifndef LIBCBOR_LOADERS_H
9 #define LIBCBOR_LOADERS_H
10 
11 #include "cbor/common.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 /* Read the given uint from the given location, no questions asked */
18 uint8_t _cbor_load_uint8(const unsigned char *source);
19 
20 uint16_t _cbor_load_uint16(const unsigned char *source);
21 
22 uint32_t _cbor_load_uint32(const unsigned char *source);
23 
24 uint64_t _cbor_load_uint64(const unsigned char *source);
25 
26 double _cbor_load_half(cbor_data source);
27 
28 float _cbor_load_float(cbor_data source);
29 
30 double _cbor_load_double(cbor_data source);
31 
32 #ifdef __cplusplus
33 }
34 #endif
35 
36 #endif //LIBCBOR_LOADERS_H
uint16_t _cbor_load_uint16(const unsigned char *source)
Definition: loaders.c:20
+
uint32_t _cbor_load_uint32(const unsigned char *source)
Definition: loaders.c:34
+
double _cbor_load_double(cbor_data source)
Definition: loaders.c:95
+
float _cbor_load_float(cbor_data source)
Definition: loaders.c:89
+
double _cbor_load_half(cbor_data source)
Definition: loaders.c:83
+
uint8_t _cbor_load_uint8(const unsigned char *source)
Definition: loaders.c:15
+
const unsigned char * cbor_data
Definition: data.h:20
+ +
uint64_t _cbor_load_uint64(const unsigned char *source)
Definition: loaders.c:50
+
+ + + + diff --git a/docs/doxygen/maps_8c.html b/docs/doxygen/maps_8c.html new file mode 100644 index 00000000..21357e45 --- /dev/null +++ b/docs/doxygen/maps_8c.html @@ -0,0 +1,446 @@ + + + + + + + +libcbor: src/cbor/maps.c File Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
maps.c File Reference
+
+
+
#include "maps.h"
+#include "internal/memory_utils.h"
+
+

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

size_t cbor_map_size (const cbor_item_t *item)
 Get the number of pairs. More...
 
size_t cbor_map_allocated (const cbor_item_t *item)
 Get the size of the allocated storage. More...
 
cbor_item_tcbor_new_definite_map (size_t size)
 Create a new definite map. More...
 
cbor_item_tcbor_new_indefinite_map ()
 Create a new indefinite map. More...
 
bool _cbor_map_add_key (cbor_item_t *item, cbor_item_t *key)
 Add a key to the map. More...
 
bool _cbor_map_add_value (cbor_item_t *item, cbor_item_t *value)
 Add a value to the map. More...
 
bool cbor_map_add (cbor_item_t *item, struct cbor_pair pair)
 Add a pair to the map. More...
 
bool cbor_map_is_definite (const cbor_item_t *item)
 Is this map definite? More...
 
bool cbor_map_is_indefinite (const cbor_item_t *item)
 Is this map indefinite? More...
 
struct cbor_paircbor_map_handle (const cbor_item_t *item)
 Get the pairs storage. More...
 
+

Function Documentation

+ +

§ _cbor_map_add_key()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool _cbor_map_add_key (cbor_item_titem,
cbor_item_tkey 
)
+
+ +

Add a key to the map.

+

Sets the value to NULL. Internal API.

+
Parameters
+ + + +
item[borrow]A map
key[incref]The key
+
+
+
Returns
true on success, false if either reallocation failed or the preallcoated storage is full
+ +

Definition at line 66 of file maps.c.

+ +
+
+ +

§ _cbor_map_add_value()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool _cbor_map_add_value (cbor_item_titem,
cbor_item_tvalue 
)
+
+ +

Add a value to the map.

+

Assumes that _cbor_map_add_key has been called. Internal API.

+
Parameters
+ + + +
item[borrow]A map
key[incref]The value
+
+
+
Returns
true on success, false if either reallocation failed or the preallcoated storage is full
+ +

Definition at line 106 of file maps.c.

+ +
+
+ +

§ cbor_map_add()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool cbor_map_add (cbor_item_titem,
struct cbor_pair pair 
)
+
+ +

Add a pair to the map.

+

For definite maps, items can only be added to the preallocated space. For indefinite maps, the storage will be expanded as needed

+
Parameters
+ + + +
item[borrow]A map
pair[incref]The key-value pair to add (incref is member-wise)
+
+
+
Returns
true on success, false if either reallocation failed or the preallcoated storage is full
+ +

Definition at line 118 of file maps.c.

+ +
+
+ +

§ cbor_map_allocated()

+ +
+
+ + + + + + + + +
size_t cbor_map_allocated (const cbor_item_titem)
+
+ +

Get the size of the allocated storage.

+
Parameters
+ + +
item[borrow]A map
+
+
+
Returns
Allocated storage size (as the number of cbor_pair items)
+ +

Definition at line 17 of file maps.c.

+ +
+
+ +

§ cbor_map_handle()

+ +
+
+ + + + + + + + +
struct cbor_pair* cbor_map_handle (const cbor_item_titem)
+
+ +

Get the pairs storage.

+
Parameters
+ + +
item[borrow]A map
+
+
+
Returns
Array of cbor_map_size pairs. Manipulation is possible as long as references remain valid.
+ +

Definition at line 137 of file maps.c.

+ +
+
+ +

§ cbor_map_is_definite()

+ +
+
+ + + + + + + + +
bool cbor_map_is_definite (const cbor_item_titem)
+
+ +

Is this map definite?

+
Parameters
+ + +
item[borrow]A map
+
+
+
Returns
Is this map definite?
+ +

Definition at line 126 of file maps.c.

+ +
+
+ +

§ cbor_map_is_indefinite()

+ +
+
+ + + + + + + + +
bool cbor_map_is_indefinite (const cbor_item_titem)
+
+ +

Is this map indefinite?

+
Parameters
+ + +
item[borrow]A map
+
+
+
Returns
Is this map indefinite?
+ +

Definition at line 132 of file maps.c.

+ +
+
+ +

§ cbor_map_size()

+ +
+
+ + + + + + + + +
size_t cbor_map_size (const cbor_item_titem)
+
+ +

Get the number of pairs.

+
Parameters
+ + +
item[borrow]A map
+
+
+
Returns
The number of pairs
+ +

Definition at line 11 of file maps.c.

+ +
+
+ +

§ cbor_new_definite_map()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_new_definite_map (size_t size)
+
+ +

Create a new definite map.

+
Parameters
+ + +
sizeThe number of slots to preallocate
+
+
+
Returns
new definite map. NULL on malloc failure.
+ +

Definition at line 23 of file maps.c.

+ +
+
+ +

§ cbor_new_indefinite_map()

+ +
+
+ + + + + + + +
cbor_item_t* cbor_new_indefinite_map ()
+
+ +

Create a new indefinite map.

+
Parameters
+ + +
sizeThe number of slots to preallocate
+
+
+
Returns
new definite map. NULL on malloc failure.
+ +

Definition at line 46 of file maps.c.

+ +
+
+
+ + + + diff --git a/docs/doxygen/maps_8c_source.html b/docs/doxygen/maps_8c_source.html new file mode 100644 index 00000000..ad442bf5 --- /dev/null +++ b/docs/doxygen/maps_8c_source.html @@ -0,0 +1,115 @@ + + + + + + + +libcbor: src/cbor/maps.c Source File + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
maps.c
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 #include "maps.h"
10 
11 size_t cbor_map_size(const cbor_item_t *item)
12 {
13  assert(cbor_isa_map(item));
14  return item->metadata.map_metadata.end_ptr;
15 }
16 
17 size_t cbor_map_allocated(const cbor_item_t *item)
18 {
19  assert(cbor_isa_map(item));
20  return item->metadata.map_metadata.allocated;
21 }
22 
24 {
25  cbor_item_t *item = _CBOR_MALLOC(sizeof(cbor_item_t));
26  if (item == NULL) {
27  return NULL;
28  }
29  *item = (cbor_item_t) {
30  .refcount = 1,
31  .type = CBOR_TYPE_MAP,
32  .metadata = {.map_metadata = {
33  .allocated = size,
35  .end_ptr = 0
36  }},
37  .data = _cbor_alloc_multiple(sizeof(struct cbor_pair), size)
38  };
39  if (item->data == NULL) {
40  _CBOR_FREE(item);
41  return NULL;
42  }
43  return item;
44 }
45 
47 {
48  cbor_item_t *item = _CBOR_MALLOC(sizeof(cbor_item_t));
49  if (item == NULL)
50  return NULL;
51  *item = (cbor_item_t) {
52  .refcount = 1,
53  .type = CBOR_TYPE_MAP,
54  .metadata = {.map_metadata = {
55  .allocated = 0,
57  .end_ptr = 0
58  }},
59  .data = NULL
60  };
61 
62  return item;
63 }
64 
65 
67 {
68  assert(cbor_isa_map(item));
69  struct _cbor_map_metadata *metadata = (struct _cbor_map_metadata *) &item->metadata;
70  if (cbor_map_is_definite(item)) {
71  struct cbor_pair *data = cbor_map_handle(item);
72  if (metadata->end_ptr >= metadata->allocated) {
73  /* Don't realloc definite preallocated map */
74  return false;
75  }
76 
77  data[metadata->end_ptr].key = key;
78  data[metadata->end_ptr++].value = NULL;
79  } else {
80  if (metadata->end_ptr >= metadata->allocated) {
81  /* Exponential realloc */
82  // Check for overflows first
83  if (!_cbor_safe_to_multiply(CBOR_BUFFER_GROWTH, metadata->allocated)) {
84  return false;
85  }
86 
87  size_t new_allocation = metadata->allocated == 0 ? 1 : CBOR_BUFFER_GROWTH * metadata->allocated;
88 
89  unsigned char * new_data = _cbor_realloc_multiple(item->data, sizeof(struct cbor_pair), new_allocation);
90 
91  if (new_data == NULL) {
92  return false;
93  }
94 
95  item->data = new_data;
96  metadata->allocated = new_allocation;
97  }
98  struct cbor_pair *data = cbor_map_handle(item);
99  data[metadata->end_ptr].key = key;
100  data[metadata->end_ptr++].value = NULL;
101  }
102  cbor_incref(key);
103  return true;
104 }
105 
107 {
108  assert(cbor_isa_map(item));
109  cbor_incref(value);
110  cbor_map_handle(item)[
111  /* Move one back since we are assuming _add_key (which increased the ptr)
112  * was the previous operation on this object */
113  item->metadata.map_metadata.end_ptr - 1
114  ].value = value;
115  return true;
116 }
117 
118 bool cbor_map_add(cbor_item_t *item, struct cbor_pair pair)
119 {
120  assert(cbor_isa_map(item));
121  if (!_cbor_map_add_key(item, pair.key))
122  return false;
123  return _cbor_map_add_value(item, pair.value);
124 }
125 
127 {
128  assert(cbor_isa_map(item));
130 }
131 
133 {
134  return !cbor_map_is_definite(item);
135 }
136 
138 {
139  assert(cbor_isa_map(item));
140  return (struct cbor_pair *) item->data;
141 }
struct cbor_item_t cbor_item_t
The item handle.
+
size_t cbor_map_allocated(const cbor_item_t *item)
Get the size of the allocated storage.
Definition: maps.c:17
+
union cbor_item_metadata metadata
Discriminated by type.
Definition: data.h:151
+
struct _cbor_map_metadata map_metadata
Definition: data.h:143
+
void * _cbor_realloc_multiple(void *pointer, size_t item_size, size_t item_count)
Overflow-proof contiguous array reallocation.
Definition: memory_utils.c:39
+
cbor_item_t * value
Definition: data.h:180
+ +
size_t cbor_map_size(const cbor_item_t *item)
Get the number of pairs.
Definition: maps.c:11
+
cbor_item_t * key
Definition: data.h:180
+
bool _cbor_map_add_key(cbor_item_t *item, cbor_item_t *key)
Add a key to the map.
Definition: maps.c:66
+
void * _cbor_alloc_multiple(size_t item_size, size_t item_count)
Overflow-proof contiguous array allocation.
Definition: memory_utils.c:30
+
size_t end_ptr
Definition: data.h:104
+
#define _CBOR_FREE
Definition: common.h:86
+
#define _CBOR_MALLOC
Definition: common.h:84
+
bool cbor_map_is_indefinite(const cbor_item_t *item)
Is this map indefinite?
Definition: maps.c:132
+
Simple pair of items for use in maps.
Definition: data.h:179
+ +
size_t refcount
Reference count - initialize to 0.
Definition: data.h:153
+
Maps specific metadata.
Definition: data.h:102
+
cbor_item_t * cbor_incref(cbor_item_t *item)
Increases the reference count by one.
Definition: common.c:93
+
_cbor_dst_metadata type
Definition: data.h:105
+
bool cbor_isa_map(const cbor_item_t *item)
Does the item have the appropriate major type?
Definition: common.c:43
+
bool cbor_map_is_definite(const cbor_item_t *item)
Is this map definite?
Definition: maps.c:126
+ +
bool _cbor_map_add_value(cbor_item_t *item, cbor_item_t *value)
Add a value to the map.
Definition: maps.c:106
+ +
unsigned char * data
Raw data block - interpretation depends on metadata.
Definition: data.h:157
+
size_t allocated
Definition: data.h:103
+
cbor_item_t * cbor_new_indefinite_map()
Create a new indefinite map.
Definition: maps.c:46
+
bool cbor_map_add(cbor_item_t *item, struct cbor_pair pair)
Add a pair to the map.
Definition: maps.c:118
+
bool _cbor_safe_to_multiply(size_t a, size_t b)
Can a and b be multiplied without overflowing size_t?
Definition: memory_utils.c:25
+
The item handle.
Definition: data.h:149
+
struct cbor_pair * cbor_map_handle(const cbor_item_t *item)
Get the pairs storage.
Definition: maps.c:137
+
cbor_item_t * cbor_new_definite_map(size_t size)
Create a new definite map.
Definition: maps.c:23
+
5 - maps
Definition: data.h:30
+
+ + + + diff --git a/docs/doxygen/maps_8h.html b/docs/doxygen/maps_8h.html new file mode 100644 index 00000000..d10870bd --- /dev/null +++ b/docs/doxygen/maps_8h.html @@ -0,0 +1,445 @@ + + + + + + + +libcbor: src/cbor/maps.h File Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
maps.h File Reference
+
+
+
#include "cbor/common.h"
+
+

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

size_t cbor_map_size (const cbor_item_t *item)
 Get the number of pairs. More...
 
size_t cbor_map_allocated (const cbor_item_t *item)
 Get the size of the allocated storage. More...
 
cbor_item_tcbor_new_definite_map (size_t size)
 Create a new definite map. More...
 
cbor_item_tcbor_new_indefinite_map ()
 Create a new indefinite map. More...
 
bool cbor_map_add (cbor_item_t *item, struct cbor_pair pair)
 Add a pair to the map. More...
 
bool _cbor_map_add_key (cbor_item_t *item, cbor_item_t *key)
 Add a key to the map. More...
 
bool _cbor_map_add_value (cbor_item_t *item, cbor_item_t *value)
 Add a value to the map. More...
 
bool cbor_map_is_definite (const cbor_item_t *item)
 Is this map definite? More...
 
bool cbor_map_is_indefinite (const cbor_item_t *item)
 Is this map indefinite? More...
 
struct cbor_paircbor_map_handle (const cbor_item_t *item)
 Get the pairs storage. More...
 
+

Function Documentation

+ +

§ _cbor_map_add_key()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool _cbor_map_add_key (cbor_item_titem,
cbor_item_tkey 
)
+
+ +

Add a key to the map.

+

Sets the value to NULL. Internal API.

+
Parameters
+ + + +
item[borrow]A map
key[incref]The key
+
+
+
Returns
true on success, false if either reallocation failed or the preallcoated storage is full
+ +

Definition at line 66 of file maps.c.

+ +
+
+ +

§ _cbor_map_add_value()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool _cbor_map_add_value (cbor_item_titem,
cbor_item_tvalue 
)
+
+ +

Add a value to the map.

+

Assumes that _cbor_map_add_key has been called. Internal API.

+
Parameters
+ + + +
item[borrow]A map
key[incref]The value
+
+
+
Returns
true on success, false if either reallocation failed or the preallcoated storage is full
+ +

Definition at line 106 of file maps.c.

+ +
+
+ +

§ cbor_map_add()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool cbor_map_add (cbor_item_titem,
struct cbor_pair pair 
)
+
+ +

Add a pair to the map.

+

For definite maps, items can only be added to the preallocated space. For indefinite maps, the storage will be expanded as needed

+
Parameters
+ + + +
item[borrow]A map
pair[incref]The key-value pair to add (incref is member-wise)
+
+
+
Returns
true on success, false if either reallocation failed or the preallcoated storage is full
+ +

Definition at line 118 of file maps.c.

+ +
+
+ +

§ cbor_map_allocated()

+ +
+
+ + + + + + + + +
size_t cbor_map_allocated (const cbor_item_titem)
+
+ +

Get the size of the allocated storage.

+
Parameters
+ + +
item[borrow]A map
+
+
+
Returns
Allocated storage size (as the number of cbor_pair items)
+ +

Definition at line 17 of file maps.c.

+ +
+
+ +

§ cbor_map_handle()

+ +
+
+ + + + + + + + +
struct cbor_pair* cbor_map_handle (const cbor_item_titem)
+
+ +

Get the pairs storage.

+
Parameters
+ + +
item[borrow]A map
+
+
+
Returns
Array of cbor_map_size pairs. Manipulation is possible as long as references remain valid.
+ +

Definition at line 137 of file maps.c.

+ +
+
+ +

§ cbor_map_is_definite()

+ +
+
+ + + + + + + + +
bool cbor_map_is_definite (const cbor_item_titem)
+
+ +

Is this map definite?

+
Parameters
+ + +
item[borrow]A map
+
+
+
Returns
Is this map definite?
+ +

Definition at line 126 of file maps.c.

+ +
+
+ +

§ cbor_map_is_indefinite()

+ +
+
+ + + + + + + + +
bool cbor_map_is_indefinite (const cbor_item_titem)
+
+ +

Is this map indefinite?

+
Parameters
+ + +
item[borrow]A map
+
+
+
Returns
Is this map indefinite?
+ +

Definition at line 132 of file maps.c.

+ +
+
+ +

§ cbor_map_size()

+ +
+
+ + + + + + + + +
size_t cbor_map_size (const cbor_item_titem)
+
+ +

Get the number of pairs.

+
Parameters
+ + +
item[borrow]A map
+
+
+
Returns
The number of pairs
+ +

Definition at line 11 of file maps.c.

+ +
+
+ +

§ cbor_new_definite_map()

+ +
+
+ + + + + + + + +
cbor_item_t* cbor_new_definite_map (size_t size)
+
+ +

Create a new definite map.

+
Parameters
+ + +
sizeThe number of slots to preallocate
+
+
+
Returns
new definite map. NULL on malloc failure.
+ +

Definition at line 23 of file maps.c.

+ +
+
+ +

§ cbor_new_indefinite_map()

+ +
+
+ + + + + + + +
cbor_item_t* cbor_new_indefinite_map ()
+
+ +

Create a new indefinite map.

+
Parameters
+ + +
sizeThe number of slots to preallocate
+
+
+
Returns
new definite map. NULL on malloc failure.
+ +

Definition at line 46 of file maps.c.

+ +
+
+
+ + + + diff --git a/docs/doxygen/maps_8h_source.html b/docs/doxygen/maps_8h_source.html new file mode 100644 index 00000000..2cb36789 --- /dev/null +++ b/docs/doxygen/maps_8h_source.html @@ -0,0 +1,95 @@ + + + + + + + +libcbor: src/cbor/maps.h Source File + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
maps.h
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 #ifndef LIBCBOR_MAPS_H
9 #define LIBCBOR_MAPS_H
10 
11 #include "cbor/common.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 /*
18 * ============================================================================
19 * Map manipulation
20 * ============================================================================
21 */
22 
28 size_t cbor_map_size(const cbor_item_t *item);
29 
35 size_t cbor_map_allocated(const cbor_item_t *item);
36 
43 
50 
60 bool cbor_map_add(cbor_item_t *item, struct cbor_pair pair);
61 
71 
81 
87 bool cbor_map_is_definite(const cbor_item_t *item);
88 
94 bool cbor_map_is_indefinite(const cbor_item_t *item);
95 
101 struct cbor_pair *cbor_map_handle(const cbor_item_t *item);
102 
103 #ifdef __cplusplus
104 }
105 #endif
106 
107 #endif //LIBCBOR_MAPS_H
size_t cbor_map_size(const cbor_item_t *item)
Get the number of pairs.
Definition: maps.c:11
+
bool cbor_map_add(cbor_item_t *item, struct cbor_pair pair)
Add a pair to the map.
Definition: maps.c:118
+
bool _cbor_map_add_key(cbor_item_t *item, cbor_item_t *key)
Add a key to the map.
Definition: maps.c:66
+
cbor_item_t * value
Definition: data.h:180
+
bool cbor_map_is_definite(const cbor_item_t *item)
Is this map definite?
Definition: maps.c:126
+
size_t cbor_map_allocated(const cbor_item_t *item)
Get the size of the allocated storage.
Definition: maps.c:17
+
cbor_item_t * cbor_new_definite_map(size_t size)
Create a new definite map.
Definition: maps.c:23
+
cbor_item_t * key
Definition: data.h:180
+
Simple pair of items for use in maps.
Definition: data.h:179
+
struct cbor_pair * cbor_map_handle(const cbor_item_t *item)
Get the pairs storage.
Definition: maps.c:137
+
bool _cbor_map_add_value(cbor_item_t *item, cbor_item_t *value)
Add a value to the map.
Definition: maps.c:106
+
cbor_item_t * cbor_new_indefinite_map()
Create a new indefinite map.
Definition: maps.c:46
+
bool cbor_map_is_indefinite(const cbor_item_t *item)
Is this map indefinite?
Definition: maps.c:132
+ +
The item handle.
Definition: data.h:149
+
+ + + + diff --git a/docs/doxygen/memory__utils_8c.html b/docs/doxygen/memory__utils_8c.html new file mode 100644 index 00000000..d68d619b --- /dev/null +++ b/docs/doxygen/memory__utils_8c.html @@ -0,0 +1,245 @@ + + + + + + + +libcbor: src/cbor/internal/memory_utils.c File Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
memory_utils.c File Reference
+
+
+
#include "memory_utils.h"
+#include "cbor/common.h"
+
+

Go to the source code of this file.

+ + + + + + + + + + + + + + +

+Functions

size_t _cbor_highest_bit (size_t number)
 Highest on bit position. More...
 
bool _cbor_safe_to_multiply (size_t a, size_t b)
 Can a and b be multiplied without overflowing size_t? More...
 
void * _cbor_alloc_multiple (size_t item_size, size_t item_count)
 Overflow-proof contiguous array allocation. More...
 
void * _cbor_realloc_multiple (void *pointer, size_t item_size, size_t item_count)
 Overflow-proof contiguous array reallocation. More...
 
+

Function Documentation

+ +

§ _cbor_alloc_multiple()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void* _cbor_alloc_multiple (size_t item_size,
size_t item_count 
)
+
+ +

Overflow-proof contiguous array allocation.

+
Parameters
+ + + +
item_size
item_count
+
+
+
Returns
Region of item_size * item_count bytes, or NULL if the total size overflows size_t or the underlying allocator failed
+ +

Definition at line 30 of file memory_utils.c.

+ +
+
+ +

§ _cbor_highest_bit()

+ +
+
+ + + + + + + + +
size_t _cbor_highest_bit (size_t number)
+
+ +

Highest on bit position.

+ +

Definition at line 14 of file memory_utils.c.

+ +
+
+ +

§ _cbor_realloc_multiple()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* _cbor_realloc_multiple (void * pointer,
size_t item_size,
size_t item_count 
)
+
+ +

Overflow-proof contiguous array reallocation.

+

This implements the OpenBSD reallocarray functionality.

+
Parameters
+ + + + +
pointer
item_size
item_count
+
+
+
Returns
Realloc'd of item_size * item_count bytes, or NULL if the total size overflows size_t or the underlying allocator failed
+ +

Definition at line 39 of file memory_utils.c.

+ +
+
+ +

§ _cbor_safe_to_multiply()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool _cbor_safe_to_multiply (size_t a,
size_t b 
)
+
+ +

Can a and b be multiplied without overflowing size_t?

+ +

Definition at line 25 of file memory_utils.c.

+ +
+
+
+ + + + diff --git a/docs/doxygen/memory__utils_8c_source.html b/docs/doxygen/memory__utils_8c_source.html new file mode 100644 index 00000000..72cc5515 --- /dev/null +++ b/docs/doxygen/memory__utils_8c_source.html @@ -0,0 +1,88 @@ + + + + + + + +libcbor: src/cbor/internal/memory_utils.c Source File + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
memory_utils.c
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 #include "memory_utils.h"
9 #include "cbor/common.h"
10 
11 // TODO: Consider builtins (https://gcc.gnu.org/onlinedocs/gcc/Integer-Overflow-Builtins.html)
12 
14 size_t _cbor_highest_bit(size_t number)
15 {
16  size_t bit = 0;
17  while (number != 0) {
18  bit++;
19  number >>= 1;
20  }
21 
22  return bit;
23 }
24 
25 bool _cbor_safe_to_multiply(size_t a, size_t b)
26 {
27  return _cbor_highest_bit(a) + _cbor_highest_bit(b) <= sizeof(size_t) * 8;
28 }
29 
30 void * _cbor_alloc_multiple(size_t item_size, size_t item_count)
31 {
32  if (_cbor_safe_to_multiply(item_size, item_count)) {
33  return _CBOR_MALLOC(item_size * item_count);
34  } else {
35  return NULL;
36  }
37 }
38 
39 void * _cbor_realloc_multiple(void * pointer, size_t item_size, size_t item_count)
40 {
41  if (_cbor_safe_to_multiply(item_size, item_count)) {
42  return _CBOR_REALLOC(pointer, item_size * item_count);
43  } else {
44  return NULL;
45  }
46 }
void * _cbor_realloc_multiple(void *pointer, size_t item_size, size_t item_count)
Overflow-proof contiguous array reallocation.
Definition: memory_utils.c:39
+
void * _cbor_alloc_multiple(size_t item_size, size_t item_count)
Overflow-proof contiguous array allocation.
Definition: memory_utils.c:30
+
#define _CBOR_MALLOC
Definition: common.h:84
+
size_t _cbor_highest_bit(size_t number)
Highest on bit position.
Definition: memory_utils.c:14
+ +
#define _CBOR_REALLOC
Definition: common.h:85
+ +
bool _cbor_safe_to_multiply(size_t a, size_t b)
Can a and b be multiplied without overflowing size_t?
Definition: memory_utils.c:25
+
+ + + + diff --git a/docs/doxygen/memory__utils_8h.html b/docs/doxygen/memory__utils_8h.html new file mode 100644 index 00000000..7732ff6a --- /dev/null +++ b/docs/doxygen/memory__utils_8h.html @@ -0,0 +1,220 @@ + + + + + + + +libcbor: src/cbor/internal/memory_utils.h File Reference + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
memory_utils.h File Reference
+
+
+
#include <string.h>
+#include <stdbool.h>
+
+

Go to the source code of this file.

+ + + + + + + + + + + +

+Functions

bool _cbor_safe_to_multiply (size_t a, size_t b)
 Can a and b be multiplied without overflowing size_t? More...
 
void * _cbor_alloc_multiple (size_t item_size, size_t item_count)
 Overflow-proof contiguous array allocation. More...
 
void * _cbor_realloc_multiple (void *pointer, size_t item_size, size_t item_count)
 Overflow-proof contiguous array reallocation. More...
 
+

Function Documentation

+ +

§ _cbor_alloc_multiple()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void* _cbor_alloc_multiple (size_t item_size,
size_t item_count 
)
+
+ +

Overflow-proof contiguous array allocation.

+
Parameters
+ + + +
item_size
item_count
+
+
+
Returns
Region of item_size * item_count bytes, or NULL if the total size overflows size_t or the underlying allocator failed
+ +

Definition at line 30 of file memory_utils.c.

+ +
+
+ +

§ _cbor_realloc_multiple()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* _cbor_realloc_multiple (void * pointer,
size_t item_size,
size_t item_count 
)
+
+ +

Overflow-proof contiguous array reallocation.

+

This implements the OpenBSD reallocarray functionality.

+
Parameters
+ + + + +
pointer
item_size
item_count
+
+
+
Returns
Realloc'd of item_size * item_count bytes, or NULL if the total size overflows size_t or the underlying allocator failed
+ +

Definition at line 39 of file memory_utils.c.

+ +
+
+ +

§ _cbor_safe_to_multiply()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool _cbor_safe_to_multiply (size_t a,
size_t b 
)
+
+ +

Can a and b be multiplied without overflowing size_t?

+ +

Definition at line 25 of file memory_utils.c.

+ +
+
+
+ + + + diff --git a/docs/doxygen/memory__utils_8h_source.html b/docs/doxygen/memory__utils_8h_source.html new file mode 100644 index 00000000..4b8c2e36 --- /dev/null +++ b/docs/doxygen/memory__utils_8h_source.html @@ -0,0 +1,83 @@ + + + + + + + +libcbor: src/cbor/internal/memory_utils.h Source File + + + + + + + + + + +
+
+ + + + + + +
+
libcbor +  0.5.0 +
+
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
memory_utils.h
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 #ifndef LIBCBOR_MEMORY_UTILS_H
9 #define LIBCBOR_MEMORY_UTILS_H
10 
11 #include <string.h>
12 #include <stdbool.h>
13 
15 bool _cbor_safe_to_multiply(size_t a, size_t b);
16 
23 void * _cbor_alloc_multiple(size_t item_size, size_t item_count);
24 
25 
35 void * _cbor_realloc_multiple(void * pointer, size_t item_size, size_t item_count);
36 
37 #endif //LIBCBOR_MEMORY_UTILS_H
void * _cbor_realloc_multiple(void *pointer, size_t item_size, size_t item_count)
Overflow-proof contiguous array reallocation.
Definition: memory_utils.c:39
+
void * _cbor_alloc_multiple(size_t item_size, size_t item_count)
Overflow-proof contiguous array allocation.
Definition: memory_utils.c:30
+
bool _cbor_safe_to_multiply(size_t a, size_t b)
Can a and b be multiplied without overflowing size_t?
Definition: memory_utils.c:25
+
+ + + + diff --git a/docs/doxygen/menu.js b/docs/doxygen/menu.js new file mode 100644 index 00000000..97db4c23 --- /dev/null +++ b/docs/doxygen/menu.js @@ -0,0 +1,26 @@ +function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { + function makeTree(data,relPath) { + var result=''; + if ('children' in data) { + result+=''; + } + return result; + } + + $('#main-nav').append(makeTree(menudata,relPath)); + $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu'); + if (searchEnabled) { + if (serverSide) { + $('#main-menu').append('
  • '); + } else { + $('#main-menu').append('
  • '); + } + } + $('#main-menu').smartmenus(); +} diff --git a/docs/doxygen/menudata.js b/docs/doxygen/menudata.js new file mode 100644 index 00000000..d11742d1 --- /dev/null +++ b/docs/doxygen/menudata.js @@ -0,0 +1,63 @@ +var menudata={children:[ +{text:'Main Page',url:'index.html'}, +{text:'Data Structures',url:'annotated.html',children:[ +{text:'Data Structures',url:'annotated.html'}, +{text:'Data Structure Index',url:'classes.html'}, +{text:'Data Fields',url:'functions.html',children:[ +{text:'All',url:'functions.html',children:[ +{text:'a',url:'functions.html#index_a'}, +{text:'b',url:'functions.html#index_b'}, +{text:'c',url:'functions.html#index_c'}, +{text:'d',url:'functions.html#index_d'}, +{text:'e',url:'functions.html#index_e'}, +{text:'f',url:'functions.html#index_f'}, +{text:'i',url:'functions.html#index_i'}, +{text:'k',url:'functions.html#index_k'}, +{text:'l',url:'functions.html#index_l'}, +{text:'m',url:'functions.html#index_m'}, +{text:'n',url:'functions.html#index_n'}, +{text:'p',url:'functions.html#index_p'}, +{text:'r',url:'functions.html#index_r'}, +{text:'s',url:'functions.html#index_s'}, +{text:'t',url:'functions.html#index_t'}, +{text:'u',url:'functions.html#index_u'}, +{text:'v',url:'functions.html#index_v'}, +{text:'w',url:'functions.html#index_w'}]}, +{text:'Variables',url:'functions_vars.html',children:[ +{text:'a',url:'functions_vars.html#index_a'}, +{text:'b',url:'functions_vars.html#index_b'}, +{text:'c',url:'functions_vars.html#index_c'}, +{text:'d',url:'functions_vars.html#index_d'}, +{text:'e',url:'functions_vars.html#index_e'}, +{text:'f',url:'functions_vars.html#index_f'}, +{text:'i',url:'functions_vars.html#index_i'}, +{text:'k',url:'functions_vars.html#index_k'}, +{text:'l',url:'functions_vars.html#index_l'}, +{text:'m',url:'functions_vars.html#index_m'}, +{text:'n',url:'functions_vars.html#index_n'}, +{text:'p',url:'functions_vars.html#index_p'}, +{text:'r',url:'functions_vars.html#index_r'}, +{text:'s',url:'functions_vars.html#index_s'}, +{text:'t',url:'functions_vars.html#index_t'}, +{text:'u',url:'functions_vars.html#index_u'}, +{text:'v',url:'functions_vars.html#index_v'}, +{text:'w',url:'functions_vars.html#index_w'}]}]}]}, +{text:'Files',url:'files.html',children:[ +{text:'File List',url:'files.html'}, +{text:'Globals',url:'globals.html',children:[ +{text:'All',url:'globals.html',children:[ +{text:'_',url:'globals.html#index__'}, +{text:'c',url:'globals_c.html#index_c'}, +{text:'d',url:'globals_d.html#index_d'}, +{text:'t',url:'globals_t.html#index_t'}, +{text:'u',url:'globals_u.html#index_u'}]}, +{text:'Functions',url:'globals_func.html',children:[ +{text:'_',url:'globals_func.html#index__'}, +{text:'c',url:'globals_func_c.html#index_c'}]}, +{text:'Variables',url:'globals_vars.html'}, +{text:'Typedefs',url:'globals_type.html'}, +{text:'Enumerations',url:'globals_enum.html'}, +{text:'Enumerator',url:'globals_eval.html',children:[ +{text:'_',url:'globals_eval.html#index__'}, +{text:'c',url:'globals_eval.html#index_c'}]}, +{text:'Macros',url:'globals_defs.html'}]}]}]} diff --git a/docs/doxygen/nav_f.png b/docs/doxygen/nav_f.png new file mode 100644 index 00000000..72a58a52 Binary files /dev/null and b/docs/doxygen/nav_f.png differ diff --git a/docs/doxygen/nav_g.png b/docs/doxygen/nav_g.png new file mode 100644 index 00000000..2093a237 Binary files /dev/null and b/docs/doxygen/nav_g.png differ diff --git a/docs/doxygen/nav_h.png b/docs/doxygen/nav_h.png new file mode 100644 index 00000000..33389b10 Binary files /dev/null and b/docs/doxygen/nav_h.png differ diff --git a/docs/doxygen/open.png b/docs/doxygen/open.png new file mode 100644 index 00000000..30f75c7e Binary files /dev/null and b/docs/doxygen/open.png differ diff --git a/docs/doxygen/search/all_0.html b/docs/doxygen/search/all_0.html new file mode 100644 index 00000000..43594633 --- /dev/null +++ b/docs/doxygen/search/all_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/all_0.js b/docs/doxygen/search/all_0.js new file mode 100644 index 00000000..665c013e --- /dev/null +++ b/docs/doxygen/search/all_0.js @@ -0,0 +1,56 @@ +var searchData= +[ + ['_5fcbor_5falloc_5fmultiple',['_cbor_alloc_multiple',['../memory__utils_8c.html#a7bfbe0ac179b30f38bfeb9fe432ad4ec',1,'_cbor_alloc_multiple(size_t item_size, size_t item_count): memory_utils.c'],['../memory__utils_8h.html#a7bfbe0ac179b30f38bfeb9fe432ad4ec',1,'_cbor_alloc_multiple(size_t item_size, size_t item_count): memory_utils.c']]], + ['_5fcbor_5farray_5fmetadata',['_cbor_array_metadata',['../struct__cbor__array__metadata.html',1,'']]], + ['_5fcbor_5fbuilder_5fappend',['_cbor_builder_append',['../builder__callbacks_8c.html#abfd1332f0df578631a3702a2c193287c',1,'builder_callbacks.c']]], + ['_5fcbor_5fbytestring_5fmetadata',['_cbor_bytestring_metadata',['../struct__cbor__bytestring__metadata.html',1,'']]], + ['_5fcbor_5fctrl',['_cbor_ctrl',['../data_8h.html#a6454b577999b479ac2585af7c204ae3b',1,'data.h']]], + ['_5fcbor_5fdecode_5fhalf',['_cbor_decode_half',['../loaders_8c.html#a8d5adcea9a5b6f265fe6bb5cbd62e5c2',1,'loaders.c']]], + ['_5fcbor_5fdecoder_5fcontext',['_cbor_decoder_context',['../struct__cbor__decoder__context.html',1,'']]], + ['_5fcbor_5fdouble_5fhelper',['_cbor_double_helper',['../union__cbor__double__helper.html',1,'']]], + ['_5fcbor_5fdst_5fmetadata',['_cbor_dst_metadata',['../data_8h.html#a3cdab5e05cf46846e98b43cf77985589',1,'data.h']]], + ['_5fcbor_5fencode_5fbyte',['_cbor_encode_byte',['../encoding_8c.html#a4352d769328811eaee8db575256f8a6d',1,'encoding.c']]], + ['_5fcbor_5fencode_5fuint',['_cbor_encode_uint',['../encoders_8c.html#ad0b03bdce1727977d8c8307e2a91590a',1,'_cbor_encode_uint(uint64_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset): encoders.c'],['../encoders_8h.html#ad0b03bdce1727977d8c8307e2a91590a',1,'_cbor_encode_uint(uint64_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset): encoders.c']]], + ['_5fcbor_5fencode_5fuint16',['_cbor_encode_uint16',['../encoders_8c.html#a18c7f670aae9fa3f03a2ba58e6590c43',1,'_cbor_encode_uint16(uint16_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset): encoders.c'],['../encoders_8h.html#a18c7f670aae9fa3f03a2ba58e6590c43',1,'_cbor_encode_uint16(uint16_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset): encoders.c']]], + ['_5fcbor_5fencode_5fuint32',['_cbor_encode_uint32',['../encoders_8c.html#a58efe8377be9b98013828ed27752e212',1,'_cbor_encode_uint32(uint32_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset): encoders.c'],['../encoders_8h.html#a58efe8377be9b98013828ed27752e212',1,'_cbor_encode_uint32(uint32_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset): encoders.c']]], + ['_5fcbor_5fencode_5fuint64',['_cbor_encode_uint64',['../encoders_8c.html#a6770d92d21edd8100cfd48ab443fc566',1,'_cbor_encode_uint64(uint64_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset): encoders.c'],['../encoders_8h.html#a6770d92d21edd8100cfd48ab443fc566',1,'_cbor_encode_uint64(uint64_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset): encoders.c']]], + ['_5fcbor_5fencode_5fuint8',['_cbor_encode_uint8',['../encoders_8c.html#a32eb27ea8f535e166b40c7be50ab8eb1',1,'_cbor_encode_uint8(uint8_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset): encoders.c'],['../encoders_8h.html#a32eb27ea8f535e166b40c7be50ab8eb1',1,'_cbor_encode_uint8(uint8_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset): encoders.c']]], + ['_5fcbor_5ffloat_5fctrl_5fmetadata',['_cbor_float_ctrl_metadata',['../struct__cbor__float__ctrl__metadata.html',1,'']]], + ['_5fcbor_5ffloat_5fhelper',['_cbor_float_helper',['../union__cbor__float__helper.html',1,'']]], + ['_5fcbor_5ffree',['_CBOR_FREE',['../common_8h.html#a1300043d7db8adf6ab67f7b787f14635',1,'_CBOR_FREE(): common.h'],['../allocators_8c.html#a994f4145360ef0bfa3c48e59a5ca7186',1,'_cbor_free(): allocators.c'],['../common_8h.html#a994f4145360ef0bfa3c48e59a5ca7186',1,'_cbor_free(): allocators.c']]], + ['_5fcbor_5ffree_5ft',['_cbor_free_t',['../common_8h.html#af05bb33f6d22cdac535576c8edaf208c',1,'common.h']]], + ['_5fcbor_5fhighest_5fbit',['_cbor_highest_bit',['../memory__utils_8c.html#ab45e9067ef782bb27cf846dc94eb4669',1,'memory_utils.c']]], + ['_5fcbor_5fint_5fmetadata',['_cbor_int_metadata',['../struct__cbor__int__metadata.html',1,'']]], + ['_5fcbor_5fload_5fdouble',['_cbor_load_double',['../loaders_8c.html#a552b4d5d5cc7c3753d48325fb6889f1d',1,'_cbor_load_double(cbor_data source): loaders.c'],['../loaders_8h.html#a552b4d5d5cc7c3753d48325fb6889f1d',1,'_cbor_load_double(cbor_data source): loaders.c']]], + ['_5fcbor_5fload_5ffloat',['_cbor_load_float',['../loaders_8c.html#aa812443c86ee5c127379009f0a760030',1,'_cbor_load_float(cbor_data source): loaders.c'],['../loaders_8h.html#aa812443c86ee5c127379009f0a760030',1,'_cbor_load_float(cbor_data source): loaders.c']]], + ['_5fcbor_5fload_5fhalf',['_cbor_load_half',['../loaders_8c.html#a771bf852840eee864b888ca85d99dfad',1,'_cbor_load_half(cbor_data source): loaders.c'],['../loaders_8h.html#a771bf852840eee864b888ca85d99dfad',1,'_cbor_load_half(cbor_data source): loaders.c']]], + ['_5fcbor_5fload_5fuint16',['_cbor_load_uint16',['../loaders_8c.html#a82cc3a9e9028cc2ea560d1538804acc7',1,'_cbor_load_uint16(const unsigned char *source): loaders.c'],['../loaders_8h.html#a82cc3a9e9028cc2ea560d1538804acc7',1,'_cbor_load_uint16(const unsigned char *source): loaders.c']]], + ['_5fcbor_5fload_5fuint32',['_cbor_load_uint32',['../loaders_8c.html#a356f0cc63df1addf4a3b1d6ee92ea3f6',1,'_cbor_load_uint32(const unsigned char *source): loaders.c'],['../loaders_8h.html#a356f0cc63df1addf4a3b1d6ee92ea3f6',1,'_cbor_load_uint32(const unsigned char *source): loaders.c']]], + ['_5fcbor_5fload_5fuint64',['_cbor_load_uint64',['../loaders_8c.html#ad1fd77b3d9b7c9369095012ae2ed9b33',1,'_cbor_load_uint64(const unsigned char *source): loaders.c'],['../loaders_8h.html#ad1fd77b3d9b7c9369095012ae2ed9b33',1,'_cbor_load_uint64(const unsigned char *source): loaders.c']]], + ['_5fcbor_5fload_5fuint8',['_cbor_load_uint8',['../loaders_8c.html#af0b29efb9dbbd26f3dd99df74382e9c9',1,'_cbor_load_uint8(cbor_data source): loaders.c'],['../loaders_8h.html#a04bc096a04750b219adf060c4fa9496a',1,'_cbor_load_uint8(const unsigned char *source): loaders.c']]], + ['_5fcbor_5fmalloc',['_CBOR_MALLOC',['../common_8h.html#a07a781e9212fad361b0f59f7fc921057',1,'_CBOR_MALLOC(): common.h'],['../allocators_8c.html#a3218c24af00a3efeaecb1716c8f5a289',1,'_cbor_malloc(): allocators.c'],['../common_8h.html#a3218c24af00a3efeaecb1716c8f5a289',1,'_cbor_malloc(): allocators.c']]], + ['_5fcbor_5fmalloc_5ft',['_cbor_malloc_t',['../common_8h.html#ad89d15c2e3f18e8914fcdffe4d725d42',1,'common.h']]], + ['_5fcbor_5fmap_5fadd_5fkey',['_cbor_map_add_key',['../maps_8c.html#a64c91e7ecba7cf7d0d4949153d681db8',1,'_cbor_map_add_key(cbor_item_t *item, cbor_item_t *key): maps.c'],['../maps_8h.html#a64c91e7ecba7cf7d0d4949153d681db8',1,'_cbor_map_add_key(cbor_item_t *item, cbor_item_t *key): maps.c']]], + ['_5fcbor_5fmap_5fadd_5fvalue',['_cbor_map_add_value',['../maps_8c.html#abb15486eebcd1c41c373613757505705',1,'_cbor_map_add_value(cbor_item_t *item, cbor_item_t *value): maps.c'],['../maps_8h.html#abb15486eebcd1c41c373613757505705',1,'_cbor_map_add_value(cbor_item_t *item, cbor_item_t *value): maps.c']]], + ['_5fcbor_5fmap_5fmetadata',['_cbor_map_metadata',['../struct__cbor__map__metadata.html',1,'']]], + ['_5fcbor_5fmetadata_5fdefinite',['_CBOR_METADATA_DEFINITE',['../data_8h.html#a3cdab5e05cf46846e98b43cf77985589a051b0d1fe7ef7ccfc3824110b797429e',1,'data.h']]], + ['_5fcbor_5fmetadata_5findefinite',['_CBOR_METADATA_INDEFINITE',['../data_8h.html#a3cdab5e05cf46846e98b43cf77985589ae598476995d503b404ccf78c21ab79ef',1,'data.h']]], + ['_5fcbor_5frealloc',['_cbor_realloc',['../allocators_8c.html#a84ecc1fc92c3812ab6ced693f2c6254c',1,'_cbor_realloc(): allocators.c'],['../common_8h.html#a84ecc1fc92c3812ab6ced693f2c6254c',1,'_cbor_realloc(): allocators.c'],['../common_8h.html#a1e39038d9b8e9b3a1e6529c9ff6091b8',1,'_CBOR_REALLOC(): common.h']]], + ['_5fcbor_5frealloc_5fmultiple',['_cbor_realloc_multiple',['../memory__utils_8c.html#afd7a22ccd3b44d6ff668e14c3a006e40',1,'_cbor_realloc_multiple(void *pointer, size_t item_size, size_t item_count): memory_utils.c'],['../memory__utils_8h.html#afd7a22ccd3b44d6ff668e14c3a006e40',1,'_cbor_realloc_multiple(void *pointer, size_t item_size, size_t item_count): memory_utils.c']]], + ['_5fcbor_5frealloc_5ft',['_cbor_realloc_t',['../common_8h.html#a5b52369a95930104d33301d12faabe75',1,'common.h']]], + ['_5fcbor_5fsafe_5fto_5fmultiply',['_cbor_safe_to_multiply',['../memory__utils_8c.html#abdee08be3f4cff35a94279fda66c4778',1,'_cbor_safe_to_multiply(size_t a, size_t b): memory_utils.c'],['../memory__utils_8h.html#abdee08be3f4cff35a94279fda66c4778',1,'_cbor_safe_to_multiply(size_t a, size_t b): memory_utils.c']]], + ['_5fcbor_5fstack',['_cbor_stack',['../struct__cbor__stack.html',1,'']]], + ['_5fcbor_5fstack_5finit',['_cbor_stack_init',['../stack_8c.html#a7702383747257f1df9c3ceda9fb9da58',1,'_cbor_stack_init(): stack.c'],['../stack_8h.html#a7702383747257f1df9c3ceda9fb9da58',1,'_cbor_stack_init(): stack.c']]], + ['_5fcbor_5fstack_5fpop',['_cbor_stack_pop',['../stack_8c.html#a6541672c7a6bcc55e6645cff2a5ab005',1,'_cbor_stack_pop(struct _cbor_stack *stack): stack.c'],['../stack_8h.html#a7ef944b8c6581c73fe7fbf678aa09f4c',1,'_cbor_stack_pop(struct _cbor_stack *): stack.c']]], + ['_5fcbor_5fstack_5fpush',['_cbor_stack_push',['../stack_8c.html#abb0f169980a61710ee2b83ac90df3442',1,'_cbor_stack_push(struct _cbor_stack *stack, cbor_item_t *item, size_t subitems): stack.c'],['../stack_8h.html#a76e5fdb5e3c5b6a35e928ee9e9310568',1,'_cbor_stack_push(struct _cbor_stack *, cbor_item_t *, size_t): stack.c']]], + ['_5fcbor_5fstack_5frecord',['_cbor_stack_record',['../struct__cbor__stack__record.html',1,'']]], + ['_5fcbor_5fstring_5fmetadata',['_cbor_string_metadata',['../struct__cbor__string__metadata.html',1,'']]], + ['_5fcbor_5ftag_5fmetadata',['_cbor_tag_metadata',['../struct__cbor__tag__metadata.html',1,'']]], + ['_5fcbor_5funicode_5fbadcp',['_CBOR_UNICODE_BADCP',['../unicode_8h.html#a5f58283b505b6cc8a5646516ae20831fa7ddb42c4f16ebd6d46fe1e331c643c8b',1,'unicode.h']]], + ['_5fcbor_5funicode_5fcodepoint_5fcount',['_cbor_unicode_codepoint_count',['../unicode_8c.html#ade9ebfe3d9b9bfad4c9fd5c158d519a8',1,'_cbor_unicode_codepoint_count(cbor_data source, size_t source_length, struct _cbor_unicode_status *status): unicode.c'],['../unicode_8h.html#ade9ebfe3d9b9bfad4c9fd5c158d519a8',1,'_cbor_unicode_codepoint_count(cbor_data source, size_t source_length, struct _cbor_unicode_status *status): unicode.c']]], + ['_5fcbor_5funicode_5fdecode',['_cbor_unicode_decode',['../unicode_8c.html#aea748174291fa35e154c69e7669f199b',1,'unicode.c']]], + ['_5fcbor_5funicode_5fok',['_CBOR_UNICODE_OK',['../unicode_8h.html#a5f58283b505b6cc8a5646516ae20831faf42cbfe1ac853288773814920e16318c',1,'unicode.h']]], + ['_5fcbor_5funicode_5fstatus',['_cbor_unicode_status',['../struct__cbor__unicode__status.html',1,'']]], + ['_5fcbor_5funicode_5fstatus_5ferror',['_cbor_unicode_status_error',['../unicode_8h.html#a5f58283b505b6cc8a5646516ae20831f',1,'unicode.h']]], + ['_5fval',['_val',['../callbacks_8c.html#aa71dda9f35e8d5245180dd90eb8604ba',1,'callbacks.c']]] +]; diff --git a/docs/doxygen/search/all_1.html b/docs/doxygen/search/all_1.html new file mode 100644 index 00000000..bc87ea8c --- /dev/null +++ b/docs/doxygen/search/all_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/all_1.js b/docs/doxygen/search/all_1.js new file mode 100644 index 00000000..5c82c534 --- /dev/null +++ b/docs/doxygen/search/all_1.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['allocated',['allocated',['../struct__cbor__array__metadata.html#ad59631add7d960a0777686c8cc0fd46a',1,'_cbor_array_metadata::allocated()'],['../struct__cbor__map__metadata.html#a6eb16c3f11be5cecbbf8ab8bae689527',1,'_cbor_map_metadata::allocated()']]], + ['allocators_2ec',['allocators.c',['../allocators_8c.html',1,'']]], + ['array_5fmetadata',['array_metadata',['../unioncbor__item__metadata.html#a51c4b86bb4e0313193df52d1320f9237',1,'cbor_item_metadata']]], + ['array_5fstart',['array_start',['../structcbor__callbacks.html#affebd3296749cdc0d564a3b9cae7a4e4',1,'cbor_callbacks']]], + ['arrays_2ec',['arrays.c',['../arrays_8c.html',1,'']]], + ['arrays_2eh',['arrays.h',['../arrays_8h.html',1,'']]], + ['as_5fdouble',['as_double',['../union__cbor__double__helper.html#a51f93c8fae90168e51b1be0517e1ada0',1,'_cbor_double_helper']]], + ['as_5ffloat',['as_float',['../union__cbor__float__helper.html#ae3a184f0f46ee8d87e6cb8e126e440a2',1,'_cbor_float_helper']]], + ['as_5fuint',['as_uint',['../union__cbor__float__helper.html#a28a0047ea6592730009da39772638a76',1,'_cbor_float_helper::as_uint()'],['../union__cbor__double__helper.html#a247647c22dd8248e513c37b0b339b856',1,'_cbor_double_helper::as_uint()']]] +]; diff --git a/docs/doxygen/search/all_10.html b/docs/doxygen/search/all_10.html new file mode 100644 index 00000000..16ffd9a0 --- /dev/null +++ b/docs/doxygen/search/all_10.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/all_10.js b/docs/doxygen/search/all_10.js new file mode 100644 index 00000000..ef547a0d --- /dev/null +++ b/docs/doxygen/search/all_10.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['uint16',['uint16',['../structcbor__callbacks.html#a3eb2039fa03bd534d6be0ed10d0c98be',1,'cbor_callbacks']]], + ['uint32',['uint32',['../structcbor__callbacks.html#af2501b53c0150c4d3244a039b3232bf1',1,'cbor_callbacks']]], + ['uint64',['uint64',['../structcbor__callbacks.html#a2b0328261726fba55f663f55f954d56b',1,'cbor_callbacks']]], + ['uint8',['uint8',['../structcbor__callbacks.html#af2d69429c9bc71edf55b6f4f1dbb76d1',1,'cbor_callbacks']]], + ['undefined',['undefined',['../structcbor__callbacks.html#af9b30de5bef7bf76e8e34bdd95434f98',1,'cbor_callbacks']]], + ['unicode_2ec',['unicode.c',['../unicode_8c.html',1,'']]], + ['unicode_2eh',['unicode.h',['../unicode_8h.html',1,'']]], + ['utf8_5faccept',['UTF8_ACCEPT',['../unicode_8c.html#a82b09bd7c24e408c73e16db56b8db6cf',1,'unicode.c']]], + ['utf8_5freject',['UTF8_REJECT',['../unicode_8c.html#a2e385a04dd7c4529414ab34a75a4f9ef',1,'unicode.c']]] +]; diff --git a/docs/doxygen/search/all_11.html b/docs/doxygen/search/all_11.html new file mode 100644 index 00000000..d689820d --- /dev/null +++ b/docs/doxygen/search/all_11.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/all_11.js b/docs/doxygen/search/all_11.js new file mode 100644 index 00000000..9df9912a --- /dev/null +++ b/docs/doxygen/search/all_11.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['value',['value',['../struct__cbor__tag__metadata.html#a23bcf332e94e901e5bc3b48aab0d89da',1,'_cbor_tag_metadata::value()'],['../structcbor__pair.html#a44bbea9cc120de72fc4871a05dc8ec85',1,'cbor_pair::value()']]] +]; diff --git a/docs/doxygen/search/all_12.html b/docs/doxygen/search/all_12.html new file mode 100644 index 00000000..698e2c5b --- /dev/null +++ b/docs/doxygen/search/all_12.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/all_12.js b/docs/doxygen/search/all_12.js new file mode 100644 index 00000000..3498380c --- /dev/null +++ b/docs/doxygen/search/all_12.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['width',['width',['../struct__cbor__int__metadata.html#a7a402d748e607c9942e5eefdb875582d',1,'_cbor_int_metadata::width()'],['../struct__cbor__float__ctrl__metadata.html#a19a1c5e96c662dd4781f0172052b194c',1,'_cbor_float_ctrl_metadata::width()']]] +]; diff --git a/docs/doxygen/search/all_2.html b/docs/doxygen/search/all_2.html new file mode 100644 index 00000000..0f777c29 --- /dev/null +++ b/docs/doxygen/search/all_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/all_2.js b/docs/doxygen/search/all_2.js new file mode 100644 index 00000000..9d91378b --- /dev/null +++ b/docs/doxygen/search/all_2.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['boolean',['boolean',['../structcbor__callbacks.html#a458321ece8c64be2c37b96f78bbdfb8c',1,'cbor_callbacks']]], + ['builder_5fcallbacks_2ec',['builder_callbacks.c',['../builder__callbacks_8c.html',1,'']]], + ['builder_5fcallbacks_2eh',['builder_callbacks.h',['../builder__callbacks_8h.html',1,'']]], + ['byte_5fstring',['byte_string',['../structcbor__callbacks.html#a0c2528e2b1d6df97053168d24e53e278',1,'cbor_callbacks']]], + ['byte_5fstring_5fstart',['byte_string_start',['../structcbor__callbacks.html#adf65a04d2423dcdd73cec4a261ccb6aa',1,'cbor_callbacks']]], + ['bytestring_5fmetadata',['bytestring_metadata',['../unioncbor__item__metadata.html#a90851d347147760c9cef8d7af485d006',1,'cbor_item_metadata']]], + ['bytestrings_2ec',['bytestrings.c',['../bytestrings_8c.html',1,'']]], + ['bytestrings_2eh',['bytestrings.h',['../bytestrings_8h.html',1,'']]] +]; diff --git a/docs/doxygen/search/all_3.html b/docs/doxygen/search/all_3.html new file mode 100644 index 00000000..ac9dbf9f --- /dev/null +++ b/docs/doxygen/search/all_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/all_3.js b/docs/doxygen/search/all_3.js new file mode 100644 index 00000000..924d58c8 --- /dev/null +++ b/docs/doxygen/search/all_3.js @@ -0,0 +1,281 @@ +var searchData= +[ + ['callbacks_2ec',['callbacks.c',['../callbacks_8c.html',1,'']]], + ['callbacks_2eh',['callbacks.h',['../callbacks_8h.html',1,'']]], + ['cbor_2ec',['cbor.c',['../cbor_8c.html',1,'']]], + ['cbor_2eh',['cbor.h',['../cbor_8h.html',1,'']]], + ['cbor_5farray_5fallocated',['cbor_array_allocated',['../arrays_8c.html#a5da97cca271f81f55809c39fad6078b0',1,'cbor_array_allocated(const cbor_item_t *item): arrays.c'],['../arrays_8h.html#a5da97cca271f81f55809c39fad6078b0',1,'cbor_array_allocated(const cbor_item_t *item): arrays.c']]], + ['cbor_5farray_5fget',['cbor_array_get',['../arrays_8c.html#a1573139e26cf5b5acc4b0ed861291069',1,'cbor_array_get(const cbor_item_t *item, size_t index): arrays.c'],['../arrays_8h.html#a1573139e26cf5b5acc4b0ed861291069',1,'cbor_array_get(const cbor_item_t *item, size_t index): arrays.c']]], + ['cbor_5farray_5fhandle',['cbor_array_handle',['../arrays_8c.html#a8dd01f4a46f162fa4f06b7df7428128e',1,'cbor_array_handle(const cbor_item_t *item): arrays.c'],['../arrays_8h.html#a8dd01f4a46f162fa4f06b7df7428128e',1,'cbor_array_handle(const cbor_item_t *item): arrays.c']]], + ['cbor_5farray_5fis_5fdefinite',['cbor_array_is_definite',['../arrays_8c.html#ac2f1480c546a0268e8b046b365e58599',1,'cbor_array_is_definite(const cbor_item_t *item): arrays.c'],['../arrays_8h.html#ac2f1480c546a0268e8b046b365e58599',1,'cbor_array_is_definite(const cbor_item_t *item): arrays.c']]], + ['cbor_5farray_5fis_5findefinite',['cbor_array_is_indefinite',['../arrays_8c.html#a291a9f3ff12a2e2c58b2ca8b00280d40',1,'cbor_array_is_indefinite(const cbor_item_t *item): arrays.c'],['../arrays_8h.html#a291a9f3ff12a2e2c58b2ca8b00280d40',1,'cbor_array_is_indefinite(const cbor_item_t *item): arrays.c']]], + ['cbor_5farray_5fpush',['cbor_array_push',['../arrays_8c.html#abb1c1c9731a2195857dc471f2a6f60f5',1,'cbor_array_push(cbor_item_t *array, cbor_item_t *pushee): arrays.c'],['../arrays_8h.html#abb1c1c9731a2195857dc471f2a6f60f5',1,'cbor_array_push(cbor_item_t *array, cbor_item_t *pushee): arrays.c']]], + ['cbor_5farray_5freplace',['cbor_array_replace',['../arrays_8c.html#a44020515090bbbe91249aff0016ab8e5',1,'cbor_array_replace(cbor_item_t *item, size_t index, cbor_item_t *value): arrays.c'],['../arrays_8h.html#a44020515090bbbe91249aff0016ab8e5',1,'cbor_array_replace(cbor_item_t *item, size_t index, cbor_item_t *value): arrays.c']]], + ['cbor_5farray_5fset',['cbor_array_set',['../arrays_8c.html#a382cc2dc480ebb9c7951eb3235be89b4',1,'cbor_array_set(cbor_item_t *item, size_t index, cbor_item_t *value): arrays.c'],['../arrays_8h.html#a382cc2dc480ebb9c7951eb3235be89b4',1,'cbor_array_set(cbor_item_t *item, size_t index, cbor_item_t *value): arrays.c']]], + ['cbor_5farray_5fsize',['cbor_array_size',['../arrays_8c.html#a4f634a9a4bc834e4ea6ac43e94d51f84',1,'cbor_array_size(const cbor_item_t *item): arrays.c'],['../arrays_8h.html#a4f634a9a4bc834e4ea6ac43e94d51f84',1,'cbor_array_size(const cbor_item_t *item): arrays.c']]], + ['cbor_5fbool_5fcallback',['cbor_bool_callback',['../callbacks_8h.html#a2d9a17678ab25d2afa83805692fec564',1,'callbacks.h']]], + ['cbor_5fbuild_5fbool',['cbor_build_bool',['../floats__ctrls_8c.html#a5218f8557e64441e9085f6b9478bfd06',1,'cbor_build_bool(bool value): floats_ctrls.c'],['../floats__ctrls_8h.html#a5218f8557e64441e9085f6b9478bfd06',1,'cbor_build_bool(bool value): floats_ctrls.c']]], + ['cbor_5fbuild_5fbytestring',['cbor_build_bytestring',['../bytestrings_8c.html#ab76bd5ff62831739cd9a8d7ec2768c1a',1,'cbor_build_bytestring(cbor_data handle, size_t length): bytestrings.c'],['../bytestrings_8h.html#ab76bd5ff62831739cd9a8d7ec2768c1a',1,'cbor_build_bytestring(cbor_data handle, size_t length): bytestrings.c']]], + ['cbor_5fbuild_5fctrl',['cbor_build_ctrl',['../floats__ctrls_8c.html#af31b0a42b2dd7f29efe42385bd4a58f1',1,'cbor_build_ctrl(uint8_t value): floats_ctrls.c'],['../floats__ctrls_8h.html#af31b0a42b2dd7f29efe42385bd4a58f1',1,'cbor_build_ctrl(uint8_t value): floats_ctrls.c']]], + ['cbor_5fbuild_5ffloat2',['cbor_build_float2',['../floats__ctrls_8c.html#a9884b85abd0c0637a4377168d034260f',1,'cbor_build_float2(float value): floats_ctrls.c'],['../floats__ctrls_8h.html#a9884b85abd0c0637a4377168d034260f',1,'cbor_build_float2(float value): floats_ctrls.c']]], + ['cbor_5fbuild_5ffloat4',['cbor_build_float4',['../floats__ctrls_8c.html#a1e3e9757ac809b6df56f1095a87bfdad',1,'cbor_build_float4(float value): floats_ctrls.c'],['../floats__ctrls_8h.html#a1e3e9757ac809b6df56f1095a87bfdad',1,'cbor_build_float4(float value): floats_ctrls.c']]], + ['cbor_5fbuild_5ffloat8',['cbor_build_float8',['../floats__ctrls_8c.html#aad0e4103cf703b5c3e856956f5a2fb96',1,'cbor_build_float8(double value): floats_ctrls.c'],['../floats__ctrls_8h.html#aad0e4103cf703b5c3e856956f5a2fb96',1,'cbor_build_float8(double value): floats_ctrls.c']]], + ['cbor_5fbuild_5fnegint16',['cbor_build_negint16',['../ints_8c.html#ae40a5af0998889c6550ceb0914b2cd9b',1,'cbor_build_negint16(uint16_t value): ints.c'],['../ints_8h.html#ae40a5af0998889c6550ceb0914b2cd9b',1,'cbor_build_negint16(uint16_t value): ints.c']]], + ['cbor_5fbuild_5fnegint32',['cbor_build_negint32',['../ints_8c.html#a35d8b500ae33d4fc0262de4830382529',1,'cbor_build_negint32(uint32_t value): ints.c'],['../ints_8h.html#a35d8b500ae33d4fc0262de4830382529',1,'cbor_build_negint32(uint32_t value): ints.c']]], + ['cbor_5fbuild_5fnegint64',['cbor_build_negint64',['../ints_8c.html#ae24074614ece5da3024a536093d21678',1,'cbor_build_negint64(uint64_t value): ints.c'],['../ints_8h.html#ae24074614ece5da3024a536093d21678',1,'cbor_build_negint64(uint64_t value): ints.c']]], + ['cbor_5fbuild_5fnegint8',['cbor_build_negint8',['../ints_8c.html#a28553eb079f8778babebf869e33f27a2',1,'cbor_build_negint8(uint8_t value): ints.c'],['../ints_8h.html#a28553eb079f8778babebf869e33f27a2',1,'cbor_build_negint8(uint8_t value): ints.c']]], + ['cbor_5fbuild_5fstring',['cbor_build_string',['../strings_8c.html#a61a9388aca4fc7ee5355eb92a6d56536',1,'cbor_build_string(const char *val): strings.c'],['../strings_8h.html#a61a9388aca4fc7ee5355eb92a6d56536',1,'cbor_build_string(const char *val): strings.c']]], + ['cbor_5fbuild_5fstringn',['cbor_build_stringn',['../strings_8c.html#a26f8c53bb33641408921c388bf539b0c',1,'cbor_build_stringn(const char *val, size_t length): strings.c'],['../strings_8h.html#a26f8c53bb33641408921c388bf539b0c',1,'cbor_build_stringn(const char *val, size_t length): strings.c']]], + ['cbor_5fbuild_5ftag',['cbor_build_tag',['../tags_8c.html#a44840e7f4b0225eebf3a366fafff8e96',1,'cbor_build_tag(uint64_t value, cbor_item_t *item): tags.c'],['../tags_8h.html#a44840e7f4b0225eebf3a366fafff8e96',1,'cbor_build_tag(uint64_t value, cbor_item_t *item): tags.c']]], + ['cbor_5fbuild_5fuint16',['cbor_build_uint16',['../ints_8c.html#a88f05c625ad9fa182bc95c9c97f87dda',1,'cbor_build_uint16(uint16_t value): ints.c'],['../ints_8h.html#a88f05c625ad9fa182bc95c9c97f87dda',1,'cbor_build_uint16(uint16_t value): ints.c']]], + ['cbor_5fbuild_5fuint32',['cbor_build_uint32',['../ints_8c.html#afcefa3190eeeff1e5ed0b5217761ad5a',1,'cbor_build_uint32(uint32_t value): ints.c'],['../ints_8h.html#afcefa3190eeeff1e5ed0b5217761ad5a',1,'cbor_build_uint32(uint32_t value): ints.c']]], + ['cbor_5fbuild_5fuint64',['cbor_build_uint64',['../ints_8c.html#adff4351ebc5bb6f69d8a2ea0c9439fc5',1,'cbor_build_uint64(uint64_t value): ints.c'],['../ints_8h.html#adff4351ebc5bb6f69d8a2ea0c9439fc5',1,'cbor_build_uint64(uint64_t value): ints.c']]], + ['cbor_5fbuild_5fuint8',['cbor_build_uint8',['../ints_8c.html#ad4d9f92f14c640544386e6655283052d',1,'cbor_build_uint8(uint8_t value): ints.c'],['../ints_8h.html#ad4d9f92f14c640544386e6655283052d',1,'cbor_build_uint8(uint8_t value): ints.c']]], + ['cbor_5fbuilder_5farray_5fstart_5fcallback',['cbor_builder_array_start_callback',['../builder__callbacks_8c.html#a2dd24b9dcda84915c4fc0229a6e52df6',1,'cbor_builder_array_start_callback(void *context, size_t size): builder_callbacks.c'],['../builder__callbacks_8h.html#a0840fe5d84881527b514d7d3049c3079',1,'cbor_builder_array_start_callback(void *, size_t): builder_callbacks.c']]], + ['cbor_5fbuilder_5fboolean_5fcallback',['cbor_builder_boolean_callback',['../builder__callbacks_8c.html#a1898083345b031539becf70203361860',1,'cbor_builder_boolean_callback(void *context, bool value): builder_callbacks.c'],['../builder__callbacks_8h.html#ab5d82f6055e7326f892be37e6b4b7916',1,'cbor_builder_boolean_callback(void *, bool): builder_callbacks.c']]], + ['cbor_5fbuilder_5fbyte_5fstring_5fcallback',['cbor_builder_byte_string_callback',['../builder__callbacks_8c.html#a41f2a1f66f9cb53dd0075e88f0b640fb',1,'cbor_builder_byte_string_callback(void *context, cbor_data data, size_t length): builder_callbacks.c'],['../builder__callbacks_8h.html#ae3487b745fc400f6ca145d09b475cc22',1,'cbor_builder_byte_string_callback(void *, cbor_data, size_t): builder_callbacks.c']]], + ['cbor_5fbuilder_5fbyte_5fstring_5fstart_5fcallback',['cbor_builder_byte_string_start_callback',['../builder__callbacks_8c.html#a1c0c98b6c27ac737123ecb014cb6e9c7',1,'cbor_builder_byte_string_start_callback(void *context): builder_callbacks.c'],['../builder__callbacks_8h.html#a50acadf2240a3b6badcb11e05aff3a47',1,'cbor_builder_byte_string_start_callback(void *): builder_callbacks.c']]], + ['cbor_5fbuilder_5ffloat2_5fcallback',['cbor_builder_float2_callback',['../builder__callbacks_8c.html#ae1509582103b87cc5824c30f101f9d76',1,'cbor_builder_float2_callback(void *context, float value): builder_callbacks.c'],['../builder__callbacks_8h.html#ab5c0f9bbfa8796a80c4b1fb666593c28',1,'cbor_builder_float2_callback(void *, float): builder_callbacks.c']]], + ['cbor_5fbuilder_5ffloat4_5fcallback',['cbor_builder_float4_callback',['../builder__callbacks_8c.html#aa86c973a7feebd7d4f12cd3014a36293',1,'cbor_builder_float4_callback(void *context, float value): builder_callbacks.c'],['../builder__callbacks_8h.html#a9603c2d5270f21afbefc0c3f15dc037b',1,'cbor_builder_float4_callback(void *, float): builder_callbacks.c']]], + ['cbor_5fbuilder_5ffloat8_5fcallback',['cbor_builder_float8_callback',['../builder__callbacks_8c.html#ac78462da492c7d57dfb90f7aadcadc5e',1,'cbor_builder_float8_callback(void *context, double value): builder_callbacks.c'],['../builder__callbacks_8h.html#a34ed1c906cb4d31432466d78cf644524',1,'cbor_builder_float8_callback(void *, double): builder_callbacks.c']]], + ['cbor_5fbuilder_5findef_5farray_5fstart_5fcallback',['cbor_builder_indef_array_start_callback',['../builder__callbacks_8c.html#a7bcc936cb1cc653551de3d5b49fbe3f0',1,'cbor_builder_indef_array_start_callback(void *context): builder_callbacks.c'],['../builder__callbacks_8h.html#a59c682fb50d074458ab1e12328aed401',1,'cbor_builder_indef_array_start_callback(void *): builder_callbacks.c']]], + ['cbor_5fbuilder_5findef_5fbreak_5fcallback',['cbor_builder_indef_break_callback',['../builder__callbacks_8c.html#ae386e2194dd97053acca4c26d6039ff6',1,'cbor_builder_indef_break_callback(void *context): builder_callbacks.c'],['../builder__callbacks_8h.html#a76daa00e402ba3b8b6c74dbbfc74b6ed',1,'cbor_builder_indef_break_callback(void *): builder_callbacks.c']]], + ['cbor_5fbuilder_5findef_5fmap_5fstart_5fcallback',['cbor_builder_indef_map_start_callback',['../builder__callbacks_8c.html#a28b2dc3b7b96debc8763407308c365ea',1,'cbor_builder_indef_map_start_callback(void *context): builder_callbacks.c'],['../builder__callbacks_8h.html#a6110c00a85a88fc4e7edf6f91bea8f18',1,'cbor_builder_indef_map_start_callback(void *): builder_callbacks.c']]], + ['cbor_5fbuilder_5fmap_5fstart_5fcallback',['cbor_builder_map_start_callback',['../builder__callbacks_8c.html#a95d00fb404804d93ebffdaf607f48a62',1,'cbor_builder_map_start_callback(void *context, size_t size): builder_callbacks.c'],['../builder__callbacks_8h.html#a683589f26de39eaa69e833084bc74279',1,'cbor_builder_map_start_callback(void *, size_t): builder_callbacks.c']]], + ['cbor_5fbuilder_5fnegint16_5fcallback',['cbor_builder_negint16_callback',['../builder__callbacks_8c.html#a355c63dd0e941d9f3bc18b95876d7b39',1,'cbor_builder_negint16_callback(void *context, uint16_t value): builder_callbacks.c'],['../builder__callbacks_8h.html#a05a3b8a63bd44609664ba1480058aeef',1,'cbor_builder_negint16_callback(void *, uint16_t): builder_callbacks.c']]], + ['cbor_5fbuilder_5fnegint32_5fcallback',['cbor_builder_negint32_callback',['../builder__callbacks_8c.html#a4b0a2d222bc823bb88f9b8ba38e00f05',1,'cbor_builder_negint32_callback(void *context, uint32_t value): builder_callbacks.c'],['../builder__callbacks_8h.html#af2c80ac4543ac875b84b8eb8c619ce4a',1,'cbor_builder_negint32_callback(void *, uint32_t): builder_callbacks.c']]], + ['cbor_5fbuilder_5fnegint64_5fcallback',['cbor_builder_negint64_callback',['../builder__callbacks_8c.html#ab99cc7da548fd54ed22a6c988be037ae',1,'cbor_builder_negint64_callback(void *context, uint64_t value): builder_callbacks.c'],['../builder__callbacks_8h.html#aa92b23a8c36df6157fde447a58241f8d',1,'cbor_builder_negint64_callback(void *, uint64_t): builder_callbacks.c']]], + ['cbor_5fbuilder_5fnegint8_5fcallback',['cbor_builder_negint8_callback',['../builder__callbacks_8c.html#a9b1fada71e0c9cbc90ed6089ffc45958',1,'cbor_builder_negint8_callback(void *context, uint8_t value): builder_callbacks.c'],['../builder__callbacks_8h.html#a0d95d98def615e7f4ea10cb680d2fadd',1,'cbor_builder_negint8_callback(void *, uint8_t): builder_callbacks.c']]], + ['cbor_5fbuilder_5fnull_5fcallback',['cbor_builder_null_callback',['../builder__callbacks_8c.html#a54852cd4c120b368d9b9b5cffb622303',1,'cbor_builder_null_callback(void *context): builder_callbacks.c'],['../builder__callbacks_8h.html#a5be99aad4fcaf9a86e2e583f3584fbd2',1,'cbor_builder_null_callback(void *): builder_callbacks.c']]], + ['cbor_5fbuilder_5fstring_5fcallback',['cbor_builder_string_callback',['../builder__callbacks_8c.html#aa10a165cd945c03ad09ae0866287f6bd',1,'cbor_builder_string_callback(void *context, cbor_data data, size_t length): builder_callbacks.c'],['../builder__callbacks_8h.html#a0752a26117a4ac11a0b31969185774c9',1,'cbor_builder_string_callback(void *, cbor_data, size_t): builder_callbacks.c']]], + ['cbor_5fbuilder_5fstring_5fstart_5fcallback',['cbor_builder_string_start_callback',['../builder__callbacks_8c.html#a269aa36265c6fb1b18cad2a14cf355a0',1,'cbor_builder_string_start_callback(void *context): builder_callbacks.c'],['../builder__callbacks_8h.html#a6ad59b5991aeeb560d2984abc85f1240',1,'cbor_builder_string_start_callback(void *): builder_callbacks.c']]], + ['cbor_5fbuilder_5ftag_5fcallback',['cbor_builder_tag_callback',['../builder__callbacks_8c.html#aa2b3ea257a52e3f002c79ca2740ef6a2',1,'cbor_builder_tag_callback(void *context, uint64_t value): builder_callbacks.c'],['../builder__callbacks_8h.html#a22b27f58982df6e585ef19a215b0b796',1,'cbor_builder_tag_callback(void *, uint64_t): builder_callbacks.c']]], + ['cbor_5fbuilder_5fuint16_5fcallback',['cbor_builder_uint16_callback',['../builder__callbacks_8c.html#a8cac42a8aeaf19f532ccc5c21e851e8c',1,'cbor_builder_uint16_callback(void *context, uint16_t value): builder_callbacks.c'],['../builder__callbacks_8h.html#ae480def467a853de4da395b83583c364',1,'cbor_builder_uint16_callback(void *, uint16_t): builder_callbacks.c']]], + ['cbor_5fbuilder_5fuint32_5fcallback',['cbor_builder_uint32_callback',['../builder__callbacks_8c.html#a69e152b1c2523502456301f878b07c49',1,'cbor_builder_uint32_callback(void *context, uint32_t value): builder_callbacks.c'],['../builder__callbacks_8h.html#a926c3b93cb1745fe7fa4bb0adf5896f7',1,'cbor_builder_uint32_callback(void *, uint32_t): builder_callbacks.c']]], + ['cbor_5fbuilder_5fuint64_5fcallback',['cbor_builder_uint64_callback',['../builder__callbacks_8c.html#a119060abe3c5b1d936514063ca4db22e',1,'cbor_builder_uint64_callback(void *context, uint64_t value): builder_callbacks.c'],['../builder__callbacks_8h.html#afbff23673e4980d9bafd0a2b61934a33',1,'cbor_builder_uint64_callback(void *, uint64_t): builder_callbacks.c']]], + ['cbor_5fbuilder_5fuint8_5fcallback',['cbor_builder_uint8_callback',['../builder__callbacks_8c.html#aa3cd19f25b7f29ddcd153e30b2e09824',1,'cbor_builder_uint8_callback(void *context, uint8_t value): builder_callbacks.c'],['../builder__callbacks_8h.html#a98b2405c0f8f7574df6f1b974d8e1e33',1,'cbor_builder_uint8_callback(void *, uint8_t): builder_callbacks.c']]], + ['cbor_5fbuilder_5fundefined_5fcallback',['cbor_builder_undefined_callback',['../builder__callbacks_8c.html#a452f42c05cdf422e6526bc0d7cc135dc',1,'cbor_builder_undefined_callback(void *context): builder_callbacks.c'],['../builder__callbacks_8h.html#a5eea26b61770e178e2c6b2ec17ecca59',1,'cbor_builder_undefined_callback(void *): builder_callbacks.c']]], + ['cbor_5fbytestring_5fadd_5fchunk',['cbor_bytestring_add_chunk',['../bytestrings_8c.html#a5dc8c27d6e7acfdd05fdc15c01e25b47',1,'cbor_bytestring_add_chunk(cbor_item_t *item, cbor_item_t *chunk): bytestrings.c'],['../bytestrings_8h.html#a5dc8c27d6e7acfdd05fdc15c01e25b47',1,'cbor_bytestring_add_chunk(cbor_item_t *item, cbor_item_t *chunk): bytestrings.c']]], + ['cbor_5fbytestring_5fchunk_5fcount',['cbor_bytestring_chunk_count',['../bytestrings_8c.html#ad02102832d452fd5a5cfa96272b1095d',1,'cbor_bytestring_chunk_count(const cbor_item_t *item): bytestrings.c'],['../bytestrings_8h.html#ad02102832d452fd5a5cfa96272b1095d',1,'cbor_bytestring_chunk_count(const cbor_item_t *item): bytestrings.c']]], + ['cbor_5fbytestring_5fchunks_5fhandle',['cbor_bytestring_chunks_handle',['../bytestrings_8c.html#a8ab6255d6f8f209149bdf794dffed849',1,'cbor_bytestring_chunks_handle(const cbor_item_t *item): bytestrings.c'],['../bytestrings_8h.html#a8ab6255d6f8f209149bdf794dffed849',1,'cbor_bytestring_chunks_handle(const cbor_item_t *item): bytestrings.c']]], + ['cbor_5fbytestring_5fhandle',['cbor_bytestring_handle',['../bytestrings_8c.html#a2c9d6feda3d0f87782168fa817f83be6',1,'cbor_bytestring_handle(const cbor_item_t *item): bytestrings.c'],['../bytestrings_8h.html#a05c09e147b0a244abc481b0b078ebcb9',1,'cbor_bytestring_handle(const cbor_item_t *item): bytestrings.c']]], + ['cbor_5fbytestring_5fis_5fdefinite',['cbor_bytestring_is_definite',['../bytestrings_8c.html#a368222dbbcea25e06469524e26587e2a',1,'cbor_bytestring_is_definite(const cbor_item_t *item): bytestrings.c'],['../bytestrings_8h.html#a368222dbbcea25e06469524e26587e2a',1,'cbor_bytestring_is_definite(const cbor_item_t *item): bytestrings.c']]], + ['cbor_5fbytestring_5fis_5findefinite',['cbor_bytestring_is_indefinite',['../bytestrings_8c.html#a3a6c450f105bb18b6b56d20f0de4786a',1,'cbor_bytestring_is_indefinite(const cbor_item_t *item): bytestrings.c'],['../bytestrings_8h.html#a3a6c450f105bb18b6b56d20f0de4786a',1,'cbor_bytestring_is_indefinite(const cbor_item_t *item): bytestrings.c']]], + ['cbor_5fbytestring_5flength',['cbor_bytestring_length',['../bytestrings_8c.html#a7c15a63fdc3830707eac0877a261f1cd',1,'cbor_bytestring_length(const cbor_item_t *item): bytestrings.c'],['../bytestrings_8h.html#a7c15a63fdc3830707eac0877a261f1cd',1,'cbor_bytestring_length(const cbor_item_t *item): bytestrings.c']]], + ['cbor_5fbytestring_5fset_5fhandle',['cbor_bytestring_set_handle',['../bytestrings_8c.html#a513fd06374cb4faa9e909c85e4248199',1,'cbor_bytestring_set_handle(cbor_item_t *item, cbor_mutable_data CBOR_RESTRICT_POINTER data, size_t length): bytestrings.c'],['../bytestrings_8h.html#a513fd06374cb4faa9e909c85e4248199',1,'cbor_bytestring_set_handle(cbor_item_t *item, cbor_mutable_data CBOR_RESTRICT_POINTER data, size_t length): bytestrings.c']]], + ['cbor_5fcallbacks',['cbor_callbacks',['../structcbor__callbacks.html',1,'']]], + ['cbor_5fcollection_5fcallback',['cbor_collection_callback',['../callbacks_8h.html#a67253dd2fa8a2a7192cdc7f0cef5bc15',1,'callbacks.h']]], + ['cbor_5fcopy',['cbor_copy',['../cbor_8c.html#ac54800327647ea17db0f40d72873f505',1,'cbor_copy(cbor_item_t *item): cbor.c'],['../cbor_8h.html#ac54800327647ea17db0f40d72873f505',1,'cbor_copy(cbor_item_t *item): cbor.c']]], + ['cbor_5fctrl_5ffalse',['CBOR_CTRL_FALSE',['../data_8h.html#a6454b577999b479ac2585af7c204ae3babbcec81d7145fdf31329e07a0bb064bd',1,'data.h']]], + ['cbor_5fctrl_5fis_5fbool',['cbor_ctrl_is_bool',['../floats__ctrls_8c.html#ac0c984ec79209ad710dd960ca9566f16',1,'cbor_ctrl_is_bool(const cbor_item_t *item): floats_ctrls.c'],['../floats__ctrls_8h.html#ac0c984ec79209ad710dd960ca9566f16',1,'cbor_ctrl_is_bool(const cbor_item_t *item): floats_ctrls.c']]], + ['cbor_5fctrl_5fnone',['CBOR_CTRL_NONE',['../data_8h.html#a6454b577999b479ac2585af7c204ae3bac8748342f8c8e6468de589a86cf736cc',1,'data.h']]], + ['cbor_5fctrl_5fnull',['CBOR_CTRL_NULL',['../data_8h.html#a6454b577999b479ac2585af7c204ae3ba64e142780db46497df37d5cfb40ef8fd',1,'data.h']]], + ['cbor_5fctrl_5ftrue',['CBOR_CTRL_TRUE',['../data_8h.html#a6454b577999b479ac2585af7c204ae3baf4f149be1611cec155482645ff2be8de',1,'data.h']]], + ['cbor_5fctrl_5fundef',['CBOR_CTRL_UNDEF',['../data_8h.html#a6454b577999b479ac2585af7c204ae3ba5354f70478e0acf68bf1682229b05b6d',1,'data.h']]], + ['cbor_5fctrl_5fvalue',['cbor_ctrl_value',['../floats__ctrls_8c.html#a9d15faa0a33797ce0b8a1a66d5773d88',1,'cbor_ctrl_value(const cbor_item_t *item): floats_ctrls.c'],['../floats__ctrls_8h.html#a9d15faa0a33797ce0b8a1a66d5773d88',1,'cbor_ctrl_value(const cbor_item_t *item): floats_ctrls.c']]], + ['cbor_5fdata',['cbor_data',['../data_8h.html#a121c5944682215e742475f12f07c0a72',1,'data.h']]], + ['cbor_5fdecoder_5febuffer',['CBOR_DECODER_EBUFFER',['../data_8h.html#abfc88122444f085a1a3fee01687329fdace2bb1bc04e3f906bd02708e991289b8',1,'data.h']]], + ['cbor_5fdecoder_5ferror',['CBOR_DECODER_ERROR',['../data_8h.html#abfc88122444f085a1a3fee01687329fda410c07e9ff710573d28db2794e008cb4',1,'data.h']]], + ['cbor_5fdecoder_5ffinished',['CBOR_DECODER_FINISHED',['../data_8h.html#abfc88122444f085a1a3fee01687329fda2ebc9567c96c353e07f9d9025054c31a',1,'data.h']]], + ['cbor_5fdecoder_5fnedata',['CBOR_DECODER_NEDATA',['../data_8h.html#abfc88122444f085a1a3fee01687329fda178d826b0e7dd7571d1f2c3be335528d',1,'data.h']]], + ['cbor_5fdecoder_5fresult',['cbor_decoder_result',['../structcbor__decoder__result.html',1,'']]], + ['cbor_5fdecoder_5fstatus',['cbor_decoder_status',['../data_8h.html#abfc88122444f085a1a3fee01687329fd',1,'data.h']]], + ['cbor_5fdecref',['cbor_decref',['../common_8c.html#aedbe700f2241de4282aedaae017e0de9',1,'cbor_decref(cbor_item_t **item_ref): common.c'],['../common_8h.html#aa10ebec46eddc9312ec46a0898b5d196',1,'cbor_decref(cbor_item_t **item): common.c']]], + ['cbor_5fdouble_5fcallback',['cbor_double_callback',['../callbacks_8h.html#a02f5e0ce638740f503b333de971fe159',1,'callbacks.h']]], + ['cbor_5fdummy_5fcallback',['CBOR_DUMMY_CALLBACK',['../callbacks_8c.html#a600badad1d123dd9fb8d74d5f2a29a5e',1,'callbacks.c']]], + ['cbor_5fempty_5fcallbacks',['cbor_empty_callbacks',['../callbacks_8h.html#a3500c93f246a6c53816e52c70fe8d640',1,'callbacks.h']]], + ['cbor_5fencode_5farray_5fstart',['cbor_encode_array_start',['../encoding_8c.html#a614462c893ad375d880178f490e4d15f',1,'cbor_encode_array_start(size_t length, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a7cf3eb01b259b2e4ea9fddd4b1a37d9a',1,'cbor_encode_array_start(size_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fbool',['cbor_encode_bool',['../encoding_8c.html#af81d6fb8076d7b413b1a520ff971cae9',1,'cbor_encode_bool(bool value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a9c298069fd256fe98007f8ebb2c3b7e4',1,'cbor_encode_bool(bool, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fbreak',['cbor_encode_break',['../encoding_8c.html#ad7599c3f22138b063730b6f08637392c',1,'cbor_encode_break(unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#aaefd57d48643806d1b5bc7ba304f9060',1,'cbor_encode_break(unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fbytestring_5fstart',['cbor_encode_bytestring_start',['../encoding_8c.html#acb1b57ebb4156007ddca6d724b9f794a',1,'cbor_encode_bytestring_start(size_t length, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a2105cee299618a9598bc39f5ae215c0b',1,'cbor_encode_bytestring_start(size_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fctrl',['cbor_encode_ctrl',['../encoding_8c.html#a1d955e4c1bb4a2e3977b7387c1fafe01',1,'cbor_encode_ctrl(uint8_t value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a9cfc3c3ca85e6acb7258cf0fb33b3543',1,'cbor_encode_ctrl(uint8_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fdouble',['cbor_encode_double',['../encoding_8c.html#a772417a925ae556f40b6811d3fba7834',1,'cbor_encode_double(double value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a63da011839918fac84a7bdef9f0f24f2',1,'cbor_encode_double(double, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fhalf',['cbor_encode_half',['../encoding_8c.html#a6d25549fbb8a0e147f2d2454a1da0bfa',1,'cbor_encode_half(float value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a570e080b214be14a3263494b3d5d19f2',1,'cbor_encode_half(float, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5findef_5farray_5fstart',['cbor_encode_indef_array_start',['../encoding_8c.html#a8794b7d67dc4b94c7191ba97518472a6',1,'cbor_encode_indef_array_start(unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a12630f19ed6040b193ac79b66b3082a4',1,'cbor_encode_indef_array_start(unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5findef_5fbytestring_5fstart',['cbor_encode_indef_bytestring_start',['../encoding_8c.html#a72fd1996d81b30a81381707708aa186d',1,'cbor_encode_indef_bytestring_start(unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a180ccc6318bf86af67bfbdd0955548df',1,'cbor_encode_indef_bytestring_start(unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5findef_5fmap_5fstart',['cbor_encode_indef_map_start',['../encoding_8c.html#a56b2ad41ccc983fce2dbaae97beb760d',1,'cbor_encode_indef_map_start(unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a7c73f8226b908bc2e917e7d0fa3125c7',1,'cbor_encode_indef_map_start(unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5findef_5fstring_5fstart',['cbor_encode_indef_string_start',['../encoding_8c.html#ae5fc25aee8ee4bb8605e105227cb21f5',1,'cbor_encode_indef_string_start(unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a743eaba2ad48bc23acbf567e1eb75eac',1,'cbor_encode_indef_string_start(unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fmap_5fstart',['cbor_encode_map_start',['../encoding_8c.html#a1dc2d5e72fc65fa52120bd9e20164277',1,'cbor_encode_map_start(size_t length, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a89ca7a5834e479190406de4fa886a975',1,'cbor_encode_map_start(size_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fnegint',['cbor_encode_negint',['../encoding_8c.html#a6002fa0d83e5e59f995eabe5ecf157e9',1,'cbor_encode_negint(uint64_t value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a1cc1e5a1b1ee934291abcfef75626616',1,'cbor_encode_negint(uint64_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fnegint16',['cbor_encode_negint16',['../encoding_8c.html#a000a6bd597e43b3b438a5659db183f40',1,'cbor_encode_negint16(uint16_t value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a0df96946a16ed6ab94d45adb7b1a14d9',1,'cbor_encode_negint16(uint16_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fnegint32',['cbor_encode_negint32',['../encoding_8c.html#aaa7b2d79e956ca4ac9db8fc3d140d6d9',1,'cbor_encode_negint32(uint32_t value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#ac1854fff9cbe4be7fa08fd311d851922',1,'cbor_encode_negint32(uint32_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fnegint64',['cbor_encode_negint64',['../encoding_8c.html#a4553dcc867b95ecfd6eb0dae79f69d81',1,'cbor_encode_negint64(uint64_t value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a1d803ca867e14739665283bee5b66b58',1,'cbor_encode_negint64(uint64_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fnegint8',['cbor_encode_negint8',['../encoding_8c.html#ac5f38c2536db32249b853d5f41ac91b3',1,'cbor_encode_negint8(uint8_t value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#aa850f2be3940fbc309fc9f611ac2989b',1,'cbor_encode_negint8(uint8_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fnull',['cbor_encode_null',['../encoding_8c.html#ad16f49267d664b734ac6bd416064a8e2',1,'cbor_encode_null(unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a01795a392b9945c416ee82f66ff5d50f',1,'cbor_encode_null(unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fsingle',['cbor_encode_single',['../encoding_8c.html#add2c3c8759e19e86cbf9ae31dd897ee1',1,'cbor_encode_single(float value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a7ea12535f26f24032ea9e0975cac3cec',1,'cbor_encode_single(float, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fstring_5fstart',['cbor_encode_string_start',['../encoding_8c.html#abb8a85db156a80932399cce55a0694f6',1,'cbor_encode_string_start(size_t length, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a58f3f82978563d732a03d4b585a1a9ea',1,'cbor_encode_string_start(size_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5ftag',['cbor_encode_tag',['../encoding_8c.html#a41bdb572cc73d9648f4c13e8465b1dcb',1,'cbor_encode_tag(uint64_t value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a153f903a2763439d0be4dc13d8e01b81',1,'cbor_encode_tag(uint64_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fuint',['cbor_encode_uint',['../encoding_8c.html#aa5fd377e949f8bf0e54d911341d5e23f',1,'cbor_encode_uint(uint64_t value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a7863aaacf5c10dbc7770010250525ed3',1,'cbor_encode_uint(uint64_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fuint16',['cbor_encode_uint16',['../encoding_8c.html#a978187eb1d49113f35204e16638a0dfa',1,'cbor_encode_uint16(uint16_t value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a56bfab261e1beaee3d41faf6463b04bf',1,'cbor_encode_uint16(uint16_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fuint32',['cbor_encode_uint32',['../encoding_8c.html#abdc5b7670f02130ba5d0ffb01b25fab2',1,'cbor_encode_uint32(uint32_t value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a90ad4b026bc13f3807e4b89409773f0b',1,'cbor_encode_uint32(uint32_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fuint64',['cbor_encode_uint64',['../encoding_8c.html#a9bdbc2a0030ec8edd071a9036e7c17bb',1,'cbor_encode_uint64(uint64_t value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a4a235fd97a2a4d13ba6d3c4306c6a643',1,'cbor_encode_uint64(uint64_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fuint8',['cbor_encode_uint8',['../encoding_8c.html#a6c970c1c3fe2a753d76ad7343b18fc43',1,'cbor_encode_uint8(uint8_t value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#afea0835d5129909ae6ccb4cbfc015970',1,'cbor_encode_uint8(uint8_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fundef',['cbor_encode_undef',['../encoding_8c.html#a7330d8c4f55a054151064acea0da181c',1,'cbor_encode_undef(unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#ace6e55205c8e7fb624cb1f39d46f1479',1,'cbor_encode_undef(unsigned char *, size_t): encoding.c']]], + ['cbor_5ferr_5fmalformated',['CBOR_ERR_MALFORMATED',['../data_8h.html#a13ad43c61d917938e0ce26173e6b2eb6af2783808f2e475f57583511ef5eb6ea7',1,'data.h']]], + ['cbor_5ferr_5fmemerror',['CBOR_ERR_MEMERROR',['../data_8h.html#a13ad43c61d917938e0ce26173e6b2eb6ae408fbed8924a3eeb005a8c6f79136cb',1,'data.h']]], + ['cbor_5ferr_5fnodata',['CBOR_ERR_NODATA',['../data_8h.html#a13ad43c61d917938e0ce26173e6b2eb6a427a7d0fde29a84566e040d065cca6d1',1,'data.h']]], + ['cbor_5ferr_5fnone',['CBOR_ERR_NONE',['../data_8h.html#a13ad43c61d917938e0ce26173e6b2eb6a711ecd32adcc030541f2cfb58f69856d',1,'data.h']]], + ['cbor_5ferr_5fnotenoughdata',['CBOR_ERR_NOTENOUGHDATA',['../data_8h.html#a13ad43c61d917938e0ce26173e6b2eb6acdd41b7dd2155b68a7e78108551bbd9a',1,'data.h']]], + ['cbor_5ferr_5fsyntaxerror',['CBOR_ERR_SYNTAXERROR',['../data_8h.html#a13ad43c61d917938e0ce26173e6b2eb6a001d313c68a4f7531026f63af3a755c7',1,'data.h']]], + ['cbor_5ferror',['cbor_error',['../structcbor__error.html',1,'']]], + ['cbor_5ferror_5fcode',['cbor_error_code',['../data_8h.html#a13ad43c61d917938e0ce26173e6b2eb6',1,'data.h']]], + ['cbor_5ffloat_5f0',['CBOR_FLOAT_0',['../data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7ac3c49d03756f116648957c5d996f48b4',1,'data.h']]], + ['cbor_5ffloat_5f16',['CBOR_FLOAT_16',['../data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7a6a044cc40003cef84432fe92780514e5',1,'data.h']]], + ['cbor_5ffloat_5f32',['CBOR_FLOAT_32',['../data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7a0b2ba87d2508e98e5f6fee7bf8beedd4',1,'data.h']]], + ['cbor_5ffloat_5f64',['CBOR_FLOAT_64',['../data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7a792f18e66a6da153eb4f40a8f894c653',1,'data.h']]], + ['cbor_5ffloat_5fcallback',['cbor_float_callback',['../callbacks_8h.html#acb7749e3b48867230d2405133f594e0e',1,'callbacks.h']]], + ['cbor_5ffloat_5fctrl_5fis_5fctrl',['cbor_float_ctrl_is_ctrl',['../floats__ctrls_8c.html#a2b304df65e44de17064bc3de154522fa',1,'cbor_float_ctrl_is_ctrl(const cbor_item_t *item): floats_ctrls.c'],['../floats__ctrls_8h.html#a2b304df65e44de17064bc3de154522fa',1,'cbor_float_ctrl_is_ctrl(const cbor_item_t *item): floats_ctrls.c']]], + ['cbor_5ffloat_5fget_5ffloat',['cbor_float_get_float',['../floats__ctrls_8c.html#ad8316cf8b830431ef9ce9562ae679563',1,'cbor_float_get_float(const cbor_item_t *item): floats_ctrls.c'],['../floats__ctrls_8h.html#ad8316cf8b830431ef9ce9562ae679563',1,'cbor_float_get_float(const cbor_item_t *item): floats_ctrls.c']]], + ['cbor_5ffloat_5fget_5ffloat2',['cbor_float_get_float2',['../floats__ctrls_8c.html#aa85d79e0f060173a9dccdada2e551cf9',1,'cbor_float_get_float2(const cbor_item_t *item): floats_ctrls.c'],['../floats__ctrls_8h.html#aa85d79e0f060173a9dccdada2e551cf9',1,'cbor_float_get_float2(const cbor_item_t *item): floats_ctrls.c']]], + ['cbor_5ffloat_5fget_5ffloat4',['cbor_float_get_float4',['../floats__ctrls_8c.html#ad504d3d291810b0c39fc498be0bd2639',1,'cbor_float_get_float4(const cbor_item_t *item): floats_ctrls.c'],['../floats__ctrls_8h.html#ad504d3d291810b0c39fc498be0bd2639',1,'cbor_float_get_float4(const cbor_item_t *item): floats_ctrls.c']]], + ['cbor_5ffloat_5fget_5ffloat8',['cbor_float_get_float8',['../floats__ctrls_8c.html#a2f215940998d05730b23b7e0e7ad8ebe',1,'cbor_float_get_float8(const cbor_item_t *item): floats_ctrls.c'],['../floats__ctrls_8h.html#a2f215940998d05730b23b7e0e7ad8ebe',1,'cbor_float_get_float8(const cbor_item_t *item): floats_ctrls.c']]], + ['cbor_5ffloat_5fget_5fwidth',['cbor_float_get_width',['../floats__ctrls_8c.html#a05778dc7349be636d47440f758ec96a6',1,'cbor_float_get_width(const cbor_item_t *item): floats_ctrls.c'],['../floats__ctrls_8h.html#a05778dc7349be636d47440f758ec96a6',1,'cbor_float_get_width(const cbor_item_t *item): floats_ctrls.c']]], + ['cbor_5ffloat_5fwidth',['cbor_float_width',['../data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7',1,'data.h']]], + ['cbor_5fget_5fint',['cbor_get_int',['../ints_8c.html#aacf93e9a8a2c4217d5cd84207b957cba',1,'cbor_get_int(const cbor_item_t *item): ints.c'],['../ints_8h.html#aacf93e9a8a2c4217d5cd84207b957cba',1,'cbor_get_int(const cbor_item_t *item): ints.c']]], + ['cbor_5fget_5fuint16',['cbor_get_uint16',['../ints_8c.html#a06a0997aed16fe6aa540f57bf40ce400',1,'cbor_get_uint16(const cbor_item_t *item): ints.c'],['../ints_8h.html#a06a0997aed16fe6aa540f57bf40ce400',1,'cbor_get_uint16(const cbor_item_t *item): ints.c']]], + ['cbor_5fget_5fuint32',['cbor_get_uint32',['../ints_8c.html#a0480e5b5849b757aa9416a4c1d51b36d',1,'cbor_get_uint32(const cbor_item_t *item): ints.c'],['../ints_8h.html#a0480e5b5849b757aa9416a4c1d51b36d',1,'cbor_get_uint32(const cbor_item_t *item): ints.c']]], + ['cbor_5fget_5fuint64',['cbor_get_uint64',['../ints_8c.html#a839ec2dc97dda1db54657cec50387a12',1,'cbor_get_uint64(const cbor_item_t *item): ints.c'],['../ints_8h.html#a839ec2dc97dda1db54657cec50387a12',1,'cbor_get_uint64(const cbor_item_t *item): ints.c']]], + ['cbor_5fget_5fuint8',['cbor_get_uint8',['../ints_8c.html#a2379bf36318e8e4faa7434c74d8553fb',1,'cbor_get_uint8(const cbor_item_t *item): ints.c'],['../ints_8h.html#a2379bf36318e8e4faa7434c74d8553fb',1,'cbor_get_uint8(const cbor_item_t *item): ints.c']]], + ['cbor_5fhex_5fversion',['CBOR_HEX_VERSION',['../common_8h.html#ac61efb646fdd1936ac0ce32829f947b8',1,'common.h']]], + ['cbor_5fincref',['cbor_incref',['../common_8c.html#aa62e72f275c2f0fa604896bfed18e992',1,'cbor_incref(cbor_item_t *item): common.c'],['../common_8h.html#aa62e72f275c2f0fa604896bfed18e992',1,'cbor_incref(cbor_item_t *item): common.c']]], + ['cbor_5findefinite_5fstring_5fdata',['cbor_indefinite_string_data',['../structcbor__indefinite__string__data.html',1,'']]], + ['cbor_5fint16_5fcallback',['cbor_int16_callback',['../callbacks_8h.html#a8b032aeecbaf7f41b6b4264db1de38c2',1,'callbacks.h']]], + ['cbor_5fint32_5fcallback',['cbor_int32_callback',['../callbacks_8h.html#ab3fce095b0d7875e7e67ab57395abf30',1,'callbacks.h']]], + ['cbor_5fint64_5fcallback',['cbor_int64_callback',['../callbacks_8h.html#af6d5f65fc16e017aaf6278321ee6caa8',1,'callbacks.h']]], + ['cbor_5fint8_5fcallback',['cbor_int8_callback',['../callbacks_8h.html#a389ed17563aeec353a493ef3b60eb593',1,'callbacks.h']]], + ['cbor_5fint_5f16',['CBOR_INT_16',['../data_8h.html#ae0fc9740f108f0f0078b93712b061e57a3a9caf604c45ce423b332e91f7370822',1,'data.h']]], + ['cbor_5fint_5f32',['CBOR_INT_32',['../data_8h.html#ae0fc9740f108f0f0078b93712b061e57ad429fc90ccfb94ec85996920fe115b51',1,'data.h']]], + ['cbor_5fint_5f64',['CBOR_INT_64',['../data_8h.html#ae0fc9740f108f0f0078b93712b061e57aafaef7945451a7f4d12298f12f8acb2d',1,'data.h']]], + ['cbor_5fint_5f8',['CBOR_INT_8',['../data_8h.html#ae0fc9740f108f0f0078b93712b061e57aaa167d7a4fac34f2bae123761b4b6fc8',1,'data.h']]], + ['cbor_5fint_5fget_5fwidth',['cbor_int_get_width',['../ints_8c.html#a30bcfb58aa41d4c44bc2d5d6b7de105d',1,'cbor_int_get_width(const cbor_item_t *item): ints.c'],['../ints_8h.html#a30bcfb58aa41d4c44bc2d5d6b7de105d',1,'cbor_int_get_width(const cbor_item_t *item): ints.c']]], + ['cbor_5fint_5fwidth',['cbor_int_width',['../data_8h.html#ae0fc9740f108f0f0078b93712b061e57',1,'data.h']]], + ['cbor_5fintermediate_5fdecref',['cbor_intermediate_decref',['../common_8c.html#a4ed20937cc091bc1f481d53787fe306b',1,'cbor_intermediate_decref(cbor_item_t *item): common.c'],['../common_8h.html#a4ed20937cc091bc1f481d53787fe306b',1,'cbor_intermediate_decref(cbor_item_t *item): common.c']]], + ['cbor_5fis_5fbool',['cbor_is_bool',['../common_8c.html#a5618a3689e31829f4f84da008e20798e',1,'cbor_is_bool(const cbor_item_t *item): common.c'],['../common_8h.html#a5618a3689e31829f4f84da008e20798e',1,'cbor_is_bool(const cbor_item_t *item): common.c']]], + ['cbor_5fis_5ffloat',['cbor_is_float',['../common_8c.html#a4dde28c548375aa954f1cad15b3739aa',1,'cbor_is_float(const cbor_item_t *item): common.c'],['../common_8h.html#a4dde28c548375aa954f1cad15b3739aa',1,'cbor_is_float(const cbor_item_t *item): common.c']]], + ['cbor_5fis_5fint',['cbor_is_int',['../common_8c.html#a4e705f34221ba434756a4a1f8e3325e6',1,'cbor_is_int(const cbor_item_t *item): common.c'],['../common_8h.html#a4e705f34221ba434756a4a1f8e3325e6',1,'cbor_is_int(const cbor_item_t *item): common.c']]], + ['cbor_5fis_5fnull',['cbor_is_null',['../common_8c.html#ad1f5efac647b4d9c437c4441d1177e01',1,'cbor_is_null(const cbor_item_t *item): common.c'],['../common_8h.html#ad1f5efac647b4d9c437c4441d1177e01',1,'cbor_is_null(const cbor_item_t *item): common.c']]], + ['cbor_5fis_5fundef',['cbor_is_undef',['../common_8c.html#afb7eb76a2953224c96d194640f3092e3',1,'cbor_is_undef(const cbor_item_t *item): common.c'],['../common_8h.html#afb7eb76a2953224c96d194640f3092e3',1,'cbor_is_undef(const cbor_item_t *item): common.c']]], + ['cbor_5fisa_5farray',['cbor_isa_array',['../common_8c.html#a9ed0fa96105c211867c5032f2a5a8b20',1,'cbor_isa_array(const cbor_item_t *item): common.c'],['../common_8h.html#a9ed0fa96105c211867c5032f2a5a8b20',1,'cbor_isa_array(const cbor_item_t *item): common.c']]], + ['cbor_5fisa_5fbytestring',['cbor_isa_bytestring',['../common_8c.html#adedaf37527b8d8261e287a0001e5a190',1,'cbor_isa_bytestring(const cbor_item_t *item): common.c'],['../common_8h.html#adedaf37527b8d8261e287a0001e5a190',1,'cbor_isa_bytestring(const cbor_item_t *item): common.c']]], + ['cbor_5fisa_5ffloat_5fctrl',['cbor_isa_float_ctrl',['../common_8c.html#a983dec76e934c49ed6979226f9db4386',1,'cbor_isa_float_ctrl(const cbor_item_t *item): common.c'],['../common_8h.html#a983dec76e934c49ed6979226f9db4386',1,'cbor_isa_float_ctrl(const cbor_item_t *item): common.c']]], + ['cbor_5fisa_5fmap',['cbor_isa_map',['../common_8c.html#af0de041481b61922d0995b63f82d8ddd',1,'cbor_isa_map(const cbor_item_t *item): common.c'],['../common_8h.html#af0de041481b61922d0995b63f82d8ddd',1,'cbor_isa_map(const cbor_item_t *item): common.c']]], + ['cbor_5fisa_5fnegint',['cbor_isa_negint',['../common_8c.html#a0ca5042e3807d2cc9c3d40f9266460dd',1,'cbor_isa_negint(const cbor_item_t *item): common.c'],['../common_8h.html#a0ca5042e3807d2cc9c3d40f9266460dd',1,'cbor_isa_negint(const cbor_item_t *item): common.c']]], + ['cbor_5fisa_5fstring',['cbor_isa_string',['../common_8c.html#a02edd93bb8eab83bc2b8f8bf5d7d1335',1,'cbor_isa_string(const cbor_item_t *item): common.c'],['../common_8h.html#a02edd93bb8eab83bc2b8f8bf5d7d1335',1,'cbor_isa_string(const cbor_item_t *item): common.c']]], + ['cbor_5fisa_5ftag',['cbor_isa_tag',['../common_8c.html#a0d5054202c5ec9375e8daf5930087a61',1,'cbor_isa_tag(const cbor_item_t *item): common.c'],['../common_8h.html#a0d5054202c5ec9375e8daf5930087a61',1,'cbor_isa_tag(const cbor_item_t *item): common.c']]], + ['cbor_5fisa_5fuint',['cbor_isa_uint',['../common_8c.html#a682a023f7012a5b66a57847e6f8d386f',1,'cbor_isa_uint(const cbor_item_t *item): common.c'],['../common_8h.html#a682a023f7012a5b66a57847e6f8d386f',1,'cbor_isa_uint(const cbor_item_t *item): common.c']]], + ['cbor_5fitem_5fmetadata',['cbor_item_metadata',['../unioncbor__item__metadata.html',1,'']]], + ['cbor_5fitem_5ft',['cbor_item_t',['../structcbor__item__t.html',1,'cbor_item_t'],['../data_8h.html#afdaa4bcbbdd295d719e39ce0b5519419',1,'cbor_item_t(): data.h']]], + ['cbor_5fload',['cbor_load',['../cbor_8c.html#ae48d76b44e6de39a98ff3599d9acda8f',1,'cbor_load(cbor_data source, size_t source_size, struct cbor_load_result *result): cbor.c'],['../cbor_8h.html#ae48d76b44e6de39a98ff3599d9acda8f',1,'cbor_load(cbor_data source, size_t source_size, struct cbor_load_result *result): cbor.c']]], + ['cbor_5fload_5fresult',['cbor_load_result',['../structcbor__load__result.html',1,'']]], + ['cbor_5fmap_5fadd',['cbor_map_add',['../maps_8c.html#af077a30d8258ab02307c24af28036fca',1,'cbor_map_add(cbor_item_t *item, struct cbor_pair pair): maps.c'],['../maps_8h.html#af077a30d8258ab02307c24af28036fca',1,'cbor_map_add(cbor_item_t *item, struct cbor_pair pair): maps.c']]], + ['cbor_5fmap_5fallocated',['cbor_map_allocated',['../maps_8c.html#a3bf8e5779a3f1311b9b3f9e0a4e4f37e',1,'cbor_map_allocated(const cbor_item_t *item): maps.c'],['../maps_8h.html#a3bf8e5779a3f1311b9b3f9e0a4e4f37e',1,'cbor_map_allocated(const cbor_item_t *item): maps.c']]], + ['cbor_5fmap_5fhandle',['cbor_map_handle',['../maps_8c.html#a4cadc8eb7ae7ff8d3f73482fb24455c9',1,'cbor_map_handle(const cbor_item_t *item): maps.c'],['../maps_8h.html#a4cadc8eb7ae7ff8d3f73482fb24455c9',1,'cbor_map_handle(const cbor_item_t *item): maps.c']]], + ['cbor_5fmap_5fis_5fdefinite',['cbor_map_is_definite',['../maps_8c.html#a0dccaa76ac293bb5a11dbca6d16f6253',1,'cbor_map_is_definite(const cbor_item_t *item): maps.c'],['../maps_8h.html#a0dccaa76ac293bb5a11dbca6d16f6253',1,'cbor_map_is_definite(const cbor_item_t *item): maps.c']]], + ['cbor_5fmap_5fis_5findefinite',['cbor_map_is_indefinite',['../maps_8c.html#a941462383a3c8a6e3a60be9778cd1913',1,'cbor_map_is_indefinite(const cbor_item_t *item): maps.c'],['../maps_8h.html#a941462383a3c8a6e3a60be9778cd1913',1,'cbor_map_is_indefinite(const cbor_item_t *item): maps.c']]], + ['cbor_5fmap_5fsize',['cbor_map_size',['../maps_8c.html#a1bbbee9c6f1eaa0ff4c19559fe109baf',1,'cbor_map_size(const cbor_item_t *item): maps.c'],['../maps_8h.html#a1bbbee9c6f1eaa0ff4c19559fe109baf',1,'cbor_map_size(const cbor_item_t *item): maps.c']]], + ['cbor_5fmark_5fnegint',['cbor_mark_negint',['../ints_8c.html#a6ef24d3e2636c02de092fdfc337276b1',1,'cbor_mark_negint(cbor_item_t *item): ints.c'],['../ints_8h.html#a6ef24d3e2636c02de092fdfc337276b1',1,'cbor_mark_negint(cbor_item_t *item): ints.c']]], + ['cbor_5fmark_5fuint',['cbor_mark_uint',['../ints_8c.html#aed6a5a44245b8447a768c95e351c2c0c',1,'cbor_mark_uint(cbor_item_t *item): ints.c'],['../ints_8h.html#aed6a5a44245b8447a768c95e351c2c0c',1,'cbor_mark_uint(cbor_item_t *item): ints.c']]], + ['cbor_5fmove',['cbor_move',['../common_8c.html#a327dce45c1cb680953555290dba8e35b',1,'cbor_move(cbor_item_t *item): common.c'],['../common_8h.html#a327dce45c1cb680953555290dba8e35b',1,'cbor_move(cbor_item_t *item): common.c']]], + ['cbor_5fmutable_5fdata',['cbor_mutable_data',['../data_8h.html#aabb40e458ece40477e134a69c76693e8',1,'data.h']]], + ['cbor_5fnew_5fctrl',['cbor_new_ctrl',['../floats__ctrls_8c.html#a6154cefb44f9df7685a5f80d0a1e7379',1,'cbor_new_ctrl(): floats_ctrls.c'],['../floats__ctrls_8h.html#a6154cefb44f9df7685a5f80d0a1e7379',1,'cbor_new_ctrl(): floats_ctrls.c']]], + ['cbor_5fnew_5fdefinite_5farray',['cbor_new_definite_array',['../arrays_8c.html#a93d7c18019000d5e206a81a4cca70631',1,'cbor_new_definite_array(size_t size): arrays.c'],['../arrays_8h.html#a93d7c18019000d5e206a81a4cca70631',1,'cbor_new_definite_array(size_t size): arrays.c']]], + ['cbor_5fnew_5fdefinite_5fbytestring',['cbor_new_definite_bytestring',['../bytestrings_8c.html#a86fc646f4520b90c85a704d27b46e69e',1,'cbor_new_definite_bytestring(): bytestrings.c'],['../bytestrings_8h.html#a86fc646f4520b90c85a704d27b46e69e',1,'cbor_new_definite_bytestring(): bytestrings.c']]], + ['cbor_5fnew_5fdefinite_5fmap',['cbor_new_definite_map',['../maps_8c.html#adab3c6ff2e51dcf2637567431cc6e76e',1,'cbor_new_definite_map(size_t size): maps.c'],['../maps_8h.html#adab3c6ff2e51dcf2637567431cc6e76e',1,'cbor_new_definite_map(size_t size): maps.c']]], + ['cbor_5fnew_5fdefinite_5fstring',['cbor_new_definite_string',['../strings_8c.html#a6e2516983e412b9d22fd1fccbeded632',1,'cbor_new_definite_string(): strings.c'],['../strings_8h.html#a6e2516983e412b9d22fd1fccbeded632',1,'cbor_new_definite_string(): strings.c']]], + ['cbor_5fnew_5ffloat2',['cbor_new_float2',['../floats__ctrls_8c.html#a1b332d66de1b49f202b257dc1d245c30',1,'cbor_new_float2(): floats_ctrls.c'],['../floats__ctrls_8h.html#a1b332d66de1b49f202b257dc1d245c30',1,'cbor_new_float2(): floats_ctrls.c']]], + ['cbor_5fnew_5ffloat4',['cbor_new_float4',['../floats__ctrls_8c.html#af5b06827916da81a32a1d68dd0727bb1',1,'cbor_new_float4(): floats_ctrls.c'],['../floats__ctrls_8h.html#af5b06827916da81a32a1d68dd0727bb1',1,'cbor_new_float4(): floats_ctrls.c']]], + ['cbor_5fnew_5ffloat8',['cbor_new_float8',['../floats__ctrls_8c.html#a128574918683dbe68c7dd5256e4f6bf3',1,'cbor_new_float8(): floats_ctrls.c'],['../floats__ctrls_8h.html#a128574918683dbe68c7dd5256e4f6bf3',1,'cbor_new_float8(): floats_ctrls.c']]], + ['cbor_5fnew_5findefinite_5farray',['cbor_new_indefinite_array',['../arrays_8c.html#aaec916ccc6f19782b6aef5ec1da2cc26',1,'cbor_new_indefinite_array(): arrays.c'],['../arrays_8h.html#aaec916ccc6f19782b6aef5ec1da2cc26',1,'cbor_new_indefinite_array(): arrays.c']]], + ['cbor_5fnew_5findefinite_5fbytestring',['cbor_new_indefinite_bytestring',['../bytestrings_8c.html#a6de9d6387e856c33d2ef8e8e9fdac0ac',1,'cbor_new_indefinite_bytestring(): bytestrings.c'],['../bytestrings_8h.html#a6de9d6387e856c33d2ef8e8e9fdac0ac',1,'cbor_new_indefinite_bytestring(): bytestrings.c']]], + ['cbor_5fnew_5findefinite_5fmap',['cbor_new_indefinite_map',['../maps_8c.html#a58ac69227f48815754651e93d15a5051',1,'cbor_new_indefinite_map(): maps.c'],['../maps_8h.html#a58ac69227f48815754651e93d15a5051',1,'cbor_new_indefinite_map(): maps.c']]], + ['cbor_5fnew_5findefinite_5fstring',['cbor_new_indefinite_string',['../strings_8c.html#a226f91c7bfd6be9b0a52cdc6f0b17741',1,'cbor_new_indefinite_string(): strings.c'],['../strings_8h.html#a226f91c7bfd6be9b0a52cdc6f0b17741',1,'cbor_new_indefinite_string(): strings.c']]], + ['cbor_5fnew_5fint16',['cbor_new_int16',['../ints_8c.html#a68f71f9574e0085f02a27bd0f58d4b55',1,'cbor_new_int16(): ints.c'],['../ints_8h.html#a68f71f9574e0085f02a27bd0f58d4b55',1,'cbor_new_int16(): ints.c']]], + ['cbor_5fnew_5fint32',['cbor_new_int32',['../ints_8c.html#a9cf9db24315a0e622746a546cc112467',1,'cbor_new_int32(): ints.c'],['../ints_8h.html#a9cf9db24315a0e622746a546cc112467',1,'cbor_new_int32(): ints.c']]], + ['cbor_5fnew_5fint64',['cbor_new_int64',['../ints_8c.html#ab863f47b9de930c5d014e0dbb5523d9d',1,'cbor_new_int64(): ints.c'],['../ints_8h.html#ab863f47b9de930c5d014e0dbb5523d9d',1,'cbor_new_int64(): ints.c']]], + ['cbor_5fnew_5fint8',['cbor_new_int8',['../ints_8c.html#ae4562e1314b122ae89712dbf0c48c14c',1,'cbor_new_int8(): ints.c'],['../ints_8h.html#ae4562e1314b122ae89712dbf0c48c14c',1,'cbor_new_int8(): ints.c']]], + ['cbor_5fnew_5fnull',['cbor_new_null',['../floats__ctrls_8c.html#a480b38bd08feb75b1bc705850595b4ee',1,'cbor_new_null(): floats_ctrls.c'],['../floats__ctrls_8h.html#a480b38bd08feb75b1bc705850595b4ee',1,'cbor_new_null(): floats_ctrls.c']]], + ['cbor_5fnew_5ftag',['cbor_new_tag',['../tags_8c.html#a54d7cc5a88a8c28cfb41b1f476a6d1e6',1,'cbor_new_tag(uint64_t value): tags.c'],['../tags_8h.html#a54d7cc5a88a8c28cfb41b1f476a6d1e6',1,'cbor_new_tag(uint64_t value): tags.c']]], + ['cbor_5fnew_5fundef',['cbor_new_undef',['../floats__ctrls_8c.html#a7d40d18664a72a266ce98030d30a7377',1,'cbor_new_undef(): floats_ctrls.c'],['../floats__ctrls_8h.html#a7d40d18664a72a266ce98030d30a7377',1,'cbor_new_undef(): floats_ctrls.c']]], + ['cbor_5fnull_5farray_5fstart_5fcallback',['cbor_null_array_start_callback',['../callbacks_8h.html#a354a9b4e2cea96d248c959fba6d7be95',1,'callbacks.h']]], + ['cbor_5fnull_5fboolean_5fcallback',['cbor_null_boolean_callback',['../callbacks_8h.html#a5c228e25d2c179a6fca5437deb28337f',1,'callbacks.h']]], + ['cbor_5fnull_5fbyte_5fstring_5fcallback',['cbor_null_byte_string_callback',['../callbacks_8h.html#a0ff7bd8646c081a0240641aa4715690d',1,'callbacks.h']]], + ['cbor_5fnull_5fbyte_5fstring_5fstart_5fcallback',['cbor_null_byte_string_start_callback',['../callbacks_8c.html#a26fcc93e4f4da0dc21274e4e2bfab1ed',1,'cbor_null_byte_string_start_callback(void *_ctx) CBOR_DUMMY_CALLBACK void cbor_null_array_start_callback(void *_ctx: callbacks.c'],['../callbacks_8h.html#aaf9938742cc3d556d940d410c1bb963e',1,'cbor_null_byte_string_start_callback(void *): callbacks.h']]], + ['cbor_5fnull_5ffloat2_5fcallback',['cbor_null_float2_callback',['../callbacks_8c.html#a179a4e1677a83ac36eb37fed183ef866',1,'cbor_null_float2_callback(void *_ctx, float _val) CBOR_DUMMY_CALLBACK void cbor_null_float4_callback(void *_ctx: callbacks.c'],['../callbacks_8h.html#a601aab51abff1d99ec652128d7722735',1,'cbor_null_float2_callback(void *, float): callbacks.h']]], + ['cbor_5fnull_5ffloat4_5fcallback',['cbor_null_float4_callback',['../callbacks_8h.html#a272e354db18ada5dab0093257f6c8d93',1,'callbacks.h']]], + ['cbor_5fnull_5ffloat8_5fcallback',['cbor_null_float8_callback',['../callbacks_8c.html#a1171a863a08151f1a98024b4dc9d4943',1,'cbor_null_float8_callback(void *_ctx, double _val) CBOR_DUMMY_CALLBACK void cbor_null_null_callback(void *_ctx) CBOR_DUMMY_CALLBACK void cbor_null_undefined_callback(void *_ctx) CBOR_DUMMY_CALLBACK void cbor_null_boolean_callback(void *_ctx: callbacks.c'],['../callbacks_8h.html#a520d52b145edee808497b558b7327f58',1,'cbor_null_float8_callback(void *, double): callbacks.h']]], + ['cbor_5fnull_5findef_5farray_5fstart_5fcallback',['cbor_null_indef_array_start_callback',['../callbacks_8c.html#a84a4ba287d0575538148d91754e8bc42',1,'cbor_null_indef_array_start_callback(void *_ctx) CBOR_DUMMY_CALLBACK void cbor_null_map_start_callback(void *_ctx: callbacks.c'],['../callbacks_8h.html#aaabbe1e2f28460268ef8e1da0290d28f',1,'cbor_null_indef_array_start_callback(void *): callbacks.h']]], + ['cbor_5fnull_5findef_5fbreak_5fcallback',['cbor_null_indef_break_callback',['../callbacks_8c.html#a02d1ceb26df6990753892a7a067be431',1,'cbor_null_indef_break_callback(void *_ctx) CBOR_DUMMY_CALLBACK const struct cbor_callbacks cbor_empty_callbacks: callbacks.c'],['../callbacks_8h.html#afa6c7a0c96f9359a9fe7e4d08b8ffbf6',1,'cbor_null_indef_break_callback(void *): callbacks.h']]], + ['cbor_5fnull_5findef_5fmap_5fstart_5fcallback',['cbor_null_indef_map_start_callback',['../callbacks_8c.html#a5479bf604bfa859c9688d4ecff610c10',1,'cbor_null_indef_map_start_callback(void *_ctx) CBOR_DUMMY_CALLBACK void cbor_null_tag_callback(void *_ctx: callbacks.c'],['../callbacks_8h.html#ad5bea0eedb4180204fba19ccc0e6cf35',1,'cbor_null_indef_map_start_callback(void *): callbacks.h']]], + ['cbor_5fnull_5fmap_5fstart_5fcallback',['cbor_null_map_start_callback',['../callbacks_8h.html#ad4a2d5d88a19c0a4aa5cbdd46126e010',1,'callbacks.h']]], + ['cbor_5fnull_5fnegint16_5fcallback',['cbor_null_negint16_callback',['../callbacks_8h.html#a19c9d5992861f55fb1fc177ea6f66434',1,'callbacks.h']]], + ['cbor_5fnull_5fnegint32_5fcallback',['cbor_null_negint32_callback',['../callbacks_8c.html#a252badae1d7dc5a1db1ceeb036647508',1,'cbor_null_negint32_callback(void *_ctx, uint32_t _val) CBOR_DUMMY_CALLBACK void cbor_null_negint64_callback(void *_ctx: callbacks.c'],['../callbacks_8h.html#aac6306901d0ff862d110be20bd5e42cb',1,'cbor_null_negint32_callback(void *, uint32_t): callbacks.h']]], + ['cbor_5fnull_5fnegint64_5fcallback',['cbor_null_negint64_callback',['../callbacks_8h.html#af1bf4531715583b2745ee3d5f68f366b',1,'callbacks.h']]], + ['cbor_5fnull_5fnegint8_5fcallback',['cbor_null_negint8_callback',['../callbacks_8c.html#ad35f12380284de27c7f93076e3702806',1,'cbor_null_negint8_callback(void *_ctx, uint8_t _val) CBOR_DUMMY_CALLBACK void cbor_null_negint16_callback(void *_ctx: callbacks.c'],['../callbacks_8h.html#a3922d840e895ba767a170f57f8dfd527',1,'cbor_null_negint8_callback(void *, uint8_t): callbacks.h']]], + ['cbor_5fnull_5fnull_5fcallback',['cbor_null_null_callback',['../callbacks_8h.html#aedd685c8fed8c76105a534e503d4817f',1,'callbacks.h']]], + ['cbor_5fnull_5fstring_5fcallback',['cbor_null_string_callback',['../callbacks_8c.html#a062fd4e961f5b71971059ec422a987cc',1,'cbor_null_string_callback(void *_ctx, cbor_data _val, size_t _val2) CBOR_DUMMY_CALLBACK void cbor_null_string_start_callback(void *_ctx) CBOR_DUMMY_CALLBACK void cbor_null_byte_string_callback(void *_ctx: callbacks.c'],['../callbacks_8h.html#a677f7b4eac5287c967a58086001cf37b',1,'cbor_null_string_callback(void *, cbor_data, size_t): callbacks.h']]], + ['cbor_5fnull_5fstring_5fstart_5fcallback',['cbor_null_string_start_callback',['../callbacks_8h.html#ace4cd7b785a8240068f10d9705ced958',1,'callbacks.h']]], + ['cbor_5fnull_5ftag_5fcallback',['cbor_null_tag_callback',['../callbacks_8h.html#ad89b715cbf487fd4d87699baf8e31aac',1,'callbacks.h']]], + ['cbor_5fnull_5fuint16_5fcallback',['cbor_null_uint16_callback',['../callbacks_8h.html#a09b8d67e3d55d7d6afcc9973b1e42046',1,'callbacks.h']]], + ['cbor_5fnull_5fuint32_5fcallback',['cbor_null_uint32_callback',['../callbacks_8c.html#a61c9fd047bdc64620dd259dba203cc24',1,'cbor_null_uint32_callback(void *_ctx, uint32_t _val) CBOR_DUMMY_CALLBACK void cbor_null_uint64_callback(void *_ctx: callbacks.c'],['../callbacks_8h.html#a3417192b0ba7934da6f37635720a981f',1,'cbor_null_uint32_callback(void *, uint32_t): callbacks.h']]], + ['cbor_5fnull_5fuint64_5fcallback',['cbor_null_uint64_callback',['../callbacks_8h.html#a01d918d5d4b04af8d317665db5b789e5',1,'callbacks.h']]], + ['cbor_5fnull_5fuint8_5fcallback',['cbor_null_uint8_callback',['../callbacks_8c.html#a73203a882651bcfad8eb467b1ada96c2',1,'cbor_null_uint8_callback(void *_ctx, uint8_t _val) CBOR_DUMMY_CALLBACK void cbor_null_uint16_callback(void *_ctx: callbacks.c'],['../callbacks_8h.html#a8241dfdd044ef9fa6a22b05e5b979840',1,'cbor_null_uint8_callback(void *, uint8_t): callbacks.h']]], + ['cbor_5fnull_5fundefined_5fcallback',['cbor_null_undefined_callback',['../callbacks_8h.html#a116576ea4ac4ed7a8bf2d66178438fdc',1,'callbacks.h']]], + ['cbor_5fpair',['cbor_pair',['../structcbor__pair.html',1,'']]], + ['cbor_5frefcount',['cbor_refcount',['../common_8c.html#ab27dda20ad909cebaee1b2f43e676f2c',1,'cbor_refcount(const cbor_item_t *item): common.c'],['../common_8h.html#ab27dda20ad909cebaee1b2f43e676f2c',1,'cbor_refcount(const cbor_item_t *item): common.c']]], + ['cbor_5frestrict_5fpointer',['CBOR_RESTRICT_POINTER',['../common_8h.html#a9ac79315ed2dcf2c9587e8e3a9a6bc97',1,'common.h']]], + ['cbor_5fserialize',['cbor_serialize',['../serialization_8c.html#a56d372b02323e8df3a37eba69acafd31',1,'cbor_serialize(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size): serialization.c'],['../serialization_8h.html#a2b99415a2c6f0d226116c707772e2fc0',1,'cbor_serialize(const cbor_item_t *item, cbor_mutable_data buffer, size_t buffer_size): serialization.c']]], + ['cbor_5fserialize_5falloc',['cbor_serialize_alloc',['../serialization_8c.html#ae995c0fac946cf851f4b37899a2e59e7',1,'cbor_serialize_alloc(const cbor_item_t *item, unsigned char **buffer, size_t *buffer_size): serialization.c'],['../serialization_8h.html#ab8a96a82216c07469a583eef3a3dd8d0',1,'cbor_serialize_alloc(const cbor_item_t *item, cbor_mutable_data *buffer, size_t *buffer_size): serialization.c']]], + ['cbor_5fserialize_5farray',['cbor_serialize_array',['../serialization_8c.html#ac8cc5befd865dd3a48ccd19730000bb3',1,'cbor_serialize_array(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size): serialization.c'],['../serialization_8h.html#a53e7d680cf41ccda369802deaf6c1ba8',1,'cbor_serialize_array(const cbor_item_t *, cbor_mutable_data, size_t): serialization.c']]], + ['cbor_5fserialize_5fbytestring',['cbor_serialize_bytestring',['../serialization_8c.html#ab4d54170870c473fe361d91740751487',1,'cbor_serialize_bytestring(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size): serialization.c'],['../serialization_8h.html#aeff4847e92b05b329edd1135c60f4179',1,'cbor_serialize_bytestring(const cbor_item_t *, cbor_mutable_data, size_t): serialization.c']]], + ['cbor_5fserialize_5ffloat_5fctrl',['cbor_serialize_float_ctrl',['../serialization_8c.html#a31bacc1eadd9f671eec5554ae658aca6',1,'cbor_serialize_float_ctrl(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size): serialization.c'],['../serialization_8h.html#ad232a99d06a972ca114a2fe753b90953',1,'cbor_serialize_float_ctrl(const cbor_item_t *, cbor_mutable_data, size_t): serialization.c']]], + ['cbor_5fserialize_5fmap',['cbor_serialize_map',['../serialization_8c.html#ad6b755769880739cf33e6bd5e5ba0733',1,'cbor_serialize_map(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size): serialization.c'],['../serialization_8h.html#a1c07f653f5aa66fadc82f24f556a162d',1,'cbor_serialize_map(const cbor_item_t *, cbor_mutable_data, size_t): serialization.c']]], + ['cbor_5fserialize_5fnegint',['cbor_serialize_negint',['../serialization_8c.html#a6f00ef0ca5354471214894c2e21ff19b',1,'cbor_serialize_negint(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size): serialization.c'],['../serialization_8h.html#ad7eb1501bd8282c21675333759dc7291',1,'cbor_serialize_negint(const cbor_item_t *, cbor_mutable_data, size_t): serialization.c']]], + ['cbor_5fserialize_5fstring',['cbor_serialize_string',['../serialization_8c.html#a23ba67d9759dc522924ff8ee6297babd',1,'cbor_serialize_string(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size): serialization.c'],['../serialization_8h.html#a9fb1138391d20c1b81081e2a5f413c3d',1,'cbor_serialize_string(const cbor_item_t *, cbor_mutable_data, size_t): serialization.c']]], + ['cbor_5fserialize_5ftag',['cbor_serialize_tag',['../serialization_8c.html#a6b946d5f299822b6b0e6d187ed36f4fa',1,'cbor_serialize_tag(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size): serialization.c'],['../serialization_8h.html#ae67b7ceefe645e660df73bf7ea255668',1,'cbor_serialize_tag(const cbor_item_t *, cbor_mutable_data, size_t): serialization.c']]], + ['cbor_5fserialize_5fuint',['cbor_serialize_uint',['../serialization_8c.html#ad0411e741dcb5352b9bc4198f0f18fbe',1,'cbor_serialize_uint(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size): serialization.c'],['../serialization_8h.html#a649fbb28229d58193a7eee96995929e0',1,'cbor_serialize_uint(const cbor_item_t *, cbor_mutable_data, size_t): serialization.c']]], + ['cbor_5fset_5fallocs',['cbor_set_allocs',['../allocators_8c.html#a3f9f1d527374dbb4b48ef3fafa92e0bf',1,'cbor_set_allocs(_cbor_malloc_t custom_malloc, _cbor_realloc_t custom_realloc, _cbor_free_t custom_free): allocators.c'],['../common_8h.html#a3f9f1d527374dbb4b48ef3fafa92e0bf',1,'cbor_set_allocs(_cbor_malloc_t custom_malloc, _cbor_realloc_t custom_realloc, _cbor_free_t custom_free): allocators.c']]], + ['cbor_5fset_5fctrl',['cbor_set_ctrl',['../floats__ctrls_8c.html#a5f5d397684bc2118f36d720c61318e7d',1,'cbor_set_ctrl(cbor_item_t *item, uint8_t value): floats_ctrls.c'],['../floats__ctrls_8h.html#a5f5d397684bc2118f36d720c61318e7d',1,'cbor_set_ctrl(cbor_item_t *item, uint8_t value): floats_ctrls.c']]], + ['cbor_5fset_5ffloat2',['cbor_set_float2',['../floats__ctrls_8c.html#aa3d3e746446ef643037a4f8838aa5753',1,'cbor_set_float2(cbor_item_t *item, float value): floats_ctrls.c'],['../floats__ctrls_8h.html#aa3d3e746446ef643037a4f8838aa5753',1,'cbor_set_float2(cbor_item_t *item, float value): floats_ctrls.c']]], + ['cbor_5fset_5ffloat4',['cbor_set_float4',['../floats__ctrls_8c.html#a5fe450a0edad9c7f1a888000f74a1085',1,'cbor_set_float4(cbor_item_t *item, float value): floats_ctrls.c'],['../floats__ctrls_8h.html#a5fe450a0edad9c7f1a888000f74a1085',1,'cbor_set_float4(cbor_item_t *item, float value): floats_ctrls.c']]], + ['cbor_5fset_5ffloat8',['cbor_set_float8',['../floats__ctrls_8c.html#a62a2ed2815d844fd54474f30ebbd0f6f',1,'cbor_set_float8(cbor_item_t *item, double value): floats_ctrls.c'],['../floats__ctrls_8h.html#a62a2ed2815d844fd54474f30ebbd0f6f',1,'cbor_set_float8(cbor_item_t *item, double value): floats_ctrls.c']]], + ['cbor_5fset_5fuint16',['cbor_set_uint16',['../ints_8c.html#a13b3dff419830b59c77ee18d4c03f6eb',1,'cbor_set_uint16(cbor_item_t *item, uint16_t value): ints.c'],['../ints_8h.html#a13b3dff419830b59c77ee18d4c03f6eb',1,'cbor_set_uint16(cbor_item_t *item, uint16_t value): ints.c']]], + ['cbor_5fset_5fuint32',['cbor_set_uint32',['../ints_8c.html#a2db697fb733dcbdbbef8714fd182a185',1,'cbor_set_uint32(cbor_item_t *item, uint32_t value): ints.c'],['../ints_8h.html#a2db697fb733dcbdbbef8714fd182a185',1,'cbor_set_uint32(cbor_item_t *item, uint32_t value): ints.c']]], + ['cbor_5fset_5fuint64',['cbor_set_uint64',['../ints_8c.html#af82a3961109f2a36324157e218680016',1,'cbor_set_uint64(cbor_item_t *item, uint64_t value): ints.c'],['../ints_8h.html#af82a3961109f2a36324157e218680016',1,'cbor_set_uint64(cbor_item_t *item, uint64_t value): ints.c']]], + ['cbor_5fset_5fuint8',['cbor_set_uint8',['../ints_8c.html#a62e9cd557438c1a5b8cf9a29c1f64baa',1,'cbor_set_uint8(cbor_item_t *item, uint8_t value): ints.c'],['../ints_8h.html#a62e9cd557438c1a5b8cf9a29c1f64baa',1,'cbor_set_uint8(cbor_item_t *item, uint8_t value): ints.c']]], + ['cbor_5fsimple_5fcallback',['cbor_simple_callback',['../callbacks_8h.html#a39ec9172857c7d7b35ab32a0f2faa693',1,'callbacks.h']]], + ['cbor_5fstream_5fdecode',['cbor_stream_decode',['../streaming_8c.html#a99343d82e96110a364a6abc8f542172a',1,'cbor_stream_decode(cbor_data source, size_t source_size, const struct cbor_callbacks *callbacks, void *context): streaming.c'],['../streaming_8h.html#aadf8db8555f22bbd5a2acfd77170b2be',1,'cbor_stream_decode(cbor_data buffer, size_t buffer_size, const struct cbor_callbacks *callbacks, void *context): streaming.c']]], + ['cbor_5fstring_5fadd_5fchunk',['cbor_string_add_chunk',['../strings_8c.html#a634462c7237298a196413cd62d7d1877',1,'cbor_string_add_chunk(cbor_item_t *item, cbor_item_t *chunk): strings.c'],['../strings_8h.html#a634462c7237298a196413cd62d7d1877',1,'cbor_string_add_chunk(cbor_item_t *item, cbor_item_t *chunk): strings.c']]], + ['cbor_5fstring_5fcallback',['cbor_string_callback',['../callbacks_8h.html#acd1d1e9fabda1cb73038048b1b7fdabf',1,'callbacks.h']]], + ['cbor_5fstring_5fchunk_5fcount',['cbor_string_chunk_count',['../strings_8c.html#ad8062db21711a51ae520cc1e4f5fe5ab',1,'cbor_string_chunk_count(const cbor_item_t *item): strings.c'],['../strings_8h.html#ad8062db21711a51ae520cc1e4f5fe5ab',1,'cbor_string_chunk_count(const cbor_item_t *item): strings.c']]], + ['cbor_5fstring_5fchunks_5fhandle',['cbor_string_chunks_handle',['../strings_8c.html#a81d1160eed81b2a29b6c5e9ff6b9e02a',1,'cbor_string_chunks_handle(const cbor_item_t *item): strings.c'],['../strings_8h.html#a81d1160eed81b2a29b6c5e9ff6b9e02a',1,'cbor_string_chunks_handle(const cbor_item_t *item): strings.c']]], + ['cbor_5fstring_5fcodepoint_5fcount',['cbor_string_codepoint_count',['../strings_8c.html#a90c1cf7781f7ef1f3549f497abd259ef',1,'cbor_string_codepoint_count(const cbor_item_t *item): strings.c'],['../strings_8h.html#a90c1cf7781f7ef1f3549f497abd259ef',1,'cbor_string_codepoint_count(const cbor_item_t *item): strings.c']]], + ['cbor_5fstring_5fhandle',['cbor_string_handle',['../strings_8c.html#ae9e5da7bdf2a79fab7965caeff49d5bb',1,'cbor_string_handle(const cbor_item_t *item): strings.c'],['../strings_8h.html#af12871b50ba25f756fa1bfacd1fca12a',1,'cbor_string_handle(const cbor_item_t *item): strings.c']]], + ['cbor_5fstring_5fis_5fdefinite',['cbor_string_is_definite',['../strings_8c.html#aa2778891e70dec4cd59c9a969294d4aa',1,'cbor_string_is_definite(const cbor_item_t *item): strings.c'],['../strings_8h.html#aa2778891e70dec4cd59c9a969294d4aa',1,'cbor_string_is_definite(const cbor_item_t *item): strings.c']]], + ['cbor_5fstring_5fis_5findefinite',['cbor_string_is_indefinite',['../strings_8c.html#aa1a92438a04ae77beea9a17910805530',1,'cbor_string_is_indefinite(const cbor_item_t *item): strings.c'],['../strings_8h.html#aa1a92438a04ae77beea9a17910805530',1,'cbor_string_is_indefinite(const cbor_item_t *item): strings.c']]], + ['cbor_5fstring_5flength',['cbor_string_length',['../strings_8c.html#aa0c17825f920ebf122bd7b9abede919f',1,'cbor_string_length(const cbor_item_t *item): strings.c'],['../strings_8h.html#aa0c17825f920ebf122bd7b9abede919f',1,'cbor_string_length(const cbor_item_t *item): strings.c']]], + ['cbor_5fstring_5fset_5fhandle',['cbor_string_set_handle',['../strings_8c.html#a5e9292c04df380f2c775fe599511a7ab',1,'cbor_string_set_handle(cbor_item_t *item, cbor_mutable_data CBOR_RESTRICT_POINTER data, size_t length): strings.c'],['../strings_8h.html#a5e9292c04df380f2c775fe599511a7ab',1,'cbor_string_set_handle(cbor_item_t *item, cbor_mutable_data CBOR_RESTRICT_POINTER data, size_t length): strings.c']]], + ['cbor_5ftag_5fitem',['cbor_tag_item',['../tags_8c.html#a162852da1313269e9d7b07dd4b964111',1,'cbor_tag_item(const cbor_item_t *item): tags.c'],['../tags_8h.html#a162852da1313269e9d7b07dd4b964111',1,'cbor_tag_item(const cbor_item_t *item): tags.c']]], + ['cbor_5ftag_5fset_5fitem',['cbor_tag_set_item',['../tags_8c.html#a4e6dc4f4fda5889819713bd3957de3c6',1,'cbor_tag_set_item(cbor_item_t *item, cbor_item_t *tagged_item): tags.c'],['../tags_8h.html#a4e6dc4f4fda5889819713bd3957de3c6',1,'cbor_tag_set_item(cbor_item_t *item, cbor_item_t *tagged_item): tags.c']]], + ['cbor_5ftag_5fvalue',['cbor_tag_value',['../tags_8c.html#a2746e6a37373e0950b646e8146ed63b6',1,'cbor_tag_value(const cbor_item_t *item): tags.c'],['../tags_8h.html#a2746e6a37373e0950b646e8146ed63b6',1,'cbor_tag_value(const cbor_item_t *item): tags.c']]], + ['cbor_5ftype',['cbor_type',['../data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6',1,'cbor_type(): data.h'],['../data_8h.html#ad692b20e7c3d172ae9ae278e508e7444',1,'cbor_type(): data.h']]], + ['cbor_5ftype_5farray',['CBOR_TYPE_ARRAY',['../data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6ae48b04b3538ade49d7eae9ee6b656103',1,'data.h']]], + ['cbor_5ftype_5fbytestring',['CBOR_TYPE_BYTESTRING',['../data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6a70b9f0b5958c8d51f15ad7bb7c4af01d',1,'data.h']]], + ['cbor_5ftype_5ffloat_5fctrl',['CBOR_TYPE_FLOAT_CTRL',['../data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6a1276dcc4ac56df5fd7e0270344a6e57d',1,'data.h']]], + ['cbor_5ftype_5fmap',['CBOR_TYPE_MAP',['../data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6a057fc3133cb4465f9eb734acfd195db2',1,'data.h']]], + ['cbor_5ftype_5fnegint',['CBOR_TYPE_NEGINT',['../data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6ae140516103af792c8f2af84390acfdcd',1,'data.h']]], + ['cbor_5ftype_5fstring',['CBOR_TYPE_STRING',['../data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6ae05102a66420250eacd5f17b95d04443',1,'data.h']]], + ['cbor_5ftype_5ftag',['CBOR_TYPE_TAG',['../data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6a16f0eaf29eeea66fe37ec1ed0fa45415',1,'data.h']]], + ['cbor_5ftype_5fuint',['CBOR_TYPE_UINT',['../data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6a2137d55d8028e37ff4319a633ef0634f',1,'data.h']]], + ['cbor_5ftypeof',['cbor_typeof',['../common_8c.html#ac2b9aba4cf07857524a0a520eabeef52',1,'cbor_typeof(const cbor_item_t *item): common.c'],['../common_8h.html#ac2b9aba4cf07857524a0a520eabeef52',1,'cbor_typeof(const cbor_item_t *item): common.c']]], + ['cbor_5fversion',['CBOR_VERSION',['../common_8h.html#a956e417f98370dd1a96e4dac2e0ed7dd',1,'common.h']]], + ['check_5fres',['CHECK_RES',['../builder__callbacks_8c.html#ac5a5fe93758a82606342a6f5513d1102',1,'builder_callbacks.c']]], + ['chunk_5fcapacity',['chunk_capacity',['../structcbor__indefinite__string__data.html#a4f07710bcaa663d2babf652fc9984412',1,'cbor_indefinite_string_data']]], + ['chunk_5fcount',['chunk_count',['../structcbor__indefinite__string__data.html#a86c3abce37287c14985b5f2a0d1935d7',1,'cbor_indefinite_string_data']]], + ['chunks',['chunks',['../structcbor__indefinite__string__data.html#ac34c0d9bd1447f53149878128e19a414',1,'cbor_indefinite_string_data']]], + ['code',['code',['../structcbor__error.html#a8674e7cac94b696eeea37db194026646',1,'cbor_error']]], + ['codepoint_5fcount',['codepoint_count',['../struct__cbor__string__metadata.html#a07f2e49bd1cd40ba2277ae6d7a9b6d5d',1,'_cbor_string_metadata']]], + ['common_2ec',['common.c',['../common_8c.html',1,'']]], + ['common_2eh',['common.h',['../common_8h.html',1,'']]], + ['creation_5ffailed',['creation_failed',['../struct__cbor__decoder__context.html#ada14322afd080c27f3ea76b3ba657505',1,'_cbor_decoder_context']]], + ['ctrl',['ctrl',['../struct__cbor__float__ctrl__metadata.html#aeeb531a44e6502b5f1bd2aece6dffaa2',1,'_cbor_float_ctrl_metadata']]] +]; diff --git a/docs/doxygen/search/all_4.html b/docs/doxygen/search/all_4.html new file mode 100644 index 00000000..8308168c --- /dev/null +++ b/docs/doxygen/search/all_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/all_4.js b/docs/doxygen/search/all_4.js new file mode 100644 index 00000000..4cd48ee3 --- /dev/null +++ b/docs/doxygen/search/all_4.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['data',['data',['../structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44',1,'cbor_item_t']]], + ['data_2eh',['data.h',['../data_8h.html',1,'']]], + ['debug_5fprint',['debug_print',['../common_8h.html#a7377cc956f5c81538f0fbf0a0492a539',1,'common.h']]], + ['doxy_5ffrontpage_2emd',['doxy_frontpage.md',['../doxy__frontpage_8md.html',1,'']]] +]; diff --git a/docs/doxygen/search/all_5.html b/docs/doxygen/search/all_5.html new file mode 100644 index 00000000..7919cd4d --- /dev/null +++ b/docs/doxygen/search/all_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/all_5.js b/docs/doxygen/search/all_5.js new file mode 100644 index 00000000..b89143a9 --- /dev/null +++ b/docs/doxygen/search/all_5.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['encoders_2ec',['encoders.c',['../encoders_8c.html',1,'']]], + ['encoders_2eh',['encoders.h',['../encoders_8h.html',1,'']]], + ['encoding_2ec',['encoding.c',['../encoding_8c.html',1,'']]], + ['encoding_2eh',['encoding.h',['../encoding_8h.html',1,'']]], + ['end_5fptr',['end_ptr',['../struct__cbor__array__metadata.html#a388742d0b665ba1775ad89858f3049cb',1,'_cbor_array_metadata::end_ptr()'],['../struct__cbor__map__metadata.html#a38136af91105ba320f1d95a4a4ceb4de',1,'_cbor_map_metadata::end_ptr()']]], + ['error',['error',['../structcbor__load__result.html#af23777116487150fb1b06842fc57724f',1,'cbor_load_result']]] +]; diff --git a/docs/doxygen/search/all_6.html b/docs/doxygen/search/all_6.html new file mode 100644 index 00000000..89d590c4 --- /dev/null +++ b/docs/doxygen/search/all_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/all_6.js b/docs/doxygen/search/all_6.js new file mode 100644 index 00000000..4ed03150 --- /dev/null +++ b/docs/doxygen/search/all_6.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['float2',['float2',['../structcbor__callbacks.html#ab1f4ab3a5bf0cf2a6418b8cb28877652',1,'cbor_callbacks']]], + ['float4',['float4',['../structcbor__callbacks.html#a3e0e5094fdfbc527f9a2ca300d65b7df',1,'cbor_callbacks']]], + ['float8',['float8',['../structcbor__callbacks.html#a5a80bae7d106e7cf61d27cd710251e4a',1,'cbor_callbacks']]], + ['float_5fctrl_5fmetadata',['float_ctrl_metadata',['../unioncbor__item__metadata.html#a456a58064b25bc6563df665bed5c122d',1,'cbor_item_metadata']]], + ['floats_5fctrls_2ec',['floats_ctrls.c',['../floats__ctrls_8c.html',1,'']]], + ['floats_5fctrls_2eh',['floats_ctrls.h',['../floats__ctrls_8h.html',1,'']]] +]; diff --git a/docs/doxygen/search/all_7.html b/docs/doxygen/search/all_7.html new file mode 100644 index 00000000..0e8c527e --- /dev/null +++ b/docs/doxygen/search/all_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/all_7.js b/docs/doxygen/search/all_7.js new file mode 100644 index 00000000..f14a9ae6 --- /dev/null +++ b/docs/doxygen/search/all_7.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['indef_5farray_5fstart',['indef_array_start',['../structcbor__callbacks.html#a5831fd6bd9372b04a8f65db1e1967713',1,'cbor_callbacks']]], + ['indef_5fbreak',['indef_break',['../structcbor__callbacks.html#abc0516d80611473d2527bf5faea393d8',1,'cbor_callbacks']]], + ['indef_5fmap_5fstart',['indef_map_start',['../structcbor__callbacks.html#ab989b168f43559f404d87508bdd0ddc8',1,'cbor_callbacks']]], + ['int_5fmetadata',['int_metadata',['../unioncbor__item__metadata.html#a9dbedd1621e78d4817c359849ffd75a9',1,'cbor_item_metadata']]], + ['ints_2ec',['ints.c',['../ints_8c.html',1,'']]], + ['ints_2eh',['ints.h',['../ints_8h.html',1,'']]], + ['item',['item',['../struct__cbor__stack__record.html#a1a1d4be830fa1e0d9c5369cddccce47e',1,'_cbor_stack_record']]] +]; diff --git a/docs/doxygen/search/all_8.html b/docs/doxygen/search/all_8.html new file mode 100644 index 00000000..80bda067 --- /dev/null +++ b/docs/doxygen/search/all_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/all_8.js b/docs/doxygen/search/all_8.js new file mode 100644 index 00000000..85d30361 --- /dev/null +++ b/docs/doxygen/search/all_8.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['key',['key',['../structcbor__pair.html#a5122c22ad7ef32b2c6ae0a413caca7a1',1,'cbor_pair']]] +]; diff --git a/docs/doxygen/search/all_9.html b/docs/doxygen/search/all_9.html new file mode 100644 index 00000000..8ebc8a2a --- /dev/null +++ b/docs/doxygen/search/all_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/all_9.js b/docs/doxygen/search/all_9.js new file mode 100644 index 00000000..be22115e --- /dev/null +++ b/docs/doxygen/search/all_9.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['length',['length',['../struct__cbor__bytestring__metadata.html#ad20fa7f7cec11db8076419169347ff75',1,'_cbor_bytestring_metadata::length()'],['../struct__cbor__string__metadata.html#a558805df7c655cfaf3c289bc536ff96e',1,'_cbor_string_metadata::length()']]], + ['loaders_2ec',['loaders.c',['../loaders_8c.html',1,'']]], + ['loaders_2eh',['loaders.h',['../loaders_8h.html',1,'']]], + ['location',['location',['../struct__cbor__unicode__status.html#a74b5cdcf18d76a2cdb19c37857f170a7',1,'_cbor_unicode_status']]], + ['lower',['lower',['../struct__cbor__stack__record.html#aca7db1e610ee0983b0e24e081ee3e5dd',1,'_cbor_stack_record']]] +]; diff --git a/docs/doxygen/search/all_a.html b/docs/doxygen/search/all_a.html new file mode 100644 index 00000000..f17bf66a --- /dev/null +++ b/docs/doxygen/search/all_a.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/all_a.js b/docs/doxygen/search/all_a.js new file mode 100644 index 00000000..3d7a7453 --- /dev/null +++ b/docs/doxygen/search/all_a.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['map_5fmetadata',['map_metadata',['../unioncbor__item__metadata.html#ac497580bfcb0c0e47438a45407ac7b4e',1,'cbor_item_metadata']]], + ['map_5fstart',['map_start',['../structcbor__callbacks.html#ac833a2232c624936d7444612e47e8a20',1,'cbor_callbacks']]], + ['maps_2ec',['maps.c',['../maps_8c.html',1,'']]], + ['maps_2eh',['maps.h',['../maps_8h.html',1,'']]], + ['memory_5futils_2ec',['memory_utils.c',['../memory__utils_8c.html',1,'']]], + ['memory_5futils_2eh',['memory_utils.h',['../memory__utils_8h.html',1,'']]], + ['metadata',['metadata',['../structcbor__item__t.html#a7d97fa5cdf027ca0499c37ec19acf843',1,'cbor_item_t']]] +]; diff --git a/docs/doxygen/search/all_b.html b/docs/doxygen/search/all_b.html new file mode 100644 index 00000000..6ef469ec --- /dev/null +++ b/docs/doxygen/search/all_b.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/all_b.js b/docs/doxygen/search/all_b.js new file mode 100644 index 00000000..86c5afe6 --- /dev/null +++ b/docs/doxygen/search/all_b.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['negint16',['negint16',['../structcbor__callbacks.html#a0e47df73a7ecf894ab75e04a1cc83dc7',1,'cbor_callbacks']]], + ['negint32',['negint32',['../structcbor__callbacks.html#a26e8c4f53af47eaaf8928b86fb92a44f',1,'cbor_callbacks']]], + ['negint64',['negint64',['../structcbor__callbacks.html#ac0a4f4915ecb9924132c60c7fe7d93fe',1,'cbor_callbacks']]], + ['negint8',['negint8',['../structcbor__callbacks.html#aae703108db340c2df1af0154b23b9631',1,'cbor_callbacks']]], + ['null',['null',['../structcbor__callbacks.html#a7483f952b13db66abd893082a204859d',1,'cbor_callbacks']]] +]; diff --git a/docs/doxygen/search/all_c.html b/docs/doxygen/search/all_c.html new file mode 100644 index 00000000..4ca7bb9e --- /dev/null +++ b/docs/doxygen/search/all_c.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/all_c.js b/docs/doxygen/search/all_c.js new file mode 100644 index 00000000..2b2064c3 --- /dev/null +++ b/docs/doxygen/search/all_c.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['position',['position',['../structcbor__error.html#a6bc04669e6fff45ad7a5e22ad5826d01',1,'cbor_error']]] +]; diff --git a/docs/doxygen/search/all_d.html b/docs/doxygen/search/all_d.html new file mode 100644 index 00000000..fedf606a --- /dev/null +++ b/docs/doxygen/search/all_d.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/all_d.js b/docs/doxygen/search/all_d.js new file mode 100644 index 00000000..77ab93bb --- /dev/null +++ b/docs/doxygen/search/all_d.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['read',['read',['../structcbor__load__result.html#ac5d6290cac5893bd060f6759beef2b28',1,'cbor_load_result::read()'],['../structcbor__decoder__result.html#a39828fd8d825610cda67d9738d2d5c23',1,'cbor_decoder_result::read()']]], + ['refcount',['refcount',['../structcbor__item__t.html#a6bb24fe655f086c6aa9a66d427e09cca',1,'cbor_item_t']]], + ['root',['root',['../struct__cbor__decoder__context.html#ad4c1540245b6241bc7aa3f7ade2fbf5a',1,'_cbor_decoder_context']]] +]; diff --git a/docs/doxygen/search/all_e.html b/docs/doxygen/search/all_e.html new file mode 100644 index 00000000..9b780860 --- /dev/null +++ b/docs/doxygen/search/all_e.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/all_e.js b/docs/doxygen/search/all_e.js new file mode 100644 index 00000000..e05b65e9 --- /dev/null +++ b/docs/doxygen/search/all_e.js @@ -0,0 +1,19 @@ +var searchData= +[ + ['serialization_2ec',['serialization.c',['../serialization_8c.html',1,'']]], + ['serialization_2eh',['serialization.h',['../serialization_8h.html',1,'']]], + ['size',['size',['../struct__cbor__stack.html#aab7d9aefcd1c46603350a1d009c048d8',1,'_cbor_stack']]], + ['stack',['stack',['../struct__cbor__decoder__context.html#af21635162948fc488da3c1625f1bc278',1,'_cbor_decoder_context']]], + ['stack_2ec',['stack.c',['../stack_8c.html',1,'']]], + ['stack_2eh',['stack.h',['../stack_8h.html',1,'']]], + ['status',['status',['../structcbor__decoder__result.html#a1b775085d3696356c9ca284ffd9a264d',1,'cbor_decoder_result::status()'],['../struct__cbor__unicode__status.html#a06b8c4d673a659a046aa3adea53cdef8',1,'_cbor_unicode_status::status()']]], + ['streaming_2ec',['streaming.c',['../streaming_8c.html',1,'']]], + ['streaming_2eh',['streaming.h',['../streaming_8h.html',1,'']]], + ['string',['string',['../structcbor__callbacks.html#a18144e8cc29b3562f071188c3d9086eb',1,'cbor_callbacks']]], + ['string_5fmetadata',['string_metadata',['../unioncbor__item__metadata.html#a753eccc4105c3861dd40f50681ff18df',1,'cbor_item_metadata']]], + ['string_5fstart',['string_start',['../structcbor__callbacks.html#ac5a3ff3cd57f469460c13598d14eb2eb',1,'cbor_callbacks']]], + ['strings_2ec',['strings.c',['../strings_8c.html',1,'']]], + ['strings_2eh',['strings.h',['../strings_8h.html',1,'']]], + ['subitems',['subitems',['../struct__cbor__stack__record.html#a9b69c0ea00da449b080343a97c026cef',1,'_cbor_stack_record']]], + ['syntax_5ferror',['syntax_error',['../struct__cbor__decoder__context.html#ae34e7cc9b435a63bc0e92c425279db84',1,'_cbor_decoder_context']]] +]; diff --git a/docs/doxygen/search/all_f.html b/docs/doxygen/search/all_f.html new file mode 100644 index 00000000..3bf97c66 --- /dev/null +++ b/docs/doxygen/search/all_f.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/all_f.js b/docs/doxygen/search/all_f.js new file mode 100644 index 00000000..b98ffbe0 --- /dev/null +++ b/docs/doxygen/search/all_f.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['tag',['tag',['../structcbor__callbacks.html#ab5a727d5b11a7f2558cf811908f92e70',1,'cbor_callbacks']]], + ['tag_5fmetadata',['tag_metadata',['../unioncbor__item__metadata.html#a7cf72d7dbb3104bd14d0e4934646212f',1,'cbor_item_metadata']]], + ['tagged_5fitem',['tagged_item',['../struct__cbor__tag__metadata.html#ae275f5a8e0a72192d393f770db923907',1,'_cbor_tag_metadata']]], + ['tags_2ec',['tags.c',['../tags_8c.html',1,'']]], + ['tags_2eh',['tags.h',['../tags_8h.html',1,'']]], + ['to_5fstr',['TO_STR',['../common_8h.html#ae45fd01d870751555ae09a0257f40eb2',1,'common.h']]], + ['to_5fstr_5f',['TO_STR_',['../common_8h.html#a4576b20b5200a67aa939a1ce7fc27bd9',1,'common.h']]], + ['top',['top',['../struct__cbor__stack.html#a559869a03a766ae041b1e385ceb34026',1,'_cbor_stack']]], + ['type',['type',['../struct__cbor__bytestring__metadata.html#ab43be7eca10ef7f0501d9f87482e27c3',1,'_cbor_bytestring_metadata::type()'],['../struct__cbor__string__metadata.html#afcfdf5e250b677a7e88c5b9c1919bc1a',1,'_cbor_string_metadata::type()'],['../struct__cbor__array__metadata.html#a0c376239d3aafcfe64ee7c74fd422f37',1,'_cbor_array_metadata::type()'],['../struct__cbor__map__metadata.html#aace4f7da19acf93e56eeb8ccf0fae7b5',1,'_cbor_map_metadata::type()'],['../structcbor__item__t.html#a6743a75cf89e1b455ddf3198ff98842a',1,'cbor_item_t::type()']]] +]; diff --git a/docs/doxygen/search/classes_0.html b/docs/doxygen/search/classes_0.html new file mode 100644 index 00000000..2e45b2cb --- /dev/null +++ b/docs/doxygen/search/classes_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/classes_0.js b/docs/doxygen/search/classes_0.js new file mode 100644 index 00000000..bb4e7394 --- /dev/null +++ b/docs/doxygen/search/classes_0.js @@ -0,0 +1,16 @@ +var searchData= +[ + ['_5fcbor_5farray_5fmetadata',['_cbor_array_metadata',['../struct__cbor__array__metadata.html',1,'']]], + ['_5fcbor_5fbytestring_5fmetadata',['_cbor_bytestring_metadata',['../struct__cbor__bytestring__metadata.html',1,'']]], + ['_5fcbor_5fdecoder_5fcontext',['_cbor_decoder_context',['../struct__cbor__decoder__context.html',1,'']]], + ['_5fcbor_5fdouble_5fhelper',['_cbor_double_helper',['../union__cbor__double__helper.html',1,'']]], + ['_5fcbor_5ffloat_5fctrl_5fmetadata',['_cbor_float_ctrl_metadata',['../struct__cbor__float__ctrl__metadata.html',1,'']]], + ['_5fcbor_5ffloat_5fhelper',['_cbor_float_helper',['../union__cbor__float__helper.html',1,'']]], + ['_5fcbor_5fint_5fmetadata',['_cbor_int_metadata',['../struct__cbor__int__metadata.html',1,'']]], + ['_5fcbor_5fmap_5fmetadata',['_cbor_map_metadata',['../struct__cbor__map__metadata.html',1,'']]], + ['_5fcbor_5fstack',['_cbor_stack',['../struct__cbor__stack.html',1,'']]], + ['_5fcbor_5fstack_5frecord',['_cbor_stack_record',['../struct__cbor__stack__record.html',1,'']]], + ['_5fcbor_5fstring_5fmetadata',['_cbor_string_metadata',['../struct__cbor__string__metadata.html',1,'']]], + ['_5fcbor_5ftag_5fmetadata',['_cbor_tag_metadata',['../struct__cbor__tag__metadata.html',1,'']]], + ['_5fcbor_5funicode_5fstatus',['_cbor_unicode_status',['../struct__cbor__unicode__status.html',1,'']]] +]; diff --git a/docs/doxygen/search/classes_1.html b/docs/doxygen/search/classes_1.html new file mode 100644 index 00000000..5f1bc63b --- /dev/null +++ b/docs/doxygen/search/classes_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/classes_1.js b/docs/doxygen/search/classes_1.js new file mode 100644 index 00000000..dd677357 --- /dev/null +++ b/docs/doxygen/search/classes_1.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['cbor_5fcallbacks',['cbor_callbacks',['../structcbor__callbacks.html',1,'']]], + ['cbor_5fdecoder_5fresult',['cbor_decoder_result',['../structcbor__decoder__result.html',1,'']]], + ['cbor_5ferror',['cbor_error',['../structcbor__error.html',1,'']]], + ['cbor_5findefinite_5fstring_5fdata',['cbor_indefinite_string_data',['../structcbor__indefinite__string__data.html',1,'']]], + ['cbor_5fitem_5fmetadata',['cbor_item_metadata',['../unioncbor__item__metadata.html',1,'']]], + ['cbor_5fitem_5ft',['cbor_item_t',['../structcbor__item__t.html',1,'']]], + ['cbor_5fload_5fresult',['cbor_load_result',['../structcbor__load__result.html',1,'']]], + ['cbor_5fpair',['cbor_pair',['../structcbor__pair.html',1,'']]] +]; diff --git a/docs/doxygen/search/close.png b/docs/doxygen/search/close.png new file mode 100644 index 00000000..9342d3df Binary files /dev/null and b/docs/doxygen/search/close.png differ diff --git a/docs/doxygen/search/defines_0.html b/docs/doxygen/search/defines_0.html new file mode 100644 index 00000000..e53ef231 --- /dev/null +++ b/docs/doxygen/search/defines_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/defines_0.js b/docs/doxygen/search/defines_0.js new file mode 100644 index 00000000..66bc245a --- /dev/null +++ b/docs/doxygen/search/defines_0.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['_5fcbor_5ffree',['_CBOR_FREE',['../common_8h.html#a1300043d7db8adf6ab67f7b787f14635',1,'common.h']]], + ['_5fcbor_5fmalloc',['_CBOR_MALLOC',['../common_8h.html#a07a781e9212fad361b0f59f7fc921057',1,'common.h']]], + ['_5fcbor_5frealloc',['_CBOR_REALLOC',['../common_8h.html#a1e39038d9b8e9b3a1e6529c9ff6091b8',1,'common.h']]] +]; diff --git a/docs/doxygen/search/defines_1.html b/docs/doxygen/search/defines_1.html new file mode 100644 index 00000000..d4f6f4e6 --- /dev/null +++ b/docs/doxygen/search/defines_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/defines_1.js b/docs/doxygen/search/defines_1.js new file mode 100644 index 00000000..cb3893a8 --- /dev/null +++ b/docs/doxygen/search/defines_1.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['cbor_5fdummy_5fcallback',['CBOR_DUMMY_CALLBACK',['../callbacks_8c.html#a600badad1d123dd9fb8d74d5f2a29a5e',1,'callbacks.c']]], + ['cbor_5fhex_5fversion',['CBOR_HEX_VERSION',['../common_8h.html#ac61efb646fdd1936ac0ce32829f947b8',1,'common.h']]], + ['cbor_5frestrict_5fpointer',['CBOR_RESTRICT_POINTER',['../common_8h.html#a9ac79315ed2dcf2c9587e8e3a9a6bc97',1,'common.h']]], + ['cbor_5fversion',['CBOR_VERSION',['../common_8h.html#a956e417f98370dd1a96e4dac2e0ed7dd',1,'common.h']]], + ['check_5fres',['CHECK_RES',['../builder__callbacks_8c.html#ac5a5fe93758a82606342a6f5513d1102',1,'builder_callbacks.c']]] +]; diff --git a/docs/doxygen/search/defines_2.html b/docs/doxygen/search/defines_2.html new file mode 100644 index 00000000..19716837 --- /dev/null +++ b/docs/doxygen/search/defines_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/defines_2.js b/docs/doxygen/search/defines_2.js new file mode 100644 index 00000000..2a5ceef9 --- /dev/null +++ b/docs/doxygen/search/defines_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['debug_5fprint',['debug_print',['../common_8h.html#a7377cc956f5c81538f0fbf0a0492a539',1,'common.h']]] +]; diff --git a/docs/doxygen/search/defines_3.html b/docs/doxygen/search/defines_3.html new file mode 100644 index 00000000..f64e41c7 --- /dev/null +++ b/docs/doxygen/search/defines_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/defines_3.js b/docs/doxygen/search/defines_3.js new file mode 100644 index 00000000..9bb5e2fd --- /dev/null +++ b/docs/doxygen/search/defines_3.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['to_5fstr',['TO_STR',['../common_8h.html#ae45fd01d870751555ae09a0257f40eb2',1,'common.h']]], + ['to_5fstr_5f',['TO_STR_',['../common_8h.html#a4576b20b5200a67aa939a1ce7fc27bd9',1,'common.h']]] +]; diff --git a/docs/doxygen/search/defines_4.html b/docs/doxygen/search/defines_4.html new file mode 100644 index 00000000..3bc3005f --- /dev/null +++ b/docs/doxygen/search/defines_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/defines_4.js b/docs/doxygen/search/defines_4.js new file mode 100644 index 00000000..0cf0f416 --- /dev/null +++ b/docs/doxygen/search/defines_4.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['utf8_5faccept',['UTF8_ACCEPT',['../unicode_8c.html#a82b09bd7c24e408c73e16db56b8db6cf',1,'unicode.c']]], + ['utf8_5freject',['UTF8_REJECT',['../unicode_8c.html#a2e385a04dd7c4529414ab34a75a4f9ef',1,'unicode.c']]] +]; diff --git a/docs/doxygen/search/enums_0.html b/docs/doxygen/search/enums_0.html new file mode 100644 index 00000000..f3028adb --- /dev/null +++ b/docs/doxygen/search/enums_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/enums_0.js b/docs/doxygen/search/enums_0.js new file mode 100644 index 00000000..1b342f31 --- /dev/null +++ b/docs/doxygen/search/enums_0.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['_5fcbor_5fctrl',['_cbor_ctrl',['../data_8h.html#a6454b577999b479ac2585af7c204ae3b',1,'data.h']]], + ['_5fcbor_5fdst_5fmetadata',['_cbor_dst_metadata',['../data_8h.html#a3cdab5e05cf46846e98b43cf77985589',1,'data.h']]], + ['_5fcbor_5funicode_5fstatus_5ferror',['_cbor_unicode_status_error',['../unicode_8h.html#a5f58283b505b6cc8a5646516ae20831f',1,'unicode.h']]] +]; diff --git a/docs/doxygen/search/enums_1.html b/docs/doxygen/search/enums_1.html new file mode 100644 index 00000000..557299db --- /dev/null +++ b/docs/doxygen/search/enums_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/enums_1.js b/docs/doxygen/search/enums_1.js new file mode 100644 index 00000000..44658826 --- /dev/null +++ b/docs/doxygen/search/enums_1.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['cbor_5fdecoder_5fstatus',['cbor_decoder_status',['../data_8h.html#abfc88122444f085a1a3fee01687329fd',1,'data.h']]], + ['cbor_5ferror_5fcode',['cbor_error_code',['../data_8h.html#a13ad43c61d917938e0ce26173e6b2eb6',1,'data.h']]], + ['cbor_5ffloat_5fwidth',['cbor_float_width',['../data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7',1,'data.h']]], + ['cbor_5fint_5fwidth',['cbor_int_width',['../data_8h.html#ae0fc9740f108f0f0078b93712b061e57',1,'data.h']]], + ['cbor_5ftype',['cbor_type',['../data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6',1,'data.h']]] +]; diff --git a/docs/doxygen/search/enumvalues_0.html b/docs/doxygen/search/enumvalues_0.html new file mode 100644 index 00000000..96eafe72 --- /dev/null +++ b/docs/doxygen/search/enumvalues_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/enumvalues_0.js b/docs/doxygen/search/enumvalues_0.js new file mode 100644 index 00000000..1084ad89 --- /dev/null +++ b/docs/doxygen/search/enumvalues_0.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['_5fcbor_5fmetadata_5fdefinite',['_CBOR_METADATA_DEFINITE',['../data_8h.html#a3cdab5e05cf46846e98b43cf77985589a051b0d1fe7ef7ccfc3824110b797429e',1,'data.h']]], + ['_5fcbor_5fmetadata_5findefinite',['_CBOR_METADATA_INDEFINITE',['../data_8h.html#a3cdab5e05cf46846e98b43cf77985589ae598476995d503b404ccf78c21ab79ef',1,'data.h']]], + ['_5fcbor_5funicode_5fbadcp',['_CBOR_UNICODE_BADCP',['../unicode_8h.html#a5f58283b505b6cc8a5646516ae20831fa7ddb42c4f16ebd6d46fe1e331c643c8b',1,'unicode.h']]], + ['_5fcbor_5funicode_5fok',['_CBOR_UNICODE_OK',['../unicode_8h.html#a5f58283b505b6cc8a5646516ae20831faf42cbfe1ac853288773814920e16318c',1,'unicode.h']]] +]; diff --git a/docs/doxygen/search/enumvalues_1.html b/docs/doxygen/search/enumvalues_1.html new file mode 100644 index 00000000..4e43948a --- /dev/null +++ b/docs/doxygen/search/enumvalues_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/enumvalues_1.js b/docs/doxygen/search/enumvalues_1.js new file mode 100644 index 00000000..5faac756 --- /dev/null +++ b/docs/doxygen/search/enumvalues_1.js @@ -0,0 +1,34 @@ +var searchData= +[ + ['cbor_5fctrl_5ffalse',['CBOR_CTRL_FALSE',['../data_8h.html#a6454b577999b479ac2585af7c204ae3babbcec81d7145fdf31329e07a0bb064bd',1,'data.h']]], + ['cbor_5fctrl_5fnone',['CBOR_CTRL_NONE',['../data_8h.html#a6454b577999b479ac2585af7c204ae3bac8748342f8c8e6468de589a86cf736cc',1,'data.h']]], + ['cbor_5fctrl_5fnull',['CBOR_CTRL_NULL',['../data_8h.html#a6454b577999b479ac2585af7c204ae3ba64e142780db46497df37d5cfb40ef8fd',1,'data.h']]], + ['cbor_5fctrl_5ftrue',['CBOR_CTRL_TRUE',['../data_8h.html#a6454b577999b479ac2585af7c204ae3baf4f149be1611cec155482645ff2be8de',1,'data.h']]], + ['cbor_5fctrl_5fundef',['CBOR_CTRL_UNDEF',['../data_8h.html#a6454b577999b479ac2585af7c204ae3ba5354f70478e0acf68bf1682229b05b6d',1,'data.h']]], + ['cbor_5fdecoder_5febuffer',['CBOR_DECODER_EBUFFER',['../data_8h.html#abfc88122444f085a1a3fee01687329fdace2bb1bc04e3f906bd02708e991289b8',1,'data.h']]], + ['cbor_5fdecoder_5ferror',['CBOR_DECODER_ERROR',['../data_8h.html#abfc88122444f085a1a3fee01687329fda410c07e9ff710573d28db2794e008cb4',1,'data.h']]], + ['cbor_5fdecoder_5ffinished',['CBOR_DECODER_FINISHED',['../data_8h.html#abfc88122444f085a1a3fee01687329fda2ebc9567c96c353e07f9d9025054c31a',1,'data.h']]], + ['cbor_5fdecoder_5fnedata',['CBOR_DECODER_NEDATA',['../data_8h.html#abfc88122444f085a1a3fee01687329fda178d826b0e7dd7571d1f2c3be335528d',1,'data.h']]], + ['cbor_5ferr_5fmalformated',['CBOR_ERR_MALFORMATED',['../data_8h.html#a13ad43c61d917938e0ce26173e6b2eb6af2783808f2e475f57583511ef5eb6ea7',1,'data.h']]], + ['cbor_5ferr_5fmemerror',['CBOR_ERR_MEMERROR',['../data_8h.html#a13ad43c61d917938e0ce26173e6b2eb6ae408fbed8924a3eeb005a8c6f79136cb',1,'data.h']]], + ['cbor_5ferr_5fnodata',['CBOR_ERR_NODATA',['../data_8h.html#a13ad43c61d917938e0ce26173e6b2eb6a427a7d0fde29a84566e040d065cca6d1',1,'data.h']]], + ['cbor_5ferr_5fnone',['CBOR_ERR_NONE',['../data_8h.html#a13ad43c61d917938e0ce26173e6b2eb6a711ecd32adcc030541f2cfb58f69856d',1,'data.h']]], + ['cbor_5ferr_5fnotenoughdata',['CBOR_ERR_NOTENOUGHDATA',['../data_8h.html#a13ad43c61d917938e0ce26173e6b2eb6acdd41b7dd2155b68a7e78108551bbd9a',1,'data.h']]], + ['cbor_5ferr_5fsyntaxerror',['CBOR_ERR_SYNTAXERROR',['../data_8h.html#a13ad43c61d917938e0ce26173e6b2eb6a001d313c68a4f7531026f63af3a755c7',1,'data.h']]], + ['cbor_5ffloat_5f0',['CBOR_FLOAT_0',['../data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7ac3c49d03756f116648957c5d996f48b4',1,'data.h']]], + ['cbor_5ffloat_5f16',['CBOR_FLOAT_16',['../data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7a6a044cc40003cef84432fe92780514e5',1,'data.h']]], + ['cbor_5ffloat_5f32',['CBOR_FLOAT_32',['../data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7a0b2ba87d2508e98e5f6fee7bf8beedd4',1,'data.h']]], + ['cbor_5ffloat_5f64',['CBOR_FLOAT_64',['../data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7a792f18e66a6da153eb4f40a8f894c653',1,'data.h']]], + ['cbor_5fint_5f16',['CBOR_INT_16',['../data_8h.html#ae0fc9740f108f0f0078b93712b061e57a3a9caf604c45ce423b332e91f7370822',1,'data.h']]], + ['cbor_5fint_5f32',['CBOR_INT_32',['../data_8h.html#ae0fc9740f108f0f0078b93712b061e57ad429fc90ccfb94ec85996920fe115b51',1,'data.h']]], + ['cbor_5fint_5f64',['CBOR_INT_64',['../data_8h.html#ae0fc9740f108f0f0078b93712b061e57aafaef7945451a7f4d12298f12f8acb2d',1,'data.h']]], + ['cbor_5fint_5f8',['CBOR_INT_8',['../data_8h.html#ae0fc9740f108f0f0078b93712b061e57aaa167d7a4fac34f2bae123761b4b6fc8',1,'data.h']]], + ['cbor_5ftype_5farray',['CBOR_TYPE_ARRAY',['../data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6ae48b04b3538ade49d7eae9ee6b656103',1,'data.h']]], + ['cbor_5ftype_5fbytestring',['CBOR_TYPE_BYTESTRING',['../data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6a70b9f0b5958c8d51f15ad7bb7c4af01d',1,'data.h']]], + ['cbor_5ftype_5ffloat_5fctrl',['CBOR_TYPE_FLOAT_CTRL',['../data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6a1276dcc4ac56df5fd7e0270344a6e57d',1,'data.h']]], + ['cbor_5ftype_5fmap',['CBOR_TYPE_MAP',['../data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6a057fc3133cb4465f9eb734acfd195db2',1,'data.h']]], + ['cbor_5ftype_5fnegint',['CBOR_TYPE_NEGINT',['../data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6ae140516103af792c8f2af84390acfdcd',1,'data.h']]], + ['cbor_5ftype_5fstring',['CBOR_TYPE_STRING',['../data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6ae05102a66420250eacd5f17b95d04443',1,'data.h']]], + ['cbor_5ftype_5ftag',['CBOR_TYPE_TAG',['../data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6a16f0eaf29eeea66fe37ec1ed0fa45415',1,'data.h']]], + ['cbor_5ftype_5fuint',['CBOR_TYPE_UINT',['../data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6a2137d55d8028e37ff4319a633ef0634f',1,'data.h']]] +]; diff --git a/docs/doxygen/search/files_0.html b/docs/doxygen/search/files_0.html new file mode 100644 index 00000000..63c6ce0c --- /dev/null +++ b/docs/doxygen/search/files_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/files_0.js b/docs/doxygen/search/files_0.js new file mode 100644 index 00000000..a110b281 --- /dev/null +++ b/docs/doxygen/search/files_0.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['allocators_2ec',['allocators.c',['../allocators_8c.html',1,'']]], + ['arrays_2ec',['arrays.c',['../arrays_8c.html',1,'']]], + ['arrays_2eh',['arrays.h',['../arrays_8h.html',1,'']]] +]; diff --git a/docs/doxygen/search/files_1.html b/docs/doxygen/search/files_1.html new file mode 100644 index 00000000..5b37391d --- /dev/null +++ b/docs/doxygen/search/files_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/files_1.js b/docs/doxygen/search/files_1.js new file mode 100644 index 00000000..73dbbbb4 --- /dev/null +++ b/docs/doxygen/search/files_1.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['builder_5fcallbacks_2ec',['builder_callbacks.c',['../builder__callbacks_8c.html',1,'']]], + ['builder_5fcallbacks_2eh',['builder_callbacks.h',['../builder__callbacks_8h.html',1,'']]], + ['bytestrings_2ec',['bytestrings.c',['../bytestrings_8c.html',1,'']]], + ['bytestrings_2eh',['bytestrings.h',['../bytestrings_8h.html',1,'']]] +]; diff --git a/docs/doxygen/search/files_2.html b/docs/doxygen/search/files_2.html new file mode 100644 index 00000000..f5456fb7 --- /dev/null +++ b/docs/doxygen/search/files_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/files_2.js b/docs/doxygen/search/files_2.js new file mode 100644 index 00000000..27969fe7 --- /dev/null +++ b/docs/doxygen/search/files_2.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['callbacks_2ec',['callbacks.c',['../callbacks_8c.html',1,'']]], + ['callbacks_2eh',['callbacks.h',['../callbacks_8h.html',1,'']]], + ['cbor_2ec',['cbor.c',['../cbor_8c.html',1,'']]], + ['cbor_2eh',['cbor.h',['../cbor_8h.html',1,'']]], + ['common_2ec',['common.c',['../common_8c.html',1,'']]], + ['common_2eh',['common.h',['../common_8h.html',1,'']]] +]; diff --git a/docs/doxygen/search/files_3.html b/docs/doxygen/search/files_3.html new file mode 100644 index 00000000..3442829a --- /dev/null +++ b/docs/doxygen/search/files_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/files_3.js b/docs/doxygen/search/files_3.js new file mode 100644 index 00000000..3a4aa3fe --- /dev/null +++ b/docs/doxygen/search/files_3.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['data_2eh',['data.h',['../data_8h.html',1,'']]], + ['doxy_5ffrontpage_2emd',['doxy_frontpage.md',['../doxy__frontpage_8md.html',1,'']]] +]; diff --git a/docs/doxygen/search/files_4.html b/docs/doxygen/search/files_4.html new file mode 100644 index 00000000..d6d5623c --- /dev/null +++ b/docs/doxygen/search/files_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/files_4.js b/docs/doxygen/search/files_4.js new file mode 100644 index 00000000..da81e101 --- /dev/null +++ b/docs/doxygen/search/files_4.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['encoders_2ec',['encoders.c',['../encoders_8c.html',1,'']]], + ['encoders_2eh',['encoders.h',['../encoders_8h.html',1,'']]], + ['encoding_2ec',['encoding.c',['../encoding_8c.html',1,'']]], + ['encoding_2eh',['encoding.h',['../encoding_8h.html',1,'']]] +]; diff --git a/docs/doxygen/search/files_5.html b/docs/doxygen/search/files_5.html new file mode 100644 index 00000000..86035b56 --- /dev/null +++ b/docs/doxygen/search/files_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/files_5.js b/docs/doxygen/search/files_5.js new file mode 100644 index 00000000..f82269f3 --- /dev/null +++ b/docs/doxygen/search/files_5.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['floats_5fctrls_2ec',['floats_ctrls.c',['../floats__ctrls_8c.html',1,'']]], + ['floats_5fctrls_2eh',['floats_ctrls.h',['../floats__ctrls_8h.html',1,'']]] +]; diff --git a/docs/doxygen/search/files_6.html b/docs/doxygen/search/files_6.html new file mode 100644 index 00000000..384e5c5b --- /dev/null +++ b/docs/doxygen/search/files_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/files_6.js b/docs/doxygen/search/files_6.js new file mode 100644 index 00000000..c182c6ea --- /dev/null +++ b/docs/doxygen/search/files_6.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['ints_2ec',['ints.c',['../ints_8c.html',1,'']]], + ['ints_2eh',['ints.h',['../ints_8h.html',1,'']]] +]; diff --git a/docs/doxygen/search/files_7.html b/docs/doxygen/search/files_7.html new file mode 100644 index 00000000..f608e34f --- /dev/null +++ b/docs/doxygen/search/files_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/files_7.js b/docs/doxygen/search/files_7.js new file mode 100644 index 00000000..da46e5f7 --- /dev/null +++ b/docs/doxygen/search/files_7.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['loaders_2ec',['loaders.c',['../loaders_8c.html',1,'']]], + ['loaders_2eh',['loaders.h',['../loaders_8h.html',1,'']]] +]; diff --git a/docs/doxygen/search/files_8.html b/docs/doxygen/search/files_8.html new file mode 100644 index 00000000..9f9ccf9f --- /dev/null +++ b/docs/doxygen/search/files_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/files_8.js b/docs/doxygen/search/files_8.js new file mode 100644 index 00000000..06d330ec --- /dev/null +++ b/docs/doxygen/search/files_8.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['maps_2ec',['maps.c',['../maps_8c.html',1,'']]], + ['maps_2eh',['maps.h',['../maps_8h.html',1,'']]], + ['memory_5futils_2ec',['memory_utils.c',['../memory__utils_8c.html',1,'']]], + ['memory_5futils_2eh',['memory_utils.h',['../memory__utils_8h.html',1,'']]] +]; diff --git a/docs/doxygen/search/files_9.html b/docs/doxygen/search/files_9.html new file mode 100644 index 00000000..bde75891 --- /dev/null +++ b/docs/doxygen/search/files_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/files_9.js b/docs/doxygen/search/files_9.js new file mode 100644 index 00000000..ddd710b8 --- /dev/null +++ b/docs/doxygen/search/files_9.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['serialization_2ec',['serialization.c',['../serialization_8c.html',1,'']]], + ['serialization_2eh',['serialization.h',['../serialization_8h.html',1,'']]], + ['stack_2ec',['stack.c',['../stack_8c.html',1,'']]], + ['stack_2eh',['stack.h',['../stack_8h.html',1,'']]], + ['streaming_2ec',['streaming.c',['../streaming_8c.html',1,'']]], + ['streaming_2eh',['streaming.h',['../streaming_8h.html',1,'']]], + ['strings_2ec',['strings.c',['../strings_8c.html',1,'']]], + ['strings_2eh',['strings.h',['../strings_8h.html',1,'']]] +]; diff --git a/docs/doxygen/search/files_a.html b/docs/doxygen/search/files_a.html new file mode 100644 index 00000000..0b3bb1dd --- /dev/null +++ b/docs/doxygen/search/files_a.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/files_a.js b/docs/doxygen/search/files_a.js new file mode 100644 index 00000000..03c4195d --- /dev/null +++ b/docs/doxygen/search/files_a.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['tags_2ec',['tags.c',['../tags_8c.html',1,'']]], + ['tags_2eh',['tags.h',['../tags_8h.html',1,'']]] +]; diff --git a/docs/doxygen/search/files_b.html b/docs/doxygen/search/files_b.html new file mode 100644 index 00000000..42483325 --- /dev/null +++ b/docs/doxygen/search/files_b.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/files_b.js b/docs/doxygen/search/files_b.js new file mode 100644 index 00000000..76e9fbf1 --- /dev/null +++ b/docs/doxygen/search/files_b.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['unicode_2ec',['unicode.c',['../unicode_8c.html',1,'']]], + ['unicode_2eh',['unicode.h',['../unicode_8h.html',1,'']]] +]; diff --git a/docs/doxygen/search/functions_0.html b/docs/doxygen/search/functions_0.html new file mode 100644 index 00000000..03cae5d9 --- /dev/null +++ b/docs/doxygen/search/functions_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/functions_0.js b/docs/doxygen/search/functions_0.js new file mode 100644 index 00000000..de1a3b42 --- /dev/null +++ b/docs/doxygen/search/functions_0.js @@ -0,0 +1,29 @@ +var searchData= +[ + ['_5fcbor_5falloc_5fmultiple',['_cbor_alloc_multiple',['../memory__utils_8c.html#a7bfbe0ac179b30f38bfeb9fe432ad4ec',1,'_cbor_alloc_multiple(size_t item_size, size_t item_count): memory_utils.c'],['../memory__utils_8h.html#a7bfbe0ac179b30f38bfeb9fe432ad4ec',1,'_cbor_alloc_multiple(size_t item_size, size_t item_count): memory_utils.c']]], + ['_5fcbor_5fbuilder_5fappend',['_cbor_builder_append',['../builder__callbacks_8c.html#abfd1332f0df578631a3702a2c193287c',1,'builder_callbacks.c']]], + ['_5fcbor_5fdecode_5fhalf',['_cbor_decode_half',['../loaders_8c.html#a8d5adcea9a5b6f265fe6bb5cbd62e5c2',1,'loaders.c']]], + ['_5fcbor_5fencode_5fbyte',['_cbor_encode_byte',['../encoding_8c.html#a4352d769328811eaee8db575256f8a6d',1,'encoding.c']]], + ['_5fcbor_5fencode_5fuint',['_cbor_encode_uint',['../encoders_8c.html#ad0b03bdce1727977d8c8307e2a91590a',1,'_cbor_encode_uint(uint64_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset): encoders.c'],['../encoders_8h.html#ad0b03bdce1727977d8c8307e2a91590a',1,'_cbor_encode_uint(uint64_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset): encoders.c']]], + ['_5fcbor_5fencode_5fuint16',['_cbor_encode_uint16',['../encoders_8c.html#a18c7f670aae9fa3f03a2ba58e6590c43',1,'_cbor_encode_uint16(uint16_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset): encoders.c'],['../encoders_8h.html#a18c7f670aae9fa3f03a2ba58e6590c43',1,'_cbor_encode_uint16(uint16_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset): encoders.c']]], + ['_5fcbor_5fencode_5fuint32',['_cbor_encode_uint32',['../encoders_8c.html#a58efe8377be9b98013828ed27752e212',1,'_cbor_encode_uint32(uint32_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset): encoders.c'],['../encoders_8h.html#a58efe8377be9b98013828ed27752e212',1,'_cbor_encode_uint32(uint32_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset): encoders.c']]], + ['_5fcbor_5fencode_5fuint64',['_cbor_encode_uint64',['../encoders_8c.html#a6770d92d21edd8100cfd48ab443fc566',1,'_cbor_encode_uint64(uint64_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset): encoders.c'],['../encoders_8h.html#a6770d92d21edd8100cfd48ab443fc566',1,'_cbor_encode_uint64(uint64_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset): encoders.c']]], + ['_5fcbor_5fencode_5fuint8',['_cbor_encode_uint8',['../encoders_8c.html#a32eb27ea8f535e166b40c7be50ab8eb1',1,'_cbor_encode_uint8(uint8_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset): encoders.c'],['../encoders_8h.html#a32eb27ea8f535e166b40c7be50ab8eb1',1,'_cbor_encode_uint8(uint8_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset): encoders.c']]], + ['_5fcbor_5fhighest_5fbit',['_cbor_highest_bit',['../memory__utils_8c.html#ab45e9067ef782bb27cf846dc94eb4669',1,'memory_utils.c']]], + ['_5fcbor_5fload_5fdouble',['_cbor_load_double',['../loaders_8c.html#a552b4d5d5cc7c3753d48325fb6889f1d',1,'_cbor_load_double(cbor_data source): loaders.c'],['../loaders_8h.html#a552b4d5d5cc7c3753d48325fb6889f1d',1,'_cbor_load_double(cbor_data source): loaders.c']]], + ['_5fcbor_5fload_5ffloat',['_cbor_load_float',['../loaders_8c.html#aa812443c86ee5c127379009f0a760030',1,'_cbor_load_float(cbor_data source): loaders.c'],['../loaders_8h.html#aa812443c86ee5c127379009f0a760030',1,'_cbor_load_float(cbor_data source): loaders.c']]], + ['_5fcbor_5fload_5fhalf',['_cbor_load_half',['../loaders_8c.html#a771bf852840eee864b888ca85d99dfad',1,'_cbor_load_half(cbor_data source): loaders.c'],['../loaders_8h.html#a771bf852840eee864b888ca85d99dfad',1,'_cbor_load_half(cbor_data source): loaders.c']]], + ['_5fcbor_5fload_5fuint16',['_cbor_load_uint16',['../loaders_8c.html#a82cc3a9e9028cc2ea560d1538804acc7',1,'_cbor_load_uint16(const unsigned char *source): loaders.c'],['../loaders_8h.html#a82cc3a9e9028cc2ea560d1538804acc7',1,'_cbor_load_uint16(const unsigned char *source): loaders.c']]], + ['_5fcbor_5fload_5fuint32',['_cbor_load_uint32',['../loaders_8c.html#a356f0cc63df1addf4a3b1d6ee92ea3f6',1,'_cbor_load_uint32(const unsigned char *source): loaders.c'],['../loaders_8h.html#a356f0cc63df1addf4a3b1d6ee92ea3f6',1,'_cbor_load_uint32(const unsigned char *source): loaders.c']]], + ['_5fcbor_5fload_5fuint64',['_cbor_load_uint64',['../loaders_8c.html#ad1fd77b3d9b7c9369095012ae2ed9b33',1,'_cbor_load_uint64(const unsigned char *source): loaders.c'],['../loaders_8h.html#ad1fd77b3d9b7c9369095012ae2ed9b33',1,'_cbor_load_uint64(const unsigned char *source): loaders.c']]], + ['_5fcbor_5fload_5fuint8',['_cbor_load_uint8',['../loaders_8c.html#af0b29efb9dbbd26f3dd99df74382e9c9',1,'_cbor_load_uint8(cbor_data source): loaders.c'],['../loaders_8h.html#a04bc096a04750b219adf060c4fa9496a',1,'_cbor_load_uint8(const unsigned char *source): loaders.c']]], + ['_5fcbor_5fmap_5fadd_5fkey',['_cbor_map_add_key',['../maps_8c.html#a64c91e7ecba7cf7d0d4949153d681db8',1,'_cbor_map_add_key(cbor_item_t *item, cbor_item_t *key): maps.c'],['../maps_8h.html#a64c91e7ecba7cf7d0d4949153d681db8',1,'_cbor_map_add_key(cbor_item_t *item, cbor_item_t *key): maps.c']]], + ['_5fcbor_5fmap_5fadd_5fvalue',['_cbor_map_add_value',['../maps_8c.html#abb15486eebcd1c41c373613757505705',1,'_cbor_map_add_value(cbor_item_t *item, cbor_item_t *value): maps.c'],['../maps_8h.html#abb15486eebcd1c41c373613757505705',1,'_cbor_map_add_value(cbor_item_t *item, cbor_item_t *value): maps.c']]], + ['_5fcbor_5frealloc_5fmultiple',['_cbor_realloc_multiple',['../memory__utils_8c.html#afd7a22ccd3b44d6ff668e14c3a006e40',1,'_cbor_realloc_multiple(void *pointer, size_t item_size, size_t item_count): memory_utils.c'],['../memory__utils_8h.html#afd7a22ccd3b44d6ff668e14c3a006e40',1,'_cbor_realloc_multiple(void *pointer, size_t item_size, size_t item_count): memory_utils.c']]], + ['_5fcbor_5fsafe_5fto_5fmultiply',['_cbor_safe_to_multiply',['../memory__utils_8c.html#abdee08be3f4cff35a94279fda66c4778',1,'_cbor_safe_to_multiply(size_t a, size_t b): memory_utils.c'],['../memory__utils_8h.html#abdee08be3f4cff35a94279fda66c4778',1,'_cbor_safe_to_multiply(size_t a, size_t b): memory_utils.c']]], + ['_5fcbor_5fstack_5finit',['_cbor_stack_init',['../stack_8c.html#a7702383747257f1df9c3ceda9fb9da58',1,'_cbor_stack_init(): stack.c'],['../stack_8h.html#a7702383747257f1df9c3ceda9fb9da58',1,'_cbor_stack_init(): stack.c']]], + ['_5fcbor_5fstack_5fpop',['_cbor_stack_pop',['../stack_8c.html#a6541672c7a6bcc55e6645cff2a5ab005',1,'_cbor_stack_pop(struct _cbor_stack *stack): stack.c'],['../stack_8h.html#a7ef944b8c6581c73fe7fbf678aa09f4c',1,'_cbor_stack_pop(struct _cbor_stack *): stack.c']]], + ['_5fcbor_5fstack_5fpush',['_cbor_stack_push',['../stack_8c.html#abb0f169980a61710ee2b83ac90df3442',1,'_cbor_stack_push(struct _cbor_stack *stack, cbor_item_t *item, size_t subitems): stack.c'],['../stack_8h.html#a76e5fdb5e3c5b6a35e928ee9e9310568',1,'_cbor_stack_push(struct _cbor_stack *, cbor_item_t *, size_t): stack.c']]], + ['_5fcbor_5funicode_5fcodepoint_5fcount',['_cbor_unicode_codepoint_count',['../unicode_8c.html#ade9ebfe3d9b9bfad4c9fd5c158d519a8',1,'_cbor_unicode_codepoint_count(cbor_data source, size_t source_length, struct _cbor_unicode_status *status): unicode.c'],['../unicode_8h.html#ade9ebfe3d9b9bfad4c9fd5c158d519a8',1,'_cbor_unicode_codepoint_count(cbor_data source, size_t source_length, struct _cbor_unicode_status *status): unicode.c']]], + ['_5fcbor_5funicode_5fdecode',['_cbor_unicode_decode',['../unicode_8c.html#aea748174291fa35e154c69e7669f199b',1,'unicode.c']]] +]; diff --git a/docs/doxygen/search/functions_1.html b/docs/doxygen/search/functions_1.html new file mode 100644 index 00000000..5d7a2e30 --- /dev/null +++ b/docs/doxygen/search/functions_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/functions_1.js b/docs/doxygen/search/functions_1.js new file mode 100644 index 00000000..f40b5fdd --- /dev/null +++ b/docs/doxygen/search/functions_1.js @@ -0,0 +1,206 @@ +var searchData= +[ + ['cbor_5farray_5fallocated',['cbor_array_allocated',['../arrays_8c.html#a5da97cca271f81f55809c39fad6078b0',1,'cbor_array_allocated(const cbor_item_t *item): arrays.c'],['../arrays_8h.html#a5da97cca271f81f55809c39fad6078b0',1,'cbor_array_allocated(const cbor_item_t *item): arrays.c']]], + ['cbor_5farray_5fget',['cbor_array_get',['../arrays_8c.html#a1573139e26cf5b5acc4b0ed861291069',1,'cbor_array_get(const cbor_item_t *item, size_t index): arrays.c'],['../arrays_8h.html#a1573139e26cf5b5acc4b0ed861291069',1,'cbor_array_get(const cbor_item_t *item, size_t index): arrays.c']]], + ['cbor_5farray_5fhandle',['cbor_array_handle',['../arrays_8c.html#a8dd01f4a46f162fa4f06b7df7428128e',1,'cbor_array_handle(const cbor_item_t *item): arrays.c'],['../arrays_8h.html#a8dd01f4a46f162fa4f06b7df7428128e',1,'cbor_array_handle(const cbor_item_t *item): arrays.c']]], + ['cbor_5farray_5fis_5fdefinite',['cbor_array_is_definite',['../arrays_8c.html#ac2f1480c546a0268e8b046b365e58599',1,'cbor_array_is_definite(const cbor_item_t *item): arrays.c'],['../arrays_8h.html#ac2f1480c546a0268e8b046b365e58599',1,'cbor_array_is_definite(const cbor_item_t *item): arrays.c']]], + ['cbor_5farray_5fis_5findefinite',['cbor_array_is_indefinite',['../arrays_8c.html#a291a9f3ff12a2e2c58b2ca8b00280d40',1,'cbor_array_is_indefinite(const cbor_item_t *item): arrays.c'],['../arrays_8h.html#a291a9f3ff12a2e2c58b2ca8b00280d40',1,'cbor_array_is_indefinite(const cbor_item_t *item): arrays.c']]], + ['cbor_5farray_5fpush',['cbor_array_push',['../arrays_8c.html#abb1c1c9731a2195857dc471f2a6f60f5',1,'cbor_array_push(cbor_item_t *array, cbor_item_t *pushee): arrays.c'],['../arrays_8h.html#abb1c1c9731a2195857dc471f2a6f60f5',1,'cbor_array_push(cbor_item_t *array, cbor_item_t *pushee): arrays.c']]], + ['cbor_5farray_5freplace',['cbor_array_replace',['../arrays_8c.html#a44020515090bbbe91249aff0016ab8e5',1,'cbor_array_replace(cbor_item_t *item, size_t index, cbor_item_t *value): arrays.c'],['../arrays_8h.html#a44020515090bbbe91249aff0016ab8e5',1,'cbor_array_replace(cbor_item_t *item, size_t index, cbor_item_t *value): arrays.c']]], + ['cbor_5farray_5fset',['cbor_array_set',['../arrays_8c.html#a382cc2dc480ebb9c7951eb3235be89b4',1,'cbor_array_set(cbor_item_t *item, size_t index, cbor_item_t *value): arrays.c'],['../arrays_8h.html#a382cc2dc480ebb9c7951eb3235be89b4',1,'cbor_array_set(cbor_item_t *item, size_t index, cbor_item_t *value): arrays.c']]], + ['cbor_5farray_5fsize',['cbor_array_size',['../arrays_8c.html#a4f634a9a4bc834e4ea6ac43e94d51f84',1,'cbor_array_size(const cbor_item_t *item): arrays.c'],['../arrays_8h.html#a4f634a9a4bc834e4ea6ac43e94d51f84',1,'cbor_array_size(const cbor_item_t *item): arrays.c']]], + ['cbor_5fbuild_5fbool',['cbor_build_bool',['../floats__ctrls_8c.html#a5218f8557e64441e9085f6b9478bfd06',1,'cbor_build_bool(bool value): floats_ctrls.c'],['../floats__ctrls_8h.html#a5218f8557e64441e9085f6b9478bfd06',1,'cbor_build_bool(bool value): floats_ctrls.c']]], + ['cbor_5fbuild_5fbytestring',['cbor_build_bytestring',['../bytestrings_8c.html#ab76bd5ff62831739cd9a8d7ec2768c1a',1,'cbor_build_bytestring(cbor_data handle, size_t length): bytestrings.c'],['../bytestrings_8h.html#ab76bd5ff62831739cd9a8d7ec2768c1a',1,'cbor_build_bytestring(cbor_data handle, size_t length): bytestrings.c']]], + ['cbor_5fbuild_5fctrl',['cbor_build_ctrl',['../floats__ctrls_8c.html#af31b0a42b2dd7f29efe42385bd4a58f1',1,'cbor_build_ctrl(uint8_t value): floats_ctrls.c'],['../floats__ctrls_8h.html#af31b0a42b2dd7f29efe42385bd4a58f1',1,'cbor_build_ctrl(uint8_t value): floats_ctrls.c']]], + ['cbor_5fbuild_5ffloat2',['cbor_build_float2',['../floats__ctrls_8c.html#a9884b85abd0c0637a4377168d034260f',1,'cbor_build_float2(float value): floats_ctrls.c'],['../floats__ctrls_8h.html#a9884b85abd0c0637a4377168d034260f',1,'cbor_build_float2(float value): floats_ctrls.c']]], + ['cbor_5fbuild_5ffloat4',['cbor_build_float4',['../floats__ctrls_8c.html#a1e3e9757ac809b6df56f1095a87bfdad',1,'cbor_build_float4(float value): floats_ctrls.c'],['../floats__ctrls_8h.html#a1e3e9757ac809b6df56f1095a87bfdad',1,'cbor_build_float4(float value): floats_ctrls.c']]], + ['cbor_5fbuild_5ffloat8',['cbor_build_float8',['../floats__ctrls_8c.html#aad0e4103cf703b5c3e856956f5a2fb96',1,'cbor_build_float8(double value): floats_ctrls.c'],['../floats__ctrls_8h.html#aad0e4103cf703b5c3e856956f5a2fb96',1,'cbor_build_float8(double value): floats_ctrls.c']]], + ['cbor_5fbuild_5fnegint16',['cbor_build_negint16',['../ints_8c.html#ae40a5af0998889c6550ceb0914b2cd9b',1,'cbor_build_negint16(uint16_t value): ints.c'],['../ints_8h.html#ae40a5af0998889c6550ceb0914b2cd9b',1,'cbor_build_negint16(uint16_t value): ints.c']]], + ['cbor_5fbuild_5fnegint32',['cbor_build_negint32',['../ints_8c.html#a35d8b500ae33d4fc0262de4830382529',1,'cbor_build_negint32(uint32_t value): ints.c'],['../ints_8h.html#a35d8b500ae33d4fc0262de4830382529',1,'cbor_build_negint32(uint32_t value): ints.c']]], + ['cbor_5fbuild_5fnegint64',['cbor_build_negint64',['../ints_8c.html#ae24074614ece5da3024a536093d21678',1,'cbor_build_negint64(uint64_t value): ints.c'],['../ints_8h.html#ae24074614ece5da3024a536093d21678',1,'cbor_build_negint64(uint64_t value): ints.c']]], + ['cbor_5fbuild_5fnegint8',['cbor_build_negint8',['../ints_8c.html#a28553eb079f8778babebf869e33f27a2',1,'cbor_build_negint8(uint8_t value): ints.c'],['../ints_8h.html#a28553eb079f8778babebf869e33f27a2',1,'cbor_build_negint8(uint8_t value): ints.c']]], + ['cbor_5fbuild_5fstring',['cbor_build_string',['../strings_8c.html#a61a9388aca4fc7ee5355eb92a6d56536',1,'cbor_build_string(const char *val): strings.c'],['../strings_8h.html#a61a9388aca4fc7ee5355eb92a6d56536',1,'cbor_build_string(const char *val): strings.c']]], + ['cbor_5fbuild_5fstringn',['cbor_build_stringn',['../strings_8c.html#a26f8c53bb33641408921c388bf539b0c',1,'cbor_build_stringn(const char *val, size_t length): strings.c'],['../strings_8h.html#a26f8c53bb33641408921c388bf539b0c',1,'cbor_build_stringn(const char *val, size_t length): strings.c']]], + ['cbor_5fbuild_5ftag',['cbor_build_tag',['../tags_8c.html#a44840e7f4b0225eebf3a366fafff8e96',1,'cbor_build_tag(uint64_t value, cbor_item_t *item): tags.c'],['../tags_8h.html#a44840e7f4b0225eebf3a366fafff8e96',1,'cbor_build_tag(uint64_t value, cbor_item_t *item): tags.c']]], + ['cbor_5fbuild_5fuint16',['cbor_build_uint16',['../ints_8c.html#a88f05c625ad9fa182bc95c9c97f87dda',1,'cbor_build_uint16(uint16_t value): ints.c'],['../ints_8h.html#a88f05c625ad9fa182bc95c9c97f87dda',1,'cbor_build_uint16(uint16_t value): ints.c']]], + ['cbor_5fbuild_5fuint32',['cbor_build_uint32',['../ints_8c.html#afcefa3190eeeff1e5ed0b5217761ad5a',1,'cbor_build_uint32(uint32_t value): ints.c'],['../ints_8h.html#afcefa3190eeeff1e5ed0b5217761ad5a',1,'cbor_build_uint32(uint32_t value): ints.c']]], + ['cbor_5fbuild_5fuint64',['cbor_build_uint64',['../ints_8c.html#adff4351ebc5bb6f69d8a2ea0c9439fc5',1,'cbor_build_uint64(uint64_t value): ints.c'],['../ints_8h.html#adff4351ebc5bb6f69d8a2ea0c9439fc5',1,'cbor_build_uint64(uint64_t value): ints.c']]], + ['cbor_5fbuild_5fuint8',['cbor_build_uint8',['../ints_8c.html#ad4d9f92f14c640544386e6655283052d',1,'cbor_build_uint8(uint8_t value): ints.c'],['../ints_8h.html#ad4d9f92f14c640544386e6655283052d',1,'cbor_build_uint8(uint8_t value): ints.c']]], + ['cbor_5fbuilder_5farray_5fstart_5fcallback',['cbor_builder_array_start_callback',['../builder__callbacks_8c.html#a2dd24b9dcda84915c4fc0229a6e52df6',1,'cbor_builder_array_start_callback(void *context, size_t size): builder_callbacks.c'],['../builder__callbacks_8h.html#a0840fe5d84881527b514d7d3049c3079',1,'cbor_builder_array_start_callback(void *, size_t): builder_callbacks.c']]], + ['cbor_5fbuilder_5fboolean_5fcallback',['cbor_builder_boolean_callback',['../builder__callbacks_8c.html#a1898083345b031539becf70203361860',1,'cbor_builder_boolean_callback(void *context, bool value): builder_callbacks.c'],['../builder__callbacks_8h.html#ab5d82f6055e7326f892be37e6b4b7916',1,'cbor_builder_boolean_callback(void *, bool): builder_callbacks.c']]], + ['cbor_5fbuilder_5fbyte_5fstring_5fcallback',['cbor_builder_byte_string_callback',['../builder__callbacks_8c.html#a41f2a1f66f9cb53dd0075e88f0b640fb',1,'cbor_builder_byte_string_callback(void *context, cbor_data data, size_t length): builder_callbacks.c'],['../builder__callbacks_8h.html#ae3487b745fc400f6ca145d09b475cc22',1,'cbor_builder_byte_string_callback(void *, cbor_data, size_t): builder_callbacks.c']]], + ['cbor_5fbuilder_5fbyte_5fstring_5fstart_5fcallback',['cbor_builder_byte_string_start_callback',['../builder__callbacks_8c.html#a1c0c98b6c27ac737123ecb014cb6e9c7',1,'cbor_builder_byte_string_start_callback(void *context): builder_callbacks.c'],['../builder__callbacks_8h.html#a50acadf2240a3b6badcb11e05aff3a47',1,'cbor_builder_byte_string_start_callback(void *): builder_callbacks.c']]], + ['cbor_5fbuilder_5ffloat2_5fcallback',['cbor_builder_float2_callback',['../builder__callbacks_8c.html#ae1509582103b87cc5824c30f101f9d76',1,'cbor_builder_float2_callback(void *context, float value): builder_callbacks.c'],['../builder__callbacks_8h.html#ab5c0f9bbfa8796a80c4b1fb666593c28',1,'cbor_builder_float2_callback(void *, float): builder_callbacks.c']]], + ['cbor_5fbuilder_5ffloat4_5fcallback',['cbor_builder_float4_callback',['../builder__callbacks_8c.html#aa86c973a7feebd7d4f12cd3014a36293',1,'cbor_builder_float4_callback(void *context, float value): builder_callbacks.c'],['../builder__callbacks_8h.html#a9603c2d5270f21afbefc0c3f15dc037b',1,'cbor_builder_float4_callback(void *, float): builder_callbacks.c']]], + ['cbor_5fbuilder_5ffloat8_5fcallback',['cbor_builder_float8_callback',['../builder__callbacks_8c.html#ac78462da492c7d57dfb90f7aadcadc5e',1,'cbor_builder_float8_callback(void *context, double value): builder_callbacks.c'],['../builder__callbacks_8h.html#a34ed1c906cb4d31432466d78cf644524',1,'cbor_builder_float8_callback(void *, double): builder_callbacks.c']]], + ['cbor_5fbuilder_5findef_5farray_5fstart_5fcallback',['cbor_builder_indef_array_start_callback',['../builder__callbacks_8c.html#a7bcc936cb1cc653551de3d5b49fbe3f0',1,'cbor_builder_indef_array_start_callback(void *context): builder_callbacks.c'],['../builder__callbacks_8h.html#a59c682fb50d074458ab1e12328aed401',1,'cbor_builder_indef_array_start_callback(void *): builder_callbacks.c']]], + ['cbor_5fbuilder_5findef_5fbreak_5fcallback',['cbor_builder_indef_break_callback',['../builder__callbacks_8c.html#ae386e2194dd97053acca4c26d6039ff6',1,'cbor_builder_indef_break_callback(void *context): builder_callbacks.c'],['../builder__callbacks_8h.html#a76daa00e402ba3b8b6c74dbbfc74b6ed',1,'cbor_builder_indef_break_callback(void *): builder_callbacks.c']]], + ['cbor_5fbuilder_5findef_5fmap_5fstart_5fcallback',['cbor_builder_indef_map_start_callback',['../builder__callbacks_8c.html#a28b2dc3b7b96debc8763407308c365ea',1,'cbor_builder_indef_map_start_callback(void *context): builder_callbacks.c'],['../builder__callbacks_8h.html#a6110c00a85a88fc4e7edf6f91bea8f18',1,'cbor_builder_indef_map_start_callback(void *): builder_callbacks.c']]], + ['cbor_5fbuilder_5fmap_5fstart_5fcallback',['cbor_builder_map_start_callback',['../builder__callbacks_8c.html#a95d00fb404804d93ebffdaf607f48a62',1,'cbor_builder_map_start_callback(void *context, size_t size): builder_callbacks.c'],['../builder__callbacks_8h.html#a683589f26de39eaa69e833084bc74279',1,'cbor_builder_map_start_callback(void *, size_t): builder_callbacks.c']]], + ['cbor_5fbuilder_5fnegint16_5fcallback',['cbor_builder_negint16_callback',['../builder__callbacks_8c.html#a355c63dd0e941d9f3bc18b95876d7b39',1,'cbor_builder_negint16_callback(void *context, uint16_t value): builder_callbacks.c'],['../builder__callbacks_8h.html#a05a3b8a63bd44609664ba1480058aeef',1,'cbor_builder_negint16_callback(void *, uint16_t): builder_callbacks.c']]], + ['cbor_5fbuilder_5fnegint32_5fcallback',['cbor_builder_negint32_callback',['../builder__callbacks_8c.html#a4b0a2d222bc823bb88f9b8ba38e00f05',1,'cbor_builder_negint32_callback(void *context, uint32_t value): builder_callbacks.c'],['../builder__callbacks_8h.html#af2c80ac4543ac875b84b8eb8c619ce4a',1,'cbor_builder_negint32_callback(void *, uint32_t): builder_callbacks.c']]], + ['cbor_5fbuilder_5fnegint64_5fcallback',['cbor_builder_negint64_callback',['../builder__callbacks_8c.html#ab99cc7da548fd54ed22a6c988be037ae',1,'cbor_builder_negint64_callback(void *context, uint64_t value): builder_callbacks.c'],['../builder__callbacks_8h.html#aa92b23a8c36df6157fde447a58241f8d',1,'cbor_builder_negint64_callback(void *, uint64_t): builder_callbacks.c']]], + ['cbor_5fbuilder_5fnegint8_5fcallback',['cbor_builder_negint8_callback',['../builder__callbacks_8c.html#a9b1fada71e0c9cbc90ed6089ffc45958',1,'cbor_builder_negint8_callback(void *context, uint8_t value): builder_callbacks.c'],['../builder__callbacks_8h.html#a0d95d98def615e7f4ea10cb680d2fadd',1,'cbor_builder_negint8_callback(void *, uint8_t): builder_callbacks.c']]], + ['cbor_5fbuilder_5fnull_5fcallback',['cbor_builder_null_callback',['../builder__callbacks_8c.html#a54852cd4c120b368d9b9b5cffb622303',1,'cbor_builder_null_callback(void *context): builder_callbacks.c'],['../builder__callbacks_8h.html#a5be99aad4fcaf9a86e2e583f3584fbd2',1,'cbor_builder_null_callback(void *): builder_callbacks.c']]], + ['cbor_5fbuilder_5fstring_5fcallback',['cbor_builder_string_callback',['../builder__callbacks_8c.html#aa10a165cd945c03ad09ae0866287f6bd',1,'cbor_builder_string_callback(void *context, cbor_data data, size_t length): builder_callbacks.c'],['../builder__callbacks_8h.html#a0752a26117a4ac11a0b31969185774c9',1,'cbor_builder_string_callback(void *, cbor_data, size_t): builder_callbacks.c']]], + ['cbor_5fbuilder_5fstring_5fstart_5fcallback',['cbor_builder_string_start_callback',['../builder__callbacks_8c.html#a269aa36265c6fb1b18cad2a14cf355a0',1,'cbor_builder_string_start_callback(void *context): builder_callbacks.c'],['../builder__callbacks_8h.html#a6ad59b5991aeeb560d2984abc85f1240',1,'cbor_builder_string_start_callback(void *): builder_callbacks.c']]], + ['cbor_5fbuilder_5ftag_5fcallback',['cbor_builder_tag_callback',['../builder__callbacks_8c.html#aa2b3ea257a52e3f002c79ca2740ef6a2',1,'cbor_builder_tag_callback(void *context, uint64_t value): builder_callbacks.c'],['../builder__callbacks_8h.html#a22b27f58982df6e585ef19a215b0b796',1,'cbor_builder_tag_callback(void *, uint64_t): builder_callbacks.c']]], + ['cbor_5fbuilder_5fuint16_5fcallback',['cbor_builder_uint16_callback',['../builder__callbacks_8c.html#a8cac42a8aeaf19f532ccc5c21e851e8c',1,'cbor_builder_uint16_callback(void *context, uint16_t value): builder_callbacks.c'],['../builder__callbacks_8h.html#ae480def467a853de4da395b83583c364',1,'cbor_builder_uint16_callback(void *, uint16_t): builder_callbacks.c']]], + ['cbor_5fbuilder_5fuint32_5fcallback',['cbor_builder_uint32_callback',['../builder__callbacks_8c.html#a69e152b1c2523502456301f878b07c49',1,'cbor_builder_uint32_callback(void *context, uint32_t value): builder_callbacks.c'],['../builder__callbacks_8h.html#a926c3b93cb1745fe7fa4bb0adf5896f7',1,'cbor_builder_uint32_callback(void *, uint32_t): builder_callbacks.c']]], + ['cbor_5fbuilder_5fuint64_5fcallback',['cbor_builder_uint64_callback',['../builder__callbacks_8c.html#a119060abe3c5b1d936514063ca4db22e',1,'cbor_builder_uint64_callback(void *context, uint64_t value): builder_callbacks.c'],['../builder__callbacks_8h.html#afbff23673e4980d9bafd0a2b61934a33',1,'cbor_builder_uint64_callback(void *, uint64_t): builder_callbacks.c']]], + ['cbor_5fbuilder_5fuint8_5fcallback',['cbor_builder_uint8_callback',['../builder__callbacks_8c.html#aa3cd19f25b7f29ddcd153e30b2e09824',1,'cbor_builder_uint8_callback(void *context, uint8_t value): builder_callbacks.c'],['../builder__callbacks_8h.html#a98b2405c0f8f7574df6f1b974d8e1e33',1,'cbor_builder_uint8_callback(void *, uint8_t): builder_callbacks.c']]], + ['cbor_5fbuilder_5fundefined_5fcallback',['cbor_builder_undefined_callback',['../builder__callbacks_8c.html#a452f42c05cdf422e6526bc0d7cc135dc',1,'cbor_builder_undefined_callback(void *context): builder_callbacks.c'],['../builder__callbacks_8h.html#a5eea26b61770e178e2c6b2ec17ecca59',1,'cbor_builder_undefined_callback(void *): builder_callbacks.c']]], + ['cbor_5fbytestring_5fadd_5fchunk',['cbor_bytestring_add_chunk',['../bytestrings_8c.html#a5dc8c27d6e7acfdd05fdc15c01e25b47',1,'cbor_bytestring_add_chunk(cbor_item_t *item, cbor_item_t *chunk): bytestrings.c'],['../bytestrings_8h.html#a5dc8c27d6e7acfdd05fdc15c01e25b47',1,'cbor_bytestring_add_chunk(cbor_item_t *item, cbor_item_t *chunk): bytestrings.c']]], + ['cbor_5fbytestring_5fchunk_5fcount',['cbor_bytestring_chunk_count',['../bytestrings_8c.html#ad02102832d452fd5a5cfa96272b1095d',1,'cbor_bytestring_chunk_count(const cbor_item_t *item): bytestrings.c'],['../bytestrings_8h.html#ad02102832d452fd5a5cfa96272b1095d',1,'cbor_bytestring_chunk_count(const cbor_item_t *item): bytestrings.c']]], + ['cbor_5fbytestring_5fchunks_5fhandle',['cbor_bytestring_chunks_handle',['../bytestrings_8c.html#a8ab6255d6f8f209149bdf794dffed849',1,'cbor_bytestring_chunks_handle(const cbor_item_t *item): bytestrings.c'],['../bytestrings_8h.html#a8ab6255d6f8f209149bdf794dffed849',1,'cbor_bytestring_chunks_handle(const cbor_item_t *item): bytestrings.c']]], + ['cbor_5fbytestring_5fhandle',['cbor_bytestring_handle',['../bytestrings_8c.html#a2c9d6feda3d0f87782168fa817f83be6',1,'cbor_bytestring_handle(const cbor_item_t *item): bytestrings.c'],['../bytestrings_8h.html#a05c09e147b0a244abc481b0b078ebcb9',1,'cbor_bytestring_handle(const cbor_item_t *item): bytestrings.c']]], + ['cbor_5fbytestring_5fis_5fdefinite',['cbor_bytestring_is_definite',['../bytestrings_8c.html#a368222dbbcea25e06469524e26587e2a',1,'cbor_bytestring_is_definite(const cbor_item_t *item): bytestrings.c'],['../bytestrings_8h.html#a368222dbbcea25e06469524e26587e2a',1,'cbor_bytestring_is_definite(const cbor_item_t *item): bytestrings.c']]], + ['cbor_5fbytestring_5fis_5findefinite',['cbor_bytestring_is_indefinite',['../bytestrings_8c.html#a3a6c450f105bb18b6b56d20f0de4786a',1,'cbor_bytestring_is_indefinite(const cbor_item_t *item): bytestrings.c'],['../bytestrings_8h.html#a3a6c450f105bb18b6b56d20f0de4786a',1,'cbor_bytestring_is_indefinite(const cbor_item_t *item): bytestrings.c']]], + ['cbor_5fbytestring_5flength',['cbor_bytestring_length',['../bytestrings_8c.html#a7c15a63fdc3830707eac0877a261f1cd',1,'cbor_bytestring_length(const cbor_item_t *item): bytestrings.c'],['../bytestrings_8h.html#a7c15a63fdc3830707eac0877a261f1cd',1,'cbor_bytestring_length(const cbor_item_t *item): bytestrings.c']]], + ['cbor_5fbytestring_5fset_5fhandle',['cbor_bytestring_set_handle',['../bytestrings_8c.html#a513fd06374cb4faa9e909c85e4248199',1,'cbor_bytestring_set_handle(cbor_item_t *item, cbor_mutable_data CBOR_RESTRICT_POINTER data, size_t length): bytestrings.c'],['../bytestrings_8h.html#a513fd06374cb4faa9e909c85e4248199',1,'cbor_bytestring_set_handle(cbor_item_t *item, cbor_mutable_data CBOR_RESTRICT_POINTER data, size_t length): bytestrings.c']]], + ['cbor_5fcopy',['cbor_copy',['../cbor_8c.html#ac54800327647ea17db0f40d72873f505',1,'cbor_copy(cbor_item_t *item): cbor.c'],['../cbor_8h.html#ac54800327647ea17db0f40d72873f505',1,'cbor_copy(cbor_item_t *item): cbor.c']]], + ['cbor_5fctrl_5fis_5fbool',['cbor_ctrl_is_bool',['../floats__ctrls_8c.html#ac0c984ec79209ad710dd960ca9566f16',1,'cbor_ctrl_is_bool(const cbor_item_t *item): floats_ctrls.c'],['../floats__ctrls_8h.html#ac0c984ec79209ad710dd960ca9566f16',1,'cbor_ctrl_is_bool(const cbor_item_t *item): floats_ctrls.c']]], + ['cbor_5fctrl_5fvalue',['cbor_ctrl_value',['../floats__ctrls_8c.html#a9d15faa0a33797ce0b8a1a66d5773d88',1,'cbor_ctrl_value(const cbor_item_t *item): floats_ctrls.c'],['../floats__ctrls_8h.html#a9d15faa0a33797ce0b8a1a66d5773d88',1,'cbor_ctrl_value(const cbor_item_t *item): floats_ctrls.c']]], + ['cbor_5fdecref',['cbor_decref',['../common_8c.html#aedbe700f2241de4282aedaae017e0de9',1,'cbor_decref(cbor_item_t **item_ref): common.c'],['../common_8h.html#aa10ebec46eddc9312ec46a0898b5d196',1,'cbor_decref(cbor_item_t **item): common.c']]], + ['cbor_5fencode_5farray_5fstart',['cbor_encode_array_start',['../encoding_8c.html#a614462c893ad375d880178f490e4d15f',1,'cbor_encode_array_start(size_t length, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a7cf3eb01b259b2e4ea9fddd4b1a37d9a',1,'cbor_encode_array_start(size_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fbool',['cbor_encode_bool',['../encoding_8c.html#af81d6fb8076d7b413b1a520ff971cae9',1,'cbor_encode_bool(bool value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a9c298069fd256fe98007f8ebb2c3b7e4',1,'cbor_encode_bool(bool, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fbreak',['cbor_encode_break',['../encoding_8c.html#ad7599c3f22138b063730b6f08637392c',1,'cbor_encode_break(unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#aaefd57d48643806d1b5bc7ba304f9060',1,'cbor_encode_break(unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fbytestring_5fstart',['cbor_encode_bytestring_start',['../encoding_8c.html#acb1b57ebb4156007ddca6d724b9f794a',1,'cbor_encode_bytestring_start(size_t length, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a2105cee299618a9598bc39f5ae215c0b',1,'cbor_encode_bytestring_start(size_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fctrl',['cbor_encode_ctrl',['../encoding_8c.html#a1d955e4c1bb4a2e3977b7387c1fafe01',1,'cbor_encode_ctrl(uint8_t value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a9cfc3c3ca85e6acb7258cf0fb33b3543',1,'cbor_encode_ctrl(uint8_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fdouble',['cbor_encode_double',['../encoding_8c.html#a772417a925ae556f40b6811d3fba7834',1,'cbor_encode_double(double value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a63da011839918fac84a7bdef9f0f24f2',1,'cbor_encode_double(double, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fhalf',['cbor_encode_half',['../encoding_8c.html#a6d25549fbb8a0e147f2d2454a1da0bfa',1,'cbor_encode_half(float value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a570e080b214be14a3263494b3d5d19f2',1,'cbor_encode_half(float, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5findef_5farray_5fstart',['cbor_encode_indef_array_start',['../encoding_8c.html#a8794b7d67dc4b94c7191ba97518472a6',1,'cbor_encode_indef_array_start(unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a12630f19ed6040b193ac79b66b3082a4',1,'cbor_encode_indef_array_start(unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5findef_5fbytestring_5fstart',['cbor_encode_indef_bytestring_start',['../encoding_8c.html#a72fd1996d81b30a81381707708aa186d',1,'cbor_encode_indef_bytestring_start(unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a180ccc6318bf86af67bfbdd0955548df',1,'cbor_encode_indef_bytestring_start(unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5findef_5fmap_5fstart',['cbor_encode_indef_map_start',['../encoding_8c.html#a56b2ad41ccc983fce2dbaae97beb760d',1,'cbor_encode_indef_map_start(unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a7c73f8226b908bc2e917e7d0fa3125c7',1,'cbor_encode_indef_map_start(unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5findef_5fstring_5fstart',['cbor_encode_indef_string_start',['../encoding_8c.html#ae5fc25aee8ee4bb8605e105227cb21f5',1,'cbor_encode_indef_string_start(unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a743eaba2ad48bc23acbf567e1eb75eac',1,'cbor_encode_indef_string_start(unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fmap_5fstart',['cbor_encode_map_start',['../encoding_8c.html#a1dc2d5e72fc65fa52120bd9e20164277',1,'cbor_encode_map_start(size_t length, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a89ca7a5834e479190406de4fa886a975',1,'cbor_encode_map_start(size_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fnegint',['cbor_encode_negint',['../encoding_8c.html#a6002fa0d83e5e59f995eabe5ecf157e9',1,'cbor_encode_negint(uint64_t value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a1cc1e5a1b1ee934291abcfef75626616',1,'cbor_encode_negint(uint64_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fnegint16',['cbor_encode_negint16',['../encoding_8c.html#a000a6bd597e43b3b438a5659db183f40',1,'cbor_encode_negint16(uint16_t value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a0df96946a16ed6ab94d45adb7b1a14d9',1,'cbor_encode_negint16(uint16_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fnegint32',['cbor_encode_negint32',['../encoding_8c.html#aaa7b2d79e956ca4ac9db8fc3d140d6d9',1,'cbor_encode_negint32(uint32_t value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#ac1854fff9cbe4be7fa08fd311d851922',1,'cbor_encode_negint32(uint32_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fnegint64',['cbor_encode_negint64',['../encoding_8c.html#a4553dcc867b95ecfd6eb0dae79f69d81',1,'cbor_encode_negint64(uint64_t value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a1d803ca867e14739665283bee5b66b58',1,'cbor_encode_negint64(uint64_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fnegint8',['cbor_encode_negint8',['../encoding_8c.html#ac5f38c2536db32249b853d5f41ac91b3',1,'cbor_encode_negint8(uint8_t value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#aa850f2be3940fbc309fc9f611ac2989b',1,'cbor_encode_negint8(uint8_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fnull',['cbor_encode_null',['../encoding_8c.html#ad16f49267d664b734ac6bd416064a8e2',1,'cbor_encode_null(unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a01795a392b9945c416ee82f66ff5d50f',1,'cbor_encode_null(unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fsingle',['cbor_encode_single',['../encoding_8c.html#add2c3c8759e19e86cbf9ae31dd897ee1',1,'cbor_encode_single(float value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a7ea12535f26f24032ea9e0975cac3cec',1,'cbor_encode_single(float, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fstring_5fstart',['cbor_encode_string_start',['../encoding_8c.html#abb8a85db156a80932399cce55a0694f6',1,'cbor_encode_string_start(size_t length, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a58f3f82978563d732a03d4b585a1a9ea',1,'cbor_encode_string_start(size_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5ftag',['cbor_encode_tag',['../encoding_8c.html#a41bdb572cc73d9648f4c13e8465b1dcb',1,'cbor_encode_tag(uint64_t value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a153f903a2763439d0be4dc13d8e01b81',1,'cbor_encode_tag(uint64_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fuint',['cbor_encode_uint',['../encoding_8c.html#aa5fd377e949f8bf0e54d911341d5e23f',1,'cbor_encode_uint(uint64_t value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a7863aaacf5c10dbc7770010250525ed3',1,'cbor_encode_uint(uint64_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fuint16',['cbor_encode_uint16',['../encoding_8c.html#a978187eb1d49113f35204e16638a0dfa',1,'cbor_encode_uint16(uint16_t value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a56bfab261e1beaee3d41faf6463b04bf',1,'cbor_encode_uint16(uint16_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fuint32',['cbor_encode_uint32',['../encoding_8c.html#abdc5b7670f02130ba5d0ffb01b25fab2',1,'cbor_encode_uint32(uint32_t value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a90ad4b026bc13f3807e4b89409773f0b',1,'cbor_encode_uint32(uint32_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fuint64',['cbor_encode_uint64',['../encoding_8c.html#a9bdbc2a0030ec8edd071a9036e7c17bb',1,'cbor_encode_uint64(uint64_t value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#a4a235fd97a2a4d13ba6d3c4306c6a643',1,'cbor_encode_uint64(uint64_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fuint8',['cbor_encode_uint8',['../encoding_8c.html#a6c970c1c3fe2a753d76ad7343b18fc43',1,'cbor_encode_uint8(uint8_t value, unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#afea0835d5129909ae6ccb4cbfc015970',1,'cbor_encode_uint8(uint8_t, unsigned char *, size_t): encoding.c']]], + ['cbor_5fencode_5fundef',['cbor_encode_undef',['../encoding_8c.html#a7330d8c4f55a054151064acea0da181c',1,'cbor_encode_undef(unsigned char *buffer, size_t buffer_size): encoding.c'],['../encoding_8h.html#ace6e55205c8e7fb624cb1f39d46f1479',1,'cbor_encode_undef(unsigned char *, size_t): encoding.c']]], + ['cbor_5ffloat_5fctrl_5fis_5fctrl',['cbor_float_ctrl_is_ctrl',['../floats__ctrls_8c.html#a2b304df65e44de17064bc3de154522fa',1,'cbor_float_ctrl_is_ctrl(const cbor_item_t *item): floats_ctrls.c'],['../floats__ctrls_8h.html#a2b304df65e44de17064bc3de154522fa',1,'cbor_float_ctrl_is_ctrl(const cbor_item_t *item): floats_ctrls.c']]], + ['cbor_5ffloat_5fget_5ffloat',['cbor_float_get_float',['../floats__ctrls_8c.html#ad8316cf8b830431ef9ce9562ae679563',1,'cbor_float_get_float(const cbor_item_t *item): floats_ctrls.c'],['../floats__ctrls_8h.html#ad8316cf8b830431ef9ce9562ae679563',1,'cbor_float_get_float(const cbor_item_t *item): floats_ctrls.c']]], + ['cbor_5ffloat_5fget_5ffloat2',['cbor_float_get_float2',['../floats__ctrls_8c.html#aa85d79e0f060173a9dccdada2e551cf9',1,'cbor_float_get_float2(const cbor_item_t *item): floats_ctrls.c'],['../floats__ctrls_8h.html#aa85d79e0f060173a9dccdada2e551cf9',1,'cbor_float_get_float2(const cbor_item_t *item): floats_ctrls.c']]], + ['cbor_5ffloat_5fget_5ffloat4',['cbor_float_get_float4',['../floats__ctrls_8c.html#ad504d3d291810b0c39fc498be0bd2639',1,'cbor_float_get_float4(const cbor_item_t *item): floats_ctrls.c'],['../floats__ctrls_8h.html#ad504d3d291810b0c39fc498be0bd2639',1,'cbor_float_get_float4(const cbor_item_t *item): floats_ctrls.c']]], + ['cbor_5ffloat_5fget_5ffloat8',['cbor_float_get_float8',['../floats__ctrls_8c.html#a2f215940998d05730b23b7e0e7ad8ebe',1,'cbor_float_get_float8(const cbor_item_t *item): floats_ctrls.c'],['../floats__ctrls_8h.html#a2f215940998d05730b23b7e0e7ad8ebe',1,'cbor_float_get_float8(const cbor_item_t *item): floats_ctrls.c']]], + ['cbor_5ffloat_5fget_5fwidth',['cbor_float_get_width',['../floats__ctrls_8c.html#a05778dc7349be636d47440f758ec96a6',1,'cbor_float_get_width(const cbor_item_t *item): floats_ctrls.c'],['../floats__ctrls_8h.html#a05778dc7349be636d47440f758ec96a6',1,'cbor_float_get_width(const cbor_item_t *item): floats_ctrls.c']]], + ['cbor_5fget_5fint',['cbor_get_int',['../ints_8c.html#aacf93e9a8a2c4217d5cd84207b957cba',1,'cbor_get_int(const cbor_item_t *item): ints.c'],['../ints_8h.html#aacf93e9a8a2c4217d5cd84207b957cba',1,'cbor_get_int(const cbor_item_t *item): ints.c']]], + ['cbor_5fget_5fuint16',['cbor_get_uint16',['../ints_8c.html#a06a0997aed16fe6aa540f57bf40ce400',1,'cbor_get_uint16(const cbor_item_t *item): ints.c'],['../ints_8h.html#a06a0997aed16fe6aa540f57bf40ce400',1,'cbor_get_uint16(const cbor_item_t *item): ints.c']]], + ['cbor_5fget_5fuint32',['cbor_get_uint32',['../ints_8c.html#a0480e5b5849b757aa9416a4c1d51b36d',1,'cbor_get_uint32(const cbor_item_t *item): ints.c'],['../ints_8h.html#a0480e5b5849b757aa9416a4c1d51b36d',1,'cbor_get_uint32(const cbor_item_t *item): ints.c']]], + ['cbor_5fget_5fuint64',['cbor_get_uint64',['../ints_8c.html#a839ec2dc97dda1db54657cec50387a12',1,'cbor_get_uint64(const cbor_item_t *item): ints.c'],['../ints_8h.html#a839ec2dc97dda1db54657cec50387a12',1,'cbor_get_uint64(const cbor_item_t *item): ints.c']]], + ['cbor_5fget_5fuint8',['cbor_get_uint8',['../ints_8c.html#a2379bf36318e8e4faa7434c74d8553fb',1,'cbor_get_uint8(const cbor_item_t *item): ints.c'],['../ints_8h.html#a2379bf36318e8e4faa7434c74d8553fb',1,'cbor_get_uint8(const cbor_item_t *item): ints.c']]], + ['cbor_5fincref',['cbor_incref',['../common_8c.html#aa62e72f275c2f0fa604896bfed18e992',1,'cbor_incref(cbor_item_t *item): common.c'],['../common_8h.html#aa62e72f275c2f0fa604896bfed18e992',1,'cbor_incref(cbor_item_t *item): common.c']]], + ['cbor_5fint_5fget_5fwidth',['cbor_int_get_width',['../ints_8c.html#a30bcfb58aa41d4c44bc2d5d6b7de105d',1,'cbor_int_get_width(const cbor_item_t *item): ints.c'],['../ints_8h.html#a30bcfb58aa41d4c44bc2d5d6b7de105d',1,'cbor_int_get_width(const cbor_item_t *item): ints.c']]], + ['cbor_5fintermediate_5fdecref',['cbor_intermediate_decref',['../common_8c.html#a4ed20937cc091bc1f481d53787fe306b',1,'cbor_intermediate_decref(cbor_item_t *item): common.c'],['../common_8h.html#a4ed20937cc091bc1f481d53787fe306b',1,'cbor_intermediate_decref(cbor_item_t *item): common.c']]], + ['cbor_5fis_5fbool',['cbor_is_bool',['../common_8c.html#a5618a3689e31829f4f84da008e20798e',1,'cbor_is_bool(const cbor_item_t *item): common.c'],['../common_8h.html#a5618a3689e31829f4f84da008e20798e',1,'cbor_is_bool(const cbor_item_t *item): common.c']]], + ['cbor_5fis_5ffloat',['cbor_is_float',['../common_8c.html#a4dde28c548375aa954f1cad15b3739aa',1,'cbor_is_float(const cbor_item_t *item): common.c'],['../common_8h.html#a4dde28c548375aa954f1cad15b3739aa',1,'cbor_is_float(const cbor_item_t *item): common.c']]], + ['cbor_5fis_5fint',['cbor_is_int',['../common_8c.html#a4e705f34221ba434756a4a1f8e3325e6',1,'cbor_is_int(const cbor_item_t *item): common.c'],['../common_8h.html#a4e705f34221ba434756a4a1f8e3325e6',1,'cbor_is_int(const cbor_item_t *item): common.c']]], + ['cbor_5fis_5fnull',['cbor_is_null',['../common_8c.html#ad1f5efac647b4d9c437c4441d1177e01',1,'cbor_is_null(const cbor_item_t *item): common.c'],['../common_8h.html#ad1f5efac647b4d9c437c4441d1177e01',1,'cbor_is_null(const cbor_item_t *item): common.c']]], + ['cbor_5fis_5fundef',['cbor_is_undef',['../common_8c.html#afb7eb76a2953224c96d194640f3092e3',1,'cbor_is_undef(const cbor_item_t *item): common.c'],['../common_8h.html#afb7eb76a2953224c96d194640f3092e3',1,'cbor_is_undef(const cbor_item_t *item): common.c']]], + ['cbor_5fisa_5farray',['cbor_isa_array',['../common_8c.html#a9ed0fa96105c211867c5032f2a5a8b20',1,'cbor_isa_array(const cbor_item_t *item): common.c'],['../common_8h.html#a9ed0fa96105c211867c5032f2a5a8b20',1,'cbor_isa_array(const cbor_item_t *item): common.c']]], + ['cbor_5fisa_5fbytestring',['cbor_isa_bytestring',['../common_8c.html#adedaf37527b8d8261e287a0001e5a190',1,'cbor_isa_bytestring(const cbor_item_t *item): common.c'],['../common_8h.html#adedaf37527b8d8261e287a0001e5a190',1,'cbor_isa_bytestring(const cbor_item_t *item): common.c']]], + ['cbor_5fisa_5ffloat_5fctrl',['cbor_isa_float_ctrl',['../common_8c.html#a983dec76e934c49ed6979226f9db4386',1,'cbor_isa_float_ctrl(const cbor_item_t *item): common.c'],['../common_8h.html#a983dec76e934c49ed6979226f9db4386',1,'cbor_isa_float_ctrl(const cbor_item_t *item): common.c']]], + ['cbor_5fisa_5fmap',['cbor_isa_map',['../common_8c.html#af0de041481b61922d0995b63f82d8ddd',1,'cbor_isa_map(const cbor_item_t *item): common.c'],['../common_8h.html#af0de041481b61922d0995b63f82d8ddd',1,'cbor_isa_map(const cbor_item_t *item): common.c']]], + ['cbor_5fisa_5fnegint',['cbor_isa_negint',['../common_8c.html#a0ca5042e3807d2cc9c3d40f9266460dd',1,'cbor_isa_negint(const cbor_item_t *item): common.c'],['../common_8h.html#a0ca5042e3807d2cc9c3d40f9266460dd',1,'cbor_isa_negint(const cbor_item_t *item): common.c']]], + ['cbor_5fisa_5fstring',['cbor_isa_string',['../common_8c.html#a02edd93bb8eab83bc2b8f8bf5d7d1335',1,'cbor_isa_string(const cbor_item_t *item): common.c'],['../common_8h.html#a02edd93bb8eab83bc2b8f8bf5d7d1335',1,'cbor_isa_string(const cbor_item_t *item): common.c']]], + ['cbor_5fisa_5ftag',['cbor_isa_tag',['../common_8c.html#a0d5054202c5ec9375e8daf5930087a61',1,'cbor_isa_tag(const cbor_item_t *item): common.c'],['../common_8h.html#a0d5054202c5ec9375e8daf5930087a61',1,'cbor_isa_tag(const cbor_item_t *item): common.c']]], + ['cbor_5fisa_5fuint',['cbor_isa_uint',['../common_8c.html#a682a023f7012a5b66a57847e6f8d386f',1,'cbor_isa_uint(const cbor_item_t *item): common.c'],['../common_8h.html#a682a023f7012a5b66a57847e6f8d386f',1,'cbor_isa_uint(const cbor_item_t *item): common.c']]], + ['cbor_5fload',['cbor_load',['../cbor_8c.html#ae48d76b44e6de39a98ff3599d9acda8f',1,'cbor_load(cbor_data source, size_t source_size, struct cbor_load_result *result): cbor.c'],['../cbor_8h.html#ae48d76b44e6de39a98ff3599d9acda8f',1,'cbor_load(cbor_data source, size_t source_size, struct cbor_load_result *result): cbor.c']]], + ['cbor_5fmap_5fadd',['cbor_map_add',['../maps_8c.html#af077a30d8258ab02307c24af28036fca',1,'cbor_map_add(cbor_item_t *item, struct cbor_pair pair): maps.c'],['../maps_8h.html#af077a30d8258ab02307c24af28036fca',1,'cbor_map_add(cbor_item_t *item, struct cbor_pair pair): maps.c']]], + ['cbor_5fmap_5fallocated',['cbor_map_allocated',['../maps_8c.html#a3bf8e5779a3f1311b9b3f9e0a4e4f37e',1,'cbor_map_allocated(const cbor_item_t *item): maps.c'],['../maps_8h.html#a3bf8e5779a3f1311b9b3f9e0a4e4f37e',1,'cbor_map_allocated(const cbor_item_t *item): maps.c']]], + ['cbor_5fmap_5fhandle',['cbor_map_handle',['../maps_8c.html#a4cadc8eb7ae7ff8d3f73482fb24455c9',1,'cbor_map_handle(const cbor_item_t *item): maps.c'],['../maps_8h.html#a4cadc8eb7ae7ff8d3f73482fb24455c9',1,'cbor_map_handle(const cbor_item_t *item): maps.c']]], + ['cbor_5fmap_5fis_5fdefinite',['cbor_map_is_definite',['../maps_8c.html#a0dccaa76ac293bb5a11dbca6d16f6253',1,'cbor_map_is_definite(const cbor_item_t *item): maps.c'],['../maps_8h.html#a0dccaa76ac293bb5a11dbca6d16f6253',1,'cbor_map_is_definite(const cbor_item_t *item): maps.c']]], + ['cbor_5fmap_5fis_5findefinite',['cbor_map_is_indefinite',['../maps_8c.html#a941462383a3c8a6e3a60be9778cd1913',1,'cbor_map_is_indefinite(const cbor_item_t *item): maps.c'],['../maps_8h.html#a941462383a3c8a6e3a60be9778cd1913',1,'cbor_map_is_indefinite(const cbor_item_t *item): maps.c']]], + ['cbor_5fmap_5fsize',['cbor_map_size',['../maps_8c.html#a1bbbee9c6f1eaa0ff4c19559fe109baf',1,'cbor_map_size(const cbor_item_t *item): maps.c'],['../maps_8h.html#a1bbbee9c6f1eaa0ff4c19559fe109baf',1,'cbor_map_size(const cbor_item_t *item): maps.c']]], + ['cbor_5fmark_5fnegint',['cbor_mark_negint',['../ints_8c.html#a6ef24d3e2636c02de092fdfc337276b1',1,'cbor_mark_negint(cbor_item_t *item): ints.c'],['../ints_8h.html#a6ef24d3e2636c02de092fdfc337276b1',1,'cbor_mark_negint(cbor_item_t *item): ints.c']]], + ['cbor_5fmark_5fuint',['cbor_mark_uint',['../ints_8c.html#aed6a5a44245b8447a768c95e351c2c0c',1,'cbor_mark_uint(cbor_item_t *item): ints.c'],['../ints_8h.html#aed6a5a44245b8447a768c95e351c2c0c',1,'cbor_mark_uint(cbor_item_t *item): ints.c']]], + ['cbor_5fmove',['cbor_move',['../common_8c.html#a327dce45c1cb680953555290dba8e35b',1,'cbor_move(cbor_item_t *item): common.c'],['../common_8h.html#a327dce45c1cb680953555290dba8e35b',1,'cbor_move(cbor_item_t *item): common.c']]], + ['cbor_5fnew_5fctrl',['cbor_new_ctrl',['../floats__ctrls_8c.html#a6154cefb44f9df7685a5f80d0a1e7379',1,'cbor_new_ctrl(): floats_ctrls.c'],['../floats__ctrls_8h.html#a6154cefb44f9df7685a5f80d0a1e7379',1,'cbor_new_ctrl(): floats_ctrls.c']]], + ['cbor_5fnew_5fdefinite_5farray',['cbor_new_definite_array',['../arrays_8c.html#a93d7c18019000d5e206a81a4cca70631',1,'cbor_new_definite_array(size_t size): arrays.c'],['../arrays_8h.html#a93d7c18019000d5e206a81a4cca70631',1,'cbor_new_definite_array(size_t size): arrays.c']]], + ['cbor_5fnew_5fdefinite_5fbytestring',['cbor_new_definite_bytestring',['../bytestrings_8c.html#a86fc646f4520b90c85a704d27b46e69e',1,'cbor_new_definite_bytestring(): bytestrings.c'],['../bytestrings_8h.html#a86fc646f4520b90c85a704d27b46e69e',1,'cbor_new_definite_bytestring(): bytestrings.c']]], + ['cbor_5fnew_5fdefinite_5fmap',['cbor_new_definite_map',['../maps_8c.html#adab3c6ff2e51dcf2637567431cc6e76e',1,'cbor_new_definite_map(size_t size): maps.c'],['../maps_8h.html#adab3c6ff2e51dcf2637567431cc6e76e',1,'cbor_new_definite_map(size_t size): maps.c']]], + ['cbor_5fnew_5fdefinite_5fstring',['cbor_new_definite_string',['../strings_8c.html#a6e2516983e412b9d22fd1fccbeded632',1,'cbor_new_definite_string(): strings.c'],['../strings_8h.html#a6e2516983e412b9d22fd1fccbeded632',1,'cbor_new_definite_string(): strings.c']]], + ['cbor_5fnew_5ffloat2',['cbor_new_float2',['../floats__ctrls_8c.html#a1b332d66de1b49f202b257dc1d245c30',1,'cbor_new_float2(): floats_ctrls.c'],['../floats__ctrls_8h.html#a1b332d66de1b49f202b257dc1d245c30',1,'cbor_new_float2(): floats_ctrls.c']]], + ['cbor_5fnew_5ffloat4',['cbor_new_float4',['../floats__ctrls_8c.html#af5b06827916da81a32a1d68dd0727bb1',1,'cbor_new_float4(): floats_ctrls.c'],['../floats__ctrls_8h.html#af5b06827916da81a32a1d68dd0727bb1',1,'cbor_new_float4(): floats_ctrls.c']]], + ['cbor_5fnew_5ffloat8',['cbor_new_float8',['../floats__ctrls_8c.html#a128574918683dbe68c7dd5256e4f6bf3',1,'cbor_new_float8(): floats_ctrls.c'],['../floats__ctrls_8h.html#a128574918683dbe68c7dd5256e4f6bf3',1,'cbor_new_float8(): floats_ctrls.c']]], + ['cbor_5fnew_5findefinite_5farray',['cbor_new_indefinite_array',['../arrays_8c.html#aaec916ccc6f19782b6aef5ec1da2cc26',1,'cbor_new_indefinite_array(): arrays.c'],['../arrays_8h.html#aaec916ccc6f19782b6aef5ec1da2cc26',1,'cbor_new_indefinite_array(): arrays.c']]], + ['cbor_5fnew_5findefinite_5fbytestring',['cbor_new_indefinite_bytestring',['../bytestrings_8c.html#a6de9d6387e856c33d2ef8e8e9fdac0ac',1,'cbor_new_indefinite_bytestring(): bytestrings.c'],['../bytestrings_8h.html#a6de9d6387e856c33d2ef8e8e9fdac0ac',1,'cbor_new_indefinite_bytestring(): bytestrings.c']]], + ['cbor_5fnew_5findefinite_5fmap',['cbor_new_indefinite_map',['../maps_8c.html#a58ac69227f48815754651e93d15a5051',1,'cbor_new_indefinite_map(): maps.c'],['../maps_8h.html#a58ac69227f48815754651e93d15a5051',1,'cbor_new_indefinite_map(): maps.c']]], + ['cbor_5fnew_5findefinite_5fstring',['cbor_new_indefinite_string',['../strings_8c.html#a226f91c7bfd6be9b0a52cdc6f0b17741',1,'cbor_new_indefinite_string(): strings.c'],['../strings_8h.html#a226f91c7bfd6be9b0a52cdc6f0b17741',1,'cbor_new_indefinite_string(): strings.c']]], + ['cbor_5fnew_5fint16',['cbor_new_int16',['../ints_8c.html#a68f71f9574e0085f02a27bd0f58d4b55',1,'cbor_new_int16(): ints.c'],['../ints_8h.html#a68f71f9574e0085f02a27bd0f58d4b55',1,'cbor_new_int16(): ints.c']]], + ['cbor_5fnew_5fint32',['cbor_new_int32',['../ints_8c.html#a9cf9db24315a0e622746a546cc112467',1,'cbor_new_int32(): ints.c'],['../ints_8h.html#a9cf9db24315a0e622746a546cc112467',1,'cbor_new_int32(): ints.c']]], + ['cbor_5fnew_5fint64',['cbor_new_int64',['../ints_8c.html#ab863f47b9de930c5d014e0dbb5523d9d',1,'cbor_new_int64(): ints.c'],['../ints_8h.html#ab863f47b9de930c5d014e0dbb5523d9d',1,'cbor_new_int64(): ints.c']]], + ['cbor_5fnew_5fint8',['cbor_new_int8',['../ints_8c.html#ae4562e1314b122ae89712dbf0c48c14c',1,'cbor_new_int8(): ints.c'],['../ints_8h.html#ae4562e1314b122ae89712dbf0c48c14c',1,'cbor_new_int8(): ints.c']]], + ['cbor_5fnew_5fnull',['cbor_new_null',['../floats__ctrls_8c.html#a480b38bd08feb75b1bc705850595b4ee',1,'cbor_new_null(): floats_ctrls.c'],['../floats__ctrls_8h.html#a480b38bd08feb75b1bc705850595b4ee',1,'cbor_new_null(): floats_ctrls.c']]], + ['cbor_5fnew_5ftag',['cbor_new_tag',['../tags_8c.html#a54d7cc5a88a8c28cfb41b1f476a6d1e6',1,'cbor_new_tag(uint64_t value): tags.c'],['../tags_8h.html#a54d7cc5a88a8c28cfb41b1f476a6d1e6',1,'cbor_new_tag(uint64_t value): tags.c']]], + ['cbor_5fnew_5fundef',['cbor_new_undef',['../floats__ctrls_8c.html#a7d40d18664a72a266ce98030d30a7377',1,'cbor_new_undef(): floats_ctrls.c'],['../floats__ctrls_8h.html#a7d40d18664a72a266ce98030d30a7377',1,'cbor_new_undef(): floats_ctrls.c']]], + ['cbor_5fnull_5farray_5fstart_5fcallback',['cbor_null_array_start_callback',['../callbacks_8h.html#a354a9b4e2cea96d248c959fba6d7be95',1,'callbacks.h']]], + ['cbor_5fnull_5fboolean_5fcallback',['cbor_null_boolean_callback',['../callbacks_8h.html#a5c228e25d2c179a6fca5437deb28337f',1,'callbacks.h']]], + ['cbor_5fnull_5fbyte_5fstring_5fcallback',['cbor_null_byte_string_callback',['../callbacks_8h.html#a0ff7bd8646c081a0240641aa4715690d',1,'callbacks.h']]], + ['cbor_5fnull_5fbyte_5fstring_5fstart_5fcallback',['cbor_null_byte_string_start_callback',['../callbacks_8c.html#a26fcc93e4f4da0dc21274e4e2bfab1ed',1,'cbor_null_byte_string_start_callback(void *_ctx) CBOR_DUMMY_CALLBACK void cbor_null_array_start_callback(void *_ctx: callbacks.c'],['../callbacks_8h.html#aaf9938742cc3d556d940d410c1bb963e',1,'cbor_null_byte_string_start_callback(void *): callbacks.h']]], + ['cbor_5fnull_5ffloat2_5fcallback',['cbor_null_float2_callback',['../callbacks_8c.html#a179a4e1677a83ac36eb37fed183ef866',1,'cbor_null_float2_callback(void *_ctx, float _val) CBOR_DUMMY_CALLBACK void cbor_null_float4_callback(void *_ctx: callbacks.c'],['../callbacks_8h.html#a601aab51abff1d99ec652128d7722735',1,'cbor_null_float2_callback(void *, float): callbacks.h']]], + ['cbor_5fnull_5ffloat4_5fcallback',['cbor_null_float4_callback',['../callbacks_8h.html#a272e354db18ada5dab0093257f6c8d93',1,'callbacks.h']]], + ['cbor_5fnull_5ffloat8_5fcallback',['cbor_null_float8_callback',['../callbacks_8c.html#a1171a863a08151f1a98024b4dc9d4943',1,'cbor_null_float8_callback(void *_ctx, double _val) CBOR_DUMMY_CALLBACK void cbor_null_null_callback(void *_ctx) CBOR_DUMMY_CALLBACK void cbor_null_undefined_callback(void *_ctx) CBOR_DUMMY_CALLBACK void cbor_null_boolean_callback(void *_ctx: callbacks.c'],['../callbacks_8h.html#a520d52b145edee808497b558b7327f58',1,'cbor_null_float8_callback(void *, double): callbacks.h']]], + ['cbor_5fnull_5findef_5farray_5fstart_5fcallback',['cbor_null_indef_array_start_callback',['../callbacks_8c.html#a84a4ba287d0575538148d91754e8bc42',1,'cbor_null_indef_array_start_callback(void *_ctx) CBOR_DUMMY_CALLBACK void cbor_null_map_start_callback(void *_ctx: callbacks.c'],['../callbacks_8h.html#aaabbe1e2f28460268ef8e1da0290d28f',1,'cbor_null_indef_array_start_callback(void *): callbacks.h']]], + ['cbor_5fnull_5findef_5fbreak_5fcallback',['cbor_null_indef_break_callback',['../callbacks_8c.html#a02d1ceb26df6990753892a7a067be431',1,'cbor_null_indef_break_callback(void *_ctx) CBOR_DUMMY_CALLBACK const struct cbor_callbacks cbor_empty_callbacks: callbacks.c'],['../callbacks_8h.html#afa6c7a0c96f9359a9fe7e4d08b8ffbf6',1,'cbor_null_indef_break_callback(void *): callbacks.h']]], + ['cbor_5fnull_5findef_5fmap_5fstart_5fcallback',['cbor_null_indef_map_start_callback',['../callbacks_8c.html#a5479bf604bfa859c9688d4ecff610c10',1,'cbor_null_indef_map_start_callback(void *_ctx) CBOR_DUMMY_CALLBACK void cbor_null_tag_callback(void *_ctx: callbacks.c'],['../callbacks_8h.html#ad5bea0eedb4180204fba19ccc0e6cf35',1,'cbor_null_indef_map_start_callback(void *): callbacks.h']]], + ['cbor_5fnull_5fmap_5fstart_5fcallback',['cbor_null_map_start_callback',['../callbacks_8h.html#ad4a2d5d88a19c0a4aa5cbdd46126e010',1,'callbacks.h']]], + ['cbor_5fnull_5fnegint16_5fcallback',['cbor_null_negint16_callback',['../callbacks_8h.html#a19c9d5992861f55fb1fc177ea6f66434',1,'callbacks.h']]], + ['cbor_5fnull_5fnegint32_5fcallback',['cbor_null_negint32_callback',['../callbacks_8c.html#a252badae1d7dc5a1db1ceeb036647508',1,'cbor_null_negint32_callback(void *_ctx, uint32_t _val) CBOR_DUMMY_CALLBACK void cbor_null_negint64_callback(void *_ctx: callbacks.c'],['../callbacks_8h.html#aac6306901d0ff862d110be20bd5e42cb',1,'cbor_null_negint32_callback(void *, uint32_t): callbacks.h']]], + ['cbor_5fnull_5fnegint64_5fcallback',['cbor_null_negint64_callback',['../callbacks_8h.html#af1bf4531715583b2745ee3d5f68f366b',1,'callbacks.h']]], + ['cbor_5fnull_5fnegint8_5fcallback',['cbor_null_negint8_callback',['../callbacks_8c.html#ad35f12380284de27c7f93076e3702806',1,'cbor_null_negint8_callback(void *_ctx, uint8_t _val) CBOR_DUMMY_CALLBACK void cbor_null_negint16_callback(void *_ctx: callbacks.c'],['../callbacks_8h.html#a3922d840e895ba767a170f57f8dfd527',1,'cbor_null_negint8_callback(void *, uint8_t): callbacks.h']]], + ['cbor_5fnull_5fnull_5fcallback',['cbor_null_null_callback',['../callbacks_8h.html#aedd685c8fed8c76105a534e503d4817f',1,'callbacks.h']]], + ['cbor_5fnull_5fstring_5fcallback',['cbor_null_string_callback',['../callbacks_8c.html#a062fd4e961f5b71971059ec422a987cc',1,'cbor_null_string_callback(void *_ctx, cbor_data _val, size_t _val2) CBOR_DUMMY_CALLBACK void cbor_null_string_start_callback(void *_ctx) CBOR_DUMMY_CALLBACK void cbor_null_byte_string_callback(void *_ctx: callbacks.c'],['../callbacks_8h.html#a677f7b4eac5287c967a58086001cf37b',1,'cbor_null_string_callback(void *, cbor_data, size_t): callbacks.h']]], + ['cbor_5fnull_5fstring_5fstart_5fcallback',['cbor_null_string_start_callback',['../callbacks_8h.html#ace4cd7b785a8240068f10d9705ced958',1,'callbacks.h']]], + ['cbor_5fnull_5ftag_5fcallback',['cbor_null_tag_callback',['../callbacks_8h.html#ad89b715cbf487fd4d87699baf8e31aac',1,'callbacks.h']]], + ['cbor_5fnull_5fuint16_5fcallback',['cbor_null_uint16_callback',['../callbacks_8h.html#a09b8d67e3d55d7d6afcc9973b1e42046',1,'callbacks.h']]], + ['cbor_5fnull_5fuint32_5fcallback',['cbor_null_uint32_callback',['../callbacks_8c.html#a61c9fd047bdc64620dd259dba203cc24',1,'cbor_null_uint32_callback(void *_ctx, uint32_t _val) CBOR_DUMMY_CALLBACK void cbor_null_uint64_callback(void *_ctx: callbacks.c'],['../callbacks_8h.html#a3417192b0ba7934da6f37635720a981f',1,'cbor_null_uint32_callback(void *, uint32_t): callbacks.h']]], + ['cbor_5fnull_5fuint64_5fcallback',['cbor_null_uint64_callback',['../callbacks_8h.html#a01d918d5d4b04af8d317665db5b789e5',1,'callbacks.h']]], + ['cbor_5fnull_5fuint8_5fcallback',['cbor_null_uint8_callback',['../callbacks_8c.html#a73203a882651bcfad8eb467b1ada96c2',1,'cbor_null_uint8_callback(void *_ctx, uint8_t _val) CBOR_DUMMY_CALLBACK void cbor_null_uint16_callback(void *_ctx: callbacks.c'],['../callbacks_8h.html#a8241dfdd044ef9fa6a22b05e5b979840',1,'cbor_null_uint8_callback(void *, uint8_t): callbacks.h']]], + ['cbor_5fnull_5fundefined_5fcallback',['cbor_null_undefined_callback',['../callbacks_8h.html#a116576ea4ac4ed7a8bf2d66178438fdc',1,'callbacks.h']]], + ['cbor_5frefcount',['cbor_refcount',['../common_8c.html#ab27dda20ad909cebaee1b2f43e676f2c',1,'cbor_refcount(const cbor_item_t *item): common.c'],['../common_8h.html#ab27dda20ad909cebaee1b2f43e676f2c',1,'cbor_refcount(const cbor_item_t *item): common.c']]], + ['cbor_5fserialize',['cbor_serialize',['../serialization_8c.html#a56d372b02323e8df3a37eba69acafd31',1,'cbor_serialize(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size): serialization.c'],['../serialization_8h.html#a2b99415a2c6f0d226116c707772e2fc0',1,'cbor_serialize(const cbor_item_t *item, cbor_mutable_data buffer, size_t buffer_size): serialization.c']]], + ['cbor_5fserialize_5falloc',['cbor_serialize_alloc',['../serialization_8c.html#ae995c0fac946cf851f4b37899a2e59e7',1,'cbor_serialize_alloc(const cbor_item_t *item, unsigned char **buffer, size_t *buffer_size): serialization.c'],['../serialization_8h.html#ab8a96a82216c07469a583eef3a3dd8d0',1,'cbor_serialize_alloc(const cbor_item_t *item, cbor_mutable_data *buffer, size_t *buffer_size): serialization.c']]], + ['cbor_5fserialize_5farray',['cbor_serialize_array',['../serialization_8c.html#ac8cc5befd865dd3a48ccd19730000bb3',1,'cbor_serialize_array(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size): serialization.c'],['../serialization_8h.html#a53e7d680cf41ccda369802deaf6c1ba8',1,'cbor_serialize_array(const cbor_item_t *, cbor_mutable_data, size_t): serialization.c']]], + ['cbor_5fserialize_5fbytestring',['cbor_serialize_bytestring',['../serialization_8c.html#ab4d54170870c473fe361d91740751487',1,'cbor_serialize_bytestring(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size): serialization.c'],['../serialization_8h.html#aeff4847e92b05b329edd1135c60f4179',1,'cbor_serialize_bytestring(const cbor_item_t *, cbor_mutable_data, size_t): serialization.c']]], + ['cbor_5fserialize_5ffloat_5fctrl',['cbor_serialize_float_ctrl',['../serialization_8c.html#a31bacc1eadd9f671eec5554ae658aca6',1,'cbor_serialize_float_ctrl(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size): serialization.c'],['../serialization_8h.html#ad232a99d06a972ca114a2fe753b90953',1,'cbor_serialize_float_ctrl(const cbor_item_t *, cbor_mutable_data, size_t): serialization.c']]], + ['cbor_5fserialize_5fmap',['cbor_serialize_map',['../serialization_8c.html#ad6b755769880739cf33e6bd5e5ba0733',1,'cbor_serialize_map(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size): serialization.c'],['../serialization_8h.html#a1c07f653f5aa66fadc82f24f556a162d',1,'cbor_serialize_map(const cbor_item_t *, cbor_mutable_data, size_t): serialization.c']]], + ['cbor_5fserialize_5fnegint',['cbor_serialize_negint',['../serialization_8c.html#a6f00ef0ca5354471214894c2e21ff19b',1,'cbor_serialize_negint(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size): serialization.c'],['../serialization_8h.html#ad7eb1501bd8282c21675333759dc7291',1,'cbor_serialize_negint(const cbor_item_t *, cbor_mutable_data, size_t): serialization.c']]], + ['cbor_5fserialize_5fstring',['cbor_serialize_string',['../serialization_8c.html#a23ba67d9759dc522924ff8ee6297babd',1,'cbor_serialize_string(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size): serialization.c'],['../serialization_8h.html#a9fb1138391d20c1b81081e2a5f413c3d',1,'cbor_serialize_string(const cbor_item_t *, cbor_mutable_data, size_t): serialization.c']]], + ['cbor_5fserialize_5ftag',['cbor_serialize_tag',['../serialization_8c.html#a6b946d5f299822b6b0e6d187ed36f4fa',1,'cbor_serialize_tag(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size): serialization.c'],['../serialization_8h.html#ae67b7ceefe645e660df73bf7ea255668',1,'cbor_serialize_tag(const cbor_item_t *, cbor_mutable_data, size_t): serialization.c']]], + ['cbor_5fserialize_5fuint',['cbor_serialize_uint',['../serialization_8c.html#ad0411e741dcb5352b9bc4198f0f18fbe',1,'cbor_serialize_uint(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size): serialization.c'],['../serialization_8h.html#a649fbb28229d58193a7eee96995929e0',1,'cbor_serialize_uint(const cbor_item_t *, cbor_mutable_data, size_t): serialization.c']]], + ['cbor_5fset_5fallocs',['cbor_set_allocs',['../allocators_8c.html#a3f9f1d527374dbb4b48ef3fafa92e0bf',1,'cbor_set_allocs(_cbor_malloc_t custom_malloc, _cbor_realloc_t custom_realloc, _cbor_free_t custom_free): allocators.c'],['../common_8h.html#a3f9f1d527374dbb4b48ef3fafa92e0bf',1,'cbor_set_allocs(_cbor_malloc_t custom_malloc, _cbor_realloc_t custom_realloc, _cbor_free_t custom_free): allocators.c']]], + ['cbor_5fset_5fctrl',['cbor_set_ctrl',['../floats__ctrls_8c.html#a5f5d397684bc2118f36d720c61318e7d',1,'cbor_set_ctrl(cbor_item_t *item, uint8_t value): floats_ctrls.c'],['../floats__ctrls_8h.html#a5f5d397684bc2118f36d720c61318e7d',1,'cbor_set_ctrl(cbor_item_t *item, uint8_t value): floats_ctrls.c']]], + ['cbor_5fset_5ffloat2',['cbor_set_float2',['../floats__ctrls_8c.html#aa3d3e746446ef643037a4f8838aa5753',1,'cbor_set_float2(cbor_item_t *item, float value): floats_ctrls.c'],['../floats__ctrls_8h.html#aa3d3e746446ef643037a4f8838aa5753',1,'cbor_set_float2(cbor_item_t *item, float value): floats_ctrls.c']]], + ['cbor_5fset_5ffloat4',['cbor_set_float4',['../floats__ctrls_8c.html#a5fe450a0edad9c7f1a888000f74a1085',1,'cbor_set_float4(cbor_item_t *item, float value): floats_ctrls.c'],['../floats__ctrls_8h.html#a5fe450a0edad9c7f1a888000f74a1085',1,'cbor_set_float4(cbor_item_t *item, float value): floats_ctrls.c']]], + ['cbor_5fset_5ffloat8',['cbor_set_float8',['../floats__ctrls_8c.html#a62a2ed2815d844fd54474f30ebbd0f6f',1,'cbor_set_float8(cbor_item_t *item, double value): floats_ctrls.c'],['../floats__ctrls_8h.html#a62a2ed2815d844fd54474f30ebbd0f6f',1,'cbor_set_float8(cbor_item_t *item, double value): floats_ctrls.c']]], + ['cbor_5fset_5fuint16',['cbor_set_uint16',['../ints_8c.html#a13b3dff419830b59c77ee18d4c03f6eb',1,'cbor_set_uint16(cbor_item_t *item, uint16_t value): ints.c'],['../ints_8h.html#a13b3dff419830b59c77ee18d4c03f6eb',1,'cbor_set_uint16(cbor_item_t *item, uint16_t value): ints.c']]], + ['cbor_5fset_5fuint32',['cbor_set_uint32',['../ints_8c.html#a2db697fb733dcbdbbef8714fd182a185',1,'cbor_set_uint32(cbor_item_t *item, uint32_t value): ints.c'],['../ints_8h.html#a2db697fb733dcbdbbef8714fd182a185',1,'cbor_set_uint32(cbor_item_t *item, uint32_t value): ints.c']]], + ['cbor_5fset_5fuint64',['cbor_set_uint64',['../ints_8c.html#af82a3961109f2a36324157e218680016',1,'cbor_set_uint64(cbor_item_t *item, uint64_t value): ints.c'],['../ints_8h.html#af82a3961109f2a36324157e218680016',1,'cbor_set_uint64(cbor_item_t *item, uint64_t value): ints.c']]], + ['cbor_5fset_5fuint8',['cbor_set_uint8',['../ints_8c.html#a62e9cd557438c1a5b8cf9a29c1f64baa',1,'cbor_set_uint8(cbor_item_t *item, uint8_t value): ints.c'],['../ints_8h.html#a62e9cd557438c1a5b8cf9a29c1f64baa',1,'cbor_set_uint8(cbor_item_t *item, uint8_t value): ints.c']]], + ['cbor_5fstream_5fdecode',['cbor_stream_decode',['../streaming_8c.html#a99343d82e96110a364a6abc8f542172a',1,'cbor_stream_decode(cbor_data source, size_t source_size, const struct cbor_callbacks *callbacks, void *context): streaming.c'],['../streaming_8h.html#aadf8db8555f22bbd5a2acfd77170b2be',1,'cbor_stream_decode(cbor_data buffer, size_t buffer_size, const struct cbor_callbacks *callbacks, void *context): streaming.c']]], + ['cbor_5fstring_5fadd_5fchunk',['cbor_string_add_chunk',['../strings_8c.html#a634462c7237298a196413cd62d7d1877',1,'cbor_string_add_chunk(cbor_item_t *item, cbor_item_t *chunk): strings.c'],['../strings_8h.html#a634462c7237298a196413cd62d7d1877',1,'cbor_string_add_chunk(cbor_item_t *item, cbor_item_t *chunk): strings.c']]], + ['cbor_5fstring_5fchunk_5fcount',['cbor_string_chunk_count',['../strings_8c.html#ad8062db21711a51ae520cc1e4f5fe5ab',1,'cbor_string_chunk_count(const cbor_item_t *item): strings.c'],['../strings_8h.html#ad8062db21711a51ae520cc1e4f5fe5ab',1,'cbor_string_chunk_count(const cbor_item_t *item): strings.c']]], + ['cbor_5fstring_5fchunks_5fhandle',['cbor_string_chunks_handle',['../strings_8c.html#a81d1160eed81b2a29b6c5e9ff6b9e02a',1,'cbor_string_chunks_handle(const cbor_item_t *item): strings.c'],['../strings_8h.html#a81d1160eed81b2a29b6c5e9ff6b9e02a',1,'cbor_string_chunks_handle(const cbor_item_t *item): strings.c']]], + ['cbor_5fstring_5fcodepoint_5fcount',['cbor_string_codepoint_count',['../strings_8c.html#a90c1cf7781f7ef1f3549f497abd259ef',1,'cbor_string_codepoint_count(const cbor_item_t *item): strings.c'],['../strings_8h.html#a90c1cf7781f7ef1f3549f497abd259ef',1,'cbor_string_codepoint_count(const cbor_item_t *item): strings.c']]], + ['cbor_5fstring_5fhandle',['cbor_string_handle',['../strings_8c.html#ae9e5da7bdf2a79fab7965caeff49d5bb',1,'cbor_string_handle(const cbor_item_t *item): strings.c'],['../strings_8h.html#af12871b50ba25f756fa1bfacd1fca12a',1,'cbor_string_handle(const cbor_item_t *item): strings.c']]], + ['cbor_5fstring_5fis_5fdefinite',['cbor_string_is_definite',['../strings_8c.html#aa2778891e70dec4cd59c9a969294d4aa',1,'cbor_string_is_definite(const cbor_item_t *item): strings.c'],['../strings_8h.html#aa2778891e70dec4cd59c9a969294d4aa',1,'cbor_string_is_definite(const cbor_item_t *item): strings.c']]], + ['cbor_5fstring_5fis_5findefinite',['cbor_string_is_indefinite',['../strings_8c.html#aa1a92438a04ae77beea9a17910805530',1,'cbor_string_is_indefinite(const cbor_item_t *item): strings.c'],['../strings_8h.html#aa1a92438a04ae77beea9a17910805530',1,'cbor_string_is_indefinite(const cbor_item_t *item): strings.c']]], + ['cbor_5fstring_5flength',['cbor_string_length',['../strings_8c.html#aa0c17825f920ebf122bd7b9abede919f',1,'cbor_string_length(const cbor_item_t *item): strings.c'],['../strings_8h.html#aa0c17825f920ebf122bd7b9abede919f',1,'cbor_string_length(const cbor_item_t *item): strings.c']]], + ['cbor_5fstring_5fset_5fhandle',['cbor_string_set_handle',['../strings_8c.html#a5e9292c04df380f2c775fe599511a7ab',1,'cbor_string_set_handle(cbor_item_t *item, cbor_mutable_data CBOR_RESTRICT_POINTER data, size_t length): strings.c'],['../strings_8h.html#a5e9292c04df380f2c775fe599511a7ab',1,'cbor_string_set_handle(cbor_item_t *item, cbor_mutable_data CBOR_RESTRICT_POINTER data, size_t length): strings.c']]], + ['cbor_5ftag_5fitem',['cbor_tag_item',['../tags_8c.html#a162852da1313269e9d7b07dd4b964111',1,'cbor_tag_item(const cbor_item_t *item): tags.c'],['../tags_8h.html#a162852da1313269e9d7b07dd4b964111',1,'cbor_tag_item(const cbor_item_t *item): tags.c']]], + ['cbor_5ftag_5fset_5fitem',['cbor_tag_set_item',['../tags_8c.html#a4e6dc4f4fda5889819713bd3957de3c6',1,'cbor_tag_set_item(cbor_item_t *item, cbor_item_t *tagged_item): tags.c'],['../tags_8h.html#a4e6dc4f4fda5889819713bd3957de3c6',1,'cbor_tag_set_item(cbor_item_t *item, cbor_item_t *tagged_item): tags.c']]], + ['cbor_5ftag_5fvalue',['cbor_tag_value',['../tags_8c.html#a2746e6a37373e0950b646e8146ed63b6',1,'cbor_tag_value(const cbor_item_t *item): tags.c'],['../tags_8h.html#a2746e6a37373e0950b646e8146ed63b6',1,'cbor_tag_value(const cbor_item_t *item): tags.c']]], + ['cbor_5ftypeof',['cbor_typeof',['../common_8c.html#ac2b9aba4cf07857524a0a520eabeef52',1,'cbor_typeof(const cbor_item_t *item): common.c'],['../common_8h.html#ac2b9aba4cf07857524a0a520eabeef52',1,'cbor_typeof(const cbor_item_t *item): common.c']]] +]; diff --git a/docs/doxygen/search/mag_sel.png b/docs/doxygen/search/mag_sel.png new file mode 100644 index 00000000..81f6040a Binary files /dev/null and b/docs/doxygen/search/mag_sel.png differ diff --git a/docs/doxygen/search/nomatches.html b/docs/doxygen/search/nomatches.html new file mode 100644 index 00000000..b1ded27e --- /dev/null +++ b/docs/doxygen/search/nomatches.html @@ -0,0 +1,12 @@ + + + + + + + +
    +
    No Matches
    +
    + + diff --git a/docs/doxygen/search/search.css b/docs/doxygen/search/search.css new file mode 100644 index 00000000..3cf9df94 --- /dev/null +++ b/docs/doxygen/search/search.css @@ -0,0 +1,271 @@ +/*---------------- Search Box */ + +#FSearchBox { + float: left; +} + +#MSearchBox { + white-space : nowrap; + float: none; + margin-top: 8px; + right: 0px; + width: 170px; + height: 24px; + z-index: 102; +} + +#MSearchBox .left +{ + display:block; + position:absolute; + left:10px; + width:20px; + height:19px; + background:url('search_l.png') no-repeat; + background-position:right; +} + +#MSearchSelect { + display:block; + position:absolute; + width:20px; + height:19px; +} + +.left #MSearchSelect { + left:4px; +} + +.right #MSearchSelect { + right:5px; +} + +#MSearchField { + display:block; + position:absolute; + height:19px; + background:url('search_m.png') repeat-x; + border:none; + width:115px; + margin-left:20px; + padding-left:4px; + color: #909090; + outline: none; + font: 9pt Arial, Verdana, sans-serif; + -webkit-border-radius: 0px; +} + +#FSearchBox #MSearchField { + margin-left:15px; +} + +#MSearchBox .right { + display:block; + position:absolute; + right:10px; + top:8px; + width:20px; + height:19px; + background:url('search_r.png') no-repeat; + background-position:left; +} + +#MSearchClose { + display: none; + position: absolute; + top: 4px; + background : none; + border: none; + margin: 0px 4px 0px 0px; + padding: 0px 0px; + outline: none; +} + +.left #MSearchClose { + left: 6px; +} + +.right #MSearchClose { + right: 2px; +} + +.MSearchBoxActive #MSearchField { + color: #000000; +} + +/*---------------- Search filter selection */ + +#MSearchSelectWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #90A5CE; + background-color: #F9FAFC; + z-index: 10001; + padding-top: 4px; + padding-bottom: 4px; + -moz-border-radius: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +.SelectItem { + font: 8pt Arial, Verdana, sans-serif; + padding-left: 2px; + padding-right: 12px; + border: 0px; +} + +span.SelectionMark { + margin-right: 4px; + font-family: monospace; + outline-style: none; + text-decoration: none; +} + +a.SelectItem { + display: block; + outline-style: none; + color: #000000; + text-decoration: none; + padding-left: 6px; + padding-right: 12px; +} + +a.SelectItem:focus, +a.SelectItem:active { + color: #000000; + outline-style: none; + text-decoration: none; +} + +a.SelectItem:hover { + color: #FFFFFF; + background-color: #3D578C; + outline-style: none; + text-decoration: none; + cursor: pointer; + display: block; +} + +/*---------------- Search results window */ + +iframe#MSearchResults { + width: 60ex; + height: 15em; +} + +#MSearchResultsWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #000; + background-color: #EEF1F7; + z-index:10000; +} + +/* ----------------------------------- */ + + +#SRIndex { + clear:both; + padding-bottom: 15px; +} + +.SREntry { + font-size: 10pt; + padding-left: 1ex; +} + +.SRPage .SREntry { + font-size: 8pt; + padding: 1px 5px; +} + +body.SRPage { + margin: 5px 2px; +} + +.SRChildren { + padding-left: 3ex; padding-bottom: .5em +} + +.SRPage .SRChildren { + display: none; +} + +.SRSymbol { + font-weight: bold; + color: #425E97; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRScope { + display: block; + color: #425E97; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRSymbol:focus, a.SRSymbol:active, +a.SRScope:focus, a.SRScope:active { + text-decoration: underline; +} + +span.SRScope { + padding-left: 4px; +} + +.SRPage .SRStatus { + padding: 2px 5px; + font-size: 8pt; + font-style: italic; +} + +.SRResult { + display: none; +} + +DIV.searchresults { + margin-left: 10px; + margin-right: 10px; +} + +/*---------------- External search page results */ + +.searchresult { + background-color: #F0F3F8; +} + +.pages b { + color: white; + padding: 5px 5px 3px 5px; + background-image: url("../tab_a.png"); + background-repeat: repeat-x; + text-shadow: 0 1px 1px #000000; +} + +.pages { + line-height: 17px; + margin-left: 4px; + text-decoration: none; +} + +.hl { + font-weight: bold; +} + +#searchresults { + margin-bottom: 20px; +} + +.searchpages { + margin-top: 10px; +} + diff --git a/docs/doxygen/search/search.js b/docs/doxygen/search/search.js new file mode 100644 index 00000000..dedce3bf --- /dev/null +++ b/docs/doxygen/search/search.js @@ -0,0 +1,791 @@ +function convertToId(search) +{ + var result = ''; + for (i=0;i do a search + { + this.Search(); + } + } + + this.OnSearchSelectKey = function(evt) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 && this.searchIndex0) // Up + { + this.searchIndex--; + this.OnSelectItem(this.searchIndex); + } + else if (e.keyCode==13 || e.keyCode==27) + { + this.OnSelectItem(this.searchIndex); + this.CloseSelectionWindow(); + this.DOMSearchField().focus(); + } + return false; + } + + // --------- Actions + + // Closes the results window. + this.CloseResultsWindow = function() + { + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.Activate(false); + } + + this.CloseSelectionWindow = function() + { + this.DOMSearchSelectWindow().style.display = 'none'; + } + + // Performs a search. + this.Search = function() + { + this.keyTimeout = 0; + + // strip leading whitespace + var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + + var code = searchValue.toLowerCase().charCodeAt(0); + var idxChar = searchValue.substr(0, 1).toLowerCase(); + if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair + { + idxChar = searchValue.substr(0, 2); + } + + var resultsPage; + var resultsPageWithSearch; + var hasResultsPage; + + var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); + if (idx!=-1) + { + var hexCode=idx.toString(16); + resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html'; + resultsPageWithSearch = resultsPage+'?'+escape(searchValue); + hasResultsPage = true; + } + else // nothing available for this search term + { + resultsPage = this.resultsPath + '/nomatches.html'; + resultsPageWithSearch = resultsPage; + hasResultsPage = false; + } + + window.frames.MSearchResults.location = resultsPageWithSearch; + var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + + if (domPopupSearchResultsWindow.style.display!='block') + { + var domSearchBox = this.DOMSearchBox(); + this.DOMSearchClose().style.display = 'inline'; + if (this.insideFrame) + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + domPopupSearchResultsWindow.style.position = 'relative'; + domPopupSearchResultsWindow.style.display = 'block'; + var width = document.body.clientWidth - 8; // the -8 is for IE :-( + domPopupSearchResultsWindow.style.width = width + 'px'; + domPopupSearchResults.style.width = width + 'px'; + } + else + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth; + var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1; + domPopupSearchResultsWindow.style.display = 'block'; + left -= domPopupSearchResults.offsetWidth; + domPopupSearchResultsWindow.style.top = top + 'px'; + domPopupSearchResultsWindow.style.left = left + 'px'; + } + } + + this.lastSearchValue = searchValue; + this.lastResultsPage = resultsPage; + } + + // -------- Activation Functions + + // Activates or deactivates the search panel, resetting things to + // their default values if necessary. + this.Activate = function(isActive) + { + if (isActive || // open it + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) + { + this.DOMSearchBox().className = 'MSearchBoxActive'; + + var searchField = this.DOMSearchField(); + + if (searchField.value == this.searchLabel) // clear "Search" term upon entry + { + searchField.value = ''; + this.searchActive = true; + } + } + else if (!isActive) // directly remove the panel + { + this.DOMSearchBox().className = 'MSearchBoxInactive'; + this.DOMSearchField().value = this.searchLabel; + this.searchActive = false; + this.lastSearchValue = '' + this.lastResultsPage = ''; + } + } +} + +// ----------------------------------------------------------------------- + +// The class that handles everything on the search results page. +function SearchResults(name) +{ + // The number of matches from the last run of . + this.lastMatchCount = 0; + this.lastKey = 0; + this.repeatOn = false; + + // Toggles the visibility of the passed element ID. + this.FindChildElement = function(id) + { + var parentElement = document.getElementById(id); + var element = parentElement.firstChild; + + while (element && element!=parentElement) + { + if (element.nodeName == 'DIV' && element.className == 'SRChildren') + { + return element; + } + + if (element.nodeName == 'DIV' && element.hasChildNodes()) + { + element = element.firstChild; + } + else if (element.nextSibling) + { + element = element.nextSibling; + } + else + { + do + { + element = element.parentNode; + } + while (element && element!=parentElement && !element.nextSibling); + + if (element && element!=parentElement) + { + element = element.nextSibling; + } + } + } + } + + this.Toggle = function(id) + { + var element = this.FindChildElement(id); + if (element) + { + if (element.style.display == 'block') + { + element.style.display = 'none'; + } + else + { + element.style.display = 'block'; + } + } + } + + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) + { + if (!search) // get search word from URL + { + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); + } + + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + var resultRows = document.getElementsByTagName("div"); + var matches = 0; + + var i = 0; + while (i < resultRows.length) + { + var row = resultRows.item(i); + if (row.className == "SRResult") + { + var rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) + { + row.style.display = 'block'; + matches++; + } + else + { + row.style.display = 'none'; + } + } + i++; + } + document.getElementById("Searching").style.display='none'; + if (matches == 0) // no results + { + document.getElementById("NoMatches").style.display='block'; + } + else // at least one result + { + document.getElementById("NoMatches").style.display='none'; + } + this.lastMatchCount = matches; + return true; + } + + // return the first item with index index or higher that is visible + this.NavNext = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index++; + } + return focusItem; + } + + this.NavPrev = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index--; + } + return focusItem; + } + + this.ProcessKeys = function(e) + { + if (e.type == "keydown") + { + this.repeatOn = false; + this.lastKey = e.keyCode; + } + else if (e.type == "keypress") + { + if (!this.repeatOn) + { + if (this.lastKey) this.repeatOn = true; + return false; // ignore first keypress after keydown + } + } + else if (e.type == "keyup") + { + this.lastKey = 0; + this.repeatOn = false; + } + return this.lastKey!=0; + } + + this.Nav = function(evt,itemIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + var newIndex = itemIndex-1; + var focusItem = this.NavPrev(newIndex); + if (focusItem) + { + var child = this.FindChildElement(focusItem.parentNode.parentNode.id); + if (child && child.style.display == 'block') // children visible + { + var n=0; + var tmpElem; + while (1) // search for last child + { + tmpElem = document.getElementById('Item'+newIndex+'_c'+n); + if (tmpElem) + { + focusItem = tmpElem; + } + else // found it! + { + break; + } + n++; + } + } + } + if (focusItem) + { + focusItem.focus(); + } + else // return focus to search field + { + parent.document.getElementById("MSearchField").focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = itemIndex+1; + var focusItem; + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem && elem.style.display == 'block') // children visible + { + focusItem = document.getElementById('Item'+itemIndex+'_c0'); + } + if (!focusItem) focusItem = this.NavNext(newIndex); + if (focusItem) focusItem.focus(); + } + else if (this.lastKey==39) // Right + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'block'; + } + else if (this.lastKey==37) // Left + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'none'; + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } + + this.NavChild = function(evt,itemIndex,childIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + if (childIndex>0) + { + var newIndex = childIndex-1; + document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); + } + else // already at first child, jump to parent + { + document.getElementById('Item'+itemIndex).focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = childIndex+1; + var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); + if (!elem) // last child, jump to parent next parent + { + elem = this.NavNext(itemIndex+1); + } + if (elem) + { + elem.focus(); + } + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } +} + +function setKeyActions(elem,action) +{ + elem.setAttribute('onkeydown',action); + elem.setAttribute('onkeypress',action); + elem.setAttribute('onkeyup',action); +} + +function setClassAttr(elem,attr) +{ + elem.setAttribute('class',attr); + elem.setAttribute('className',attr); +} + +function createResults() +{ + var results = document.getElementById("SRResults"); + for (var e=0; e + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/typedefs_0.js b/docs/doxygen/search/typedefs_0.js new file mode 100644 index 00000000..2503e932 --- /dev/null +++ b/docs/doxygen/search/typedefs_0.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['_5fcbor_5ffree_5ft',['_cbor_free_t',['../common_8h.html#af05bb33f6d22cdac535576c8edaf208c',1,'common.h']]], + ['_5fcbor_5fmalloc_5ft',['_cbor_malloc_t',['../common_8h.html#ad89d15c2e3f18e8914fcdffe4d725d42',1,'common.h']]], + ['_5fcbor_5frealloc_5ft',['_cbor_realloc_t',['../common_8h.html#a5b52369a95930104d33301d12faabe75',1,'common.h']]] +]; diff --git a/docs/doxygen/search/typedefs_1.html b/docs/doxygen/search/typedefs_1.html new file mode 100644 index 00000000..a6b5eea6 --- /dev/null +++ b/docs/doxygen/search/typedefs_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/typedefs_1.js b/docs/doxygen/search/typedefs_1.js new file mode 100644 index 00000000..2461ff48 --- /dev/null +++ b/docs/doxygen/search/typedefs_1.js @@ -0,0 +1,17 @@ +var searchData= +[ + ['cbor_5fbool_5fcallback',['cbor_bool_callback',['../callbacks_8h.html#a2d9a17678ab25d2afa83805692fec564',1,'callbacks.h']]], + ['cbor_5fcollection_5fcallback',['cbor_collection_callback',['../callbacks_8h.html#a67253dd2fa8a2a7192cdc7f0cef5bc15',1,'callbacks.h']]], + ['cbor_5fdata',['cbor_data',['../data_8h.html#a121c5944682215e742475f12f07c0a72',1,'data.h']]], + ['cbor_5fdouble_5fcallback',['cbor_double_callback',['../callbacks_8h.html#a02f5e0ce638740f503b333de971fe159',1,'callbacks.h']]], + ['cbor_5ffloat_5fcallback',['cbor_float_callback',['../callbacks_8h.html#acb7749e3b48867230d2405133f594e0e',1,'callbacks.h']]], + ['cbor_5fint16_5fcallback',['cbor_int16_callback',['../callbacks_8h.html#a8b032aeecbaf7f41b6b4264db1de38c2',1,'callbacks.h']]], + ['cbor_5fint32_5fcallback',['cbor_int32_callback',['../callbacks_8h.html#ab3fce095b0d7875e7e67ab57395abf30',1,'callbacks.h']]], + ['cbor_5fint64_5fcallback',['cbor_int64_callback',['../callbacks_8h.html#af6d5f65fc16e017aaf6278321ee6caa8',1,'callbacks.h']]], + ['cbor_5fint8_5fcallback',['cbor_int8_callback',['../callbacks_8h.html#a389ed17563aeec353a493ef3b60eb593',1,'callbacks.h']]], + ['cbor_5fitem_5ft',['cbor_item_t',['../data_8h.html#afdaa4bcbbdd295d719e39ce0b5519419',1,'data.h']]], + ['cbor_5fmutable_5fdata',['cbor_mutable_data',['../data_8h.html#aabb40e458ece40477e134a69c76693e8',1,'data.h']]], + ['cbor_5fsimple_5fcallback',['cbor_simple_callback',['../callbacks_8h.html#a39ec9172857c7d7b35ab32a0f2faa693',1,'callbacks.h']]], + ['cbor_5fstring_5fcallback',['cbor_string_callback',['../callbacks_8h.html#acd1d1e9fabda1cb73038048b1b7fdabf',1,'callbacks.h']]], + ['cbor_5ftype',['cbor_type',['../data_8h.html#ad692b20e7c3d172ae9ae278e508e7444',1,'data.h']]] +]; diff --git a/docs/doxygen/search/variables_0.html b/docs/doxygen/search/variables_0.html new file mode 100644 index 00000000..164aa544 --- /dev/null +++ b/docs/doxygen/search/variables_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/variables_0.js b/docs/doxygen/search/variables_0.js new file mode 100644 index 00000000..47867cba --- /dev/null +++ b/docs/doxygen/search/variables_0.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['_5fcbor_5ffree',['_cbor_free',['../allocators_8c.html#a994f4145360ef0bfa3c48e59a5ca7186',1,'_cbor_free(): allocators.c'],['../common_8h.html#a994f4145360ef0bfa3c48e59a5ca7186',1,'_cbor_free(): allocators.c']]], + ['_5fcbor_5fmalloc',['_cbor_malloc',['../allocators_8c.html#a3218c24af00a3efeaecb1716c8f5a289',1,'_cbor_malloc(): allocators.c'],['../common_8h.html#a3218c24af00a3efeaecb1716c8f5a289',1,'_cbor_malloc(): allocators.c']]], + ['_5fcbor_5frealloc',['_cbor_realloc',['../allocators_8c.html#a84ecc1fc92c3812ab6ced693f2c6254c',1,'_cbor_realloc(): allocators.c'],['../common_8h.html#a84ecc1fc92c3812ab6ced693f2c6254c',1,'_cbor_realloc(): allocators.c']]], + ['_5fval',['_val',['../callbacks_8c.html#aa71dda9f35e8d5245180dd90eb8604ba',1,'callbacks.c']]] +]; diff --git a/docs/doxygen/search/variables_1.html b/docs/doxygen/search/variables_1.html new file mode 100644 index 00000000..857fbbda --- /dev/null +++ b/docs/doxygen/search/variables_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/variables_1.js b/docs/doxygen/search/variables_1.js new file mode 100644 index 00000000..5706de04 --- /dev/null +++ b/docs/doxygen/search/variables_1.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['allocated',['allocated',['../struct__cbor__array__metadata.html#ad59631add7d960a0777686c8cc0fd46a',1,'_cbor_array_metadata::allocated()'],['../struct__cbor__map__metadata.html#a6eb16c3f11be5cecbbf8ab8bae689527',1,'_cbor_map_metadata::allocated()']]], + ['array_5fmetadata',['array_metadata',['../unioncbor__item__metadata.html#a51c4b86bb4e0313193df52d1320f9237',1,'cbor_item_metadata']]], + ['array_5fstart',['array_start',['../structcbor__callbacks.html#affebd3296749cdc0d564a3b9cae7a4e4',1,'cbor_callbacks']]], + ['as_5fdouble',['as_double',['../union__cbor__double__helper.html#a51f93c8fae90168e51b1be0517e1ada0',1,'_cbor_double_helper']]], + ['as_5ffloat',['as_float',['../union__cbor__float__helper.html#ae3a184f0f46ee8d87e6cb8e126e440a2',1,'_cbor_float_helper']]], + ['as_5fuint',['as_uint',['../union__cbor__float__helper.html#a28a0047ea6592730009da39772638a76',1,'_cbor_float_helper::as_uint()'],['../union__cbor__double__helper.html#a247647c22dd8248e513c37b0b339b856',1,'_cbor_double_helper::as_uint()']]] +]; diff --git a/docs/doxygen/search/variables_10.html b/docs/doxygen/search/variables_10.html new file mode 100644 index 00000000..3143a875 --- /dev/null +++ b/docs/doxygen/search/variables_10.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/variables_10.js b/docs/doxygen/search/variables_10.js new file mode 100644 index 00000000..3b621688 --- /dev/null +++ b/docs/doxygen/search/variables_10.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['uint16',['uint16',['../structcbor__callbacks.html#a3eb2039fa03bd534d6be0ed10d0c98be',1,'cbor_callbacks']]], + ['uint32',['uint32',['../structcbor__callbacks.html#af2501b53c0150c4d3244a039b3232bf1',1,'cbor_callbacks']]], + ['uint64',['uint64',['../structcbor__callbacks.html#a2b0328261726fba55f663f55f954d56b',1,'cbor_callbacks']]], + ['uint8',['uint8',['../structcbor__callbacks.html#af2d69429c9bc71edf55b6f4f1dbb76d1',1,'cbor_callbacks']]], + ['undefined',['undefined',['../structcbor__callbacks.html#af9b30de5bef7bf76e8e34bdd95434f98',1,'cbor_callbacks']]] +]; diff --git a/docs/doxygen/search/variables_11.html b/docs/doxygen/search/variables_11.html new file mode 100644 index 00000000..d27fb7aa --- /dev/null +++ b/docs/doxygen/search/variables_11.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/variables_11.js b/docs/doxygen/search/variables_11.js new file mode 100644 index 00000000..9df9912a --- /dev/null +++ b/docs/doxygen/search/variables_11.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['value',['value',['../struct__cbor__tag__metadata.html#a23bcf332e94e901e5bc3b48aab0d89da',1,'_cbor_tag_metadata::value()'],['../structcbor__pair.html#a44bbea9cc120de72fc4871a05dc8ec85',1,'cbor_pair::value()']]] +]; diff --git a/docs/doxygen/search/variables_12.html b/docs/doxygen/search/variables_12.html new file mode 100644 index 00000000..bc5a2b13 --- /dev/null +++ b/docs/doxygen/search/variables_12.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/variables_12.js b/docs/doxygen/search/variables_12.js new file mode 100644 index 00000000..3498380c --- /dev/null +++ b/docs/doxygen/search/variables_12.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['width',['width',['../struct__cbor__int__metadata.html#a7a402d748e607c9942e5eefdb875582d',1,'_cbor_int_metadata::width()'],['../struct__cbor__float__ctrl__metadata.html#a19a1c5e96c662dd4781f0172052b194c',1,'_cbor_float_ctrl_metadata::width()']]] +]; diff --git a/docs/doxygen/search/variables_2.html b/docs/doxygen/search/variables_2.html new file mode 100644 index 00000000..35233e3c --- /dev/null +++ b/docs/doxygen/search/variables_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/variables_2.js b/docs/doxygen/search/variables_2.js new file mode 100644 index 00000000..02f6953f --- /dev/null +++ b/docs/doxygen/search/variables_2.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['boolean',['boolean',['../structcbor__callbacks.html#a458321ece8c64be2c37b96f78bbdfb8c',1,'cbor_callbacks']]], + ['byte_5fstring',['byte_string',['../structcbor__callbacks.html#a0c2528e2b1d6df97053168d24e53e278',1,'cbor_callbacks']]], + ['byte_5fstring_5fstart',['byte_string_start',['../structcbor__callbacks.html#adf65a04d2423dcdd73cec4a261ccb6aa',1,'cbor_callbacks']]], + ['bytestring_5fmetadata',['bytestring_metadata',['../unioncbor__item__metadata.html#a90851d347147760c9cef8d7af485d006',1,'cbor_item_metadata']]] +]; diff --git a/docs/doxygen/search/variables_3.html b/docs/doxygen/search/variables_3.html new file mode 100644 index 00000000..e45e6131 --- /dev/null +++ b/docs/doxygen/search/variables_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/variables_3.js b/docs/doxygen/search/variables_3.js new file mode 100644 index 00000000..e8f59723 --- /dev/null +++ b/docs/doxygen/search/variables_3.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['cbor_5fempty_5fcallbacks',['cbor_empty_callbacks',['../callbacks_8h.html#a3500c93f246a6c53816e52c70fe8d640',1,'callbacks.h']]], + ['chunk_5fcapacity',['chunk_capacity',['../structcbor__indefinite__string__data.html#a4f07710bcaa663d2babf652fc9984412',1,'cbor_indefinite_string_data']]], + ['chunk_5fcount',['chunk_count',['../structcbor__indefinite__string__data.html#a86c3abce37287c14985b5f2a0d1935d7',1,'cbor_indefinite_string_data']]], + ['chunks',['chunks',['../structcbor__indefinite__string__data.html#ac34c0d9bd1447f53149878128e19a414',1,'cbor_indefinite_string_data']]], + ['code',['code',['../structcbor__error.html#a8674e7cac94b696eeea37db194026646',1,'cbor_error']]], + ['codepoint_5fcount',['codepoint_count',['../struct__cbor__string__metadata.html#a07f2e49bd1cd40ba2277ae6d7a9b6d5d',1,'_cbor_string_metadata']]], + ['creation_5ffailed',['creation_failed',['../struct__cbor__decoder__context.html#ada14322afd080c27f3ea76b3ba657505',1,'_cbor_decoder_context']]], + ['ctrl',['ctrl',['../struct__cbor__float__ctrl__metadata.html#aeeb531a44e6502b5f1bd2aece6dffaa2',1,'_cbor_float_ctrl_metadata']]] +]; diff --git a/docs/doxygen/search/variables_4.html b/docs/doxygen/search/variables_4.html new file mode 100644 index 00000000..97ec2557 --- /dev/null +++ b/docs/doxygen/search/variables_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/variables_4.js b/docs/doxygen/search/variables_4.js new file mode 100644 index 00000000..d61d86fd --- /dev/null +++ b/docs/doxygen/search/variables_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['data',['data',['../structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44',1,'cbor_item_t']]] +]; diff --git a/docs/doxygen/search/variables_5.html b/docs/doxygen/search/variables_5.html new file mode 100644 index 00000000..d77fa844 --- /dev/null +++ b/docs/doxygen/search/variables_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/variables_5.js b/docs/doxygen/search/variables_5.js new file mode 100644 index 00000000..1dabfbc0 --- /dev/null +++ b/docs/doxygen/search/variables_5.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['end_5fptr',['end_ptr',['../struct__cbor__array__metadata.html#a388742d0b665ba1775ad89858f3049cb',1,'_cbor_array_metadata::end_ptr()'],['../struct__cbor__map__metadata.html#a38136af91105ba320f1d95a4a4ceb4de',1,'_cbor_map_metadata::end_ptr()']]], + ['error',['error',['../structcbor__load__result.html#af23777116487150fb1b06842fc57724f',1,'cbor_load_result']]] +]; diff --git a/docs/doxygen/search/variables_6.html b/docs/doxygen/search/variables_6.html new file mode 100644 index 00000000..c656bb6f --- /dev/null +++ b/docs/doxygen/search/variables_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/variables_6.js b/docs/doxygen/search/variables_6.js new file mode 100644 index 00000000..22d95648 --- /dev/null +++ b/docs/doxygen/search/variables_6.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['float2',['float2',['../structcbor__callbacks.html#ab1f4ab3a5bf0cf2a6418b8cb28877652',1,'cbor_callbacks']]], + ['float4',['float4',['../structcbor__callbacks.html#a3e0e5094fdfbc527f9a2ca300d65b7df',1,'cbor_callbacks']]], + ['float8',['float8',['../structcbor__callbacks.html#a5a80bae7d106e7cf61d27cd710251e4a',1,'cbor_callbacks']]], + ['float_5fctrl_5fmetadata',['float_ctrl_metadata',['../unioncbor__item__metadata.html#a456a58064b25bc6563df665bed5c122d',1,'cbor_item_metadata']]] +]; diff --git a/docs/doxygen/search/variables_7.html b/docs/doxygen/search/variables_7.html new file mode 100644 index 00000000..8aac8363 --- /dev/null +++ b/docs/doxygen/search/variables_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/variables_7.js b/docs/doxygen/search/variables_7.js new file mode 100644 index 00000000..3db00931 --- /dev/null +++ b/docs/doxygen/search/variables_7.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['indef_5farray_5fstart',['indef_array_start',['../structcbor__callbacks.html#a5831fd6bd9372b04a8f65db1e1967713',1,'cbor_callbacks']]], + ['indef_5fbreak',['indef_break',['../structcbor__callbacks.html#abc0516d80611473d2527bf5faea393d8',1,'cbor_callbacks']]], + ['indef_5fmap_5fstart',['indef_map_start',['../structcbor__callbacks.html#ab989b168f43559f404d87508bdd0ddc8',1,'cbor_callbacks']]], + ['int_5fmetadata',['int_metadata',['../unioncbor__item__metadata.html#a9dbedd1621e78d4817c359849ffd75a9',1,'cbor_item_metadata']]], + ['item',['item',['../struct__cbor__stack__record.html#a1a1d4be830fa1e0d9c5369cddccce47e',1,'_cbor_stack_record']]] +]; diff --git a/docs/doxygen/search/variables_8.html b/docs/doxygen/search/variables_8.html new file mode 100644 index 00000000..a74c6caf --- /dev/null +++ b/docs/doxygen/search/variables_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/variables_8.js b/docs/doxygen/search/variables_8.js new file mode 100644 index 00000000..85d30361 --- /dev/null +++ b/docs/doxygen/search/variables_8.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['key',['key',['../structcbor__pair.html#a5122c22ad7ef32b2c6ae0a413caca7a1',1,'cbor_pair']]] +]; diff --git a/docs/doxygen/search/variables_9.html b/docs/doxygen/search/variables_9.html new file mode 100644 index 00000000..39685267 --- /dev/null +++ b/docs/doxygen/search/variables_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/variables_9.js b/docs/doxygen/search/variables_9.js new file mode 100644 index 00000000..1a86234a --- /dev/null +++ b/docs/doxygen/search/variables_9.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['length',['length',['../struct__cbor__bytestring__metadata.html#ad20fa7f7cec11db8076419169347ff75',1,'_cbor_bytestring_metadata::length()'],['../struct__cbor__string__metadata.html#a558805df7c655cfaf3c289bc536ff96e',1,'_cbor_string_metadata::length()']]], + ['location',['location',['../struct__cbor__unicode__status.html#a74b5cdcf18d76a2cdb19c37857f170a7',1,'_cbor_unicode_status']]], + ['lower',['lower',['../struct__cbor__stack__record.html#aca7db1e610ee0983b0e24e081ee3e5dd',1,'_cbor_stack_record']]] +]; diff --git a/docs/doxygen/search/variables_a.html b/docs/doxygen/search/variables_a.html new file mode 100644 index 00000000..ce54923f --- /dev/null +++ b/docs/doxygen/search/variables_a.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/variables_a.js b/docs/doxygen/search/variables_a.js new file mode 100644 index 00000000..3bb5d07a --- /dev/null +++ b/docs/doxygen/search/variables_a.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['map_5fmetadata',['map_metadata',['../unioncbor__item__metadata.html#ac497580bfcb0c0e47438a45407ac7b4e',1,'cbor_item_metadata']]], + ['map_5fstart',['map_start',['../structcbor__callbacks.html#ac833a2232c624936d7444612e47e8a20',1,'cbor_callbacks']]], + ['metadata',['metadata',['../structcbor__item__t.html#a7d97fa5cdf027ca0499c37ec19acf843',1,'cbor_item_t']]] +]; diff --git a/docs/doxygen/search/variables_b.html b/docs/doxygen/search/variables_b.html new file mode 100644 index 00000000..4825aed0 --- /dev/null +++ b/docs/doxygen/search/variables_b.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/variables_b.js b/docs/doxygen/search/variables_b.js new file mode 100644 index 00000000..86c5afe6 --- /dev/null +++ b/docs/doxygen/search/variables_b.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['negint16',['negint16',['../structcbor__callbacks.html#a0e47df73a7ecf894ab75e04a1cc83dc7',1,'cbor_callbacks']]], + ['negint32',['negint32',['../structcbor__callbacks.html#a26e8c4f53af47eaaf8928b86fb92a44f',1,'cbor_callbacks']]], + ['negint64',['negint64',['../structcbor__callbacks.html#ac0a4f4915ecb9924132c60c7fe7d93fe',1,'cbor_callbacks']]], + ['negint8',['negint8',['../structcbor__callbacks.html#aae703108db340c2df1af0154b23b9631',1,'cbor_callbacks']]], + ['null',['null',['../structcbor__callbacks.html#a7483f952b13db66abd893082a204859d',1,'cbor_callbacks']]] +]; diff --git a/docs/doxygen/search/variables_c.html b/docs/doxygen/search/variables_c.html new file mode 100644 index 00000000..40b9b9a3 --- /dev/null +++ b/docs/doxygen/search/variables_c.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/variables_c.js b/docs/doxygen/search/variables_c.js new file mode 100644 index 00000000..2b2064c3 --- /dev/null +++ b/docs/doxygen/search/variables_c.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['position',['position',['../structcbor__error.html#a6bc04669e6fff45ad7a5e22ad5826d01',1,'cbor_error']]] +]; diff --git a/docs/doxygen/search/variables_d.html b/docs/doxygen/search/variables_d.html new file mode 100644 index 00000000..125bf94a --- /dev/null +++ b/docs/doxygen/search/variables_d.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/variables_d.js b/docs/doxygen/search/variables_d.js new file mode 100644 index 00000000..77ab93bb --- /dev/null +++ b/docs/doxygen/search/variables_d.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['read',['read',['../structcbor__load__result.html#ac5d6290cac5893bd060f6759beef2b28',1,'cbor_load_result::read()'],['../structcbor__decoder__result.html#a39828fd8d825610cda67d9738d2d5c23',1,'cbor_decoder_result::read()']]], + ['refcount',['refcount',['../structcbor__item__t.html#a6bb24fe655f086c6aa9a66d427e09cca',1,'cbor_item_t']]], + ['root',['root',['../struct__cbor__decoder__context.html#ad4c1540245b6241bc7aa3f7ade2fbf5a',1,'_cbor_decoder_context']]] +]; diff --git a/docs/doxygen/search/variables_e.html b/docs/doxygen/search/variables_e.html new file mode 100644 index 00000000..3f5bb667 --- /dev/null +++ b/docs/doxygen/search/variables_e.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/variables_e.js b/docs/doxygen/search/variables_e.js new file mode 100644 index 00000000..e3f4a1bc --- /dev/null +++ b/docs/doxygen/search/variables_e.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['size',['size',['../struct__cbor__stack.html#aab7d9aefcd1c46603350a1d009c048d8',1,'_cbor_stack']]], + ['stack',['stack',['../struct__cbor__decoder__context.html#af21635162948fc488da3c1625f1bc278',1,'_cbor_decoder_context']]], + ['status',['status',['../structcbor__decoder__result.html#a1b775085d3696356c9ca284ffd9a264d',1,'cbor_decoder_result::status()'],['../struct__cbor__unicode__status.html#a06b8c4d673a659a046aa3adea53cdef8',1,'_cbor_unicode_status::status()']]], + ['string',['string',['../structcbor__callbacks.html#a18144e8cc29b3562f071188c3d9086eb',1,'cbor_callbacks']]], + ['string_5fmetadata',['string_metadata',['../unioncbor__item__metadata.html#a753eccc4105c3861dd40f50681ff18df',1,'cbor_item_metadata']]], + ['string_5fstart',['string_start',['../structcbor__callbacks.html#ac5a3ff3cd57f469460c13598d14eb2eb',1,'cbor_callbacks']]], + ['subitems',['subitems',['../struct__cbor__stack__record.html#a9b69c0ea00da449b080343a97c026cef',1,'_cbor_stack_record']]], + ['syntax_5ferror',['syntax_error',['../struct__cbor__decoder__context.html#ae34e7cc9b435a63bc0e92c425279db84',1,'_cbor_decoder_context']]] +]; diff --git a/docs/doxygen/search/variables_f.html b/docs/doxygen/search/variables_f.html new file mode 100644 index 00000000..20f51676 --- /dev/null +++ b/docs/doxygen/search/variables_f.html @@ -0,0 +1,26 @@ + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/docs/doxygen/search/variables_f.js b/docs/doxygen/search/variables_f.js new file mode 100644 index 00000000..a77bf4e1 --- /dev/null +++ b/docs/doxygen/search/variables_f.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['tag',['tag',['../structcbor__callbacks.html#ab5a727d5b11a7f2558cf811908f92e70',1,'cbor_callbacks']]], + ['tag_5fmetadata',['tag_metadata',['../unioncbor__item__metadata.html#a7cf72d7dbb3104bd14d0e4934646212f',1,'cbor_item_metadata']]], + ['tagged_5fitem',['tagged_item',['../struct__cbor__tag__metadata.html#ae275f5a8e0a72192d393f770db923907',1,'_cbor_tag_metadata']]], + ['top',['top',['../struct__cbor__stack.html#a559869a03a766ae041b1e385ceb34026',1,'_cbor_stack']]], + ['type',['type',['../struct__cbor__bytestring__metadata.html#ab43be7eca10ef7f0501d9f87482e27c3',1,'_cbor_bytestring_metadata::type()'],['../struct__cbor__string__metadata.html#afcfdf5e250b677a7e88c5b9c1919bc1a',1,'_cbor_string_metadata::type()'],['../struct__cbor__array__metadata.html#a0c376239d3aafcfe64ee7c74fd422f37',1,'_cbor_array_metadata::type()'],['../struct__cbor__map__metadata.html#aace4f7da19acf93e56eeb8ccf0fae7b5',1,'_cbor_map_metadata::type()'],['../structcbor__item__t.html#a6743a75cf89e1b455ddf3198ff98842a',1,'cbor_item_t::type()']]] +]; diff --git a/docs/doxygen/serialization_8c.html b/docs/doxygen/serialization_8c.html new file mode 100644 index 00000000..ea5ca0e5 --- /dev/null +++ b/docs/doxygen/serialization_8c.html @@ -0,0 +1,602 @@ + + + + + + + +libcbor: src/cbor/serialization.c File Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    serialization.c File Reference
    +
    +
    +
    #include "serialization.h"
    +#include "encoding.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 "internal/memory_utils.h"
    +#include <string.h>
    +
    +

    Go to the source code of this file.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    size_t cbor_serialize (const cbor_item_t *item, unsigned char *buffer, size_t buffer_size)
     Serialize the given item. More...
     
    size_t cbor_serialize_alloc (const cbor_item_t *item, unsigned char **buffer, size_t *buffer_size)
     Serialize the given item, allocating buffers as needed. More...
     
    size_t cbor_serialize_uint (const cbor_item_t *item, unsigned char *buffer, size_t buffer_size)
     Serialize an uint. More...
     
    size_t cbor_serialize_negint (const cbor_item_t *item, unsigned char *buffer, size_t buffer_size)
     Serialize a negint. More...
     
    size_t cbor_serialize_bytestring (const cbor_item_t *item, unsigned char *buffer, size_t buffer_size)
     Serialize a bytestring. More...
     
    size_t cbor_serialize_string (const cbor_item_t *item, unsigned char *buffer, size_t buffer_size)
     Serialize a string. More...
     
    size_t cbor_serialize_array (const cbor_item_t *item, unsigned char *buffer, size_t buffer_size)
     Serialize an array. More...
     
    size_t cbor_serialize_map (const cbor_item_t *item, unsigned char *buffer, size_t buffer_size)
     Serialize a map. More...
     
    size_t cbor_serialize_tag (const cbor_item_t *item, unsigned char *buffer, size_t buffer_size)
     Serialize a tag. More...
     
    size_t cbor_serialize_float_ctrl (const cbor_item_t *item, unsigned char *buffer, size_t buffer_size)
     Serialize a. More...
     
    +

    Function Documentation

    + +

    § cbor_serialize()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    size_t cbor_serialize (const cbor_item_titem,
    cbor_mutable_data buffer,
    size_t buffer_size 
    )
    +
    + +

    Serialize the given item.

    +
    Parameters
    + + + + +
    item[borrow]A data item
    bufferBuffer to serialize to
    buffer_sizeSize of the buffer
    +
    +
    +
    Returns
    Length of the result. 0 on failure.
    + +

    Definition at line 20 of file serialization.c.

    + +
    +
    + +

    § cbor_serialize_alloc()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    size_t cbor_serialize_alloc (const cbor_item_titem,
    cbor_mutable_databuffer,
    size_t * buffer_size 
    )
    +
    + +

    Serialize the given item, allocating buffers as needed.

    +
    embed:rst:leading-asterisk
    +* .. warning:: It is your responsibility to free the buffer using an appropriate ``free`` implementation.
    +* 
    Parameters
    + + + + +
    item[borrow]A data item
    buffer[out]Buffer containing the result
    buffer_size[out]Size of the buffer
    +
    +
    +
    Returns
    Length of the result. 0 on failure, in which case buffer is NULL.
    + +

    Definition at line 44 of file serialization.c.

    + +
    +
    + +

    § cbor_serialize_array()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    size_t cbor_serialize_array (const cbor_item_t,
    cbor_mutable_data ,
    size_t  
    )
    +
    + +

    Serialize an array.

    +
    Parameters
    + + + + +
    item[borrow]An array
    bufferBuffer to serialize to
    buffer_sizeSize of the buffer
    +
    +
    +
    Returns
    Length of the result. 0 on failure.
    + +

    Definition at line 178 of file serialization.c.

    + +
    +
    + +

    § cbor_serialize_bytestring()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    size_t cbor_serialize_bytestring (const cbor_item_t,
    cbor_mutable_data ,
    size_t  
    )
    +
    + +

    Serialize a bytestring.

    +
    Parameters
    + + + + +
    item[borrow]A bytestring
    bufferBuffer to serialize to
    buffer_sizeSize of the buffer
    +
    +
    +
    Returns
    Length of the result. 0 on failure.
    + +

    Definition at line 110 of file serialization.c.

    + +
    +
    + +

    § cbor_serialize_float_ctrl()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    size_t cbor_serialize_float_ctrl (const cbor_item_t,
    cbor_mutable_data ,
    size_t  
    )
    +
    + +

    Serialize a.

    +
    Parameters
    + + + + +
    item[borrow]A float or ctrl
    bufferBuffer to serialize to
    buffer_sizeSize of the buffer
    +
    +
    +
    Returns
    Length of the result. 0 on failure.
    + +

    Definition at line 270 of file serialization.c.

    + +
    +
    + +

    § cbor_serialize_map()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    size_t cbor_serialize_map (const cbor_item_t,
    cbor_mutable_data ,
    size_t  
    )
    +
    + +

    Serialize a map.

    +
    Parameters
    + + + + +
    item[borrow]A map
    bufferBuffer to serialize to
    buffer_sizeSize of the buffer
    +
    +
    +
    Returns
    Length of the result. 0 on failure.
    + +

    Definition at line 214 of file serialization.c.

    + +
    +
    + +

    § cbor_serialize_negint()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    size_t cbor_serialize_negint (const cbor_item_t,
    cbor_mutable_data ,
    size_t  
    )
    +
    + +

    Serialize a negint.

    +
    Parameters
    + + + + +
    item[borrow]A neging
    bufferBuffer to serialize to
    buffer_sizeSize of the buffer
    +
    +
    +
    Returns
    Length of the result. 0 on failure.
    + +

    Definition at line 93 of file serialization.c.

    + +
    +
    + +

    § cbor_serialize_string()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    size_t cbor_serialize_string (const cbor_item_t,
    cbor_mutable_data ,
    size_t  
    )
    +
    + +

    Serialize a string.

    +
    Parameters
    + + + + +
    item[borrow]A string
    bufferBuffer to serialize to
    buffer_sizeSize of the buffer
    +
    +
    +
    Returns
    Length of the result. 0 on failure.
    + +

    Definition at line 144 of file serialization.c.

    + +
    +
    + +

    § cbor_serialize_tag()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    size_t cbor_serialize_tag (const cbor_item_t,
    cbor_mutable_data ,
    size_t  
    )
    +
    + +

    Serialize a tag.

    +
    Parameters
    + + + + +
    item[borrow]A tag
    bufferBuffer to serialize to
    buffer_sizeSize of the buffer
    +
    +
    +
    Returns
    Length of the result. 0 on failure.
    + +

    Definition at line 256 of file serialization.c.

    + +
    +
    + +

    § cbor_serialize_uint()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    size_t cbor_serialize_uint (const cbor_item_t,
    cbor_mutable_data ,
    size_t  
    )
    +
    + +

    Serialize an uint.

    +
    Parameters
    + + + + +
    item[borrow]A uint
    bufferBuffer to serialize to
    buffer_sizeSize of the buffer
    +
    +
    +
    Returns
    Length of the result. 0 on failure.
    + +

    Definition at line 76 of file serialization.c.

    + +
    +
    +
    + + + + diff --git a/docs/doxygen/serialization_8c_source.html b/docs/doxygen/serialization_8c_source.html new file mode 100644 index 00000000..3476ecfa --- /dev/null +++ b/docs/doxygen/serialization_8c_source.html @@ -0,0 +1,187 @@ + + + + + + + +libcbor: src/cbor/serialization.c Source File + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    serialization.c
    +
    +
    +Go to the documentation of this file.
    1 /*
    2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
    3  *
    4  * libcbor is free software; you can redistribute it and/or modify
    5  * it under the terms of the MIT license. See LICENSE for details.
    6  */
    7 
    8 #include "serialization.h"
    9 #include "encoding.h"
    10 #include "cbor/arrays.h"
    11 #include "cbor/bytestrings.h"
    12 #include "cbor/floats_ctrls.h"
    13 #include "cbor/ints.h"
    14 #include "cbor/maps.h"
    15 #include "cbor/strings.h"
    16 #include "cbor/tags.h"
    17 #include "internal/memory_utils.h"
    18 #include <string.h>
    19 
    20 size_t cbor_serialize(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size)
    21 {
    22  switch (cbor_typeof(item)) {
    23  case CBOR_TYPE_UINT:
    24  return cbor_serialize_uint(item, buffer, buffer_size);
    25  case CBOR_TYPE_NEGINT:
    26  return cbor_serialize_negint(item, buffer, buffer_size);
    28  return cbor_serialize_bytestring(item, buffer, buffer_size);
    29  case CBOR_TYPE_STRING:
    30  return cbor_serialize_string(item, buffer, buffer_size);
    31  case CBOR_TYPE_ARRAY:
    32  return cbor_serialize_array(item, buffer, buffer_size);
    33  case CBOR_TYPE_MAP:
    34  return cbor_serialize_map(item, buffer, buffer_size);
    35  case CBOR_TYPE_TAG:
    36  return cbor_serialize_tag(item, buffer, buffer_size);
    38  return cbor_serialize_float_ctrl(item, buffer, buffer_size);
    39  default:
    40  return 0;
    41  }
    42 }
    43 
    44 size_t cbor_serialize_alloc(const cbor_item_t * item,
    45  unsigned char ** buffer,
    46  size_t * buffer_size)
    47 {
    48  size_t bfr_size = 32;
    49  unsigned char * bfr = _CBOR_MALLOC(bfr_size), * tmp_bfr;
    50  if (bfr == NULL) {
    51  return 0;
    52  }
    53 
    54  size_t written;
    55 
    56  /* This is waaay too optimistic - figure out something smarter (eventually) */
    57  while ((written = cbor_serialize(item, bfr, bfr_size)) == 0) {
    58  if (!_cbor_safe_to_multiply(CBOR_BUFFER_GROWTH, bfr_size)) {
    59  _CBOR_FREE(bfr);
    60  return 0;
    61  }
    62 
    63  tmp_bfr = _CBOR_REALLOC(bfr, bfr_size *= 2);
    64 
    65  if (tmp_bfr == NULL) {
    66  _CBOR_FREE(bfr);
    67  return 0;
    68  }
    69  bfr = tmp_bfr;
    70  }
    71  *buffer = bfr;
    72  *buffer_size = bfr_size;
    73  return written;
    74 }
    75 
    76 size_t cbor_serialize_uint(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size)
    77 {
    78  assert(cbor_isa_uint(item));
    79  switch (cbor_int_get_width(item)) {
    80  case CBOR_INT_8:
    81  return cbor_encode_uint8(cbor_get_uint8(item), buffer, buffer_size);
    82  case CBOR_INT_16:
    83  return cbor_encode_uint16(cbor_get_uint16(item), buffer, buffer_size);
    84  case CBOR_INT_32:
    85  return cbor_encode_uint32(cbor_get_uint32(item), buffer, buffer_size);
    86  case CBOR_INT_64:
    87  return cbor_encode_uint64(cbor_get_uint64(item), buffer, buffer_size);
    88  default:
    89  return 0;
    90  }
    91 }
    92 
    93 size_t cbor_serialize_negint(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size)
    94 {
    95  assert(cbor_isa_negint(item));
    96  switch (cbor_int_get_width(item)) {
    97  case CBOR_INT_8:
    98  return cbor_encode_negint8(cbor_get_uint8(item), buffer, buffer_size);
    99  case CBOR_INT_16:
    100  return cbor_encode_negint16(cbor_get_uint16(item), buffer, buffer_size);
    101  case CBOR_INT_32:
    102  return cbor_encode_negint32(cbor_get_uint32(item), buffer, buffer_size);
    103  case CBOR_INT_64:
    104  return cbor_encode_negint64(cbor_get_uint64(item), buffer, buffer_size);
    105  default:
    106  return 0;
    107  }
    108 }
    109 
    110 size_t cbor_serialize_bytestring(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size)
    111 {
    112  assert(cbor_isa_bytestring(item));
    113  if (cbor_bytestring_is_definite(item)) {
    114  size_t length = cbor_bytestring_length(item);
    115  size_t written = cbor_encode_bytestring_start(length, buffer, buffer_size);
    116  if (written && (buffer_size - written >= length)) {
    117  memcpy(buffer + written, cbor_bytestring_handle(item), length);
    118  return written + length;
    119  } else
    120  return 0;
    121  } else {
    122  assert(cbor_bytestring_is_indefinite(item));
    123  size_t chunk_count = cbor_bytestring_chunk_count(item);
    124  size_t written = cbor_encode_indef_bytestring_start(buffer, buffer_size);
    125 
    126  if (written == 0)
    127  return 0;
    128 
    130  for (size_t i = 0; i < chunk_count; i++) {
    131  size_t chunk_written = cbor_serialize_bytestring(chunks[i], buffer + written, buffer_size - written);
    132  if (chunk_written == 0)
    133  return 0;
    134  else
    135  written += chunk_written;
    136  }
    137  if (cbor_encode_break(buffer + written, buffer_size - written) > 0)
    138  return written + 1;
    139  else
    140  return 0;
    141  }
    142 }
    143 
    144 size_t cbor_serialize_string(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size)
    145 {
    146  assert(cbor_isa_string(item));
    147  if (cbor_string_is_definite(item)) {
    148  size_t length = cbor_string_length(item);
    149  size_t written = cbor_encode_string_start(length, buffer, buffer_size);
    150  if (written && (buffer_size - written >= length)) {
    151  memcpy(buffer + written, cbor_string_handle(item), length);
    152  return written + length;
    153  } else
    154  return 0;
    155  } else {
    156  assert(cbor_string_is_indefinite(item));
    157  size_t chunk_count = cbor_string_chunk_count(item);
    158  size_t written = cbor_encode_indef_string_start(buffer, buffer_size);
    159 
    160  if (written == 0)
    161  return 0;
    162 
    163  cbor_item_t **chunks = cbor_string_chunks_handle(item);
    164  for (size_t i = 0; i < chunk_count; i++) {
    165  size_t chunk_written = cbor_serialize_string(chunks[i], buffer + written, buffer_size - written);
    166  if (chunk_written == 0)
    167  return 0;
    168  else
    169  written += chunk_written;
    170  }
    171  if (cbor_encode_break(buffer + written, buffer_size - written) > 0)
    172  return written + 1;
    173  else
    174  return 0;
    175  }
    176 }
    177 
    178 size_t cbor_serialize_array(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size)
    179 {
    180  assert(cbor_isa_array(item));
    181  size_t size = cbor_array_size(item),
    182  written = 0;
    183  cbor_item_t **handle = cbor_array_handle(item);
    184  if (cbor_array_is_definite(item)) {
    185  written = cbor_encode_array_start(size, buffer, buffer_size);
    186  } else {
    187  assert(cbor_array_is_indefinite(item));
    188  written = cbor_encode_indef_array_start(buffer, buffer_size);
    189  }
    190  if (written == 0)
    191  return 0;
    192 
    193  size_t item_written;
    194  for (size_t i = 0; i < size; i++) {
    195  item_written = cbor_serialize(*(handle++), buffer + written, buffer_size - written);
    196  if (item_written == 0)
    197  return 0;
    198  else
    199  written += item_written;
    200  }
    201 
    202  if (cbor_array_is_definite(item)) {
    203  return written;
    204  } else {
    205  assert(cbor_array_is_indefinite(item));
    206  item_written = cbor_encode_break(buffer + written, buffer_size - written);
    207  if (item_written == 0)
    208  return 0;
    209  else
    210  return written + 1;
    211  }
    212 }
    213 
    214 size_t cbor_serialize_map(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size)
    215 {
    216  assert(cbor_isa_map(item));
    217  size_t size = cbor_map_size(item),
    218  written = 0;
    219  struct cbor_pair * handle = cbor_map_handle(item);
    220 
    221  if (cbor_map_is_definite(item)) {
    222  written = cbor_encode_map_start(size, buffer, buffer_size);
    223  } else {
    224  assert(cbor_map_is_indefinite(item));
    225  written = cbor_encode_indef_map_start(buffer, buffer_size);
    226  }
    227  if (written == 0)
    228  return 0;
    229 
    230  size_t item_written;
    231  for (size_t i = 0; i < size; i++) {
    232  item_written = cbor_serialize(handle->key, buffer + written, buffer_size - written);
    233  if (item_written == 0)
    234  return 0;
    235  else
    236  written += item_written;
    237  item_written = cbor_serialize((handle++)->value, buffer + written, buffer_size - written);
    238  if (item_written == 0)
    239  return 0;
    240  else
    241  written += item_written;
    242  }
    243 
    244  if (cbor_map_is_definite(item)) {
    245  return written;
    246  } else {
    247  assert(cbor_map_is_indefinite(item));
    248  item_written = cbor_encode_break(buffer + written, buffer_size - written);
    249  if (item_written == 0)
    250  return 0;
    251  else
    252  return written + 1;
    253  }
    254 }
    255 
    256 size_t cbor_serialize_tag(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size)
    257 {
    258  assert(cbor_isa_tag(item));
    259  size_t written = cbor_encode_tag(cbor_tag_value(item), buffer, buffer_size);
    260  if (written == 0)
    261  return 0;
    262 
    263  size_t item_written = cbor_serialize(cbor_tag_item(item), buffer + written, buffer_size - written);
    264  if (item_written == 0)
    265  return 0;
    266  else
    267  return written + item_written;
    268 }
    269 
    270 size_t cbor_serialize_float_ctrl(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size)
    271 {
    272  assert(cbor_isa_float_ctrl(item));
    273  switch (cbor_float_get_width(item)) {
    274  case CBOR_FLOAT_0:
    275  /* CTRL - special treatment */
    276  return cbor_encode_ctrl(cbor_ctrl_value(item), buffer, buffer_size);
    277  case CBOR_FLOAT_16:
    278  return cbor_encode_half(cbor_float_get_float2(item), buffer, buffer_size);
    279  case CBOR_FLOAT_32:
    280  return cbor_encode_single(cbor_float_get_float4(item), buffer, buffer_size);
    281  case CBOR_FLOAT_64:
    282  return cbor_encode_double(cbor_float_get_float8(item), buffer, buffer_size);
    283  }
    284 
    285  /* Should never happen - make the compiler happy */
    286  return 0;
    287 }
    size_t cbor_encode_map_start(size_t length, unsigned char *buffer, size_t buffer_size)
    Definition: encoding.c:101
    +
    size_t cbor_encode_break(unsigned char *buffer, size_t buffer_size)
    Definition: encoding.c:178
    + +
    bool cbor_bytestring_is_definite(const cbor_item_t *item)
    Is the byte string definite?
    Definition: bytestrings.c:24
    +
    6 - tags
    Definition: data.h:31
    +
    3 - strings
    Definition: data.h:28
    +
    size_t cbor_serialize_uint(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size)
    Serialize an uint.
    Definition: serialization.c:76
    +
    size_t cbor_encode_half(float value, unsigned char *buffer, size_t buffer_size)
    Encodes a half-precision float.
    Definition: encoding.c:131
    + +
    cbor_int_width cbor_int_get_width(const cbor_item_t *item)
    Queries the integer width.
    Definition: ints.c:10
    +
    2 - byte strings
    Definition: data.h:27
    +
    Internal use - ctrl and special values.
    Definition: data.h:55
    +
    size_t cbor_serialize_map(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size)
    Serialize a map.
    +
    unsigned char * cbor_string_handle(const cbor_item_t *item)
    Get the handle to the underlying string.
    Definition: strings.c:112
    +
    size_t cbor_encode_indef_array_start(unsigned char *buffer, size_t buffer_size)
    Definition: encoding.c:96
    +
    size_t cbor_serialize_bytestring(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size)
    Serialize a bytestring.
    +
    bool cbor_isa_negint(const cbor_item_t *item)
    Does the item have the appropriate major type?
    Definition: common.c:23
    +
    cbor_item_t * value
    Definition: data.h:180
    +
    size_t cbor_encode_string_start(size_t length, unsigned char *buffer, size_t buffer_size)
    Definition: encoding.c:81
    +
    bool cbor_isa_string(const cbor_item_t *item)
    Does the item have the appropriate major type?
    Definition: common.c:33
    +
    size_t cbor_encode_negint32(uint32_t value, unsigned char *buffer, size_t buffer_size)
    Definition: encoding.c:47
    + +
    size_t cbor_bytestring_chunk_count(const cbor_item_t *item)
    Get the number of chunks this string consist of.
    Definition: bytestrings.c:87
    +
    cbor_item_t ** cbor_string_chunks_handle(const cbor_item_t *item)
    Get the handle to the array of chunks.
    Definition: strings.c:67
    +
    size_t cbor_serialize_alloc(const cbor_item_t *item, unsigned char **buffer, size_t *buffer_size)
    Serialize the given item, allocating buffers as needed.
    Definition: serialization.c:44
    +
    bool cbor_isa_bytestring(const cbor_item_t *item)
    Does the item have the appropriate major type?
    Definition: common.c:28
    +
    size_t cbor_encode_ctrl(uint8_t value, unsigned char *buffer, size_t buffer_size)
    Definition: encoding.c:183
    +
    size_t cbor_map_size(const cbor_item_t *item)
    Get the number of pairs.
    Definition: maps.c:11
    +
    cbor_item_t ** cbor_bytestring_chunks_handle(const cbor_item_t *item)
    Get the handle to the array of chunks.
    Definition: bytestrings.c:80
    +
    bool cbor_bytestring_is_indefinite(const cbor_item_t *item)
    Is the byte string indefinite?
    Definition: bytestrings.c:30
    + +
    4 - arrays
    Definition: data.h:29
    +
    cbor_item_t * cbor_tag_item(const cbor_item_t *item)
    Get the tagged item.
    Definition: tags.c:22
    +
    cbor_item_t * key
    Definition: data.h:180
    +
    size_t cbor_encode_negint8(uint8_t value, unsigned char *buffer, size_t buffer_size)
    Definition: encoding.c:37
    +
    size_t cbor_serialize_string(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size)
    Serialize a string.
    + +
    size_t cbor_encode_uint64(uint64_t value, unsigned char *buffer, size_t buffer_size)
    Definition: encoding.c:26
    +
    7 - decimals and special values (true, false, nil, ...)
    Definition: data.h:32
    +
    uint32_t cbor_get_uint32(const cbor_item_t *item)
    Extracts the integer value.
    Definition: ints.c:30
    +
    #define _CBOR_FREE
    Definition: common.h:86
    +
    #define _CBOR_MALLOC
    Definition: common.h:84
    +
    bool cbor_map_is_indefinite(const cbor_item_t *item)
    Is this map indefinite?
    Definition: maps.c:132
    +
    Simple pair of items for use in maps.
    Definition: data.h:179
    + + +
    bool cbor_array_is_definite(const cbor_item_t *item)
    Is the array definite?
    Definition: arrays.c:88
    +
    Double.
    Definition: data.h:58
    + +
    uint16_t cbor_get_uint16(const cbor_item_t *item)
    Extracts the integer value.
    Definition: ints.c:23
    +
    Half float.
    Definition: data.h:56
    +
    size_t cbor_encode_single(float value, unsigned char *buffer, size_t buffer_size)
    Definition: encoding.c:167
    +
    size_t cbor_encode_indef_map_start(unsigned char *buffer, size_t buffer_size)
    Definition: encoding.c:106
    +
    size_t cbor_serialize_tag(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size)
    Serialize a tag.
    +
    size_t cbor_encode_double(double value, unsigned char *buffer, size_t buffer_size)
    Definition: encoding.c:173
    +
    size_t cbor_string_chunk_count(const cbor_item_t *item)
    Get the number of chunks this string consist of.
    Definition: strings.c:74
    + +
    size_t cbor_serialize_float_ctrl(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size)
    Serialize a.
    +
    size_t cbor_serialize_array(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size)
    Serialize an array.
    +
    size_t cbor_array_size(const cbor_item_t *item)
    Get the number of members.
    Definition: arrays.c:12
    +
    0 - positive integers
    Definition: data.h:25
    +
    size_t cbor_encode_array_start(size_t length, unsigned char *buffer, size_t buffer_size)
    Definition: encoding.c:91
    +
    size_t cbor_encode_uint8(uint8_t value, unsigned char *buffer, size_t buffer_size)
    Definition: encoding.c:11
    +
    size_t cbor_encode_uint16(uint16_t value, unsigned char *buffer, size_t buffer_size)
    Definition: encoding.c:16
    +
    uint8_t cbor_get_uint8(const cbor_item_t *item)
    Extracts the integer value.
    Definition: ints.c:16
    +
    float cbor_float_get_float4(const cbor_item_t *item)
    Get a single precision float.
    Definition: floats_ctrls.c:38
    +
    uint64_t cbor_get_uint64(const cbor_item_t *item)
    Extracts the integer value.
    Definition: ints.c:37
    +
    uint8_t cbor_ctrl_value(const cbor_item_t *item)
    Reads the control value.
    Definition: floats_ctrls.c:18
    +
    uint64_t cbor_tag_value(const cbor_item_t *item)
    Get tag value.
    Definition: tags.c:28
    +
    cbor_float_width cbor_float_get_width(const cbor_item_t *item)
    Get the float width.
    Definition: floats_ctrls.c:12
    +
    bool cbor_isa_float_ctrl(const cbor_item_t *item)
    Does the item have the appropriate major type?
    Definition: common.c:53
    +
    bool cbor_isa_array(const cbor_item_t *item)
    Does the item have the appropriate major type?
    Definition: common.c:38
    + +
    bool cbor_isa_map(const cbor_item_t *item)
    Does the item have the appropriate major type?
    Definition: common.c:43
    +
    bool cbor_map_is_definite(const cbor_item_t *item)
    Is this map definite?
    Definition: maps.c:126
    +
    float cbor_float_get_float2(const cbor_item_t *item)
    Get a half precision float.
    Definition: floats_ctrls.c:31
    +
    bool cbor_isa_uint(const cbor_item_t *item)
    Does the item have the appropriate major type?
    Definition: common.c:18
    +
    double cbor_float_get_float8(const cbor_item_t *item)
    Get a double precision float.
    Definition: floats_ctrls.c:45
    +
    bool cbor_isa_tag(const cbor_item_t *item)
    Does the item have the appropriate major type?
    Definition: common.c:48
    + +
    size_t cbor_encode_negint64(uint64_t value, unsigned char *buffer, size_t buffer_size)
    Definition: encoding.c:52
    +
    size_t cbor_encode_uint32(uint32_t value, unsigned char *buffer, size_t buffer_size)
    Definition: encoding.c:21
    + +
    cbor_type cbor_typeof(const cbor_item_t *item)
    Get the type of the item.
    Definition: common.c:59
    + +
    bool cbor_string_is_definite(const cbor_item_t *item)
    Is the string definite?
    Definition: strings.c:124
    +
    unsigned char * cbor_bytestring_handle(const cbor_item_t *item)
    Get the handle to the binary data.
    Definition: bytestrings.c:18
    +
    #define _CBOR_REALLOC
    Definition: common.h:85
    +
    size_t cbor_encode_indef_string_start(unsigned char *buffer, size_t buffer_size)
    Definition: encoding.c:86
    +
    size_t cbor_serialize(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size)
    Serialize the given item.
    Definition: serialization.c:20
    + +
    size_t cbor_string_length(const cbor_item_t *item)
    Returns the length of the underlying string.
    Definition: strings.c:106
    +
    size_t cbor_encode_bytestring_start(size_t length, unsigned char *buffer, size_t buffer_size)
    Definition: encoding.c:62
    +
    bool _cbor_safe_to_multiply(size_t a, size_t b)
    Can a and b be multiplied without overflowing size_t?
    Definition: memory_utils.c:25
    +
    size_t cbor_encode_indef_bytestring_start(unsigned char *buffer, size_t buffer_size)
    Definition: encoding.c:76
    +
    The item handle.
    Definition: data.h:149
    +
    size_t cbor_encode_negint16(uint16_t value, unsigned char *buffer, size_t buffer_size)
    Definition: encoding.c:42
    +
    1 - negative integers
    Definition: data.h:26
    +
    struct cbor_pair * cbor_map_handle(const cbor_item_t *item)
    Get the pairs storage.
    Definition: maps.c:137
    +
    bool cbor_array_is_indefinite(const cbor_item_t *item)
    Is the array indefinite?
    Definition: arrays.c:94
    +
    size_t cbor_bytestring_length(const cbor_item_t *item)
    Returns the length of the binary data.
    Definition: bytestrings.c:12
    +
    size_t cbor_encode_tag(uint64_t value, unsigned char *buffer, size_t buffer_size)
    Definition: encoding.c:111
    +
    size_t cbor_serialize_negint(const cbor_item_t *item, unsigned char *buffer, size_t buffer_size)
    Serialize a negint.
    Definition: serialization.c:93
    +
    cbor_item_t ** cbor_array_handle(const cbor_item_t *item)
    Get the array contents.
    Definition: arrays.c:100
    +
    5 - maps
    Definition: data.h:30
    +
    Single float.
    Definition: data.h:57
    +
    bool cbor_string_is_indefinite(const cbor_item_t *item)
    Is the string indefinite?
    Definition: strings.c:130
    +
    + + + + diff --git a/docs/doxygen/serialization_8h.html b/docs/doxygen/serialization_8h.html new file mode 100644 index 00000000..18008366 --- /dev/null +++ b/docs/doxygen/serialization_8h.html @@ -0,0 +1,592 @@ + + + + + + + +libcbor: src/cbor/serialization.h File Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    serialization.h File Reference
    +
    +
    +
    #include "cbor/common.h"
    +
    +

    Go to the source code of this file.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    size_t cbor_serialize (const cbor_item_t *item, cbor_mutable_data buffer, size_t buffer_size)
     Serialize the given item. More...
     
    size_t cbor_serialize_alloc (const cbor_item_t *item, cbor_mutable_data *buffer, size_t *buffer_size)
     Serialize the given item, allocating buffers as needed. More...
     
    size_t cbor_serialize_uint (const cbor_item_t *, cbor_mutable_data, size_t)
     Serialize an uint. More...
     
    size_t cbor_serialize_negint (const cbor_item_t *, cbor_mutable_data, size_t)
     Serialize a negint. More...
     
    size_t cbor_serialize_bytestring (const cbor_item_t *, cbor_mutable_data, size_t)
     Serialize a bytestring. More...
     
    size_t cbor_serialize_string (const cbor_item_t *, cbor_mutable_data, size_t)
     Serialize a string. More...
     
    size_t cbor_serialize_array (const cbor_item_t *, cbor_mutable_data, size_t)
     Serialize an array. More...
     
    size_t cbor_serialize_map (const cbor_item_t *, cbor_mutable_data, size_t)
     Serialize a map. More...
     
    size_t cbor_serialize_tag (const cbor_item_t *, cbor_mutable_data, size_t)
     Serialize a tag. More...
     
    size_t cbor_serialize_float_ctrl (const cbor_item_t *, cbor_mutable_data, size_t)
     Serialize a. More...
     
    +

    Function Documentation

    + +

    § cbor_serialize()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    size_t cbor_serialize (const cbor_item_titem,
    cbor_mutable_data buffer,
    size_t buffer_size 
    )
    +
    + +

    Serialize the given item.

    +
    Parameters
    + + + + +
    item[borrow]A data item
    bufferBuffer to serialize to
    buffer_sizeSize of the buffer
    +
    +
    +
    Returns
    Length of the result. 0 on failure.
    + +

    Definition at line 20 of file serialization.c.

    + +
    +
    + +

    § cbor_serialize_alloc()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    size_t cbor_serialize_alloc (const cbor_item_titem,
    cbor_mutable_databuffer,
    size_t * buffer_size 
    )
    +
    + +

    Serialize the given item, allocating buffers as needed.

    +
    embed:rst:leading-asterisk
    +* .. warning:: It is your responsibility to free the buffer using an appropriate ``free`` implementation.
    +* 
    Parameters
    + + + + +
    item[borrow]A data item
    buffer[out]Buffer containing the result
    buffer_size[out]Size of the buffer
    +
    +
    +
    Returns
    Length of the result. 0 on failure, in which case buffer is NULL.
    + +

    Definition at line 44 of file serialization.c.

    + +
    +
    + +

    § cbor_serialize_array()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    size_t cbor_serialize_array (const cbor_item_t,
    cbor_mutable_data ,
    size_t  
    )
    +
    + +

    Serialize an array.

    +
    Parameters
    + + + + +
    item[borrow]An array
    bufferBuffer to serialize to
    buffer_sizeSize of the buffer
    +
    +
    +
    Returns
    Length of the result. 0 on failure.
    + +

    Definition at line 178 of file serialization.c.

    + +
    +
    + +

    § cbor_serialize_bytestring()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    size_t cbor_serialize_bytestring (const cbor_item_t,
    cbor_mutable_data ,
    size_t  
    )
    +
    + +

    Serialize a bytestring.

    +
    Parameters
    + + + + +
    item[borrow]A bytestring
    bufferBuffer to serialize to
    buffer_sizeSize of the buffer
    +
    +
    +
    Returns
    Length of the result. 0 on failure.
    + +

    Definition at line 110 of file serialization.c.

    + +
    +
    + +

    § cbor_serialize_float_ctrl()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    size_t cbor_serialize_float_ctrl (const cbor_item_t,
    cbor_mutable_data ,
    size_t  
    )
    +
    + +

    Serialize a.

    +
    Parameters
    + + + + +
    item[borrow]A float or ctrl
    bufferBuffer to serialize to
    buffer_sizeSize of the buffer
    +
    +
    +
    Returns
    Length of the result. 0 on failure.
    + +

    Definition at line 270 of file serialization.c.

    + +
    +
    + +

    § cbor_serialize_map()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    size_t cbor_serialize_map (const cbor_item_t,
    cbor_mutable_data ,
    size_t  
    )
    +
    + +

    Serialize a map.

    +
    Parameters
    + + + + +
    item[borrow]A map
    bufferBuffer to serialize to
    buffer_sizeSize of the buffer
    +
    +
    +
    Returns
    Length of the result. 0 on failure.
    + +

    Definition at line 214 of file serialization.c.

    + +
    +
    + +

    § cbor_serialize_negint()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    size_t cbor_serialize_negint (const cbor_item_t,
    cbor_mutable_data ,
    size_t  
    )
    +
    + +

    Serialize a negint.

    +
    Parameters
    + + + + +
    item[borrow]A neging
    bufferBuffer to serialize to
    buffer_sizeSize of the buffer
    +
    +
    +
    Returns
    Length of the result. 0 on failure.
    + +

    Definition at line 93 of file serialization.c.

    + +
    +
    + +

    § cbor_serialize_string()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    size_t cbor_serialize_string (const cbor_item_t,
    cbor_mutable_data ,
    size_t  
    )
    +
    + +

    Serialize a string.

    +
    Parameters
    + + + + +
    item[borrow]A string
    bufferBuffer to serialize to
    buffer_sizeSize of the buffer
    +
    +
    +
    Returns
    Length of the result. 0 on failure.
    + +

    Definition at line 144 of file serialization.c.

    + +
    +
    + +

    § cbor_serialize_tag()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    size_t cbor_serialize_tag (const cbor_item_t,
    cbor_mutable_data ,
    size_t  
    )
    +
    + +

    Serialize a tag.

    +
    Parameters
    + + + + +
    item[borrow]A tag
    bufferBuffer to serialize to
    buffer_sizeSize of the buffer
    +
    +
    +
    Returns
    Length of the result. 0 on failure.
    + +

    Definition at line 256 of file serialization.c.

    + +
    +
    + +

    § cbor_serialize_uint()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    size_t cbor_serialize_uint (const cbor_item_t,
    cbor_mutable_data ,
    size_t  
    )
    +
    + +

    Serialize an uint.

    +
    Parameters
    + + + + +
    item[borrow]A uint
    bufferBuffer to serialize to
    buffer_sizeSize of the buffer
    +
    +
    +
    Returns
    Length of the result. 0 on failure.
    + +

    Definition at line 76 of file serialization.c.

    + +
    +
    +
    + + + + diff --git a/docs/doxygen/serialization_8h_source.html b/docs/doxygen/serialization_8h_source.html new file mode 100644 index 00000000..cb77c3b2 --- /dev/null +++ b/docs/doxygen/serialization_8h_source.html @@ -0,0 +1,93 @@ + + + + + + + +libcbor: src/cbor/serialization.h Source File + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    serialization.h
    +
    +
    +Go to the documentation of this file.
    1 /*
    2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
    3  *
    4  * libcbor is free software; you can redistribute it and/or modify
    5  * it under the terms of the MIT license. See LICENSE for details.
    6  */
    7 
    8 #ifndef LIBCBOR_SERIALIZATION_H
    9 #define LIBCBOR_SERIALIZATION_H
    10 
    11 #include "cbor/common.h"
    12 
    13 #ifdef __cplusplus
    14 extern "C" {
    15 #endif
    16 
    17 
    18 /*
    19 * ============================================================================
    20 * High level encoding
    21 * ============================================================================
    22 */
    23 
    31 size_t cbor_serialize(const cbor_item_t * item, cbor_mutable_data buffer, size_t buffer_size);
    32 
    44 size_t cbor_serialize_alloc(const cbor_item_t * item, cbor_mutable_data * buffer, size_t * buffer_size);
    45 
    53 size_t cbor_serialize_uint(const cbor_item_t *, cbor_mutable_data, size_t);
    54 
    62 size_t cbor_serialize_negint(const cbor_item_t *, cbor_mutable_data, size_t);
    63 
    72 
    80 size_t cbor_serialize_string(const cbor_item_t *, cbor_mutable_data, size_t);
    81 
    89 size_t cbor_serialize_array(const cbor_item_t *, cbor_mutable_data, size_t);
    90 
    98 size_t cbor_serialize_map(const cbor_item_t *, cbor_mutable_data, size_t);
    99 
    107 size_t cbor_serialize_tag(const cbor_item_t *, cbor_mutable_data, size_t);
    108 
    117 
    118 #ifdef __cplusplus
    119 }
    120 #endif
    121 
    122 
    123 #endif //LIBCBOR_SERIALIZATION_H
    size_t cbor_serialize_map(const cbor_item_t *, cbor_mutable_data, size_t)
    Serialize a map.
    +
    size_t cbor_serialize_array(const cbor_item_t *, cbor_mutable_data, size_t)
    Serialize an array.
    +
    size_t cbor_serialize_negint(const cbor_item_t *, cbor_mutable_data, size_t)
    Serialize a negint.
    Definition: serialization.c:93
    +
    size_t cbor_serialize_uint(const cbor_item_t *, cbor_mutable_data, size_t)
    Serialize an uint.
    Definition: serialization.c:76
    +
    unsigned char * cbor_mutable_data
    Definition: data.h:21
    +
    size_t cbor_serialize_bytestring(const cbor_item_t *, cbor_mutable_data, size_t)
    Serialize a bytestring.
    +
    size_t cbor_serialize_alloc(const cbor_item_t *item, cbor_mutable_data *buffer, size_t *buffer_size)
    Serialize the given item, allocating buffers as needed.
    Definition: serialization.c:44
    +
    size_t cbor_serialize_float_ctrl(const cbor_item_t *, cbor_mutable_data, size_t)
    Serialize a.
    + +
    size_t cbor_serialize_string(const cbor_item_t *, cbor_mutable_data, size_t)
    Serialize a string.
    +
    The item handle.
    Definition: data.h:149
    +
    size_t cbor_serialize(const cbor_item_t *item, cbor_mutable_data buffer, size_t buffer_size)
    Serialize the given item.
    Definition: serialization.c:20
    +
    size_t cbor_serialize_tag(const cbor_item_t *, cbor_mutable_data, size_t)
    Serialize a tag.
    +
    + + + + diff --git a/docs/doxygen/splitbar.png b/docs/doxygen/splitbar.png new file mode 100644 index 00000000..fe895f2c Binary files /dev/null and b/docs/doxygen/splitbar.png differ diff --git a/docs/doxygen/stack_8c.html b/docs/doxygen/stack_8c.html new file mode 100644 index 00000000..526fbd2b --- /dev/null +++ b/docs/doxygen/stack_8c.html @@ -0,0 +1,171 @@ + + + + + + + +libcbor: src/cbor/internal/stack.c File Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    stack.c File Reference
    +
    +
    +
    #include "stack.h"
    +
    +

    Go to the source code of this file.

    + + + + + + + + +

    +Functions

    struct _cbor_stack _cbor_stack_init ()
     
    void _cbor_stack_pop (struct _cbor_stack *stack)
     
    struct _cbor_stack_record_cbor_stack_push (struct _cbor_stack *stack, cbor_item_t *item, size_t subitems)
     
    +

    Function Documentation

    + +

    § _cbor_stack_init()

    + +
    +
    + + + + + + + +
    struct _cbor_stack _cbor_stack_init ()
    +
    + +

    Definition at line 10 of file stack.c.

    + +
    +
    + +

    § _cbor_stack_pop()

    + +
    +
    + + + + + + + + +
    void _cbor_stack_pop (struct _cbor_stackstack)
    +
    + +

    Definition at line 15 of file stack.c.

    + +
    +
    + +

    § _cbor_stack_push()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    struct _cbor_stack_record* _cbor_stack_push (struct _cbor_stackstack,
    cbor_item_titem,
    size_t subitems 
    )
    +
    + +

    Definition at line 23 of file stack.c.

    + +
    +
    +
    + + + + diff --git a/docs/doxygen/stack_8c_source.html b/docs/doxygen/stack_8c_source.html new file mode 100644 index 00000000..9fc6d9f8 --- /dev/null +++ b/docs/doxygen/stack_8c_source.html @@ -0,0 +1,94 @@ + + + + + + + +libcbor: src/cbor/internal/stack.c Source File + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    stack.c
    +
    +
    +Go to the documentation of this file.
    1 /*
    2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
    3  *
    4  * libcbor is free software; you can redistribute it and/or modify
    5  * it under the terms of the MIT license. See LICENSE for details.
    6  */
    7 
    8 #include "stack.h"
    9 
    11 {
    12  return (struct _cbor_stack) {.top = NULL, .size = 0};
    13 }
    14 
    15 void _cbor_stack_pop(struct _cbor_stack *stack)
    16 {
    17  struct _cbor_stack_record *top = stack->top;
    18  stack->top = stack->top->lower;
    19  _CBOR_FREE(top);
    20  stack->size--;
    21 }
    22 
    24 {
    25  struct _cbor_stack_record *new_top = _CBOR_MALLOC(sizeof(struct _cbor_stack_record));
    26  if (new_top == NULL)
    27  return NULL;
    28 
    29  *new_top = (struct _cbor_stack_record) {stack->top, item, subitems};
    30  stack->top = new_top;
    31  stack->size++;
    32  return new_top;
    33 }
    size_t size
    Definition: stack.h:27
    +
    size_t subitems
    Definition: stack.h:21
    +
    Stack handle - contents and size.
    Definition: stack.h:25
    +
    struct _cbor_stack_record * lower
    Definition: stack.h:19
    +
    struct _cbor_stack _cbor_stack_init()
    Definition: stack.c:10
    +
    Simple stack record for the parser.
    Definition: stack.h:18
    +
    #define _CBOR_FREE
    Definition: common.h:86
    +
    #define _CBOR_MALLOC
    Definition: common.h:84
    +
    void _cbor_stack_pop(struct _cbor_stack *stack)
    Definition: stack.c:15
    +
    struct _cbor_stack_record * _cbor_stack_push(struct _cbor_stack *stack, cbor_item_t *item, size_t subitems)
    Definition: stack.c:23
    +
    cbor_item_t * item
    Definition: stack.h:20
    +
    The item handle.
    Definition: data.h:149
    + +
    struct _cbor_stack_record * top
    Definition: stack.h:26
    +
    + + + + diff --git a/docs/doxygen/stack_8h.html b/docs/doxygen/stack_8h.html new file mode 100644 index 00000000..5f0f82e6 --- /dev/null +++ b/docs/doxygen/stack_8h.html @@ -0,0 +1,181 @@ + + + + + + + +libcbor: src/cbor/internal/stack.h File Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    stack.h File Reference
    +
    +
    +
    #include "cbor/common.h"
    +
    +

    Go to the source code of this file.

    + + + + + + + + +

    +Data Structures

    struct  _cbor_stack_record
     Simple stack record for the parser. More...
     
    struct  _cbor_stack
     Stack handle - contents and size. More...
     
    + + + + + + + +

    +Functions

    struct _cbor_stack _cbor_stack_init ()
     
    void _cbor_stack_pop (struct _cbor_stack *)
     
    struct _cbor_stack_record_cbor_stack_push (struct _cbor_stack *, cbor_item_t *, size_t)
     
    +

    Function Documentation

    + +

    § _cbor_stack_init()

    + +
    +
    + + + + + + + +
    struct _cbor_stack _cbor_stack_init ()
    +
    + +

    Definition at line 10 of file stack.c.

    + +
    +
    + +

    § _cbor_stack_pop()

    + +
    +
    + + + + + + + + +
    void _cbor_stack_pop (struct _cbor_stack)
    +
    + +

    Definition at line 15 of file stack.c.

    + +
    +
    + +

    § _cbor_stack_push()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    struct _cbor_stack_record* _cbor_stack_push (struct _cbor_stack,
    cbor_item_t,
    size_t  
    )
    +
    + +

    Definition at line 23 of file stack.c.

    + +
    +
    +
    + + + + diff --git a/docs/doxygen/stack_8h_source.html b/docs/doxygen/stack_8h_source.html new file mode 100644 index 00000000..cc5eef8e --- /dev/null +++ b/docs/doxygen/stack_8h_source.html @@ -0,0 +1,92 @@ + + + + + + + +libcbor: src/cbor/internal/stack.h Source File + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    stack.h
    +
    +
    +Go to the documentation of this file.
    1 /*
    2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
    3  *
    4  * libcbor is free software; you can redistribute it and/or modify
    5  * it under the terms of the MIT license. See LICENSE for details.
    6  */
    7 
    8 #ifndef LIBCBOR_STACK_H
    9 #define LIBCBOR_STACK_H
    10 
    11 #include "cbor/common.h"
    12 
    13 #ifdef __cplusplus
    14 extern "C" {
    15 #endif
    16 
    21  size_t subitems;
    22 };
    23 
    25 struct _cbor_stack {
    27  size_t size;
    28 };
    29 
    31 
    32 void _cbor_stack_pop(struct _cbor_stack *);
    33 
    34 struct _cbor_stack_record *_cbor_stack_push(struct _cbor_stack *, cbor_item_t *, size_t);
    35 
    36 #ifdef __cplusplus
    37 }
    38 #endif
    39 
    40 #endif //LIBCBOR_STACK_H
    size_t size
    Definition: stack.h:27
    +
    size_t subitems
    Definition: stack.h:21
    +
    Stack handle - contents and size.
    Definition: stack.h:25
    +
    struct _cbor_stack_record * lower
    Definition: stack.h:19
    +
    struct _cbor_stack _cbor_stack_init()
    Definition: stack.c:10
    +
    Simple stack record for the parser.
    Definition: stack.h:18
    +
    struct _cbor_stack_record * _cbor_stack_push(struct _cbor_stack *, cbor_item_t *, size_t)
    Definition: stack.c:23
    +
    void _cbor_stack_pop(struct _cbor_stack *)
    Definition: stack.c:15
    + +
    cbor_item_t * item
    Definition: stack.h:20
    +
    The item handle.
    Definition: data.h:149
    +
    struct _cbor_stack_record * top
    Definition: stack.h:26
    +
    + + + + diff --git a/docs/doxygen/streaming_8c.html b/docs/doxygen/streaming_8c.html new file mode 100644 index 00000000..d217fb04 --- /dev/null +++ b/docs/doxygen/streaming_8c.html @@ -0,0 +1,148 @@ + + + + + + + +libcbor: src/cbor/streaming.c File Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    streaming.c File Reference
    +
    +
    +
    #include "streaming.h"
    +#include "internal/loaders.h"
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Functions

    struct cbor_decoder_result cbor_stream_decode (cbor_data source, size_t source_size, const struct cbor_callbacks *callbacks, void *context)
     Stateless decoder. More...
     
    +

    Function Documentation

    + +

    § cbor_stream_decode()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    struct cbor_decoder_result cbor_stream_decode (cbor_data buffer,
    size_t buffer_size,
    const struct cbor_callbackscallbacks,
    void * context 
    )
    +
    + +

    Stateless decoder.

    +

    Will try parsing the buffer and will invoke the appropriate callback on success. Decodes one item at a time. No memory allocations occur.

    +
    Parameters
    + + + + + +
    bufferInput buffer
    buffer_sizeLength of the buffer
    callbacksThe callback bundle
    contextAn arbitrary pointer to allow for maintaining context.
    +
    +
    + +

    Definition at line 26 of file streaming.c.

    + +
    +
    +
    + + + + diff --git a/docs/doxygen/streaming_8c_source.html b/docs/doxygen/streaming_8c_source.html new file mode 100644 index 00000000..f672dc94 --- /dev/null +++ b/docs/doxygen/streaming_8c_source.html @@ -0,0 +1,99 @@ + + + + + + + +libcbor: src/cbor/streaming.c Source File + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    streaming.c
    +
    +
    +Go to the documentation of this file.
    1 /*
    2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
    3  *
    4  * libcbor is free software; you can redistribute it and/or modify
    5  * it under the terms of the MIT license. See LICENSE for details.
    6  */
    7 
    8 #include "streaming.h"
    9 #include "internal/loaders.h"
    10 
    11 bool static _cbor_claim_bytes(size_t required,
    12  size_t provided, struct cbor_decoder_result *result)
    13 {
    14  if (required > (provided - result->read)) {
    15  /* We need to keep all the metadata if parsing is to be resumed */
    16  result->read = 0;
    17  result->status = CBOR_DECODER_NEDATA;
    18  return false;
    19  } else {
    20  result->read += required;
    21  return true;
    22  }
    23 }
    24 
    25 
    26 struct cbor_decoder_result cbor_stream_decode(cbor_data source, size_t source_size,
    27  const struct cbor_callbacks *callbacks,
    28  void *context)
    29 {
    30  /* If we have no data, we cannot read even the MTB */
    31  if (source_size < 1) {
    32  return (struct cbor_decoder_result) {0, CBOR_DECODER_EBUFFER};
    33  }
    34 
    35  /* If we have a byte, assume it's the MTB */
    36  struct cbor_decoder_result result = {1, CBOR_DECODER_FINISHED};
    37 
    38  switch (*source) {
    39  case 0x00: /* Fallthrough */
    40  case 0x01: /* Fallthrough */
    41  case 0x02: /* Fallthrough */
    42  case 0x03: /* Fallthrough */
    43  case 0x04: /* Fallthrough */
    44  case 0x05: /* Fallthrough */
    45  case 0x06: /* Fallthrough */
    46  case 0x07: /* Fallthrough */
    47  case 0x08: /* Fallthrough */
    48  case 0x09: /* Fallthrough */
    49  case 0x0A: /* Fallthrough */
    50  case 0x0B: /* Fallthrough */
    51  case 0x0C: /* Fallthrough */
    52  case 0x0D: /* Fallthrough */
    53  case 0x0E: /* Fallthrough */
    54  case 0x0F: /* Fallthrough */
    55  case 0x10: /* Fallthrough */
    56  case 0x11: /* Fallthrough */
    57  case 0x12: /* Fallthrough */
    58  case 0x13: /* Fallthrough */
    59  case 0x14: /* Fallthrough */
    60  case 0x15: /* Fallthrough */
    61  case 0x16: /* Fallthrough */
    62  case 0x17:
    63  /* Embedded one byte unsigned integer */
    64  {
    65  callbacks->uint8(context, _cbor_load_uint8(source));
    66  return result;
    67  }
    68  case 0x18:
    69  /* One byte unsigned integer */
    70  {
    71  if (_cbor_claim_bytes(1, source_size, &result)) {
    72  callbacks->uint8(context, _cbor_load_uint8(source + 1));
    73  }
    74  return result;
    75  }
    76  case 0x19:
    77  /* Two bytes unsigned integer */
    78  {
    79  if (_cbor_claim_bytes(2, source_size, &result)) {
    80  callbacks->uint16(context, _cbor_load_uint16(source + 1));
    81  }
    82  return result;
    83  }
    84  case 0x1A:
    85  /* Four bytes unsigned integer */
    86  {
    87  if (_cbor_claim_bytes(4, source_size, &result)) {
    88  callbacks->uint32(context, _cbor_load_uint32(source + 1));
    89  }
    90  return result;
    91  }
    92  case 0x1B:
    93  /* Eight bytes unsigned integer */
    94  {
    95  if (_cbor_claim_bytes(8, source_size, &result)) {
    96  callbacks->uint64(context, _cbor_load_uint64(source + 1));
    97  }
    98  return result;
    99  }
    100  case 0x1C: /* Fallthrough */
    101  case 0x1D: /* Fallthrough */
    102  case 0x1E: /* Fallthrough */
    103  case 0x1F:
    104  /* Reserved */
    105  {
    106  return (struct cbor_decoder_result) {0, CBOR_DECODER_ERROR};
    107  }
    108  case 0x20: /* Fallthrough */
    109  case 0x21: /* Fallthrough */
    110  case 0x22: /* Fallthrough */
    111  case 0x23: /* Fallthrough */
    112  case 0x24: /* Fallthrough */
    113  case 0x25: /* Fallthrough */
    114  case 0x26: /* Fallthrough */
    115  case 0x27: /* Fallthrough */
    116  case 0x28: /* Fallthrough */
    117  case 0x29: /* Fallthrough */
    118  case 0x2A: /* Fallthrough */
    119  case 0x2B: /* Fallthrough */
    120  case 0x2C: /* Fallthrough */
    121  case 0x2D: /* Fallthrough */
    122  case 0x2E: /* Fallthrough */
    123  case 0x2F: /* Fallthrough */
    124  case 0x30: /* Fallthrough */
    125  case 0x31: /* Fallthrough */
    126  case 0x32: /* Fallthrough */
    127  case 0x33: /* Fallthrough */
    128  case 0x34: /* Fallthrough */
    129  case 0x35: /* Fallthrough */
    130  case 0x36: /* Fallthrough */
    131  case 0x37:
    132  /* Embedded one byte negative integer */
    133  {
    134  callbacks->negint8(context, _cbor_load_uint8(source) - 0x20); /* 0x20 offset */
    135  return result;
    136  }
    137  case 0x38:
    138  /* One byte negative integer */
    139  {
    140  if (_cbor_claim_bytes(1, source_size, &result)) {
    141  callbacks->negint8(context, _cbor_load_uint8(source + 1));
    142  }
    143  return result;
    144  }
    145  case 0x39:
    146  /* Two bytes negative integer */
    147  {
    148  if (_cbor_claim_bytes(2, source_size, &result)) {
    149  callbacks->negint16(context, _cbor_load_uint16(source + 1));
    150  }
    151  return result;
    152  }
    153  case 0x3A:
    154  /* Four bytes negative integer */
    155  {
    156  if (_cbor_claim_bytes(4, source_size, &result)) {
    157  callbacks->negint32(context, _cbor_load_uint32(source + 1));
    158  }
    159  return result;
    160  }
    161  case 0x3B:
    162  /* Eight bytes negative integer */
    163  {
    164  if (_cbor_claim_bytes(8, source_size, &result)) {
    165  callbacks->negint64(context, _cbor_load_uint64(source + 1));
    166  }
    167  return result;
    168  }
    169  case 0x3C: /* Fallthrough */
    170  case 0x3D: /* Fallthrough */
    171  case 0x3E: /* Fallthrough */
    172  case 0x3F:
    173  /* Reserved */
    174  {
    175  return (struct cbor_decoder_result) {0, CBOR_DECODER_ERROR};
    176  }
    177  case 0x40: /* Fallthrough */
    178  case 0x41: /* Fallthrough */
    179  case 0x42: /* Fallthrough */
    180  case 0x43: /* Fallthrough */
    181  case 0x44: /* Fallthrough */
    182  case 0x45: /* Fallthrough */
    183  case 0x46: /* Fallthrough */
    184  case 0x47: /* Fallthrough */
    185  case 0x48: /* Fallthrough */
    186  case 0x49: /* Fallthrough */
    187  case 0x4A: /* Fallthrough */
    188  case 0x4B: /* Fallthrough */
    189  case 0x4C: /* Fallthrough */
    190  case 0x4D: /* Fallthrough */
    191  case 0x4E: /* Fallthrough */
    192  case 0x4F: /* Fallthrough */
    193  case 0x50: /* Fallthrough */
    194  case 0x51: /* Fallthrough */
    195  case 0x52: /* Fallthrough */
    196  case 0x53: /* Fallthrough */
    197  case 0x54: /* Fallthrough */
    198  case 0x55: /* Fallthrough */
    199  case 0x56: /* Fallthrough */
    200  case 0x57:
    201  /* Embedded length byte string */
    202  {
    203  size_t length = (size_t) _cbor_load_uint8(source) - 0x40; /* 0x40 offset */
    204  if (_cbor_claim_bytes(length, source_size, &result)) {
    205  callbacks->byte_string(context, source + 1, length);
    206  }
    207  return result;
    208  }
    209  case 0x58:
    210  /* One byte length byte string */
    211  // TODO template this?
    212  {
    213  if (_cbor_claim_bytes(1, source_size, &result)) {
    214  size_t length = (size_t) _cbor_load_uint8(source + 1);
    215  if (_cbor_claim_bytes(length, source_size, &result)) {
    216  callbacks->byte_string(context, source + 1 + 1, length);
    217  }
    218  }
    219  return result;
    220  }
    221  case 0x59:
    222  /* Two bytes length byte string */
    223  {
    224  if (_cbor_claim_bytes(2, source_size, &result)) {
    225  size_t length = (size_t) _cbor_load_uint16(source + 1);
    226  if (_cbor_claim_bytes(length, source_size, &result)) {
    227  callbacks->byte_string(context, source + 1 + 2, length);
    228  }
    229  }
    230  return result;
    231  }
    232  case 0x5A:
    233  /* Four bytes length byte string */
    234  {
    235  if (_cbor_claim_bytes(4, source_size, &result)) {
    236  size_t length = (size_t) _cbor_load_uint32(source + 1);
    237  if (_cbor_claim_bytes(length, source_size, &result)) {
    238  callbacks->byte_string(context, source + 1 + 4, length);
    239  }
    240  }
    241  return result;
    242  }
    243  case 0x5B:
    244  /* Eight bytes length byte string */
    245  {
    246  if (_cbor_claim_bytes(8, source_size, &result)) {
    247  size_t length = (size_t) _cbor_load_uint64(source + 1);
    248  if (_cbor_claim_bytes(length, source_size, &result)) {
    249  callbacks->byte_string(context, source + 1 + 8, length);
    250  }
    251  }
    252  return result;
    253  }
    254  case 0x5C: /* Fallthrough */
    255  case 0x5D: /* Fallthrough */
    256  case 0x5E:
    257  /* Reserved */
    258  {
    259  return (struct cbor_decoder_result) {0, CBOR_DECODER_ERROR};
    260  }
    261  case 0x5F:
    262  /* Indefinite byte string */
    263  {
    264  callbacks->byte_string_start(context);
    265  return result;
    266  }
    267  case 0x60: /* Fallthrough */
    268  case 0x61: /* Fallthrough */
    269  case 0x62: /* Fallthrough */
    270  case 0x63: /* Fallthrough */
    271  case 0x64: /* Fallthrough */
    272  case 0x65: /* Fallthrough */
    273  case 0x66: /* Fallthrough */
    274  case 0x67: /* Fallthrough */
    275  case 0x68: /* Fallthrough */
    276  case 0x69: /* Fallthrough */
    277  case 0x6A: /* Fallthrough */
    278  case 0x6B: /* Fallthrough */
    279  case 0x6C: /* Fallthrough */
    280  case 0x6D: /* Fallthrough */
    281  case 0x6E: /* Fallthrough */
    282  case 0x6F: /* Fallthrough */
    283  case 0x70: /* Fallthrough */
    284  case 0x71: /* Fallthrough */
    285  case 0x72: /* Fallthrough */
    286  case 0x73: /* Fallthrough */
    287  case 0x74: /* Fallthrough */
    288  case 0x75: /* Fallthrough */
    289  case 0x76: /* Fallthrough */
    290  case 0x77:
    291  /* Embedded one byte length string */
    292  {
    293  size_t length = (size_t) _cbor_load_uint8(source) - 0x60; /* 0x60 offset */
    294  if (_cbor_claim_bytes(length, source_size, &result)) {
    295  callbacks->string(context, source + 1, length);
    296  }
    297  return result;
    298  }
    299  case 0x78:
    300  /* One byte length string */
    301  {
    302  if (_cbor_claim_bytes(1, source_size, &result)) {
    303  size_t length = (size_t) _cbor_load_uint8(source + 1);
    304  if (_cbor_claim_bytes(length, source_size, &result)) {
    305  callbacks->string(context, source + 1 + 1, length);
    306  }
    307  }
    308  return result;
    309  }
    310  case 0x79:
    311  /* Two bytes length string */
    312  {
    313  if (_cbor_claim_bytes(2, source_size, &result)) {
    314  size_t length = (size_t) _cbor_load_uint16(source + 1);
    315  if (_cbor_claim_bytes(length, source_size, &result)) {
    316  callbacks->string(context, source + 1 + 2, length);
    317  }
    318  }
    319  return result;
    320  }
    321  case 0x7A:
    322  /* Four bytes length string */
    323  {
    324  if (_cbor_claim_bytes(4, source_size, &result)) {
    325  size_t length = (size_t) _cbor_load_uint32(source + 1);
    326  if (_cbor_claim_bytes(length, source_size, &result)) {
    327  callbacks->string(context, source + 1 + 4, length);
    328  }
    329  }
    330  return result;
    331  }
    332  case 0x7B:
    333  /* Eight bytes length string */
    334  {
    335  if (_cbor_claim_bytes(8, source_size, &result)) {
    336  size_t length = (size_t) _cbor_load_uint64(source + 1);
    337  if (_cbor_claim_bytes(length, source_size, &result)) {
    338  callbacks->string(context, source + 1 + 8, length);
    339  }
    340  }
    341  return result;
    342  }
    343  case 0x7C: /* Fallthrough */
    344  case 0x7D: /* Fallthrough */
    345  case 0x7E:
    346  /* Reserved */
    347  {
    348  return (struct cbor_decoder_result) {0, CBOR_DECODER_ERROR};
    349  }
    350  case 0x7F:
    351  /* Indefinite length string */
    352  {
    353  callbacks->string_start(context);
    354  return result;
    355  }
    356  case 0x80: /* Fallthrough */
    357  case 0x81: /* Fallthrough */
    358  case 0x82: /* Fallthrough */
    359  case 0x83: /* Fallthrough */
    360  case 0x84: /* Fallthrough */
    361  case 0x85: /* Fallthrough */
    362  case 0x86: /* Fallthrough */
    363  case 0x87: /* Fallthrough */
    364  case 0x88: /* Fallthrough */
    365  case 0x89: /* Fallthrough */
    366  case 0x8A: /* Fallthrough */
    367  case 0x8B: /* Fallthrough */
    368  case 0x8C: /* Fallthrough */
    369  case 0x8D: /* Fallthrough */
    370  case 0x8E: /* Fallthrough */
    371  case 0x8F: /* Fallthrough */
    372  case 0x90: /* Fallthrough */
    373  case 0x91: /* Fallthrough */
    374  case 0x92: /* Fallthrough */
    375  case 0x93: /* Fallthrough */
    376  case 0x94: /* Fallthrough */
    377  case 0x95: /* Fallthrough */
    378  case 0x96: /* Fallthrough */
    379  case 0x97:
    380  /* Embedded one byte length array */
    381  {
    382  callbacks->array_start(context, (size_t) _cbor_load_uint8(source) - 0x80); /* 0x40 offset */
    383  return result;
    384  }
    385  case 0x98:
    386  /* One byte length array */
    387  {
    388  if (_cbor_claim_bytes(1, source_size, &result)) {
    389  callbacks->array_start(context, (size_t) _cbor_load_uint8(source + 1));
    390  }
    391  return result;
    392  }
    393  case 0x99:
    394  /* Two bytes length string */
    395  {
    396  if (_cbor_claim_bytes(2, source_size, &result)) {
    397  callbacks->array_start(context, (size_t) _cbor_load_uint16(source + 1));
    398  }
    399  return result;
    400  }
    401  case 0x9A:
    402  /* Four bytes length string */
    403  {
    404  if (_cbor_claim_bytes(4, source_size, &result)) {
    405  callbacks->array_start(context, (size_t) _cbor_load_uint32(source + 1));
    406  }
    407  return result;
    408  }
    409  case 0x9B:
    410  /* Eight bytes length string */
    411  {
    412  if (_cbor_claim_bytes(8, source_size, &result)) {
    413  callbacks->array_start(context, (size_t) _cbor_load_uint64(source + 1));
    414  }
    415  return result;
    416  }
    417  case 0x9C: /* Fallthrough */
    418  case 0x9D: /* Fallthrough */
    419  case 0x9E:
    420  /* Reserved */
    421  {
    422  return (struct cbor_decoder_result) {0, CBOR_DECODER_ERROR};
    423  }
    424  case 0x9F:
    425  /* Indefinite length array */
    426  {
    427  callbacks->indef_array_start(context);
    428  return result;
    429  }
    430  case 0xA0: /* Fallthrough */
    431  case 0xA1: /* Fallthrough */
    432  case 0xA2: /* Fallthrough */
    433  case 0xA3: /* Fallthrough */
    434  case 0xA4: /* Fallthrough */
    435  case 0xA5: /* Fallthrough */
    436  case 0xA6: /* Fallthrough */
    437  case 0xA7: /* Fallthrough */
    438  case 0xA8: /* Fallthrough */
    439  case 0xA9: /* Fallthrough */
    440  case 0xAA: /* Fallthrough */
    441  case 0xAB: /* Fallthrough */
    442  case 0xAC: /* Fallthrough */
    443  case 0xAD: /* Fallthrough */
    444  case 0xAE: /* Fallthrough */
    445  case 0xAF: /* Fallthrough */
    446  case 0xB0: /* Fallthrough */
    447  case 0xB1: /* Fallthrough */
    448  case 0xB2: /* Fallthrough */
    449  case 0xB3: /* Fallthrough */
    450  case 0xB4: /* Fallthrough */
    451  case 0xB5: /* Fallthrough */
    452  case 0xB6: /* Fallthrough */
    453  case 0xB7:
    454  /* Embedded one byte length map */
    455  {
    456  callbacks->map_start(context, (size_t) _cbor_load_uint8(source) - 0xA0); /* 0xA0 offset */
    457  return result;
    458  }
    459  case 0xB8:
    460  /* One byte length map */
    461  {
    462  if (_cbor_claim_bytes(1, source_size, &result)) {
    463  callbacks->map_start(context, (size_t) _cbor_load_uint8(source + 1));
    464  }
    465  return result;
    466  }
    467  case 0xB9:
    468  /* Two bytes length map */
    469  {
    470  if (_cbor_claim_bytes(2, source_size, &result)) {
    471  callbacks->map_start(context, (size_t) _cbor_load_uint16(source + 1));
    472  }
    473  return result;
    474  }
    475  case 0xBA:
    476  /* Four bytes length map */
    477  {
    478  if (_cbor_claim_bytes(4, source_size, &result)) {
    479  callbacks->map_start(context, (size_t) _cbor_load_uint32(source + 1));
    480  }
    481  return result;
    482  }
    483  case 0xBB:
    484  /* Eight bytes length map */
    485  {
    486  if (_cbor_claim_bytes(8, source_size, &result)) {
    487  callbacks->map_start(context, (size_t) _cbor_load_uint64(source + 1));
    488  }
    489  return result;
    490  }
    491  case 0xBC: /* Fallthrough */
    492  case 0xBD: /* Fallthrough */
    493  case 0xBE:
    494  /* Reserved */
    495  {
    496  return (struct cbor_decoder_result) {0, CBOR_DECODER_ERROR};
    497  }
    498  case 0xBF:
    499  /* Indefinite length map */
    500  {
    501  callbacks->indef_map_start(context);
    502  return result;
    503  }
    504  case 0xC0:
    505  /* Text date/time - RFC 3339 tag, fallthrough */
    506  case 0xC1:
    507  /* Epoch date tag, fallthrough */
    508  case 0xC2:
    509  /* Positive bignum tag, fallthrough */
    510  case 0xC3:
    511  /* Negative bignum tag, fallthrough */
    512  case 0xC4:
    513  /* Fraction, fallthrough */
    514  case 0xC5:
    515  /* Big float */
    516  {
    517  callbacks->tag(context, _cbor_load_uint8(source) - 0xC0); /* 0xC0 offset */
    518  return result;
    519  }
    520  case 0xC6: /* Fallthrough */
    521  case 0xC7: /* Fallthrough */
    522  case 0xC8: /* Fallthrough */
    523  case 0xC9: /* Fallthrough */
    524  case 0xCA: /* Fallthrough */
    525  case 0xCB: /* Fallthrough */
    526  case 0xCC: /* Fallthrough */
    527  case 0xCD: /* Fallthrough */
    528  case 0xCE: /* Fallthrough */
    529  case 0xCF: /* Fallthrough */
    530  case 0xD0: /* Fallthrough */
    531  case 0xD1: /* Fallthrough */
    532  case 0xD2: /* Fallthrough */
    533  case 0xD3: /* Fallthrough */
    534  case 0xD4: /* Unassigned tag value */
    535  {
    536  return (struct cbor_decoder_result) {0, CBOR_DECODER_ERROR};
    537  }
    538  case 0xD5: /* Expected b64url conversion tag - fallthrough */
    539  case 0xD6: /* Expected b64 conversion tag - fallthrough */
    540  case 0xD7: /* Expected b16 conversion tag */
    541  {
    542  callbacks->tag(context, _cbor_load_uint8(source) - 0xC0); /* 0xC0 offset */
    543  return result;
    544  }
    545  case 0xD8: /* 1B tag */
    546  {
    547  if (_cbor_claim_bytes(1, source_size, &result)) {
    548  callbacks->tag(context, _cbor_load_uint8(source + 1));
    549  }
    550  return result;
    551  }
    552  case 0xD9: /* 2B tag */
    553  {
    554  if (_cbor_claim_bytes(2, source_size, &result)) {
    555  callbacks->tag(context, _cbor_load_uint16(source + 1));
    556  }
    557  return result;
    558  }
    559  case 0xDA: /* 4B tag */
    560  {
    561  if (_cbor_claim_bytes(4, source_size, &result)) {
    562  callbacks->tag(context, _cbor_load_uint32(source + 1));
    563  }
    564  return result;
    565  }
    566  case 0xDB: /* 8B tag */
    567  {
    568  if (_cbor_claim_bytes(8, source_size, &result)) {
    569  callbacks->tag(context, _cbor_load_uint64(source + 1));
    570  }
    571  return result;
    572  }
    573  case 0xDC: /* Fallthrough */
    574  case 0xDD: /* Fallthrough */
    575  case 0xDE: /* Fallthrough */
    576  case 0xDF: /* Reserved */
    577  {
    578  return (struct cbor_decoder_result) {0, CBOR_DECODER_ERROR};
    579  }
    580  case 0xE0: /* Fallthrough */
    581  case 0xE1: /* Fallthrough */
    582  case 0xE2: /* Fallthrough */
    583  case 0xE3: /* Fallthrough */
    584  case 0xE4: /* Fallthrough */
    585  case 0xE5: /* Fallthrough */
    586  case 0xE6: /* Fallthrough */
    587  case 0xE7: /* Fallthrough */
    588  case 0xE8: /* Fallthrough */
    589  case 0xE9: /* Fallthrough */
    590  case 0xEA: /* Fallthrough */
    591  case 0xEB: /* Fallthrough */
    592  case 0xEC: /* Fallthrough */
    593  case 0xED: /* Fallthrough */
    594  case 0xEE: /* Fallthrough */
    595  case 0xEF: /* Fallthrough */
    596  case 0xF0: /* Fallthrough */
    597  case 0xF1: /* Fallthrough */
    598  case 0xF2: /* Fallthrough */
    599  case 0xF3: /* Simple value - unassigned */
    600  {
    601  return (struct cbor_decoder_result) {0, CBOR_DECODER_ERROR};
    602  }
    603  case 0xF4:
    604  /* False */
    605  {
    606  callbacks->boolean(context, false);
    607  return result;
    608  }
    609  case 0xF5:
    610  /* True */
    611  {
    612  callbacks->boolean(context, true);
    613  return result;
    614  }
    615  case 0xF6:
    616  /* Null */
    617  {
    618  callbacks->null(context);
    619  return result;
    620  }
    621  case 0xF7:
    622  /* Undefined */
    623  {
    624  callbacks->undefined(context);
    625  return result;
    626  }
    627  case 0xF8:
    628  /* 1B simple value, unassigned */
    629  {
    630  return (struct cbor_decoder_result) {0, CBOR_DECODER_ERROR};
    631  }
    632  case 0xF9:
    633  /* 2B float */
    634  {
    635  if (_cbor_claim_bytes(2, source_size, &result)) {
    636  callbacks->float2(context, _cbor_load_half(source + 1));
    637  }
    638  return result;
    639  }
    640  case 0xFA:
    641  /* 4B float */
    642  {
    643  if (_cbor_claim_bytes(4, source_size, &result)) {
    644  callbacks->float4(context, _cbor_load_float(source + 1));
    645  }
    646  return result;
    647  }
    648  case 0xFB:
    649  /* 8B float */
    650  {
    651  if (_cbor_claim_bytes(8, source_size, &result)) {
    652  callbacks->float8(context, _cbor_load_double(source + 1));
    653  }
    654  return result;
    655  }
    656  case 0xFC: /* Fallthrough */
    657  case 0xFD: /* Fallthrough */
    658  case 0xFE:
    659  /* Reserved */
    660  {
    661  return (struct cbor_decoder_result) {0, CBOR_DECODER_ERROR};
    662  }
    663  case 0xFF:
    664  /* Break */
    665  {
    666  callbacks->indef_break(context);
    667  return result;
    668  }
    669  default: /* Never happens - this shuts up the compiler */
    670  {
    671  return result;
    672  }
    673  }
    674 }
    675 
    676 
    677 
    678 
    679 
    680 
    681 
    682 
    683 
    684 
    double _cbor_load_double(cbor_data source)
    Definition: loaders.c:95
    +
    Malformed or reserved MTB/value.
    Definition: data.h:197
    +
    OK, finished.
    Definition: data.h:194
    +
    size_t read
    Bytes read.
    Definition: data.h:203
    +
    float _cbor_load_float(cbor_data source)
    Definition: loaders.c:89
    + +
    double _cbor_load_half(cbor_data source)
    Definition: loaders.c:83
    +
    uint16_t _cbor_load_uint16(const unsigned char *source)
    Definition: loaders.c:20
    +
    uint8_t _cbor_load_uint8(cbor_data source)
    Definition: loaders.c:15
    +
    uint32_t _cbor_load_uint32(const unsigned char *source)
    Definition: loaders.c:34
    +
    Streaming decoder result.
    Definition: data.h:201
    +
    const unsigned char * cbor_data
    Definition: data.h:20
    +
    enum cbor_decoder_status status
    The result.
    Definition: data.h:205
    +
    Callback bundle – passed to the decoder.
    Definition: callbacks.h:48
    + +
    Not enough data - mismatch with MTB.
    Definition: data.h:195
    +
    Buffer manipulation problem.
    Definition: data.h:196
    +
    struct cbor_decoder_result cbor_stream_decode(cbor_data source, size_t source_size, const struct cbor_callbacks *callbacks, void *context)
    Stateless decoder.
    Definition: streaming.c:26
    +
    uint64_t _cbor_load_uint64(const unsigned char *source)
    Definition: loaders.c:50
    +
    + + + + diff --git a/docs/doxygen/streaming_8h.html b/docs/doxygen/streaming_8h.html new file mode 100644 index 00000000..40b4f5e1 --- /dev/null +++ b/docs/doxygen/streaming_8h.html @@ -0,0 +1,148 @@ + + + + + + + +libcbor: src/cbor/streaming.h File Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    streaming.h File Reference
    +
    +
    +
    #include "cbor/common.h"
    +#include "callbacks.h"
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Functions

    struct cbor_decoder_result cbor_stream_decode (cbor_data buffer, size_t buffer_size, const struct cbor_callbacks *callbacks, void *context)
     Stateless decoder. More...
     
    +

    Function Documentation

    + +

    § cbor_stream_decode()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    struct cbor_decoder_result cbor_stream_decode (cbor_data buffer,
    size_t buffer_size,
    const struct cbor_callbackscallbacks,
    void * context 
    )
    +
    + +

    Stateless decoder.

    +

    Will try parsing the buffer and will invoke the appropriate callback on success. Decodes one item at a time. No memory allocations occur.

    +
    Parameters
    + + + + + +
    bufferInput buffer
    buffer_sizeLength of the buffer
    callbacksThe callback bundle
    contextAn arbitrary pointer to allow for maintaining context.
    +
    +
    + +

    Definition at line 26 of file streaming.c.

    + +
    +
    +
    + + + + diff --git a/docs/doxygen/streaming_8h_source.html b/docs/doxygen/streaming_8h_source.html new file mode 100644 index 00000000..9d3e0a0e --- /dev/null +++ b/docs/doxygen/streaming_8h_source.html @@ -0,0 +1,86 @@ + + + + + + + +libcbor: src/cbor/streaming.h Source File + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    streaming.h
    +
    +
    +Go to the documentation of this file.
    1 /*
    2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
    3  *
    4  * libcbor is free software; you can redistribute it and/or modify
    5  * it under the terms of the MIT license. See LICENSE for details.
    6  */
    7 
    8 #ifndef LIBCBOR_STREAMING_H
    9 #define LIBCBOR_STREAMING_H
    10 
    11 #include "cbor/common.h"
    12 #include "callbacks.h"
    13 
    14 #ifdef __cplusplus
    15 extern "C" {
    16 #endif
    17 
    29  size_t buffer_size,
    30  const struct cbor_callbacks * callbacks,
    31  void * context);
    32 
    33 
    34 #ifdef __cplusplus
    35 }
    36 #endif
    37 
    38 #endif //LIBCBOR_STREAMING_H
    Streaming decoder result.
    Definition: data.h:201
    +
    const unsigned char * cbor_data
    Definition: data.h:20
    +
    Callback bundle – passed to the decoder.
    Definition: callbacks.h:48
    + +
    struct cbor_decoder_result cbor_stream_decode(cbor_data buffer, size_t buffer_size, const struct cbor_callbacks *callbacks, void *context)
    Stateless decoder.
    Definition: streaming.c:26
    + +
    + + + + diff --git a/docs/doxygen/strings_8c.html b/docs/doxygen/strings_8c.html new file mode 100644 index 00000000..a4a5e030 --- /dev/null +++ b/docs/doxygen/strings_8c.html @@ -0,0 +1,544 @@ + + + + + + + +libcbor: src/cbor/strings.c File Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    strings.c File Reference
    +
    +
    +
    #include <string.h>
    +#include "strings.h"
    +#include "internal/memory_utils.h"
    +
    +

    Go to the source code of this file.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    cbor_item_tcbor_new_definite_string ()
     Creates a new definite string. More...
     
    cbor_item_tcbor_new_indefinite_string ()
     Creates a new indefinite string. More...
     
    cbor_item_tcbor_build_string (const char *val)
     Creates a new string and initializes it. More...
     
    cbor_item_tcbor_build_stringn (const char *val, size_t length)
     Creates a new string and initializes it. More...
     
    void cbor_string_set_handle (cbor_item_t *item, cbor_mutable_data CBOR_RESTRICT_POINTER data, size_t length)
     Set the handle to the underlying string. More...
     
    cbor_item_t ** cbor_string_chunks_handle (const cbor_item_t *item)
     Get the handle to the array of chunks. More...
     
    size_t cbor_string_chunk_count (const cbor_item_t *item)
     Get the number of chunks this string consist of. More...
     
    bool cbor_string_add_chunk (cbor_item_t *item, cbor_item_t *chunk)
     Appends a chunk to the string. More...
     
    size_t cbor_string_length (const cbor_item_t *item)
     Returns the length of the underlying string. More...
     
    unsigned char * cbor_string_handle (const cbor_item_t *item)
     Get the handle to the underlying string. More...
     
    size_t cbor_string_codepoint_count (const cbor_item_t *item)
     The number of codepoints in this string. More...
     
    bool cbor_string_is_definite (const cbor_item_t *item)
     Is the string definite? More...
     
    bool cbor_string_is_indefinite (const cbor_item_t *item)
     Is the string indefinite? More...
     
    +

    Function Documentation

    + +

    § cbor_build_string()

    + +
    +
    + + + + + + + + +
    cbor_item_t* cbor_build_string (const char * val)
    +
    + +

    Creates a new string and initializes it.

    +

    The val will be copied to a newly allocated block

    +
    Parameters
    + + +
    valA null-terminated UTF-8 string
    +
    +
    +
    Returns
    A new string with content handle. NULL on malloc failure.
    + +

    Definition at line 40 of file strings.c.

    + +
    +
    + +

    § cbor_build_stringn()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    cbor_item_t* cbor_build_stringn (const char * val,
    size_t length 
    )
    +
    + +

    Creates a new string and initializes it.

    +

    The handle will be copied to a newly allocated block

    +
    Parameters
    + + +
    valA UTF-8 string, at least length long (excluding the null byte)
    +
    +
    +
    Returns
    A new string with content handle. NULL on malloc failure.
    + +

    Definition at line 50 of file strings.c.

    + +
    +
    + +

    § cbor_new_definite_string()

    + +
    +
    + + + + + + + +
    cbor_item_t* cbor_new_definite_string ()
    +
    + +

    Creates a new definite string.

    +

    The handle is initialized to NULL and length to 0

    +
    Returns
    new definite string. NULL on malloc failure.
    + +

    Definition at line 12 of file strings.c.

    + +
    +
    + +

    § cbor_new_indefinite_string()

    + +
    +
    + + + + + + + +
    cbor_item_t* cbor_new_indefinite_string ()
    +
    + +

    Creates a new indefinite string.

    +

    The chunks array is initialized to NULL and chunkcount to 0

    +
    Returns
    new indefinite string. NULL on malloc failure.
    + +

    Definition at line 23 of file strings.c.

    + +
    +
    + +

    § cbor_string_add_chunk()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    bool cbor_string_add_chunk (cbor_item_titem,
    cbor_item_tchunk 
    )
    +
    + +

    Appends a chunk to the string.

    +

    Indefinite strings only.

    +

    May realloc the chunk storage.

    +
    Parameters
    + + + +
    item[borrow]An indefinite string
    item[incref]A definite string
    +
    +
    +
    Returns
    true on success. false on realloc failure. In that case, the refcount of chunk is not increased and the item is left intact.
    + +

    Definition at line 82 of file strings.c.

    + +
    +
    + +

    § cbor_string_chunk_count()

    + +
    +
    + + + + + + + + +
    size_t cbor_string_chunk_count (const cbor_item_titem)
    +
    + +

    Get the number of chunks this string consist of.

    +
    Parameters
    + + +
    item[borrow]A indefinite string
    +
    +
    +
    Returns
    The chunk count. 0 for freshly created items.
    + +

    Definition at line 74 of file strings.c.

    + +
    +
    + +

    § cbor_string_chunks_handle()

    + +
    +
    + + + + + + + + +
    cbor_item_t** cbor_string_chunks_handle (const cbor_item_titem)
    +
    + +

    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.

    +
    Parameters
    + + +
    item[borrow]A indefinite string
    +
    +
    +
    Returns
    array of cbor_string_chunk_count definite strings
    + +

    Definition at line 67 of file strings.c.

    + +
    +
    + +

    § cbor_string_codepoint_count()

    + +
    +
    + + + + + + + + +
    size_t cbor_string_codepoint_count (const cbor_item_titem)
    +
    + +

    The number of codepoints in this string.

    +

    Might differ from length if there are multibyte ones

    +
    Parameters
    + + +
    item[borrow]A string
    +
    +
    +
    Returns
    The number of codepoints in this string
    + +

    Definition at line 118 of file strings.c.

    + +
    +
    + +

    § cbor_string_handle()

    + +
    +
    + + + + + + + + +
    unsigned char* cbor_string_handle (const cbor_item_titem)
    +
    + +

    Get the handle to the underlying string.

    +

    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

    +
    Parameters
    + + +
    item[borrow]A definite string
    +
    +
    +
    Returns
    The address of the underlying string. NULL if no data have been assigned yet.
    + +

    Definition at line 112 of file strings.c.

    + +
    +
    + +

    § cbor_string_is_definite()

    + +
    +
    + + + + + + + + +
    bool cbor_string_is_definite (const cbor_item_titem)
    +
    + +

    Is the string definite?

    +
    Parameters
    + + +
    item[borrow]a string
    +
    +
    +
    Returns
    Is the string definite?
    + +

    Definition at line 124 of file strings.c.

    + +
    +
    + +

    § cbor_string_is_indefinite()

    + +
    +
    + + + + + + + + +
    bool cbor_string_is_indefinite (const cbor_item_titem)
    +
    + +

    Is the string indefinite?

    +
    Parameters
    + + +
    item[borrow]a string
    +
    +
    +
    Returns
    Is the string indefinite?
    + +

    Definition at line 130 of file strings.c.

    + +
    +
    + +

    § cbor_string_length()

    + +
    +
    + + + + + + + + +
    size_t cbor_string_length (const cbor_item_titem)
    +
    + +

    Returns the length of the underlying string.

    +

    For definite strings only

    +
    Parameters
    + + +
    item[borrow]a definite string
    +
    +
    +
    Returns
    length of the string. Zero if no chunk has been attached yet
    + +

    Definition at line 106 of file strings.c.

    + +
    +
    + +

    § cbor_string_set_handle()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void cbor_string_set_handle (cbor_item_titem,
    cbor_mutable_data CBOR_RESTRICT_POINTER data,
    size_t length 
    )
    +
    + +

    Set the handle to the underlying string.

    +
    embed:rst:leading-asterisk
    +* .. warning:: Using a pointer to a stack allocated constant is a common mistake. Lifetime of the string will expire when it goes out of scope and the CBOR item will be left inconsistent.
    +* 
    Parameters
    + + + + +
    item[borrow]A definite string
    dataThe memory block. The caller gives up the ownership of the block. libcbor will deallocate it when appropriate using its free function
    lengthLength of the data block
    +
    +
    + +

    Definition at line 59 of file strings.c.

    + +
    +
    +
    + + + + diff --git a/docs/doxygen/strings_8c_source.html b/docs/doxygen/strings_8c_source.html new file mode 100644 index 00000000..1f3f641c --- /dev/null +++ b/docs/doxygen/strings_8c_source.html @@ -0,0 +1,118 @@ + + + + + + + +libcbor: src/cbor/strings.c Source File + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    strings.c
    +
    +
    +Go to the documentation of this file.
    1 /*
    2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
    3  *
    4  * libcbor is free software; you can redistribute it and/or modify
    5  * it under the terms of the MIT license. See LICENSE for details.
    6  */
    7 
    8 #include <string.h>
    9 #include "strings.h"
    10 #include "internal/memory_utils.h"
    11 
    13 {
    14  cbor_item_t *item = _CBOR_MALLOC(sizeof(cbor_item_t));
    15  *item = (cbor_item_t) {
    16  .refcount = 1,
    17  .type = CBOR_TYPE_STRING,
    18  .metadata = {.string_metadata = {_CBOR_METADATA_DEFINITE, 0}}
    19  };
    20  return item;
    21 }
    22 
    24 {
    25  cbor_item_t *item = _CBOR_MALLOC(sizeof(cbor_item_t));
    26  *item = (cbor_item_t) {
    27  .refcount = 1,
    28  .type = CBOR_TYPE_STRING,
    29  .metadata = {.string_metadata = {.type = _CBOR_METADATA_INDEFINITE, .length = 0}},
    30  .data = _CBOR_MALLOC(sizeof(struct cbor_indefinite_string_data))
    31  };
    32  *((struct cbor_indefinite_string_data *) item->data) = (struct cbor_indefinite_string_data) {
    33  .chunk_count = 0,
    34  .chunk_capacity = 0,
    35  .chunks = NULL,
    36  };
    37  return item;
    38 }
    39 
    40 cbor_item_t *cbor_build_string(const char *val)
    41 {
    43  size_t len = strlen(val);
    44  unsigned char * handle = _CBOR_MALLOC(len);
    45  memcpy(handle, val, len);
    46  cbor_string_set_handle(item, handle, len);
    47  return item;
    48 }
    49 
    50 cbor_item_t *cbor_build_stringn(const char *val, size_t length)
    51 {
    53  unsigned char * handle = _CBOR_MALLOC(length);
    54  memcpy(handle, val, length);
    55  cbor_string_set_handle(item, handle, length);
    56  return item;
    57 }
    58 
    60 {
    61  assert(cbor_isa_string(item));
    62  assert(cbor_string_is_definite(item));
    63  item->data = data;
    64  item->metadata.string_metadata.length = length;
    65 }
    66 
    68 {
    69  assert(cbor_isa_string(item));
    70  assert(cbor_string_is_indefinite(item));
    71  return ((struct cbor_indefinite_string_data *) item->data)->chunks;
    72 }
    73 
    75 {
    76  assert(cbor_isa_string(item));
    77  assert(cbor_string_is_indefinite(item));
    78  return ((struct cbor_indefinite_string_data *) item->data)->chunk_count;
    79 
    80 }
    81 
    83 {
    84  assert(cbor_isa_string(item));
    85  assert(cbor_string_is_indefinite(item));
    86  struct cbor_indefinite_string_data *data = (struct cbor_indefinite_string_data *) item->data;
    87  if (data->chunk_count == data->chunk_capacity) {
    88  /* We need more space */
    89  if (!_cbor_safe_to_multiply(CBOR_BUFFER_GROWTH, data->chunk_capacity)) {
    90  return false;
    91  }
    92 
    93  data->chunk_capacity = data->chunk_capacity == 0 ? 1 : CBOR_BUFFER_GROWTH * (data->chunk_capacity);
    94  cbor_item_t **new_chunks_data = _cbor_realloc_multiple(data->chunks, sizeof(cbor_item_t *), data->chunk_capacity);
    95 
    96  if (new_chunks_data == NULL) {
    97  return false;
    98  }
    99 
    100  data->chunks = new_chunks_data;
    101  }
    102  data->chunks[data->chunk_count++] = cbor_incref(chunk);
    103  return true;
    104 }
    105 
    106 size_t cbor_string_length(const cbor_item_t *item)
    107 {
    108  assert(cbor_isa_string(item));
    109  return item->metadata.string_metadata.length;
    110 }
    111 
    112 unsigned char *cbor_string_handle(const cbor_item_t *item)
    113 {
    114  assert(cbor_isa_string(item));
    115  return item->data;
    116 }
    117 
    119 {
    120  assert(cbor_isa_string(item));
    122 }
    123 
    125 {
    126  assert(cbor_isa_string(item));
    128 }
    129 
    131 {
    132  return !cbor_string_is_definite(item);
    133 }
    struct cbor_item_t cbor_item_t
    The item handle.
    +
    cbor_item_t ** chunks
    Definition: data.h:167
    +
    void cbor_string_set_handle(cbor_item_t *item, cbor_mutable_data CBOR_RESTRICT_POINTER data, size_t length)
    Set the handle to the underlying string.
    Definition: strings.c:59
    +
    cbor_item_t * cbor_build_stringn(const char *val, size_t length)
    Creates a new string and initializes it.
    Definition: strings.c:50
    +
    3 - strings
    Definition: data.h:28
    +
    union cbor_item_metadata metadata
    Discriminated by type.
    Definition: data.h:151
    + +
    unsigned char * cbor_string_handle(const cbor_item_t *item)
    Get the handle to the underlying string.
    Definition: strings.c:112
    +
    void * _cbor_realloc_multiple(void *pointer, size_t item_size, size_t item_count)
    Overflow-proof contiguous array reallocation.
    Definition: memory_utils.c:39
    +
    cbor_item_t * cbor_new_indefinite_string()
    Creates a new indefinite string.
    Definition: strings.c:23
    +
    bool cbor_isa_string(const cbor_item_t *item)
    Does the item have the appropriate major type?
    Definition: common.c:33
    + +
    cbor_item_t ** cbor_string_chunks_handle(const cbor_item_t *item)
    Get the handle to the array of chunks.
    Definition: strings.c:67
    +
    #define CBOR_RESTRICT_POINTER
    Definition: common.h:33
    +
    #define _CBOR_MALLOC
    Definition: common.h:84
    + + +
    size_t refcount
    Reference count - initialize to 0.
    Definition: data.h:153
    +
    cbor_item_t * cbor_new_definite_string()
    Creates a new definite string.
    Definition: strings.c:12
    + +
    unsigned char * cbor_mutable_data
    Definition: data.h:21
    +
    size_t cbor_string_chunk_count(const cbor_item_t *item)
    Get the number of chunks this string consist of.
    Definition: strings.c:74
    +
    cbor_item_t * cbor_incref(cbor_item_t *item)
    Increases the reference count by one.
    Definition: common.c:93
    +
    size_t codepoint_count
    Definition: data.h:90
    +
    Defines cbor_item_t::data structure for indefinite strings and bytestrings.
    Definition: data.h:164
    + +
    struct _cbor_string_metadata string_metadata
    Definition: data.h:141
    +
    cbor_item_t * cbor_build_string(const char *val)
    Creates a new string and initializes it.
    Definition: strings.c:40
    + +
    size_t cbor_string_codepoint_count(const cbor_item_t *item)
    The number of codepoints in this string.
    Definition: strings.c:118
    +
    bool cbor_string_add_chunk(cbor_item_t *item, cbor_item_t *chunk)
    Appends a chunk to the string.
    Definition: strings.c:82
    +
    bool cbor_string_is_definite(const cbor_item_t *item)
    Is the string definite?
    Definition: strings.c:124
    +
    unsigned char * data
    Raw data block - interpretation depends on metadata.
    Definition: data.h:157
    +
    _cbor_dst_metadata type
    Definition: data.h:91
    +
    size_t cbor_string_length(const cbor_item_t *item)
    Returns the length of the underlying string.
    Definition: strings.c:106
    +
    bool _cbor_safe_to_multiply(size_t a, size_t b)
    Can a and b be multiplied without overflowing size_t?
    Definition: memory_utils.c:25
    +
    The item handle.
    Definition: data.h:149
    +
    bool cbor_string_is_indefinite(const cbor_item_t *item)
    Is the string indefinite?
    Definition: strings.c:130
    +
    + + + + diff --git a/docs/doxygen/strings_8h.html b/docs/doxygen/strings_8h.html new file mode 100644 index 00000000..33268620 --- /dev/null +++ b/docs/doxygen/strings_8h.html @@ -0,0 +1,542 @@ + + + + + + + +libcbor: src/cbor/strings.h File Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    strings.h File Reference
    +
    +
    +
    #include "cbor/common.h"
    +
    +

    Go to the source code of this file.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    size_t cbor_string_length (const cbor_item_t *item)
     Returns the length of the underlying string. More...
     
    size_t cbor_string_codepoint_count (const cbor_item_t *item)
     The number of codepoints in this string. More...
     
    bool cbor_string_is_definite (const cbor_item_t *item)
     Is the string definite? More...
     
    bool cbor_string_is_indefinite (const cbor_item_t *item)
     Is the string indefinite? More...
     
    cbor_mutable_data cbor_string_handle (const cbor_item_t *item)
     Get the handle to the underlying string. More...
     
    void cbor_string_set_handle (cbor_item_t *item, cbor_mutable_data CBOR_RESTRICT_POINTER data, size_t length)
     Set the handle to the underlying string. More...
     
    cbor_item_t ** cbor_string_chunks_handle (const cbor_item_t *item)
     Get the handle to the array of chunks. More...
     
    size_t cbor_string_chunk_count (const cbor_item_t *item)
     Get the number of chunks this string consist of. More...
     
    bool cbor_string_add_chunk (cbor_item_t *item, cbor_item_t *chunk)
     Appends a chunk to the string. More...
     
    cbor_item_tcbor_new_definite_string ()
     Creates a new definite string. More...
     
    cbor_item_tcbor_new_indefinite_string ()
     Creates a new indefinite string. More...
     
    cbor_item_tcbor_build_string (const char *val)
     Creates a new string and initializes it. More...
     
    cbor_item_tcbor_build_stringn (const char *val, size_t length)
     Creates a new string and initializes it. More...
     
    +

    Function Documentation

    + +

    § cbor_build_string()

    + +
    +
    + + + + + + + + +
    cbor_item_t* cbor_build_string (const char * val)
    +
    + +

    Creates a new string and initializes it.

    +

    The val will be copied to a newly allocated block

    +
    Parameters
    + + +
    valA null-terminated UTF-8 string
    +
    +
    +
    Returns
    A new string with content handle. NULL on malloc failure.
    + +

    Definition at line 40 of file strings.c.

    + +
    +
    + +

    § cbor_build_stringn()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    cbor_item_t* cbor_build_stringn (const char * val,
    size_t length 
    )
    +
    + +

    Creates a new string and initializes it.

    +

    The handle will be copied to a newly allocated block

    +
    Parameters
    + + +
    valA UTF-8 string, at least length long (excluding the null byte)
    +
    +
    +
    Returns
    A new string with content handle. NULL on malloc failure.
    + +

    Definition at line 50 of file strings.c.

    + +
    +
    + +

    § cbor_new_definite_string()

    + +
    +
    + + + + + + + +
    cbor_item_t* cbor_new_definite_string ()
    +
    + +

    Creates a new definite string.

    +

    The handle is initialized to NULL and length to 0

    +
    Returns
    new definite string. NULL on malloc failure.
    + +

    Definition at line 12 of file strings.c.

    + +
    +
    + +

    § cbor_new_indefinite_string()

    + +
    +
    + + + + + + + +
    cbor_item_t* cbor_new_indefinite_string ()
    +
    + +

    Creates a new indefinite string.

    +

    The chunks array is initialized to NULL and chunkcount to 0

    +
    Returns
    new indefinite string. NULL on malloc failure.
    + +

    Definition at line 23 of file strings.c.

    + +
    +
    + +

    § cbor_string_add_chunk()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    bool cbor_string_add_chunk (cbor_item_titem,
    cbor_item_tchunk 
    )
    +
    + +

    Appends a chunk to the string.

    +

    Indefinite strings only.

    +

    May realloc the chunk storage.

    +
    Parameters
    + + + +
    item[borrow]An indefinite string
    item[incref]A definite string
    +
    +
    +
    Returns
    true on success. false on realloc failure. In that case, the refcount of chunk is not increased and the item is left intact.
    + +

    Definition at line 82 of file strings.c.

    + +
    +
    + +

    § cbor_string_chunk_count()

    + +
    +
    + + + + + + + + +
    size_t cbor_string_chunk_count (const cbor_item_titem)
    +
    + +

    Get the number of chunks this string consist of.

    +
    Parameters
    + + +
    item[borrow]A indefinite string
    +
    +
    +
    Returns
    The chunk count. 0 for freshly created items.
    + +

    Definition at line 74 of file strings.c.

    + +
    +
    + +

    § cbor_string_chunks_handle()

    + +
    +
    + + + + + + + + +
    cbor_item_t** cbor_string_chunks_handle (const cbor_item_titem)
    +
    + +

    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.

    +
    Parameters
    + + +
    item[borrow]A indefinite string
    +
    +
    +
    Returns
    array of cbor_string_chunk_count definite strings
    + +

    Definition at line 67 of file strings.c.

    + +
    +
    + +

    § cbor_string_codepoint_count()

    + +
    +
    + + + + + + + + +
    size_t cbor_string_codepoint_count (const cbor_item_titem)
    +
    + +

    The number of codepoints in this string.

    +

    Might differ from length if there are multibyte ones

    +
    Parameters
    + + +
    item[borrow]A string
    +
    +
    +
    Returns
    The number of codepoints in this string
    + +

    Definition at line 118 of file strings.c.

    + +
    +
    + +

    § cbor_string_handle()

    + +
    +
    + + + + + + + + +
    cbor_mutable_data cbor_string_handle (const cbor_item_titem)
    +
    + +

    Get the handle to the underlying string.

    +

    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

    +
    Parameters
    + + +
    item[borrow]A definite string
    +
    +
    +
    Returns
    The address of the underlying string. NULL if no data have been assigned yet.
    + +

    Definition at line 112 of file strings.c.

    + +
    +
    + +

    § cbor_string_is_definite()

    + +
    +
    + + + + + + + + +
    bool cbor_string_is_definite (const cbor_item_titem)
    +
    + +

    Is the string definite?

    +
    Parameters
    + + +
    item[borrow]a string
    +
    +
    +
    Returns
    Is the string definite?
    + +

    Definition at line 124 of file strings.c.

    + +
    +
    + +

    § cbor_string_is_indefinite()

    + +
    +
    + + + + + + + + +
    bool cbor_string_is_indefinite (const cbor_item_titem)
    +
    + +

    Is the string indefinite?

    +
    Parameters
    + + +
    item[borrow]a string
    +
    +
    +
    Returns
    Is the string indefinite?
    + +

    Definition at line 130 of file strings.c.

    + +
    +
    + +

    § cbor_string_length()

    + +
    +
    + + + + + + + + +
    size_t cbor_string_length (const cbor_item_titem)
    +
    + +

    Returns the length of the underlying string.

    +

    For definite strings only

    +
    Parameters
    + + +
    item[borrow]a definite string
    +
    +
    +
    Returns
    length of the string. Zero if no chunk has been attached yet
    + +

    Definition at line 106 of file strings.c.

    + +
    +
    + +

    § cbor_string_set_handle()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void cbor_string_set_handle (cbor_item_titem,
    cbor_mutable_data CBOR_RESTRICT_POINTER data,
    size_t length 
    )
    +
    + +

    Set the handle to the underlying string.

    +
    embed:rst:leading-asterisk
    +* .. warning:: Using a pointer to a stack allocated constant is a common mistake. Lifetime of the string will expire when it goes out of scope and the CBOR item will be left inconsistent.
    +* 
    Parameters
    + + + + +
    item[borrow]A definite string
    dataThe memory block. The caller gives up the ownership of the block. libcbor will deallocate it when appropriate using its free function
    lengthLength of the data block
    +
    +
    + +

    Definition at line 59 of file strings.c.

    + +
    +
    +
    + + + + diff --git a/docs/doxygen/strings_8h_source.html b/docs/doxygen/strings_8h_source.html new file mode 100644 index 00000000..63a4d848 --- /dev/null +++ b/docs/doxygen/strings_8h_source.html @@ -0,0 +1,97 @@ + + + + + + + +libcbor: src/cbor/strings.h Source File + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    strings.h
    +
    +
    +Go to the documentation of this file.
    1 /*
    2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
    3  *
    4  * libcbor is free software; you can redistribute it and/or modify
    5  * it under the terms of the MIT license. See LICENSE for details.
    6  */
    7 
    8 #ifndef LIBCBOR_STRINGS_H
    9 #define LIBCBOR_STRINGS_H
    10 
    11 #include "cbor/common.h"
    12 
    13 #ifdef __cplusplus
    14 extern "C" {
    15 #endif
    16 
    17 /*
    18 * ============================================================================
    19 * String manipulation
    20 * ============================================================================
    21 */
    22 
    30 size_t cbor_string_length(const cbor_item_t *item);
    31 
    39 size_t cbor_string_codepoint_count(const cbor_item_t *item);
    40 
    46 bool cbor_string_is_definite(const cbor_item_t *item);
    47 
    53 bool cbor_string_is_indefinite(const cbor_item_t *item);
    54 
    64 
    77 
    86 
    92 size_t cbor_string_chunk_count(const cbor_item_t *item);
    93 
    104 bool cbor_string_add_chunk(cbor_item_t *item, cbor_item_t *chunk);
    105 
    113 
    121 
    129 cbor_item_t *cbor_build_string(const char *val);
    130 
    138 cbor_item_t *cbor_build_stringn(const char *val, size_t length);
    139 
    140 #ifdef __cplusplus
    141 }
    142 #endif
    143 
    144 #endif //LIBCBOR_STRINGS_H
    cbor_item_t * cbor_new_definite_string()
    Creates a new definite string.
    Definition: strings.c:12
    +
    cbor_mutable_data cbor_string_handle(const cbor_item_t *item)
    Get the handle to the underlying string.
    Definition: strings.c:112
    +
    bool cbor_string_is_indefinite(const cbor_item_t *item)
    Is the string indefinite?
    Definition: strings.c:130
    +
    #define CBOR_RESTRICT_POINTER
    Definition: common.h:33
    +
    void cbor_string_set_handle(cbor_item_t *item, cbor_mutable_data CBOR_RESTRICT_POINTER data, size_t length)
    Set the handle to the underlying string.
    Definition: strings.c:59
    +
    cbor_item_t * cbor_build_stringn(const char *val, size_t length)
    Creates a new string and initializes it.
    Definition: strings.c:50
    +
    cbor_item_t * cbor_build_string(const char *val)
    Creates a new string and initializes it.
    Definition: strings.c:40
    +
    unsigned char * cbor_mutable_data
    Definition: data.h:21
    +
    bool cbor_string_is_definite(const cbor_item_t *item)
    Is the string definite?
    Definition: strings.c:124
    +
    size_t cbor_string_length(const cbor_item_t *item)
    Returns the length of the underlying string.
    Definition: strings.c:106
    +
    bool cbor_string_add_chunk(cbor_item_t *item, cbor_item_t *chunk)
    Appends a chunk to the string.
    Definition: strings.c:82
    +
    cbor_item_t ** cbor_string_chunks_handle(const cbor_item_t *item)
    Get the handle to the array of chunks.
    Definition: strings.c:67
    +
    size_t cbor_string_chunk_count(const cbor_item_t *item)
    Get the number of chunks this string consist of.
    Definition: strings.c:74
    +
    size_t cbor_string_codepoint_count(const cbor_item_t *item)
    The number of codepoints in this string.
    Definition: strings.c:118
    + +
    The item handle.
    Definition: data.h:149
    +
    cbor_item_t * cbor_new_indefinite_string()
    Creates a new indefinite string.
    Definition: strings.c:23
    +
    + + + + diff --git a/docs/doxygen/struct__cbor__array__metadata.html b/docs/doxygen/struct__cbor__array__metadata.html new file mode 100644 index 00000000..dbe8d0c2 --- /dev/null +++ b/docs/doxygen/struct__cbor__array__metadata.html @@ -0,0 +1,149 @@ + + + + + + + +libcbor: _cbor_array_metadata Struct Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    _cbor_array_metadata Struct Reference
    +
    +
    + +

    Arrays specific metadata. + More...

    + +

    #include <data.h>

    + + + + + + + + +

    +Data Fields

    size_t allocated
     
    size_t end_ptr
     
    _cbor_dst_metadata type
     
    +

    Detailed Description

    +

    Arrays specific metadata.

    + +

    Definition at line 95 of file data.h.

    +

    Field Documentation

    + +

    § allocated

    + +
    +
    + + + + +
    size_t _cbor_array_metadata::allocated
    +
    + +

    Definition at line 96 of file data.h.

    + +
    +
    + +

    § end_ptr

    + +
    +
    + + + + +
    size_t _cbor_array_metadata::end_ptr
    +
    + +

    Definition at line 97 of file data.h.

    + +
    +
    + +

    § type

    + +
    +
    + + + + +
    _cbor_dst_metadata _cbor_array_metadata::type
    +
    + +

    Definition at line 98 of file data.h.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/docs/doxygen/struct__cbor__bytestring__metadata.html b/docs/doxygen/struct__cbor__bytestring__metadata.html new file mode 100644 index 00000000..98576b20 --- /dev/null +++ b/docs/doxygen/struct__cbor__bytestring__metadata.html @@ -0,0 +1,131 @@ + + + + + + + +libcbor: _cbor_bytestring_metadata Struct Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    _cbor_bytestring_metadata Struct Reference
    +
    +
    + +

    Bytestrings specific metadata. + More...

    + +

    #include <data.h>

    + + + + + + +

    +Data Fields

    size_t length
     
    _cbor_dst_metadata type
     
    +

    Detailed Description

    +

    Bytestrings specific metadata.

    + +

    Definition at line 82 of file data.h.

    +

    Field Documentation

    + +

    § length

    + +
    +
    + + + + +
    size_t _cbor_bytestring_metadata::length
    +
    + +

    Definition at line 83 of file data.h.

    + +
    +
    + +

    § type

    + +
    +
    + + + + +
    _cbor_dst_metadata _cbor_bytestring_metadata::type
    +
    + +

    Definition at line 84 of file data.h.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/docs/doxygen/struct__cbor__decoder__context.html b/docs/doxygen/struct__cbor__decoder__context.html new file mode 100644 index 00000000..a7ac1839 --- /dev/null +++ b/docs/doxygen/struct__cbor__decoder__context.html @@ -0,0 +1,173 @@ + + + + + + + +libcbor: _cbor_decoder_context Struct Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    _cbor_decoder_context Struct Reference
    +
    +
    + +

    High-level decoding context. + More...

    + +

    #include <builder_callbacks.h>

    + + + + + + + + + + + + +

    +Data Fields

    bool creation_failed
     Callback creating the last item has failed. More...
     
    bool syntax_error
     Stack expectation mismatch. More...
     
    cbor_item_troot
     
    struct _cbor_stackstack
     
    +

    Detailed Description

    +

    High-level decoding context.

    + +

    Definition at line 20 of file builder_callbacks.h.

    +

    Field Documentation

    + +

    § creation_failed

    + +
    +
    + + + + +
    bool _cbor_decoder_context::creation_failed
    +
    + +

    Callback creating the last item has failed.

    + +

    Definition at line 22 of file builder_callbacks.h.

    + +
    +
    + +

    § root

    + +
    +
    + + + + +
    cbor_item_t* _cbor_decoder_context::root
    +
    + +

    Definition at line 25 of file builder_callbacks.h.

    + +
    +
    + +

    § stack

    + +
    +
    + + + + +
    struct _cbor_stack* _cbor_decoder_context::stack
    +
    + +

    Definition at line 26 of file builder_callbacks.h.

    + +
    +
    + +

    § syntax_error

    + +
    +
    + + + + +
    bool _cbor_decoder_context::syntax_error
    +
    + +

    Stack expectation mismatch.

    + +

    Definition at line 24 of file builder_callbacks.h.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/docs/doxygen/struct__cbor__float__ctrl__metadata.html b/docs/doxygen/struct__cbor__float__ctrl__metadata.html new file mode 100644 index 00000000..160f3ad6 --- /dev/null +++ b/docs/doxygen/struct__cbor__float__ctrl__metadata.html @@ -0,0 +1,131 @@ + + + + + + + +libcbor: _cbor_float_ctrl_metadata Struct Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    _cbor_float_ctrl_metadata Struct Reference
    +
    +
    + +

    Floats specific metadata - includes CTRL values. + More...

    + +

    #include <data.h>

    + + + + + + +

    +Data Fields

    cbor_float_width width
     
    uint8_t ctrl
     
    +

    Detailed Description

    +

    Floats specific metadata - includes CTRL values.

    + +

    Definition at line 120 of file data.h.

    +

    Field Documentation

    + +

    § ctrl

    + +
    +
    + + + + +
    uint8_t _cbor_float_ctrl_metadata::ctrl
    +
    + +

    Definition at line 122 of file data.h.

    + +
    +
    + +

    § width

    + +
    +
    + + + + +
    cbor_float_width _cbor_float_ctrl_metadata::width
    +
    + +

    Definition at line 121 of file data.h.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/docs/doxygen/struct__cbor__int__metadata.html b/docs/doxygen/struct__cbor__int__metadata.html new file mode 100644 index 00000000..1e9a42c2 --- /dev/null +++ b/docs/doxygen/struct__cbor__int__metadata.html @@ -0,0 +1,113 @@ + + + + + + + +libcbor: _cbor_int_metadata Struct Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    _cbor_int_metadata Struct Reference
    +
    +
    + +

    Integers specific metadata. + More...

    + +

    #include <data.h>

    + + + + +

    +Data Fields

    cbor_int_width width
     
    +

    Detailed Description

    +

    Integers specific metadata.

    + +

    Definition at line 77 of file data.h.

    +

    Field Documentation

    + +

    § width

    + +
    +
    + + + + +
    cbor_int_width _cbor_int_metadata::width
    +
    + +

    Definition at line 78 of file data.h.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/docs/doxygen/struct__cbor__map__metadata.html b/docs/doxygen/struct__cbor__map__metadata.html new file mode 100644 index 00000000..7d260ac9 --- /dev/null +++ b/docs/doxygen/struct__cbor__map__metadata.html @@ -0,0 +1,149 @@ + + + + + + + +libcbor: _cbor_map_metadata Struct Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    _cbor_map_metadata Struct Reference
    +
    +
    + +

    Maps specific metadata. + More...

    + +

    #include <data.h>

    + + + + + + + + +

    +Data Fields

    size_t allocated
     
    size_t end_ptr
     
    _cbor_dst_metadata type
     
    +

    Detailed Description

    +

    Maps specific metadata.

    + +

    Definition at line 102 of file data.h.

    +

    Field Documentation

    + +

    § allocated

    + +
    +
    + + + + +
    size_t _cbor_map_metadata::allocated
    +
    + +

    Definition at line 103 of file data.h.

    + +
    +
    + +

    § end_ptr

    + +
    +
    + + + + +
    size_t _cbor_map_metadata::end_ptr
    +
    + +

    Definition at line 104 of file data.h.

    + +
    +
    + +

    § type

    + +
    +
    + + + + +
    _cbor_dst_metadata _cbor_map_metadata::type
    +
    + +

    Definition at line 105 of file data.h.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/docs/doxygen/struct__cbor__stack.html b/docs/doxygen/struct__cbor__stack.html new file mode 100644 index 00000000..84fda478 --- /dev/null +++ b/docs/doxygen/struct__cbor__stack.html @@ -0,0 +1,131 @@ + + + + + + + +libcbor: _cbor_stack Struct Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    _cbor_stack Struct Reference
    +
    +
    + +

    Stack handle - contents and size. + More...

    + +

    #include <stack.h>

    + + + + + + +

    +Data Fields

    struct _cbor_stack_recordtop
     
    size_t size
     
    +

    Detailed Description

    +

    Stack handle - contents and size.

    + +

    Definition at line 25 of file stack.h.

    +

    Field Documentation

    + +

    § size

    + +
    +
    + + + + +
    size_t _cbor_stack::size
    +
    + +

    Definition at line 27 of file stack.h.

    + +
    +
    + +

    § top

    + +
    +
    + + + + +
    struct _cbor_stack_record* _cbor_stack::top
    +
    + +

    Definition at line 26 of file stack.h.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/docs/doxygen/struct__cbor__stack__record.html b/docs/doxygen/struct__cbor__stack__record.html new file mode 100644 index 00000000..f13daf64 --- /dev/null +++ b/docs/doxygen/struct__cbor__stack__record.html @@ -0,0 +1,149 @@ + + + + + + + +libcbor: _cbor_stack_record Struct Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    _cbor_stack_record Struct Reference
    +
    +
    + +

    Simple stack record for the parser. + More...

    + +

    #include <stack.h>

    + + + + + + + + +

    +Data Fields

    struct _cbor_stack_recordlower
     
    cbor_item_titem
     
    size_t subitems
     
    +

    Detailed Description

    +

    Simple stack record for the parser.

    + +

    Definition at line 18 of file stack.h.

    +

    Field Documentation

    + +

    § item

    + +
    +
    + + + + +
    cbor_item_t* _cbor_stack_record::item
    +
    + +

    Definition at line 20 of file stack.h.

    + +
    +
    + +

    § lower

    + +
    +
    + + + + +
    struct _cbor_stack_record* _cbor_stack_record::lower
    +
    + +

    Definition at line 19 of file stack.h.

    + +
    +
    + +

    § subitems

    + +
    +
    + + + + +
    size_t _cbor_stack_record::subitems
    +
    + +

    Definition at line 21 of file stack.h.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/docs/doxygen/struct__cbor__string__metadata.html b/docs/doxygen/struct__cbor__string__metadata.html new file mode 100644 index 00000000..19fe3721 --- /dev/null +++ b/docs/doxygen/struct__cbor__string__metadata.html @@ -0,0 +1,149 @@ + + + + + + + +libcbor: _cbor_string_metadata Struct Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    _cbor_string_metadata Struct Reference
    +
    +
    + +

    Strings specific metadata. + More...

    + +

    #include <data.h>

    + + + + + + + + +

    +Data Fields

    size_t length
     
    size_t codepoint_count
     
    _cbor_dst_metadata type
     
    +

    Detailed Description

    +

    Strings specific metadata.

    + +

    Definition at line 88 of file data.h.

    +

    Field Documentation

    + +

    § codepoint_count

    + +
    +
    + + + + +
    size_t _cbor_string_metadata::codepoint_count
    +
    + +

    Definition at line 90 of file data.h.

    + +
    +
    + +

    § length

    + +
    +
    + + + + +
    size_t _cbor_string_metadata::length
    +
    + +

    Definition at line 89 of file data.h.

    + +
    +
    + +

    § type

    + +
    +
    + + + + +
    _cbor_dst_metadata _cbor_string_metadata::type
    +
    + +

    Definition at line 91 of file data.h.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/docs/doxygen/struct__cbor__tag__metadata.html b/docs/doxygen/struct__cbor__tag__metadata.html new file mode 100644 index 00000000..e9184aa7 --- /dev/null +++ b/docs/doxygen/struct__cbor__tag__metadata.html @@ -0,0 +1,132 @@ + + + + + + + +libcbor: _cbor_tag_metadata Struct Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    _cbor_tag_metadata Struct Reference
    +
    +
    + +

    Arrays specific metadata. + More...

    + +

    #include <data.h>

    + + + + + + +

    +Data Fields

    struct cbor_item_ttagged_item
     
    uint64_t value
     
    +

    Detailed Description

    +

    Arrays specific metadata.

    +

    The pointer is included - cbor_item_metadata is 2 * sizeof(size_t) + sizeof(_cbor_string_type_metadata), lets use the space

    + +

    Definition at line 114 of file data.h.

    +

    Field Documentation

    + +

    § tagged_item

    + +
    +
    + + + + +
    struct cbor_item_t* _cbor_tag_metadata::tagged_item
    +
    + +

    Definition at line 115 of file data.h.

    + +
    +
    + +

    § value

    + +
    +
    + + + + +
    uint64_t _cbor_tag_metadata::value
    +
    + +

    Definition at line 116 of file data.h.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/docs/doxygen/struct__cbor__unicode__status.html b/docs/doxygen/struct__cbor__unicode__status.html new file mode 100644 index 00000000..0eeb3ea8 --- /dev/null +++ b/docs/doxygen/struct__cbor__unicode__status.html @@ -0,0 +1,131 @@ + + + + + + + +libcbor: _cbor_unicode_status Struct Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    _cbor_unicode_status Struct Reference
    +
    +
    + +

    Signals unicode validation error and possibly its location. + More...

    + +

    #include <unicode.h>

    + + + + + + +

    +Data Fields

    enum _cbor_unicode_status_error status
     
    size_t location
     
    +

    Detailed Description

    +

    Signals unicode validation error and possibly its location.

    + +

    Definition at line 23 of file unicode.h.

    +

    Field Documentation

    + +

    § location

    + +
    +
    + + + + +
    size_t _cbor_unicode_status::location
    +
    + +

    Definition at line 25 of file unicode.h.

    + +
    +
    + +

    § status

    + +
    +
    + + + + +
    enum _cbor_unicode_status_error _cbor_unicode_status::status
    +
    + +

    Definition at line 24 of file unicode.h.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/docs/doxygen/structcbor__callbacks.html b/docs/doxygen/structcbor__callbacks.html new file mode 100644 index 00000000..01f0d6c6 --- /dev/null +++ b/docs/doxygen/structcbor__callbacks.html @@ -0,0 +1,599 @@ + + + + + + + +libcbor: cbor_callbacks Struct Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    cbor_callbacks Struct Reference
    +
    +
    + +

    Callback bundle – passed to the decoder. + More...

    + +

    #include <callbacks.h>

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Data Fields

    cbor_int8_callback uint8
     Unsigned int. More...
     
    cbor_int16_callback uint16
     Unsigned int. More...
     
    cbor_int32_callback uint32
     Unsigned int. More...
     
    cbor_int64_callback uint64
     Unsigned int. More...
     
    cbor_int64_callback negint64
     Negative int. More...
     
    cbor_int32_callback negint32
     Negative int. More...
     
    cbor_int16_callback negint16
     Negative int. More...
     
    cbor_int8_callback negint8
     Negative int. More...
     
    cbor_simple_callback byte_string_start
     Definite byte string. More...
     
    cbor_string_callback byte_string
     Indefinite byte string start. More...
     
    cbor_string_callback string
     Definite string. More...
     
    cbor_simple_callback string_start
     Indefinite string start. More...
     
    cbor_simple_callback indef_array_start
     Definite array. More...
     
    cbor_collection_callback array_start
     Indefinite array. More...
     
    cbor_simple_callback indef_map_start
     Definite map. More...
     
    cbor_collection_callback map_start
     Indefinite map. More...
     
    cbor_int64_callback tag
     Tags. More...
     
    cbor_float_callback float2
     Half float. More...
     
    cbor_float_callback float4
     Single float. More...
     
    cbor_double_callback float8
     Double float. More...
     
    cbor_simple_callback undefined
     Undef. More...
     
    cbor_simple_callback null
     Null. More...
     
    cbor_bool_callback boolean
     Bool. More...
     
    cbor_simple_callback indef_break
     Indefinite item break. More...
     
    +

    Detailed Description

    +

    Callback bundle – passed to the decoder.

    + +

    Definition at line 48 of file callbacks.h.

    +

    Field Documentation

    + +

    § array_start

    + +
    +
    + + + + +
    cbor_collection_callback cbor_callbacks::array_start
    +
    + +

    Indefinite array.

    + +

    Definition at line 80 of file callbacks.h.

    + +
    +
    + +

    § boolean

    + +
    +
    + + + + +
    cbor_bool_callback cbor_callbacks::boolean
    +
    + +

    Bool.

    + +

    Definition at line 101 of file callbacks.h.

    + +
    +
    + +

    § byte_string

    + +
    +
    + + + + +
    cbor_string_callback cbor_callbacks::byte_string
    +
    + +

    Indefinite byte string start.

    + +

    Definition at line 70 of file callbacks.h.

    + +
    +
    + +

    § byte_string_start

    + +
    +
    + + + + +
    cbor_simple_callback cbor_callbacks::byte_string_start
    +
    + +

    Definite byte string.

    + +

    Definition at line 68 of file callbacks.h.

    + +
    +
    + +

    § float2

    + +
    +
    + + + + +
    cbor_float_callback cbor_callbacks::float2
    +
    + +

    Half float.

    + +

    Definition at line 91 of file callbacks.h.

    + +
    +
    + +

    § float4

    + +
    +
    + + + + +
    cbor_float_callback cbor_callbacks::float4
    +
    + +

    Single float.

    + +

    Definition at line 93 of file callbacks.h.

    + +
    +
    + +

    § float8

    + +
    +
    + + + + +
    cbor_double_callback cbor_callbacks::float8
    +
    + +

    Double float.

    + +

    Definition at line 95 of file callbacks.h.

    + +
    +
    + +

    § indef_array_start

    + +
    +
    + + + + +
    cbor_simple_callback cbor_callbacks::indef_array_start
    +
    + +

    Definite array.

    + +

    Definition at line 78 of file callbacks.h.

    + +
    +
    + +

    § indef_break

    + +
    +
    + + + + +
    cbor_simple_callback cbor_callbacks::indef_break
    +
    + +

    Indefinite item break.

    + +

    Definition at line 104 of file callbacks.h.

    + +
    +
    + +

    § indef_map_start

    + +
    +
    + + + + +
    cbor_simple_callback cbor_callbacks::indef_map_start
    +
    + +

    Definite map.

    + +

    Definition at line 83 of file callbacks.h.

    + +
    +
    + +

    § map_start

    + +
    +
    + + + + +
    cbor_collection_callback cbor_callbacks::map_start
    +
    + +

    Indefinite map.

    + +

    Definition at line 85 of file callbacks.h.

    + +
    +
    + +

    § negint16

    + +
    +
    + + + + +
    cbor_int16_callback cbor_callbacks::negint16
    +
    + +

    Negative int.

    + +

    Definition at line 63 of file callbacks.h.

    + +
    +
    + +

    § negint32

    + +
    +
    + + + + +
    cbor_int32_callback cbor_callbacks::negint32
    +
    + +

    Negative int.

    + +

    Definition at line 61 of file callbacks.h.

    + +
    +
    + +

    § negint64

    + +
    +
    + + + + +
    cbor_int64_callback cbor_callbacks::negint64
    +
    + +

    Negative int.

    + +

    Definition at line 59 of file callbacks.h.

    + +
    +
    + +

    § negint8

    + +
    +
    + + + + +
    cbor_int8_callback cbor_callbacks::negint8
    +
    + +

    Negative int.

    + +

    Definition at line 65 of file callbacks.h.

    + +
    +
    + +

    § null

    + +
    +
    + + + + +
    cbor_simple_callback cbor_callbacks::null
    +
    + +

    Null.

    + +

    Definition at line 99 of file callbacks.h.

    + +
    +
    + +

    § string

    + +
    +
    + + + + +
    cbor_string_callback cbor_callbacks::string
    +
    + +

    Definite string.

    + +

    Definition at line 73 of file callbacks.h.

    + +
    +
    + +

    § string_start

    + +
    +
    + + + + +
    cbor_simple_callback cbor_callbacks::string_start
    +
    + +

    Indefinite string start.

    + +

    Definition at line 75 of file callbacks.h.

    + +
    +
    + +

    § tag

    + +
    +
    + + + + +
    cbor_int64_callback cbor_callbacks::tag
    +
    + +

    Tags.

    + +

    Definition at line 88 of file callbacks.h.

    + +
    +
    + +

    § uint16

    + +
    +
    + + + + +
    cbor_int16_callback cbor_callbacks::uint16
    +
    + +

    Unsigned int.

    + +

    Definition at line 52 of file callbacks.h.

    + +
    +
    + +

    § uint32

    + +
    +
    + + + + +
    cbor_int32_callback cbor_callbacks::uint32
    +
    + +

    Unsigned int.

    + +

    Definition at line 54 of file callbacks.h.

    + +
    +
    + +

    § uint64

    + +
    +
    + + + + +
    cbor_int64_callback cbor_callbacks::uint64
    +
    + +

    Unsigned int.

    + +

    Definition at line 56 of file callbacks.h.

    + +
    +
    + +

    § uint8

    + +
    +
    + + + + +
    cbor_int8_callback cbor_callbacks::uint8
    +
    + +

    Unsigned int.

    + +

    Definition at line 50 of file callbacks.h.

    + +
    +
    + +

    § undefined

    + +
    +
    + + + + +
    cbor_simple_callback cbor_callbacks::undefined
    +
    + +

    Undef.

    + +

    Definition at line 97 of file callbacks.h.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/docs/doxygen/structcbor__decoder__result.html b/docs/doxygen/structcbor__decoder__result.html new file mode 100644 index 00000000..04400347 --- /dev/null +++ b/docs/doxygen/structcbor__decoder__result.html @@ -0,0 +1,137 @@ + + + + + + + +libcbor: cbor_decoder_result Struct Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    cbor_decoder_result Struct Reference
    +
    +
    + +

    Streaming decoder result. + More...

    + +

    #include <data.h>

    + + + + + + + + +

    +Data Fields

    size_t read
     Bytes read. More...
     
    enum cbor_decoder_status status
     The result. More...
     
    +

    Detailed Description

    +

    Streaming decoder result.

    + +

    Definition at line 201 of file data.h.

    +

    Field Documentation

    + +

    § read

    + +
    +
    + + + + +
    size_t cbor_decoder_result::read
    +
    + +

    Bytes read.

    + +

    Definition at line 203 of file data.h.

    + +
    +
    + +

    § status

    + +
    +
    + + + + +
    enum cbor_decoder_status cbor_decoder_result::status
    +
    + +

    The result.

    + +

    Definition at line 205 of file data.h.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/docs/doxygen/structcbor__error.html b/docs/doxygen/structcbor__error.html new file mode 100644 index 00000000..0c5a0575 --- /dev/null +++ b/docs/doxygen/structcbor__error.html @@ -0,0 +1,137 @@ + + + + + + + +libcbor: cbor_error Struct Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    cbor_error Struct Reference
    +
    +
    + +

    High-level decoding error. + More...

    + +

    #include <data.h>

    + + + + + + + + +

    +Data Fields

    size_t position
     Aproximate position. More...
     
    cbor_error_code code
     Description. More...
     
    +

    Detailed Description

    +

    High-level decoding error.

    + +

    Definition at line 171 of file data.h.

    +

    Field Documentation

    + +

    § code

    + +
    +
    + + + + +
    cbor_error_code cbor_error::code
    +
    + +

    Description.

    + +

    Definition at line 175 of file data.h.

    + +
    +
    + +

    § position

    + +
    +
    + + + + +
    size_t cbor_error::position
    +
    + +

    Aproximate position.

    + +

    Definition at line 173 of file data.h.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/docs/doxygen/structcbor__indefinite__string__data.html b/docs/doxygen/structcbor__indefinite__string__data.html new file mode 100644 index 00000000..f4a64c1b --- /dev/null +++ b/docs/doxygen/structcbor__indefinite__string__data.html @@ -0,0 +1,150 @@ + + + + + + + +libcbor: cbor_indefinite_string_data Struct Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    cbor_indefinite_string_data Struct Reference
    +
    +
    + +

    Defines cbor_item_t::data structure for indefinite strings and bytestrings. + More...

    + +

    #include <data.h>

    + + + + + + + + +

    +Data Fields

    size_t chunk_count
     
    size_t chunk_capacity
     
    cbor_item_t ** chunks
     
    +

    Detailed Description

    +

    Defines cbor_item_t::data structure for indefinite strings and bytestrings.

    +

    Used to cast the raw representation for a sane manipulation

    + +

    Definition at line 164 of file data.h.

    +

    Field Documentation

    + +

    § chunk_capacity

    + +
    +
    + + + + +
    size_t cbor_indefinite_string_data::chunk_capacity
    +
    + +

    Definition at line 166 of file data.h.

    + +
    +
    + +

    § chunk_count

    + +
    +
    + + + + +
    size_t cbor_indefinite_string_data::chunk_count
    +
    + +

    Definition at line 165 of file data.h.

    + +
    +
    + +

    § chunks

    + +
    +
    + + + + +
    cbor_item_t* * cbor_indefinite_string_data::chunks
    +
    + +

    Definition at line 167 of file data.h.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/docs/doxygen/structcbor__item__t.html b/docs/doxygen/structcbor__item__t.html new file mode 100644 index 00000000..c4bc9886 --- /dev/null +++ b/docs/doxygen/structcbor__item__t.html @@ -0,0 +1,179 @@ + + + + + + + +libcbor: cbor_item_t Struct Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    cbor_item_t Struct Reference
    +
    +
    + +

    The item handle. + More...

    + +

    #include <data.h>

    + + + + + + + + + + + + + + +

    +Data Fields

    union cbor_item_metadata metadata
     Discriminated by type. More...
     
    size_t refcount
     Reference count - initialize to 0. More...
     
    cbor_type type
     Major type discriminator. More...
     
    unsigned char * data
     Raw data block - interpretation depends on metadata. More...
     
    +

    Detailed Description

    +

    The item handle.

    + +

    Definition at line 149 of file data.h.

    +

    Field Documentation

    + +

    § data

    + +
    +
    + + + + +
    unsigned char* cbor_item_t::data
    +
    + +

    Raw data block - interpretation depends on metadata.

    + +

    Definition at line 157 of file data.h.

    + +
    +
    + +

    § metadata

    + +
    +
    + + + + +
    union cbor_item_metadata cbor_item_t::metadata
    +
    + +

    Discriminated by type.

    + +

    Definition at line 151 of file data.h.

    + +
    +
    + +

    § refcount

    + +
    +
    + + + + +
    size_t cbor_item_t::refcount
    +
    + +

    Reference count - initialize to 0.

    + +

    Definition at line 153 of file data.h.

    + +
    +
    + +

    § type

    + +
    +
    + + + + +
    cbor_type cbor_item_t::type
    +
    + +

    Major type discriminator.

    + +

    Definition at line 155 of file data.h.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/docs/doxygen/structcbor__load__result.html b/docs/doxygen/structcbor__load__result.html new file mode 100644 index 00000000..9d12a466 --- /dev/null +++ b/docs/doxygen/structcbor__load__result.html @@ -0,0 +1,137 @@ + + + + + + + +libcbor: cbor_load_result Struct Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    cbor_load_result Struct Reference
    +
    +
    + +

    High-level decoding result. + More...

    + +

    #include <data.h>

    + + + + + + + + +

    +Data Fields

    struct cbor_error error
     Error indicator. More...
     
    size_t read
     Number of bytes read. More...
     
    +

    Detailed Description

    +

    High-level decoding result.

    + +

    Definition at line 184 of file data.h.

    +

    Field Documentation

    + +

    § error

    + +
    +
    + + + + +
    struct cbor_error cbor_load_result::error
    +
    + +

    Error indicator.

    + +

    Definition at line 186 of file data.h.

    + +
    +
    + +

    § read

    + +
    +
    + + + + +
    size_t cbor_load_result::read
    +
    + +

    Number of bytes read.

    + +

    Definition at line 188 of file data.h.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/docs/doxygen/structcbor__pair.html b/docs/doxygen/structcbor__pair.html new file mode 100644 index 00000000..c8c6a99c --- /dev/null +++ b/docs/doxygen/structcbor__pair.html @@ -0,0 +1,131 @@ + + + + + + + +libcbor: cbor_pair Struct Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    cbor_pair Struct Reference
    +
    +
    + +

    Simple pair of items for use in maps. + More...

    + +

    #include <data.h>

    + + + + + + +

    +Data Fields

    cbor_item_tkey
     
    cbor_item_tvalue
     
    +

    Detailed Description

    +

    Simple pair of items for use in maps.

    + +

    Definition at line 179 of file data.h.

    +

    Field Documentation

    + +

    § key

    + +
    +
    + + + + +
    cbor_item_t* cbor_pair::key
    +
    + +

    Definition at line 180 of file data.h.

    + +
    +
    + +

    § value

    + +
    +
    + + + + +
    cbor_item_t * cbor_pair::value
    +
    + +

    Definition at line 180 of file data.h.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/docs/doxygen/sync_off.png b/docs/doxygen/sync_off.png new file mode 100644 index 00000000..3b443fc6 Binary files /dev/null and b/docs/doxygen/sync_off.png differ diff --git a/docs/doxygen/sync_on.png b/docs/doxygen/sync_on.png new file mode 100644 index 00000000..e08320fb Binary files /dev/null and b/docs/doxygen/sync_on.png differ diff --git a/docs/doxygen/tab_a.png b/docs/doxygen/tab_a.png new file mode 100644 index 00000000..3b725c41 Binary files /dev/null and b/docs/doxygen/tab_a.png differ diff --git a/docs/doxygen/tab_b.png b/docs/doxygen/tab_b.png new file mode 100644 index 00000000..e2b4a863 Binary files /dev/null and b/docs/doxygen/tab_b.png differ diff --git a/docs/doxygen/tab_h.png b/docs/doxygen/tab_h.png new file mode 100644 index 00000000..fd5cb705 Binary files /dev/null and b/docs/doxygen/tab_h.png differ diff --git a/docs/doxygen/tab_s.png b/docs/doxygen/tab_s.png new file mode 100644 index 00000000..ab478c95 Binary files /dev/null and b/docs/doxygen/tab_s.png differ diff --git a/docs/doxygen/tabs.css b/docs/doxygen/tabs.css new file mode 100644 index 00000000..a28614b8 --- /dev/null +++ b/docs/doxygen/tabs.css @@ -0,0 +1 @@ +.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#doc-content{overflow:auto;display:block;padding:0;margin:0;-webkit-overflow-scrolling:touch}.sm-dox{background-image:url("tab_b.png")}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:"Lucida Grande","Geneva","Helvetica",Arial,sans-serif;font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:0 1px 1px rgba(255,255,255,0.9);color:#283a5d;outline:0}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace!important;text-align:center;text-shadow:none;background:rgba(255,255,255,0.5);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:rgba(162,162,162,0.1)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:white;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:url("tab_b.png");line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:#283a5d transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:url("tab_s.png");background-repeat:no-repeat;background-position:right;-moz-border-radius:0!important;-webkit-border-radius:0;border-radius:0!important}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a:hover span.sub-arrow{border-color:white transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent #fff transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:#fff;-moz-border-radius:5px!important;-webkit-border-radius:5px;border-radius:5px!important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent #555;border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:#555;background-image:none;border:0!important;color:#555;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent white}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:#fff;height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent #555 transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:#555 transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px!important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:url("tab_b.png")}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:#fff}} \ No newline at end of file diff --git a/docs/doxygen/tags_8c.html b/docs/doxygen/tags_8c.html new file mode 100644 index 00000000..958b1ab5 --- /dev/null +++ b/docs/doxygen/tags_8c.html @@ -0,0 +1,271 @@ + + + + + + + +libcbor: src/cbor/tags.c File Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    tags.c File Reference
    +
    +
    +
    #include "tags.h"
    +
    +

    Go to the source code of this file.

    + + + + + + + + + + + + + + + + + +

    +Functions

    cbor_item_tcbor_new_tag (uint64_t value)
     Create a new tag. More...
     
    cbor_item_tcbor_tag_item (const cbor_item_t *item)
     Get the tagged item. More...
     
    uint64_t cbor_tag_value (const cbor_item_t *item)
     Get tag value. More...
     
    void cbor_tag_set_item (cbor_item_t *item, cbor_item_t *tagged_item)
     Set the tagged item. More...
     
    cbor_item_tcbor_build_tag (uint64_t value, cbor_item_t *item)
     Build a new tag. More...
     
    +

    Function Documentation

    + +

    § cbor_build_tag()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    cbor_item_t* cbor_build_tag (uint64_t value,
    cbor_item_titem 
    )
    +
    + +

    Build a new tag.

    +
    Parameters
    + + + +
    item[incref]The tagee
    valueTag value
    +
    +
    +
    Returns
    new tag item
    + +

    Definition at line 41 of file tags.c.

    + +
    +
    + +

    § cbor_new_tag()

    + +
    +
    + + + + + + + + +
    cbor_item_t* cbor_new_tag (uint64_t value)
    +
    + +

    Create a new tag.

    +
    Parameters
    + + +
    valueThe tag value. Please consult the tag repository
    +
    +
    +
    Returns
    new tag. Item reference is NULL.
    + +

    Definition at line 10 of file tags.c.

    + +
    +
    + +

    § cbor_tag_item()

    + +
    +
    + + + + + + + + +
    cbor_item_t* cbor_tag_item (const cbor_item_titem)
    +
    + +

    Get the tagged item.

    +
    Parameters
    + + +
    item[borrow]A tag
    +
    +
    +
    Returns
    incref the tagged item
    + +

    Definition at line 22 of file tags.c.

    + +
    +
    + +

    § cbor_tag_set_item()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void cbor_tag_set_item (cbor_item_titem,
    cbor_item_ttagged_item 
    )
    +
    + +

    Set the tagged item.

    +
    Parameters
    + + + +
    item[borrow]A tag
    tagged_item[incref]The item to tag
    +
    +
    + +

    Definition at line 34 of file tags.c.

    + +
    +
    + +

    § cbor_tag_value()

    + +
    +
    + + + + + + + + +
    uint64_t cbor_tag_value (const cbor_item_titem)
    +
    + +

    Get tag value.

    +
    Parameters
    + + +
    item[borrow]A tag
    +
    +
    +
    Returns
    The tag value. Please consult the tag repository
    + +

    Definition at line 28 of file tags.c.

    + +
    +
    +
    + + + + diff --git a/docs/doxygen/tags_8c_source.html b/docs/doxygen/tags_8c_source.html new file mode 100644 index 00000000..ed989bfc --- /dev/null +++ b/docs/doxygen/tags_8c_source.html @@ -0,0 +1,97 @@ + + + + + + + +libcbor: src/cbor/tags.c Source File + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    tags.c
    +
    +
    +Go to the documentation of this file.
    1 /*
    2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
    3  *
    4  * libcbor is free software; you can redistribute it and/or modify
    5  * it under the terms of the MIT license. See LICENSE for details.
    6  */
    7 
    8 #include "tags.h"
    9 
    10 cbor_item_t *cbor_new_tag(uint64_t value)
    11 {
    12  cbor_item_t *item = _CBOR_MALLOC(sizeof(cbor_item_t));
    13  *item = (cbor_item_t) {
    14  .refcount = 1,
    15  .type = CBOR_TYPE_TAG,
    16  .metadata = {.tag_metadata = {.value = value, .tagged_item = NULL}},
    17  .data = NULL /* Never used */
    18  };
    19  return item;
    20 }
    21 
    23 {
    24  assert(cbor_isa_tag(item));
    25  return item->metadata.tag_metadata.tagged_item;
    26 }
    27 
    28 uint64_t cbor_tag_value(const cbor_item_t *item)
    29 {
    30  assert(cbor_isa_tag(item));
    31  return item->metadata.tag_metadata.value;
    32 }
    33 
    34 void cbor_tag_set_item(cbor_item_t *item, cbor_item_t *tagged_item)
    35 {
    36  assert(cbor_isa_tag(item));
    37  cbor_incref(tagged_item);
    38  item->metadata.tag_metadata.tagged_item = tagged_item;
    39 }
    40 
    41 cbor_item_t * cbor_build_tag(uint64_t value, cbor_item_t * item) {
    42  cbor_item_t *res = cbor_new_tag(value);
    43  cbor_tag_set_item(res, item);
    44  return res;
    45 }
    struct cbor_item_t cbor_item_t
    The item handle.
    +
    6 - tags
    Definition: data.h:31
    +
    union cbor_item_metadata metadata
    Discriminated by type.
    Definition: data.h:151
    +
    cbor_item_t * cbor_new_tag(uint64_t value)
    Create a new tag.
    Definition: tags.c:10
    +
    cbor_item_t * cbor_tag_item(const cbor_item_t *item)
    Get the tagged item.
    Definition: tags.c:22
    +
    cbor_item_t * cbor_build_tag(uint64_t value, cbor_item_t *item)
    Build a new tag.
    Definition: tags.c:41
    +
    #define _CBOR_MALLOC
    Definition: common.h:84
    +
    size_t refcount
    Reference count - initialize to 0.
    Definition: data.h:153
    +
    cbor_item_t * cbor_incref(cbor_item_t *item)
    Increases the reference count by one.
    Definition: common.c:93
    +
    struct _cbor_tag_metadata tag_metadata
    Definition: data.h:144
    +
    uint64_t cbor_tag_value(const cbor_item_t *item)
    Get tag value.
    Definition: tags.c:28
    +
    struct cbor_item_t * tagged_item
    Definition: data.h:115
    +
    bool cbor_isa_tag(const cbor_item_t *item)
    Does the item have the appropriate major type?
    Definition: common.c:48
    +
    uint64_t value
    Definition: data.h:116
    +
    void cbor_tag_set_item(cbor_item_t *item, cbor_item_t *tagged_item)
    Set the tagged item.
    Definition: tags.c:34
    + +
    The item handle.
    Definition: data.h:149
    +
    + + + + diff --git a/docs/doxygen/tags_8h.html b/docs/doxygen/tags_8h.html new file mode 100644 index 00000000..d3f30a4b --- /dev/null +++ b/docs/doxygen/tags_8h.html @@ -0,0 +1,271 @@ + + + + + + + +libcbor: src/cbor/tags.h File Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    tags.h File Reference
    +
    +
    +
    #include "cbor/common.h"
    +
    +

    Go to the source code of this file.

    + + + + + + + + + + + + + + + + + +

    +Functions

    cbor_item_tcbor_new_tag (uint64_t value)
     Create a new tag. More...
     
    cbor_item_tcbor_tag_item (const cbor_item_t *item)
     Get the tagged item. More...
     
    uint64_t cbor_tag_value (const cbor_item_t *item)
     Get tag value. More...
     
    void cbor_tag_set_item (cbor_item_t *item, cbor_item_t *tagged_item)
     Set the tagged item. More...
     
    cbor_item_tcbor_build_tag (uint64_t value, cbor_item_t *item)
     Build a new tag. More...
     
    +

    Function Documentation

    + +

    § cbor_build_tag()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    cbor_item_t* cbor_build_tag (uint64_t value,
    cbor_item_titem 
    )
    +
    + +

    Build a new tag.

    +
    Parameters
    + + + +
    item[incref]The tagee
    valueTag value
    +
    +
    +
    Returns
    new tag item
    + +

    Definition at line 41 of file tags.c.

    + +
    +
    + +

    § cbor_new_tag()

    + +
    +
    + + + + + + + + +
    cbor_item_t* cbor_new_tag (uint64_t value)
    +
    + +

    Create a new tag.

    +
    Parameters
    + + +
    valueThe tag value. Please consult the tag repository
    +
    +
    +
    Returns
    new tag. Item reference is NULL.
    + +

    Definition at line 10 of file tags.c.

    + +
    +
    + +

    § cbor_tag_item()

    + +
    +
    + + + + + + + + +
    cbor_item_t* cbor_tag_item (const cbor_item_titem)
    +
    + +

    Get the tagged item.

    +
    Parameters
    + + +
    item[borrow]A tag
    +
    +
    +
    Returns
    incref the tagged item
    + +

    Definition at line 22 of file tags.c.

    + +
    +
    + +

    § cbor_tag_set_item()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    void cbor_tag_set_item (cbor_item_titem,
    cbor_item_ttagged_item 
    )
    +
    + +

    Set the tagged item.

    +
    Parameters
    + + + +
    item[borrow]A tag
    tagged_item[incref]The item to tag
    +
    +
    + +

    Definition at line 34 of file tags.c.

    + +
    +
    + +

    § cbor_tag_value()

    + +
    +
    + + + + + + + + +
    uint64_t cbor_tag_value (const cbor_item_titem)
    +
    + +

    Get tag value.

    +
    Parameters
    + + +
    item[borrow]A tag
    +
    +
    +
    Returns
    The tag value. Please consult the tag repository
    + +

    Definition at line 28 of file tags.c.

    + +
    +
    +
    + + + + diff --git a/docs/doxygen/tags_8h_source.html b/docs/doxygen/tags_8h_source.html new file mode 100644 index 00000000..87298b86 --- /dev/null +++ b/docs/doxygen/tags_8h_source.html @@ -0,0 +1,87 @@ + + + + + + + +libcbor: src/cbor/tags.h Source File + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    tags.h
    +
    +
    +Go to the documentation of this file.
    1 /*
    2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
    3  *
    4  * libcbor is free software; you can redistribute it and/or modify
    5  * it under the terms of the MIT license. See LICENSE for details.
    6  */
    7 
    8 #ifndef LIBCBOR_TAGS_H
    9 #define LIBCBOR_TAGS_H
    10 
    11 #include "cbor/common.h"
    12 
    13 #ifdef __cplusplus
    14 extern "C" {
    15 #endif
    16 
    17 /*
    18 * ============================================================================
    19 * Tag manipulation
    20 * ============================================================================
    21 */
    22 
    28 cbor_item_t *cbor_new_tag(uint64_t value);
    29 
    36 
    42 uint64_t cbor_tag_value(const cbor_item_t *item);
    43 
    49 void cbor_tag_set_item(cbor_item_t *item, cbor_item_t *tagged_item);
    50 
    57 cbor_item_t * cbor_build_tag(uint64_t value, cbor_item_t * item);
    58 
    59 #ifdef __cplusplus
    60 }
    61 #endif
    62 
    63 #endif //LIBCBOR_TAGS_H
    uint64_t cbor_tag_value(const cbor_item_t *item)
    Get tag value.
    Definition: tags.c:28
    +
    void cbor_tag_set_item(cbor_item_t *item, cbor_item_t *tagged_item)
    Set the tagged item.
    Definition: tags.c:34
    +
    cbor_item_t * cbor_tag_item(const cbor_item_t *item)
    Get the tagged item.
    Definition: tags.c:22
    +
    cbor_item_t * cbor_new_tag(uint64_t value)
    Create a new tag.
    Definition: tags.c:10
    +
    cbor_item_t * cbor_build_tag(uint64_t value, cbor_item_t *item)
    Build a new tag.
    Definition: tags.c:41
    + +
    The item handle.
    Definition: data.h:149
    +
    + + + + diff --git a/docs/doxygen/unicode_8c.html b/docs/doxygen/unicode_8c.html new file mode 100644 index 00000000..77fbdb64 --- /dev/null +++ b/docs/doxygen/unicode_8c.html @@ -0,0 +1,207 @@ + + + + + + + +libcbor: src/cbor/internal/unicode.c File Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    unicode.c File Reference
    +
    +
    +
    #include "unicode.h"
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Macros

    #define UTF8_ACCEPT   0
     
    #define UTF8_REJECT   1
     
    + + + + + +

    +Functions

    uint32_t _cbor_unicode_decode (uint32_t *state, uint32_t *codep, uint32_t byte)
     
    size_t _cbor_unicode_codepoint_count (cbor_data source, size_t source_length, struct _cbor_unicode_status *status)
     
    +

    Macro Definition Documentation

    + +

    § UTF8_ACCEPT

    + +
    +
    + + + + +
    #define UTF8_ACCEPT   0
    +
    + +

    Definition at line 10 of file unicode.c.

    + +
    +
    + +

    § UTF8_REJECT

    + +
    +
    + + + + +
    #define UTF8_REJECT   1
    +
    + +

    Definition at line 11 of file unicode.c.

    + +
    +
    +

    Function Documentation

    + +

    § _cbor_unicode_codepoint_count()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    size_t _cbor_unicode_codepoint_count (cbor_data source,
    size_t source_length,
    struct _cbor_unicode_statusstatus 
    )
    +
    + +

    Definition at line 43 of file unicode.c.

    + +
    +
    + +

    § _cbor_unicode_decode()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    uint32_t _cbor_unicode_decode (uint32_t * state,
    uint32_t * codep,
    uint32_t byte 
    )
    +
    + +

    Definition at line 32 of file unicode.c.

    + +
    +
    +
    + + + + diff --git a/docs/doxygen/unicode_8c_source.html b/docs/doxygen/unicode_8c_source.html new file mode 100644 index 00000000..b7c07c21 --- /dev/null +++ b/docs/doxygen/unicode_8c_source.html @@ -0,0 +1,90 @@ + + + + + + + +libcbor: src/cbor/internal/unicode.c Source File + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    unicode.c
    +
    +
    +Go to the documentation of this file.
    1 /*
    2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
    3  *
    4  * libcbor is free software; you can redistribute it and/or modify
    5  * it under the terms of the MIT license. See LICENSE for details.
    6  */
    7 
    8 #include "unicode.h"
    9 
    10 #define UTF8_ACCEPT 0
    11 #define UTF8_REJECT 1
    12 
    13 static const uint8_t utf8d[] = {
    14  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 00..1f */
    15  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 20..3f */
    16  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 40..5f */
    17  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 60..7f */
    18  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, /* 80..9f */
    19  7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, /* a0..bf */
    20  8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, /* c0..df */
    21  0xa,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x4,0x3,0x3, /* e0..ef */
    22  0xb,0x6,0x6,0x6,0x5,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8, /* f0..ff */
    23  0x0,0x1,0x2,0x3,0x5,0x8,0x7,0x1,0x1,0x1,0x4,0x6,0x1,0x1,0x1,0x1, /* s0..s0 */
    24  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,0,1,0,1,1,1,1,1,1, /* s1..s2 */
    25  1,2,1,1,1,1,1,2,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1, /* s3..s4 */
    26  1,2,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,3,1,1,1,1,1,1, /* s5..s6 */
    27  1,3,1,1,1,1,1,3,1,3,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* s7..s8 */
    28 };
    29 
    30 /* Copyright of this function: (c) 2008-2009 Bjoern Hoehrmann <bjoern@hoehrmann.de> */
    31 /* See http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ for details. */
    32 uint32_t _cbor_unicode_decode(uint32_t* state, uint32_t* codep, uint32_t byte) {
    33  uint32_t type = utf8d[byte];
    34 
    35  *codep = (*state != UTF8_ACCEPT) ?
    36  (byte & 0x3fu) | (*codep << 6) :
    37  (0xff >> type) & (byte);
    38 
    39  *state = utf8d[256 + *state * 16 + type];
    40  return *state;
    41 }
    42 
    43 size_t _cbor_unicode_codepoint_count(cbor_data source, size_t source_length, struct _cbor_unicode_status * status)
    44 {
    45  *status = (struct _cbor_unicode_status) { .location = 0, .status = _CBOR_UNICODE_OK };
    46  uint32_t codepoint, state = UTF8_ACCEPT, res;
    47  size_t pos = 0, count = 0;
    48 
    49  for (; pos < source_length; pos++)
    50  {
    51  res = _cbor_unicode_decode(&state, &codepoint, source[pos]);
    52 
    53  if (res == UTF8_ACCEPT) {
    54  count++;
    55  } else if (res == UTF8_REJECT) {
    56  goto error;
    57  }
    58  }
    59 
    60  /* Unfinished multibyte codepoint */
    61  if (state != UTF8_ACCEPT)
    62  goto error;
    63 
    64  return count;
    65 
    66  error:
    67  *status = (struct _cbor_unicode_status) { .location = pos, .status = _CBOR_UNICODE_BADCP };
    68  return -1;
    69 }
    +
    #define UTF8_REJECT
    Definition: unicode.c:11
    +
    uint32_t _cbor_unicode_decode(uint32_t *state, uint32_t *codep, uint32_t byte)
    Definition: unicode.c:32
    +
    #define UTF8_ACCEPT
    Definition: unicode.c:10
    +
    Signals unicode validation error and possibly its location.
    Definition: unicode.h:23
    + +
    const unsigned char * cbor_data
    Definition: data.h:20
    +
    size_t _cbor_unicode_codepoint_count(cbor_data source, size_t source_length, struct _cbor_unicode_status *status)
    Definition: unicode.c:43
    + + +
    + + + + diff --git a/docs/doxygen/unicode_8h.html b/docs/doxygen/unicode_8h.html new file mode 100644 index 00000000..8de8c6a5 --- /dev/null +++ b/docs/doxygen/unicode_8h.html @@ -0,0 +1,164 @@ + + + + + + + +libcbor: src/cbor/internal/unicode.h File Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    unicode.h File Reference
    +
    +
    +
    #include "cbor/common.h"
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Data Structures

    struct  _cbor_unicode_status
     Signals unicode validation error and possibly its location. More...
     
    + + + +

    +Enumerations

    enum  _cbor_unicode_status_error { _CBOR_UNICODE_OK, +_CBOR_UNICODE_BADCP + }
     
    + + + +

    +Functions

    size_t _cbor_unicode_codepoint_count (cbor_data source, size_t source_length, struct _cbor_unicode_status *status)
     
    +

    Enumeration Type Documentation

    + +

    § _cbor_unicode_status_error

    + +
    +
    + + + + +
    enum _cbor_unicode_status_error
    +
    + + + +
    Enumerator
    _CBOR_UNICODE_OK 
    _CBOR_UNICODE_BADCP 
    + +

    Definition at line 17 of file unicode.h.

    + +
    +
    +

    Function Documentation

    + +

    § _cbor_unicode_codepoint_count()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    size_t _cbor_unicode_codepoint_count (cbor_data source,
    size_t source_length,
    struct _cbor_unicode_statusstatus 
    )
    +
    + +

    Definition at line 43 of file unicode.c.

    + +
    +
    +
    + + + + diff --git a/docs/doxygen/unicode_8h_source.html b/docs/doxygen/unicode_8h_source.html new file mode 100644 index 00000000..68dd77d9 --- /dev/null +++ b/docs/doxygen/unicode_8h_source.html @@ -0,0 +1,89 @@ + + + + + + + +libcbor: src/cbor/internal/unicode.h Source File + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    unicode.h
    +
    +
    +Go to the documentation of this file.
    1 /*
    2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
    3  *
    4  * libcbor is free software; you can redistribute it and/or modify
    5  * it under the terms of the MIT license. See LICENSE for details.
    6  */
    7 
    8 #ifndef LIBCBOR_UNICODE_H
    9 #define LIBCBOR_UNICODE_H
    10 
    11 #include "cbor/common.h"
    12 
    13 #ifdef __cplusplus
    14 extern "C" {
    15 #endif
    16 
    20 };
    21 
    25  size_t location;
    26 };
    27 
    28 size_t _cbor_unicode_codepoint_count(cbor_data source, size_t source_length, struct _cbor_unicode_status * status);
    29 
    30 #ifdef __cplusplus
    31 }
    32 #endif
    33 
    34 #endif //LIBCBOR_UNICODE_H
    enum _cbor_unicode_status_error status
    Definition: unicode.h:24
    +
    Signals unicode validation error and possibly its location.
    Definition: unicode.h:23
    + +
    const unsigned char * cbor_data
    Definition: data.h:20
    +
    size_t _cbor_unicode_codepoint_count(cbor_data source, size_t source_length, struct _cbor_unicode_status *status)
    Definition: unicode.c:43
    +
    _cbor_unicode_status_error
    Definition: unicode.h:17
    + + + +
    + + + + diff --git a/docs/doxygen/union__cbor__double__helper.html b/docs/doxygen/union__cbor__double__helper.html new file mode 100644 index 00000000..780c87e9 --- /dev/null +++ b/docs/doxygen/union__cbor__double__helper.html @@ -0,0 +1,131 @@ + + + + + + + +libcbor: _cbor_double_helper Union Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    _cbor_double_helper Union Reference
    +
    +
    + +

    Raw memory casts helper. + More...

    + +

    #include <data.h>

    + + + + + + +

    +Data Fields

    double as_double
     
    uint64_t as_uint
     
    +

    Detailed Description

    +

    Raw memory casts helper.

    + +

    Definition at line 132 of file data.h.

    +

    Field Documentation

    + +

    § as_double

    + +
    +
    + + + + +
    double _cbor_double_helper::as_double
    +
    + +

    Definition at line 133 of file data.h.

    + +
    +
    + +

    § as_uint

    + +
    +
    + + + + +
    uint64_t _cbor_double_helper::as_uint
    +
    + +

    Definition at line 134 of file data.h.

    + +
    +
    +
    The documentation for this union was generated from the following file: +
    + + + + diff --git a/docs/doxygen/union__cbor__float__helper.html b/docs/doxygen/union__cbor__float__helper.html new file mode 100644 index 00000000..0b4042d9 --- /dev/null +++ b/docs/doxygen/union__cbor__float__helper.html @@ -0,0 +1,131 @@ + + + + + + + +libcbor: _cbor_float_helper Union Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    _cbor_float_helper Union Reference
    +
    +
    + +

    Raw memory casts helper. + More...

    + +

    #include <data.h>

    + + + + + + +

    +Data Fields

    float as_float
     
    uint32_t as_uint
     
    +

    Detailed Description

    +

    Raw memory casts helper.

    + +

    Definition at line 126 of file data.h.

    +

    Field Documentation

    + +

    § as_float

    + +
    +
    + + + + +
    float _cbor_float_helper::as_float
    +
    + +

    Definition at line 127 of file data.h.

    + +
    +
    + +

    § as_uint

    + +
    +
    + + + + +
    uint32_t _cbor_float_helper::as_uint
    +
    + +

    Definition at line 128 of file data.h.

    + +
    +
    +
    The documentation for this union was generated from the following file: +
    + + + + diff --git a/docs/doxygen/unioncbor__item__metadata.html b/docs/doxygen/unioncbor__item__metadata.html new file mode 100644 index 00000000..2422fac3 --- /dev/null +++ b/docs/doxygen/unioncbor__item__metadata.html @@ -0,0 +1,221 @@ + + + + + + + +libcbor: cbor_item_metadata Union Reference + + + + + + + + + + +
    +
    + + + + + + +
    +
    libcbor +  0.5.0 +
    +
    libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    cbor_item_metadata Union Reference
    +
    +
    + +

    Union of metadata across all possible types - discriminated in cbor_item_t. + More...

    + +

    #include <data.h>

    + + + + + + + + + + + + + + + + +

    +Data Fields

    struct _cbor_int_metadata int_metadata
     
    struct _cbor_bytestring_metadata bytestring_metadata
     
    struct _cbor_string_metadata string_metadata
     
    struct _cbor_array_metadata array_metadata
     
    struct _cbor_map_metadata map_metadata
     
    struct _cbor_tag_metadata tag_metadata
     
    struct _cbor_float_ctrl_metadata float_ctrl_metadata
     
    +

    Detailed Description

    +

    Union of metadata across all possible types - discriminated in cbor_item_t.

    + +

    Definition at line 138 of file data.h.

    +

    Field Documentation

    + +

    § array_metadata

    + +
    +
    + + + + +
    struct _cbor_array_metadata cbor_item_metadata::array_metadata
    +
    + +

    Definition at line 142 of file data.h.

    + +
    +
    + +

    § bytestring_metadata

    + +
    +
    + + + + +
    struct _cbor_bytestring_metadata cbor_item_metadata::bytestring_metadata
    +
    + +

    Definition at line 140 of file data.h.

    + +
    +
    + +

    § float_ctrl_metadata

    + +
    +
    + + + + +
    struct _cbor_float_ctrl_metadata cbor_item_metadata::float_ctrl_metadata
    +
    + +

    Definition at line 145 of file data.h.

    + +
    +
    + +

    § int_metadata

    + +
    +
    + + + + +
    struct _cbor_int_metadata cbor_item_metadata::int_metadata
    +
    + +

    Definition at line 139 of file data.h.

    + +
    +
    + +

    § map_metadata

    + +
    +
    + + + + +
    struct _cbor_map_metadata cbor_item_metadata::map_metadata
    +
    + +

    Definition at line 143 of file data.h.

    + +
    +
    + +

    § string_metadata

    + +
    +
    + + + + +
    struct _cbor_string_metadata cbor_item_metadata::string_metadata
    +
    + +

    Definition at line 141 of file data.h.

    + +
    +
    + +

    § tag_metadata

    + +
    +
    + + + + +
    struct _cbor_tag_metadata cbor_item_metadata::tag_metadata
    +
    + +

    Definition at line 144 of file data.h.

    + +
    +
    +
    The documentation for this union was generated from the following file: +
    + + + +