Move to kernel style SPDX license identifiers
[babeltrace.git] / src / lib / trace-ir / packet.h
1 /*
2 * SPDX-License-Identifier: MIT
3 *
4 * Copyright 2016-2018 Philippe Proulx <pproulx@efficios.com>
5 */
6
7 #ifndef BABELTRACE_TRACE_IR_PACKET_INTERNAL_H
8 #define BABELTRACE_TRACE_IR_PACKET_INTERNAL_H
9
10 #include <stdbool.h>
11 #include "common/assert.h"
12 #include <babeltrace2/trace-ir/clock-snapshot.h>
13 #include <babeltrace2/trace-ir/packet.h>
14 #include <babeltrace2/trace-ir/field.h>
15 #include <babeltrace2/trace-ir/stream.h>
16 #include "lib/object.h"
17 #include "common/macros.h"
18 #include "lib/property.h"
19
20 #include "field-wrapper.h"
21
22 struct bt_packet {
23 struct bt_object base;
24 struct bt_field_wrapper *context_field;
25 struct bt_stream *stream;
26 bool frozen;
27 };
28
29 BT_HIDDEN
30 void _bt_packet_set_is_frozen(const struct bt_packet *packet, bool is_frozen);
31
32 #ifdef BT_DEV_MODE
33 # define bt_packet_set_is_frozen _bt_packet_set_is_frozen
34 #else
35 # define bt_packet_set_is_frozen(_packet, _is_frozen)
36 #endif /* BT_DEV_MODE */
37
38 BT_HIDDEN
39 struct bt_packet *bt_packet_new(struct bt_stream *stream);
40
41 BT_HIDDEN
42 void bt_packet_recycle(struct bt_packet *packet);
43
44 BT_HIDDEN
45 void bt_packet_destroy(struct bt_packet *packet);
46
47 #endif /* BABELTRACE_TRACE_IR_PACKET_INTERNAL_H */
This page took 0.028886 seconds and 4 git commands to generate.