2 * SPDX-License-Identifier: MIT
4 * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
5 * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 #ifndef BABELTRACE_TRACE_IR_EVENT_CLASS_INTERNAL_H
9 #define BABELTRACE_TRACE_IR_EVENT_CLASS_INTERNAL_H
11 #include "lib/assert-pre.h"
12 #include <babeltrace2/trace-ir/field-class.h>
13 #include <babeltrace2/trace-ir/field.h>
14 #include "common/macros.h"
15 #include <babeltrace2/value.h>
16 #include <babeltrace2/trace-ir/stream-class.h>
17 #include <babeltrace2/trace-ir/stream.h>
18 #include <babeltrace2/trace-ir/event-class.h>
19 #include "lib/object.h"
20 #include "common/assert.h"
21 #include "lib/object-pool.h"
22 #include "lib/property.h"
28 struct bt_event_class
{
29 struct bt_object base
;
30 struct bt_field_class
*specific_context_fc
;
31 struct bt_field_class
*payload_fc
;
34 struct bt_value
*user_attributes
;
39 /* NULL or `str->str` above */
44 struct bt_property_uint log_level
;
49 /* NULL or `str->str` above */
53 /* Pool of `struct bt_event *` */
54 struct bt_object_pool event_pool
;
60 void _bt_event_class_freeze(const struct bt_event_class
*event_class
);
63 # define bt_event_class_freeze _bt_event_class_freeze
65 # define bt_event_class_freeze(_ec)
69 struct bt_stream_class
*bt_event_class_borrow_stream_class_inline(
70 const struct bt_event_class
*event_class
)
72 BT_ASSERT_DBG(event_class
);
73 return (void *) bt_object_borrow_parent(&event_class
->base
);
76 #endif /* BABELTRACE_TRACE_IR_EVENT_CLASS_INTERNAL_H */