2 * SPDX-License-Identifier: LGPL-2.1-only
4 * Copyright (C) 2020 Francis Deslauriers <francis.deslauriers@efficios.com>
7 #ifndef _LTTNG_UST_MSGPACK_H
8 #define _LTTNG_UST_MSGPACK_H
12 #include <linux/types.h>
13 #else /* __KERNEL__ */
15 #endif /* __KERNEL__ */
17 struct lttng_msgpack_writer
{
20 const uint8_t *end_write_pos
;
21 uint8_t array_nesting
;
25 void lttng_msgpack_writer_init(
26 struct lttng_msgpack_writer
*writer
,
27 uint8_t *buffer
, size_t size
)
28 __attribute__((visibility("hidden")));
30 void lttng_msgpack_writer_fini(struct lttng_msgpack_writer
*writer
)
31 __attribute__((visibility("hidden")));
33 int lttng_msgpack_write_nil(struct lttng_msgpack_writer
*writer
)
34 __attribute__((visibility("hidden")));
36 int lttng_msgpack_write_true(struct lttng_msgpack_writer
*writer
)
37 __attribute__((visibility("hidden")));
39 int lttng_msgpack_write_false(struct lttng_msgpack_writer
*writer
)
40 __attribute__((visibility("hidden")));
42 int lttng_msgpack_write_unsigned_integer(
43 struct lttng_msgpack_writer
*writer
, uint64_t value
)
44 __attribute__((visibility("hidden")));
46 int lttng_msgpack_write_signed_integer(
47 struct lttng_msgpack_writer
*writer
, int64_t value
)
48 __attribute__((visibility("hidden")));
50 int lttng_msgpack_write_double(struct lttng_msgpack_writer
*writer
, double value
)
51 __attribute__((visibility("hidden")));
53 int lttng_msgpack_write_str(struct lttng_msgpack_writer
*writer
,
55 __attribute__((visibility("hidden")));
57 int lttng_msgpack_begin_map(struct lttng_msgpack_writer
*writer
, size_t count
)
58 __attribute__((visibility("hidden")));
60 int lttng_msgpack_end_map(struct lttng_msgpack_writer
*writer
)
61 __attribute__((visibility("hidden")));
63 int lttng_msgpack_begin_array(
64 struct lttng_msgpack_writer
*writer
, size_t count
)
65 __attribute__((visibility("hidden")));
67 int lttng_msgpack_end_array(struct lttng_msgpack_writer
*writer
)
68 __attribute__((visibility("hidden")));
70 #endif /* _LTTNG_UST_MSGPACK_H */
This page took 0.030072 seconds and 4 git commands to generate.