Searched refs:cn_cbor (Results 1 – 8 of 8) sorted by relevance
/external/cn-cbor/include/cn-cbor/ |
D | cn-cbor.h | 76 typedef struct cn_cbor { struct 101 struct cn_cbor* first_child; argument 103 struct cn_cbor* last_child; argument 105 struct cn_cbor* next; argument 107 struct cn_cbor* parent; argument 108 } cn_cbor; typedef 221 cn_cbor* cn_cbor_decode(const uint8_t *buf, size_t len CBOR_CONTEXT, cn_cbor_errback *errp); 230 cn_cbor* cn_cbor_mapget_string(const cn_cbor* cb, const char* key); 239 cn_cbor* cn_cbor_mapget_int(const cn_cbor* cb, int key); 248 cn_cbor* cn_cbor_index(const cn_cbor* cb, unsigned int idx); [all …]
|
/external/cn-cbor/src/ |
D | cn-create.c | 19 cn_cbor* cn_cbor_map_create(CBOR_CONTEXT_COMMA cn_cbor_errback *errp) in cn_cbor_map_create() 21 cn_cbor* ret; in cn_cbor_map_create() 30 cn_cbor* cn_cbor_data_create(const uint8_t* data, int len in cn_cbor_data_create() 34 cn_cbor* ret; in cn_cbor_data_create() 44 cn_cbor* cn_cbor_string_create(const char* data in cn_cbor_string_create() 48 cn_cbor* ret; in cn_cbor_string_create() 58 cn_cbor* cn_cbor_int_create(int64_t value in cn_cbor_int_create() 62 cn_cbor* ret; in cn_cbor_int_create() 76 static bool _append_kv(cn_cbor *cb_map, cn_cbor *key, cn_cbor *val) in _append_kv() 94 bool cn_cbor_map_put(cn_cbor* cb_map, in cn_cbor_map_put() [all …]
|
D | cn-get.c | 7 cn_cbor* cn_cbor_mapget_int(const cn_cbor* cb, int key) { in cn_cbor_mapget_int() 8 cn_cbor* cp; in cn_cbor_mapget_int() 29 cn_cbor* cn_cbor_mapget_string(const cn_cbor* cb, const char* key) { in cn_cbor_mapget_string() 30 cn_cbor *cp; in cn_cbor_mapget_string() 52 cn_cbor* cn_cbor_index(const cn_cbor* cb, unsigned int idx) { in cn_cbor_index() 53 cn_cbor *cp; in cn_cbor_index()
|
D | cn-cbor.c | 23 void cn_cbor_free(cn_cbor* cb CBOR_CONTEXT) { in cn_cbor_free() 24 cn_cbor* p = cb; in cn_cbor_free() 27 cn_cbor* p1; in cn_cbor_free() 82 static cn_cbor *decode_item (struct parse_buf *pb CBOR_CONTEXT, cn_cbor* top_parent) { in decode_item() 85 cn_cbor* parent = top_parent; in decode_item() 90 cn_cbor* cb = NULL; in decode_item() 241 cn_cbor* cn_cbor_decode(const unsigned char* buf, size_t len CBOR_CONTEXT, cn_cbor_errback *errp) { in cn_cbor_decode() 242 cn_cbor catcher = {CN_CBOR_INVALID, 0, {0}, 0, NULL, NULL, NULL, NULL}; in cn_cbor_decode() 244 cn_cbor* ret; in cn_cbor_decode()
|
D | cn-encoder.c | 74 static inline bool is_indefinite(const cn_cbor *cb) in is_indefinite() 180 typedef void (*cn_visit_func)(const cn_cbor *cb, int depth, void *context); 181 static void _visit(const cn_cbor *cb, in _visit() 186 const cn_cbor *p = cb; in _visit() 223 void _encoder_visitor(const cn_cbor *cb, int depth, void *context) in _encoder_visitor() 286 void _encoder_breaker(const cn_cbor *cb, int depth, void *context) in _encoder_breaker() 297 const cn_cbor *cb) in cn_cbor_encoder_write()
|
D | cbor.h | 82 (ctx)->calloc_func(1, sizeof(cn_cbor), (ctx)->context) : \ 83 calloc(1, sizeof(cn_cbor)); 105 #define CN_CALLOC calloc(1, sizeof(cn_cbor))
|
/external/cn-cbor/test/ |
D | cbor_test.c | 114 cn_cbor *cb; in CTEST() 162 cn_cbor *cb; in CTEST() 224 cn_cbor *cb; in CTEST() 228 cn_cbor inv = {CN_CBOR_INVALID, 0, {0}, 0, NULL, NULL, NULL, NULL}; in CTEST() 256 cn_cbor *cb; in CTEST() 279 cn_cbor *cb; in CTEST() 280 cn_cbor *val; in CTEST() 325 const cn_cbor* val; in CTEST() 327 cn_cbor *cb_map = cn_cbor_map_create(CONTEXT_NULL_COMMA &err); in CTEST() 328 cn_cbor *cb_int; in CTEST() [all …]
|
D | test.c | 41 static void dump(const cn_cbor* cb, char* out, char** end, int indent) { in dump() 45 cn_cbor* cp; in dump() 106 const cn_cbor *ret = cn_cbor_decode(buf, len CBOR_CONTEXT_PARAM, &back); in cn_cbor_decode_test() 118 cn_cbor *cb = cn_cbor_decode(s, end-s CBOR_CONTEXT_PARAM, 0); in main()
|