RMW desert 1.0
Loading...
Searching...
No Matches
helper.h
1/*
2 * SPDX-FileCopyrightText: 2021 Kyunghwan Kwon <k@mononn.com>
3 *
4 * SPDX-License-Identifier: MIT
5 */
6
7#ifndef CBOR_HELPER_H
8#define CBOR_HELPER_H
9
10#if defined(__cplusplus)
11extern "C" {
12#endif
13
14#include "cbor/base.h"
15#include <stdbool.h>
16
18 const void *key;
19 size_t keylen;
20 void (*run)(const cbor_reader_t *reader,
21 const struct cbor_parser *parser,
22 const cbor_item_t *item, void *arg);
23};
24
25bool cbor_unmarshal(cbor_reader_t *reader,
26 const struct cbor_parser *parsers, size_t nr_parsers,
27 const void *msg, size_t msglen, void *arg);
28
29size_t cbor_iterate(const cbor_reader_t *reader,
30 const cbor_item_t *parent,
31 void (*callback_each)(const cbor_reader_t *reader,
32 const cbor_item_t *item, const cbor_item_t *parent,
33 void *arg),
34 void *arg);
35
36const char *cbor_stringify_error(cbor_error_t err);
37const char *cbor_stringify_item(cbor_item_t *item);
38
39#if defined(__cplusplus)
40}
41#endif
42
43#endif /* CBOR_HELPER_H */
Definition base.h:48
Definition helper.h:17
Definition base.h:55