1 #ifndef BABELTRACE2_CTF_WRITER_STREAM_CLASS_H
2 #define BABELTRACE2_CTF_WRITER_STREAM_CLASS_H
5 * Copyright (c) 2010-2019 EfficiOS Inc. and Linux Foundation
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:
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
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
26 #include <babeltrace2/ctf-writer/object.h>
32 struct bt_ctf_stream_class
;
34 struct bt_ctf_event_class
;
35 struct bt_ctf_field_type
;
38 extern struct bt_ctf_stream_class
*bt_ctf_stream_class_create(
41 extern struct bt_ctf_trace
*bt_ctf_stream_class_get_trace(
42 struct bt_ctf_stream_class
*stream_class
);
44 extern const char *bt_ctf_stream_class_get_name(
45 struct bt_ctf_stream_class
*stream_class
);
47 extern int bt_ctf_stream_class_set_name(
48 struct bt_ctf_stream_class
*stream_class
, const char *name
);
50 extern int64_t bt_ctf_stream_class_get_id(
51 struct bt_ctf_stream_class
*stream_class
);
53 extern int bt_ctf_stream_class_set_id(
54 struct bt_ctf_stream_class
*stream_class
, uint64_t id
);
56 extern struct bt_ctf_field_type
*bt_ctf_stream_class_get_packet_context_type(
57 struct bt_ctf_stream_class
*stream_class
);
59 extern 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
);
63 extern struct bt_ctf_field_type
*
64 bt_ctf_stream_class_get_event_header_type(
65 struct bt_ctf_stream_class
*stream_class
);
67 extern 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
);
71 extern struct bt_ctf_field_type
*
72 bt_ctf_stream_class_get_event_context_type(
73 struct bt_ctf_stream_class
*stream_class
);
75 extern 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
);
79 extern int64_t bt_ctf_stream_class_get_event_class_count(
80 struct bt_ctf_stream_class
*stream_class
);
82 extern 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
);
85 extern 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
);
88 extern int bt_ctf_stream_class_add_event_class(
89 struct bt_ctf_stream_class
*stream_class
,
90 struct bt_ctf_event_class
*event_class
);
92 extern int bt_ctf_stream_class_set_clock(
93 struct bt_ctf_stream_class
*ctf_stream_class
,
94 struct bt_ctf_clock
*clock
);
96 extern struct bt_ctf_clock
*bt_ctf_stream_class_get_clock(
97 struct bt_ctf_stream_class
*stream_class
);
99 /* Pre-2.0 CTF writer compatibility */
101 void bt_ctf_stream_class_get(struct bt_ctf_stream_class
*stream_class
)
103 bt_ctf_object_get_ref(stream_class
);
106 /* Pre-2.0 CTF writer compatibility */
108 void bt_ctf_stream_class_put(struct bt_ctf_stream_class
*stream_class
)
110 bt_ctf_object_put_ref(stream_class
);
117 #endif /* BABELTRACE2_CTF_WRITER_STREAM_CLASS_H */
This page took 0.053646 seconds and 5 git commands to generate.