libcbor 0.12.0
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
Loading...
Searching...
No Matches
callbacks.c
Go to the documentation of this file.
1/*
2 * Copyright (c) 2014-2020 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
11 uint8_t _CBOR_UNUSED _val) {}
12
14 uint16_t _CBOR_UNUSED _val) {}
15
17 uint32_t _CBOR_UNUSED _val) {}
18
20 uint64_t _CBOR_UNUSED _val) {}
21
23 uint8_t _CBOR_UNUSED _val) {}
24
26 uint16_t _CBOR_UNUSED _val) {}
27
29 uint32_t _CBOR_UNUSED _val) {}
30
32 uint64_t _CBOR_UNUSED _val) {}
33
36 uint64_t _CBOR_UNUSED _val2) {}
37
39
42 uint64_t _CBOR_UNUSED _val2) {}
43
45
47 uint64_t _CBOR_UNUSED _val) {}
48
50
52 uint64_t _CBOR_UNUSED _val) {}
53
55
57 uint64_t _CBOR_UNUSED _val) {}
58
60 float _CBOR_UNUSED _val) {}
61
63 float _CBOR_UNUSED _val) {}
64
66 double _CBOR_UNUSED _val) {}
67
69
71
73 bool _CBOR_UNUSED _val) {}
74
76
77CBOR_EXPORT const struct cbor_callbacks cbor_empty_callbacks = {
78 /* Type 0 - Unsigned integers */
83
84 /* Type 1 - Negative integers */
89
90 /* Type 2 - Byte strings */
91 .byte_string_start = cbor_null_byte_string_start_callback,
92 .byte_string = cbor_null_byte_string_callback,
93
94 /* Type 3 - Strings */
95 .string_start = cbor_null_string_start_callback,
97
98 /* Type 4 - Arrays */
99 .indef_array_start = cbor_null_indef_array_start_callback,
100 .array_start = cbor_null_array_start_callback,
101
102 /* Type 5 - Maps */
103 .indef_map_start = cbor_null_indef_map_start_callback,
104 .map_start = cbor_null_map_start_callback,
105
106 /* Type 6 - Tags */
108
109 /* Type 7 - Floats & misc */
110 /* Type names cannot be member names */
112 /* 2B float is not supported in standard C */
115 .undefined = cbor_null_undefined_callback,
118
119 /* Shared indefinites */
120 .indef_break = cbor_null_indef_break_callback,
121};
void cbor_null_undefined_callback(void *_ctx _CBOR_UNUSED)
Definition callbacks.c:70
void cbor_null_float8_callback(void *_ctx _CBOR_UNUSED, double _CBOR_UNUSED _val)
Definition callbacks.c:65
const struct cbor_callbacks cbor_empty_callbacks
Dummy callback bundle - does nothing.
Definition callbacks.c:77
void cbor_null_negint16_callback(void *_ctx _CBOR_UNUSED, uint16_t _CBOR_UNUSED _val)
Definition callbacks.c:25
void cbor_null_uint8_callback(void *_ctx _CBOR_UNUSED, uint8_t _CBOR_UNUSED _val)
Definition callbacks.c:10
void cbor_null_float2_callback(void *_ctx _CBOR_UNUSED, float _CBOR_UNUSED _val)
Definition callbacks.c:59
void cbor_null_float4_callback(void *_ctx _CBOR_UNUSED, float _CBOR_UNUSED _val)
Definition callbacks.c:62
void cbor_null_uint32_callback(void *_ctx _CBOR_UNUSED, uint32_t _CBOR_UNUSED _val)
Definition callbacks.c:16
void cbor_null_indef_break_callback(void *_ctx _CBOR_UNUSED)
Definition callbacks.c:75
void cbor_null_string_start_callback(void *_ctx _CBOR_UNUSED)
Definition callbacks.c:38
void cbor_null_boolean_callback(void *_ctx _CBOR_UNUSED, bool _CBOR_UNUSED _val)
Definition callbacks.c:72
void cbor_null_tag_callback(void *_ctx _CBOR_UNUSED, uint64_t _CBOR_UNUSED _val)
Definition callbacks.c:56
void cbor_null_negint32_callback(void *_ctx _CBOR_UNUSED, uint32_t _CBOR_UNUSED _val)
Definition callbacks.c:28
void cbor_null_indef_array_start_callback(void *_ctx _CBOR_UNUSED)
Definition callbacks.c:49
void cbor_null_negint64_callback(void *_ctx _CBOR_UNUSED, uint64_t _CBOR_UNUSED _val)
Definition callbacks.c:31
void cbor_null_array_start_callback(void *_ctx _CBOR_UNUSED, uint64_t _CBOR_UNUSED _val)
Definition callbacks.c:46
void cbor_null_indef_map_start_callback(void *_ctx _CBOR_UNUSED)
Definition callbacks.c:54
void cbor_null_negint8_callback(void *_ctx _CBOR_UNUSED, uint8_t _CBOR_UNUSED _val)
Definition callbacks.c:22
void cbor_null_uint16_callback(void *_ctx _CBOR_UNUSED, uint16_t _CBOR_UNUSED _val)
Definition callbacks.c:13
void cbor_null_null_callback(void *_ctx _CBOR_UNUSED)
Definition callbacks.c:68
void cbor_null_byte_string_start_callback(void *_ctx _CBOR_UNUSED)
Definition callbacks.c:44
void cbor_null_map_start_callback(void *_ctx _CBOR_UNUSED, uint64_t _CBOR_UNUSED _val)
Definition callbacks.c:51
void cbor_null_byte_string_callback(void *_ctx _CBOR_UNUSED, cbor_data _CBOR_UNUSED _val, uint64_t _CBOR_UNUSED _val2)
Definition callbacks.c:40
void cbor_null_string_callback(void *_ctx _CBOR_UNUSED, cbor_data _CBOR_UNUSED _val, uint64_t _CBOR_UNUSED _val2)
Definition callbacks.c:34
void cbor_null_uint64_callback(void *_ctx _CBOR_UNUSED, uint64_t _CBOR_UNUSED _val)
Definition callbacks.c:19
#define _CBOR_UNUSED
Definition common.h:92
const unsigned char * cbor_data
Definition data.h:20
Callback bundle – passed to the decoder.
Definition callbacks.h:51