Visibility hidden by default
[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 void _bt_packet_set_is_frozen(const struct bt_packet *packet, bool is_frozen);
30
31 #ifdef BT_DEV_MODE
32 # define bt_packet_set_is_frozen _bt_packet_set_is_frozen
33 #else
34 # define bt_packet_set_is_frozen(_packet, _is_frozen)
35 #endif /* BT_DEV_MODE */
36
37 struct bt_packet *bt_packet_new(struct bt_stream *stream);
38
39 void bt_packet_recycle(struct bt_packet *packet);
40
41 void bt_packet_destroy(struct bt_packet *packet);
42
43 #endif /* BABELTRACE_TRACE_IR_PACKET_INTERNAL_H */
This page took 0.02979 seconds and 4 git commands to generate.