cpp-common/bt2c/fmt.hpp: use `wise_enum::string_type` in `EnableIfIsWiseEnum` definition
[babeltrace.git] / src / lib / graph / message / stream.h
CommitLineData
043e2020 1/*
0235b0db
MJ
2 * SPDX-License-Identifier: MIT
3 *
e2f7325d 4 * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
043e2020 5 * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
043e2020
JG
6 */
7
0235b0db
MJ
8#ifndef BABELTRACE_GRAPH_MESSAGE_STREAM_INTERNAL_H
9#define BABELTRACE_GRAPH_MESSAGE_STREAM_INTERNAL_H
10
43c59509 11#include <babeltrace2/graph/message.h>
188edac1 12
578e048b
MJ
13#include "compat/compiler.h"
14#include "lib/trace-ir/stream.h"
15#include "lib/trace-ir/clock-snapshot.h"
578e048b
MJ
16
17#include "message.h"
043e2020 18
5df26c89 19struct bt_message_stream {
d6e69534 20 struct bt_message parent;
50842bdc 21 struct bt_stream *stream;
188edac1
SM
22 struct bt_clock_snapshot *default_cs;
23 enum bt_message_stream_clock_snapshot_state default_cs_state;
043e2020
JG
24};
25
188edac1
SM
26static inline
27const char *bt_message_stream_clock_snapshot_state_string(
28 enum bt_message_stream_clock_snapshot_state state)
29{
30 switch (state) {
31 case BT_MESSAGE_STREAM_CLOCK_SNAPSHOT_STATE_KNOWN:
8a432889 32 return "KNOWN";
188edac1 33 case BT_MESSAGE_STREAM_CLOCK_SNAPSHOT_STATE_UNKNOWN:
8a432889 34 return "UNKNOWN";
188edac1
SM
35 default:
36 return "(unknown)";
37 }
38}
39
40
d6e69534 41#endif /* BABELTRACE_GRAPH_MESSAGE_STREAM_INTERNAL_H */
This page took 0.104894 seconds and 5 git commands to generate.