bt2c::Logger: remove unused cLevel() method
[babeltrace.git] / src / lib / trace-ir / stream.h
... / ...
CommitLineData
1/*
2 * SPDX-License-Identifier: MIT
3 *
4 * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
5 * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 */
7
8#ifndef BABELTRACE_TRACE_IR_STREAM_INTERNAL_H
9#define BABELTRACE_TRACE_IR_STREAM_INTERNAL_H
10
11#include <babeltrace2/trace-ir/stream.h>
12#include "lib/object.h"
13#include "lib/object-pool.h"
14#include <glib.h>
15#include <stdbool.h>
16
17struct bt_stream_class;
18struct bt_stream;
19
20struct bt_stream {
21 struct bt_object base;
22
23 /* Owned by this */
24 struct bt_value *user_attributes;
25
26 /* Owned by this */
27 struct bt_stream_class *class;
28
29 struct {
30 GString *str;
31
32 /* NULL or `str->str` above */
33 const char *value;
34 } name;
35
36 uint64_t id;
37
38 /* Pool of `struct bt_packet *` */
39 struct bt_object_pool packet_pool;
40
41 bool frozen;
42};
43
44void _bt_stream_freeze(const struct bt_stream *stream);
45
46#ifdef BT_DEV_MODE
47# define bt_stream_freeze _bt_stream_freeze
48#else
49# define bt_stream_freeze(_stream)
50#endif
51
52static inline
53struct bt_trace *bt_stream_borrow_trace_inline(const struct bt_stream *stream)
54{
55 BT_ASSERT_DBG(stream);
56 return (void *) bt_object_borrow_parent(&stream->base);
57}
58
59#endif /* BABELTRACE_TRACE_IR_STREAM_INTERNAL_H */
This page took 0.025678 seconds and 4 git commands to generate.