RMW desert
1.0
Loading...
Searching...
No Matches
cbor
include
cbor
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)
11
extern
"C"
{
12
#endif
13
14
#include "cbor/base.h"
15
#include <stdbool.h>
16
17
struct
cbor_parser
{
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
25
bool
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
29
size_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
36
const
char
*cbor_stringify_error(cbor_error_t err);
37
const
char
*cbor_stringify_item(
cbor_item_t
*item);
38
39
#if defined(__cplusplus)
40
}
41
#endif
42
43
#endif
/* CBOR_HELPER_H */
cbor_item_t
Definition
base.h:48
cbor_parser
Definition
helper.h:17
cbor_reader_t
Definition
base.h:55
Generated by
1.9.8