Remove unneeded fwd declaration
[libside.git] / include / side / event-description-abi.h
1 // SPDX-License-Identifier: MIT
2 /*
3 * Copyright 2022-2023 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 */
5
6 #ifndef SIDE_EVENT_DESCRIPTION_ABI_H
7 #define SIDE_EVENT_DESCRIPTION_ABI_H
8
9 #include <stdint.h>
10 #include <side/macros.h>
11 #include <side/endian.h>
12
13 #define SIDE_EVENT_DESCRIPTION_ABI_VERSION 0
14
15 enum side_event_flags {
16 SIDE_EVENT_FLAG_VARIADIC = (1 << 0),
17 };
18
19 enum side_loglevel {
20 SIDE_LOGLEVEL_EMERG = 0,
21 SIDE_LOGLEVEL_ALERT = 1,
22 SIDE_LOGLEVEL_CRIT = 2,
23 SIDE_LOGLEVEL_ERR = 3,
24 SIDE_LOGLEVEL_WARNING = 4,
25 SIDE_LOGLEVEL_NOTICE = 5,
26 SIDE_LOGLEVEL_INFO = 6,
27 SIDE_LOGLEVEL_DEBUG = 7,
28 };
29
30 struct side_event_description {
31 uint32_t struct_size; /* Size of this structure. */
32 uint32_t version; /* Event description ABI version. */
33
34 side_ptr_t(struct side_event_state) state;
35 side_ptr_t(const char) provider_name;
36 side_ptr_t(const char) event_name;
37 side_ptr_t(const struct side_event_field) fields;
38 side_ptr_t(const struct side_attr) attr;
39 uint64_t flags; /* Bitwise OR of enum side_event_flags */
40 uint16_t nr_side_type_label;
41 uint16_t nr_side_attr_type;
42 side_enum_t(enum side_loglevel, uint32_t) loglevel;
43 uint32_t nr_fields;
44 uint32_t nr_attr;
45 uint32_t nr_callbacks;
46 #define side_event_description_orig_abi_last nr_callbacks
47 /* End of fields supported in the original ABI. */
48
49 char end[]; /* End with a flexible array to account for extensibility. */
50 } SIDE_PACKED;
51
52 #endif /* SIDE_EVENT_DESCRIPTION_ABI_H */
This page took 0.032683 seconds and 4 git commands to generate.