Fix: CTF writer: bt_ctf_field_unsigned_integer_set_value() -> *get_value()
[babeltrace.git] / include / babeltrace2-ctf-writer / stream-class.h
CommitLineData
924dc299
PP
1#ifndef BABELTRACE2_CTF_WRITER_STREAM_CLASS_H
2#define BABELTRACE2_CTF_WRITER_STREAM_CLASS_H
8c18d80b 3
cf6f1e34 4/*
bbb7b5f0 5 * Copyright (c) 2010-2019 EfficiOS Inc. and Linux Foundation
cf6f1e34
JG
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal
9 * in the Software without restriction, including without limitation the rights
10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 * copies of the Software, and to permit persons to whom the Software is
12 * furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 * SOFTWARE.
cf6f1e34
JG
24 */
25
217cf9d3 26#include <babeltrace2-ctf-writer/object.h>
8c18d80b
PP
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
3dca2276
PP
32struct bt_ctf_stream_class;
33struct bt_ctf_trace;
34struct bt_ctf_event_class;
35struct bt_ctf_field_type;
36struct bt_ctf_clock;
37
38extern struct bt_ctf_stream_class *bt_ctf_stream_class_create(
39 const char *name);
40
41extern struct bt_ctf_trace *bt_ctf_stream_class_get_trace(
42 struct bt_ctf_stream_class *stream_class);
43
44extern const char *bt_ctf_stream_class_get_name(
45 struct bt_ctf_stream_class *stream_class);
46
47extern int bt_ctf_stream_class_set_name(
48 struct bt_ctf_stream_class *stream_class, const char *name);
49
50extern int64_t bt_ctf_stream_class_get_id(
51 struct bt_ctf_stream_class *stream_class);
52
53extern int bt_ctf_stream_class_set_id(
54 struct bt_ctf_stream_class *stream_class, uint64_t id);
55
56extern struct bt_ctf_field_type *bt_ctf_stream_class_get_packet_context_type(
57 struct bt_ctf_stream_class *stream_class);
58
59extern int bt_ctf_stream_class_set_packet_context_type(
60 struct bt_ctf_stream_class *stream_class,
61 struct bt_ctf_field_type *packet_context_type);
62
63extern struct bt_ctf_field_type *
64bt_ctf_stream_class_get_event_header_type(
65 struct bt_ctf_stream_class *stream_class);
66
67extern int bt_ctf_stream_class_set_event_header_type(
68 struct bt_ctf_stream_class *stream_class,
69 struct bt_ctf_field_type *event_header_type);
70
71extern struct bt_ctf_field_type *
72bt_ctf_stream_class_get_event_context_type(
73 struct bt_ctf_stream_class *stream_class);
74
75extern int bt_ctf_stream_class_set_event_context_type(
76 struct bt_ctf_stream_class *stream_class,
77 struct bt_ctf_field_type *event_context_type);
78
79extern int64_t bt_ctf_stream_class_get_event_class_count(
80 struct bt_ctf_stream_class *stream_class);
81
82extern struct bt_ctf_event_class *bt_ctf_stream_class_get_event_class_by_index(
83 struct bt_ctf_stream_class *stream_class, uint64_t index);
84
85extern struct bt_ctf_event_class *bt_ctf_stream_class_get_event_class_by_id(
86 struct bt_ctf_stream_class *stream_class, uint64_t id);
87
88extern int bt_ctf_stream_class_add_event_class(
89 struct bt_ctf_stream_class *stream_class,
90 struct bt_ctf_event_class *event_class);
91
92extern int bt_ctf_stream_class_set_clock(
93 struct bt_ctf_stream_class *ctf_stream_class,
72bd645e
PP
94 struct bt_ctf_clock *clock);
95
3dca2276
PP
96extern struct bt_ctf_clock *bt_ctf_stream_class_get_clock(
97 struct bt_ctf_stream_class *stream_class);
50842bdc
PP
98
99/* Pre-2.0 CTF writer compatibility */
3dca2276
PP
100static inline
101void bt_ctf_stream_class_get(struct bt_ctf_stream_class *stream_class)
102{
e1e02a22 103 bt_ctf_object_get_ref(stream_class);
3dca2276 104}
ac0c6bdd 105
3dca2276
PP
106/* Pre-2.0 CTF writer compatibility */
107static inline
108void bt_ctf_stream_class_put(struct bt_ctf_stream_class *stream_class)
109{
e1e02a22 110 bt_ctf_object_put_ref(stream_class);
3dca2276 111}
8c18d80b
PP
112
113#ifdef __cplusplus
114}
115#endif
116
924dc299 117#endif /* BABELTRACE2_CTF_WRITER_STREAM_CLASS_H */
This page took 0.060836 seconds and 4 git commands to generate.