Move to kernel style SPDX license identifiers
[babeltrace.git] / src / lib / graph / message / stream.h
... / ...
CommitLineData
1/*
2 * SPDX-License-Identifier: MIT
3 *
4 * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
5 * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 */
7
8#ifndef BABELTRACE_GRAPH_MESSAGE_STREAM_INTERNAL_H
9#define BABELTRACE_GRAPH_MESSAGE_STREAM_INTERNAL_H
10
11#include <babeltrace2/graph/message.h>
12
13#include "compat/compiler.h"
14#include "lib/trace-ir/stream.h"
15#include "lib/trace-ir/clock-snapshot.h"
16#include "common/assert.h"
17
18#include "message.h"
19
20struct bt_message_stream {
21 struct bt_message parent;
22 struct bt_stream *stream;
23 struct bt_clock_snapshot *default_cs;
24 enum bt_message_stream_clock_snapshot_state default_cs_state;
25};
26
27static inline
28const char *bt_message_stream_clock_snapshot_state_string(
29 enum bt_message_stream_clock_snapshot_state state)
30{
31 switch (state) {
32 case BT_MESSAGE_STREAM_CLOCK_SNAPSHOT_STATE_KNOWN:
33 return "KNOWN";
34 case BT_MESSAGE_STREAM_CLOCK_SNAPSHOT_STATE_UNKNOWN:
35 return "UNKNOWN";
36 default:
37 return "(unknown)";
38 }
39}
40
41
42#endif /* BABELTRACE_GRAPH_MESSAGE_STREAM_INTERNAL_H */
This page took 0.022715 seconds and 4 git commands to generate.