src/Makefile.am: build {fmt} without `-Wmissing-noreturn`
[babeltrace.git] / include / babeltrace2-ctf-writer / stream-class.h
1 /*
2 * SPDX-License-Identifier: MIT
3 *
4 * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation
5 */
6
7 #ifndef BABELTRACE2_CTF_WRITER_STREAM_CLASS_H
8 #define BABELTRACE2_CTF_WRITER_STREAM_CLASS_H
9
10 #include <babeltrace2-ctf-writer/object.h>
11
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15
16 struct bt_ctf_stream_class;
17 struct bt_ctf_trace;
18 struct bt_ctf_event_class;
19 struct bt_ctf_field_type;
20 struct bt_ctf_clock;
21
22 extern struct bt_ctf_stream_class *bt_ctf_stream_class_create(
23 const char *name);
24
25 extern struct bt_ctf_trace *bt_ctf_stream_class_get_trace(
26 struct bt_ctf_stream_class *stream_class);
27
28 extern const char *bt_ctf_stream_class_get_name(
29 struct bt_ctf_stream_class *stream_class);
30
31 extern int bt_ctf_stream_class_set_name(
32 struct bt_ctf_stream_class *stream_class, const char *name);
33
34 extern int64_t bt_ctf_stream_class_get_id(
35 struct bt_ctf_stream_class *stream_class);
36
37 extern int bt_ctf_stream_class_set_id(
38 struct bt_ctf_stream_class *stream_class, uint64_t id);
39
40 extern struct bt_ctf_field_type *bt_ctf_stream_class_get_packet_context_type(
41 struct bt_ctf_stream_class *stream_class);
42
43 extern int bt_ctf_stream_class_set_packet_context_type(
44 struct bt_ctf_stream_class *stream_class,
45 struct bt_ctf_field_type *packet_context_type);
46
47 extern struct bt_ctf_field_type *
48 bt_ctf_stream_class_get_event_header_type(
49 struct bt_ctf_stream_class *stream_class);
50
51 extern int bt_ctf_stream_class_set_event_header_type(
52 struct bt_ctf_stream_class *stream_class,
53 struct bt_ctf_field_type *event_header_type);
54
55 extern struct bt_ctf_field_type *
56 bt_ctf_stream_class_get_event_context_type(
57 struct bt_ctf_stream_class *stream_class);
58
59 extern int bt_ctf_stream_class_set_event_context_type(
60 struct bt_ctf_stream_class *stream_class,
61 struct bt_ctf_field_type *event_context_type);
62
63 extern int64_t bt_ctf_stream_class_get_event_class_count(
64 struct bt_ctf_stream_class *stream_class);
65
66 extern struct bt_ctf_event_class *bt_ctf_stream_class_get_event_class_by_index(
67 struct bt_ctf_stream_class *stream_class, uint64_t index);
68
69 extern struct bt_ctf_event_class *bt_ctf_stream_class_get_event_class_by_id(
70 struct bt_ctf_stream_class *stream_class, uint64_t id);
71
72 extern int bt_ctf_stream_class_add_event_class(
73 struct bt_ctf_stream_class *stream_class,
74 struct bt_ctf_event_class *event_class);
75
76 extern int bt_ctf_stream_class_set_clock(
77 struct bt_ctf_stream_class *ctf_stream_class,
78 struct bt_ctf_clock *clock);
79
80 extern struct bt_ctf_clock *bt_ctf_stream_class_get_clock(
81 struct bt_ctf_stream_class *stream_class);
82
83 /* Pre-2.0 CTF writer compatibility */
84 static inline
85 void bt_ctf_stream_class_get(struct bt_ctf_stream_class *stream_class)
86 {
87 bt_ctf_object_get_ref(stream_class);
88 }
89
90 /* Pre-2.0 CTF writer compatibility */
91 static inline
92 void bt_ctf_stream_class_put(struct bt_ctf_stream_class *stream_class)
93 {
94 bt_ctf_object_put_ref(stream_class);
95 }
96
97 #ifdef __cplusplus
98 }
99 #endif
100
101 #endif /* BABELTRACE2_CTF_WRITER_STREAM_CLASS_H */
This page took 0.031874 seconds and 4 git commands to generate.