Commit | Line | Data |
---|---|---|
6fd49698 PP |
1 | /* |
2 | * nativebt.i.in | |
3 | * | |
4 | * Babeltrace native interface Python module | |
5 | * | |
6 | * Copyright 2012 EfficiOS Inc. | |
7 | * | |
8 | * Author: Danny Serres <danny.serres@efficios.com> | |
9 | * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com> | |
10 | * | |
11 | * Permission is hereby granted, free of charge, to any person obtaining a copy | |
12 | * of this software and associated documentation files (the "Software"), to deal | |
13 | * in the Software without restriction, including without limitation the rights | |
14 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
15 | * copies of the Software, and to permit persons to whom the Software is | |
16 | * furnished to do so, subject to the following conditions: | |
17 | * | |
18 | * The above copyright notice and this permission notice shall be included in | |
19 | * all copies or substantial portions of the Software. | |
20 | * | |
21 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
22 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
23 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
24 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
25 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
26 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
27 | * SOFTWARE. | |
28 | */ | |
29 | %module nativebt | |
30 | ||
31 | ||
32 | %include "stdint.i" | |
33 | %include "typemaps.i" | |
34 | %{ | |
35 | #define SWIG_FILE_WITH_INIT | |
36 | #include <babeltrace/babeltrace.h> | |
37 | #include <babeltrace/babeltrace-internal.h> | |
38 | #include <babeltrace/trace-handle.h> | |
39 | #include <babeltrace/trace-handle-internal.h> | |
40 | #include <babeltrace/context.h> | |
41 | #include <babeltrace/context-internal.h> | |
42 | #include <babeltrace/iterator.h> | |
43 | #include <babeltrace/iterator-internal.h> | |
44 | #include <babeltrace/format.h> | |
45 | #include <babeltrace/list.h> | |
46 | #include <babeltrace/types.h> | |
47 | #include <babeltrace/ctf/iterator.h> | |
48 | #include "python-complements.h" | |
49 | #include <babeltrace/ctf-writer/clock.h> | |
50 | #include <babeltrace/ctf-writer/event-fields.h> | |
51 | #include <babeltrace/ctf-writer/event-types.h> | |
52 | #include <babeltrace/ctf-writer/event.h> | |
53 | #include <babeltrace/ctf-writer/stream.h> | |
54 | #include <babeltrace/ctf-writer/writer.h> | |
55 | %} | |
56 | ||
57 | ||
58 | typedef int bt_intern_str; | |
59 | typedef int64_t ssize_t; | |
60 | ||
61 | ||
62 | /* python-complements.h */ | |
63 | struct bt_definition **_bt_python_field_listcaller( | |
64 | const struct bt_ctf_event *ctf_event, | |
65 | const struct bt_definition *scope, | |
66 | unsigned int *OUTPUT); | |
67 | struct bt_definition *_bt_python_field_one_from_list( | |
68 | struct bt_definition **list, int index); | |
69 | struct bt_ctf_event_decl **_bt_python_event_decl_listcaller( | |
70 | int handle_id, | |
71 | struct bt_context *ctx, | |
72 | unsigned int *OUTPUT); | |
73 | struct bt_ctf_event_decl *_bt_python_decl_one_from_list( | |
74 | struct bt_ctf_event_decl **list, int index); | |
75 | struct bt_ctf_field_decl **_by_python_field_decl_listcaller( | |
76 | struct bt_ctf_event_decl *event_decl, | |
46df6b28 | 77 | enum ctf_scope scope, |
6fd49698 PP |
78 | unsigned int *OUTPUT); |
79 | struct bt_ctf_field_decl *_bt_python_field_decl_one_from_list( | |
80 | struct bt_ctf_field_decl **list, int index); | |
81 | struct definition_array *_bt_python_get_array_from_def( | |
82 | struct bt_definition *field); | |
83 | struct definition_sequence *_bt_python_get_sequence_from_def( | |
84 | struct bt_definition *field); | |
85 | struct bt_declaration *_bt_python_get_array_element_declaration( | |
86 | struct bt_declaration *field); | |
87 | struct bt_declaration *_bt_python_get_sequence_element_declaration( | |
88 | struct bt_declaration *field); | |
89 | const char *_bt_python_get_array_string(struct bt_definition *field); | |
90 | const char *_bt_python_get_sequence_string(struct bt_definition *field); | |
91 | int _bt_python_field_integer_get_signedness(const struct bt_ctf_field *field); | |
92 | enum ctf_type_id _bt_python_get_field_type(const struct bt_ctf_field *field); | |
93 | const char *_bt_python_ctf_field_type_enumeration_get_mapping( | |
94 | struct bt_ctf_field_type *enumeration, size_t index, | |
95 | int64_t *OUTPUT, int64_t *OUTPUT); | |
96 | const char *_bt_python_ctf_field_type_enumeration_get_mapping_unsigned( | |
97 | struct bt_ctf_field_type *enumeration, size_t index, | |
98 | uint64_t *OUTPUT, uint64_t *OUTPUT); | |
99 | const char *_bt_python_ctf_field_type_structure_get_field_name( | |
100 | struct bt_ctf_field_type *structure, size_t index); | |
101 | struct bt_ctf_field_type *_bt_python_ctf_field_type_structure_get_field_type( | |
102 | struct bt_ctf_field_type *structure, size_t index); | |
103 | const char *_bt_python_ctf_field_type_variant_get_field_name( | |
104 | struct bt_ctf_field_type *variant, size_t index); | |
105 | struct bt_ctf_field_type *_bt_python_ctf_field_type_variant_get_field_type( | |
106 | struct bt_ctf_field_type *variant, size_t index); | |
107 | const char *_bt_python_ctf_event_class_get_field_name( | |
108 | struct bt_ctf_event_class *event_class, size_t index); | |
109 | struct bt_ctf_field_type *_bt_python_ctf_event_class_get_field_type( | |
110 | struct bt_ctf_event_class *event_class, size_t index); | |
111 | int _bt_python_ctf_clock_get_uuid_index(struct bt_ctf_clock *clock, | |
112 | size_t index, unsigned char *OUTPUT); | |
113 | int _bt_python_ctf_clock_set_uuid_index(struct bt_ctf_clock *clock, | |
114 | size_t index, unsigned char value); | |
1fa8e237 | 115 | struct bt_iter_pos *_bt_python_create_iter_pos(void); |
9b93351a AB |
116 | struct bt_ctf_iter *_bt_python_ctf_iter_create_intersect( |
117 | struct bt_context *ctx, | |
118 | struct bt_iter_pos *inter_begin_pos, | |
119 | struct bt_iter_pos *inter_end_pos); | |
120 | int _bt_python_has_intersection(struct bt_context *ctx); | |
6fd49698 PP |
121 | |
122 | /* context.h, context-internal.h */ | |
123 | %rename("_bt_context_create") bt_context_create(void); | |
124 | %rename("_bt_context_add_trace") bt_context_add_trace( | |
125 | struct bt_context *ctx, const char *path, const char *format, | |
126 | void (*packet_seek)(struct bt_stream_pos *pos, size_t index, int whence), | |
127 | struct bt_mmap_stream_list *stream_list, FILE *metadata); | |
128 | %rename("_bt_context_remove_trace") bt_context_remove_trace( | |
129 | struct bt_context *ctx, int trace_id); | |
130 | %rename("_bt_context_get") bt_context_get(struct bt_context *ctx); | |
131 | %rename("_bt_context_put") bt_context_put(struct bt_context *ctx); | |
132 | %rename("_bt_ctf_event_get_context") bt_ctf_event_get_context( | |
133 | const struct bt_ctf_event *event); | |
134 | ||
135 | struct bt_context *bt_context_create(void); | |
136 | int bt_context_add_trace(struct bt_context *ctx, const char *path, const char *format, | |
137 | void (*packet_seek)(struct bt_stream_pos *pos, size_t index, int whence), | |
138 | struct bt_mmap_stream_list *stream_list, FILE *metadata); | |
139 | void bt_context_remove_trace(struct bt_context *ctx, int trace_id); | |
140 | void bt_context_get(struct bt_context *ctx); | |
141 | void bt_context_put(struct bt_context *ctx); | |
142 | struct bt_context *bt_ctf_event_get_context(const struct bt_ctf_event *event); | |
143 | ||
144 | ||
145 | /* format.h */ | |
146 | %rename("lookup_format") bt_lookup_format(bt_intern_str qname); | |
147 | %rename("_bt_print_format_list") bt_fprintf_format_list(FILE *fp); | |
148 | %rename("register_format") bt_register_format(struct format *format); | |
149 | %rename("unregister_format") bt_unregister_format(struct bt_format *format); | |
150 | ||
151 | extern struct format *bt_lookup_format(bt_intern_str qname); | |
152 | extern void bt_fprintf_format_list(FILE *fp); | |
153 | extern int bt_register_format(struct bt_format *format); | |
154 | extern void bt_unregister_format(struct bt_format *format); | |
155 | ||
156 | ||
157 | /* iterator.h, iterator-internal.h */ | |
158 | %rename("_bt_iter_create") bt_iter_create(struct bt_context *ctx, | |
159 | const struct bt_iter_pos *begin_pos, const struct bt_iter_pos *end_pos); | |
160 | %rename("_bt_iter_destroy") bt_iter_destroy(struct bt_iter *iter); | |
161 | %rename("_bt_iter_next") bt_iter_next(struct bt_iter *iter); | |
162 | %rename("_bt_iter_get_pos") bt_iter_get_pos(struct bt_iter *iter); | |
163 | %rename("_bt_iter_free_pos") bt_iter_free_pos(struct bt_iter_pos *pos); | |
164 | %rename("_bt_iter_set_pos") bt_iter_set_pos(struct bt_iter *iter, | |
165 | const struct bt_iter_pos *pos); | |
166 | %rename("_bt_iter_create_time_pos") bt_iter_create_time_pos(struct bt_iter *iter, | |
167 | uint64_t timestamp); | |
168 | ||
169 | struct bt_iter *bt_iter_create(struct bt_context *ctx, | |
170 | const struct bt_iter_pos *begin_pos, const struct bt_iter_pos *end_pos); | |
171 | void bt_iter_destroy(struct bt_iter *iter); | |
172 | int bt_iter_next(struct bt_iter *iter); | |
173 | struct bt_iter_pos *bt_iter_get_pos(struct bt_iter *iter); | |
174 | void bt_iter_free_pos(struct bt_iter_pos *pos); | |
175 | int bt_iter_set_pos(struct bt_iter *iter, const struct bt_iter_pos *pos); | |
176 | struct bt_iter_pos *bt_iter_create_time_pos(struct bt_iter *iter, uint64_t timestamp); | |
177 | ||
178 | %rename("_bt_iter_pos") bt_iter_pos; | |
179 | %rename("SEEK_TIME") BT_SEEK_TIME; | |
180 | %rename("SEEK_RESTORE") BT_SEEK_RESTORE; | |
181 | %rename("SEEK_CUR") BT_SEEK_CUR; | |
182 | %rename("SEEK_BEGIN") BT_SEEK_BEGIN; | |
183 | %rename("SEEK_LAST") BT_SEEK_LAST; | |
184 | ||
185 | ||
186 | /* | |
187 | * This struct is taken from iterator.h | |
188 | * All changes to the struct must also be made here. | |
189 | */ | |
190 | struct bt_iter_pos { | |
191 | enum { | |
192 | BT_SEEK_TIME, /* uses u.seek_time */ | |
193 | BT_SEEK_RESTORE, /* uses u.restore */ | |
194 | BT_SEEK_CUR, | |
195 | BT_SEEK_BEGIN, | |
196 | BT_SEEK_LAST | |
197 | } type; | |
198 | union { | |
199 | uint64_t seek_time; | |
200 | struct bt_saved_pos *restore; | |
201 | } u; | |
202 | }; | |
203 | ||
204 | ||
205 | /* trace-handle.h, trace-handle-internal.h */ | |
206 | %rename("_bt_trace_handle_create") bt_trace_handle_create(struct bt_context *ctx); | |
207 | %rename("_bt_trace_handle_destroy") bt_trace_handle_destroy(struct bt_trace_handle *bt); | |
208 | struct bt_trace_handle *bt_trace_handle_create(struct bt_context *ctx); | |
209 | void bt_trace_handle_destroy(struct bt_trace_handle *bt); | |
210 | ||
211 | %rename("_bt_trace_handle_get_path") bt_trace_handle_get_path(struct bt_context *ctx, | |
212 | int handle_id); | |
213 | %rename("_bt_trace_handle_get_timestamp_begin") bt_trace_handle_get_timestamp_begin( | |
61cf588b MD |
214 | struct bt_context *ctx, int handle_id, enum bt_clock_type type, |
215 | int64_t *timestamp); | |
6fd49698 | 216 | %rename("_bt_trace_handle_get_timestamp_end") bt_trace_handle_get_timestamp_end( |
61cf588b MD |
217 | struct bt_context *ctx, int handle_id, enum bt_clock_type type, |
218 | int64_t *timestamp); | |
6fd49698 | 219 | const char *bt_trace_handle_get_path(struct bt_context *ctx, int handle_id); |
61cf588b | 220 | int bt_trace_handle_get_timestamp_begin(struct bt_context *ctx, int handle_id, |
7a5f95fa | 221 | enum bt_clock_type type, int64_t *OUTPUT); |
61cf588b | 222 | int bt_trace_handle_get_timestamp_end(struct bt_context *ctx, int handle_id, |
7a5f95fa | 223 | enum bt_clock_type type, int64_t *OUTPUT); |
6fd49698 PP |
224 | |
225 | %rename("_bt_ctf_event_get_handle_id") bt_ctf_event_get_handle_id( | |
226 | const struct bt_ctf_event *event); | |
227 | int bt_ctf_event_get_handle_id(const struct bt_ctf_event *event); | |
228 | ||
229 | ||
230 | /* iterator.h, events.h */ | |
231 | %rename("_bt_ctf_iter_create") bt_ctf_iter_create(struct bt_context *ctx, | |
232 | const struct bt_iter_pos *begin_pos, | |
233 | const struct bt_iter_pos *end_pos); | |
234 | %rename("_bt_ctf_get_iter") bt_ctf_get_iter(struct bt_ctf_iter *iter); | |
235 | %rename("_bt_ctf_iter_destroy") bt_ctf_iter_destroy(struct bt_ctf_iter *iter); | |
236 | %rename("_bt_ctf_iter_read_event") bt_ctf_iter_read_event(struct bt_ctf_iter *iter); | |
237 | ||
238 | struct bt_ctf_iter *bt_ctf_iter_create(struct bt_context *ctx, | |
239 | const struct bt_iter_pos *begin_pos, | |
240 | const struct bt_iter_pos *end_pos); | |
241 | struct bt_iter *bt_ctf_get_iter(struct bt_ctf_iter *iter); | |
242 | void bt_ctf_iter_destroy(struct bt_ctf_iter *iter); | |
243 | struct bt_ctf_event *bt_ctf_iter_read_event(struct bt_ctf_iter *iter); | |
244 | ||
245 | ||
246 | /* events.h */ | |
247 | %rename("_bt_ctf_get_top_level_scope") bt_ctf_get_top_level_scope(const struct | |
46df6b28 | 248 | bt_ctf_event *event, enum ctf_scope scope); |
6fd49698 PP |
249 | %rename("_bt_ctf_event_name") bt_ctf_event_name(const struct bt_ctf_event *ctf_event); |
250 | %rename("_bt_ctf_get_timestamp") bt_ctf_get_timestamp( | |
7a5f95fa | 251 | const struct bt_ctf_event *ctf_event, int64_t *OUTPUT); |
6fd49698 PP |
252 | %rename("_bt_ctf_get_cycles") bt_ctf_get_cycles( |
253 | const struct bt_ctf_event *ctf_event); | |
254 | ||
255 | %rename("_bt_ctf_get_field") bt_ctf_get_field(const struct bt_ctf_event *ctf_event, | |
256 | const struct bt_definition *scope, const char *field); | |
257 | %rename("_bt_ctf_get_index") bt_ctf_get_index(const struct bt_ctf_event *ctf_event, | |
258 | const struct bt_definition *field, unsigned int index); | |
259 | %rename("_bt_ctf_field_name") bt_ctf_field_name(const struct bt_definition *field); | |
260 | %rename("_bt_ctf_field_type") bt_ctf_field_type(const struct bt_declaration *field); | |
261 | %rename("_bt_ctf_get_int_signedness") bt_ctf_get_int_signedness( | |
262 | const struct bt_declaration *field); | |
263 | %rename("_bt_ctf_get_int_base") bt_ctf_get_int_base(const struct bt_declaration *field); | |
264 | %rename("_bt_ctf_get_int_byte_order") bt_ctf_get_int_byte_order( | |
265 | const struct bt_declaration *field); | |
266 | %rename("_bt_ctf_get_int_len") bt_ctf_get_int_len(const struct bt_declaration *field); | |
267 | %rename("_bt_ctf_get_enum_int") bt_ctf_get_enum_int(const struct bt_definition *field); | |
268 | %rename("_bt_ctf_get_enum_str") bt_ctf_get_enum_str(const struct bt_definition *field); | |
269 | %rename("_bt_ctf_get_encoding") bt_ctf_get_encoding(const struct bt_declaration *field); | |
270 | %rename("_bt_ctf_get_array_len") bt_ctf_get_array_len(const struct bt_declaration *field); | |
271 | %rename("_bt_ctf_get_uint64") bt_ctf_get_uint64(const struct bt_definition *field); | |
272 | %rename("_bt_ctf_get_int64") bt_ctf_get_int64(const struct bt_definition *field); | |
273 | %rename("_bt_ctf_get_char_array") bt_ctf_get_char_array(const struct bt_definition *field); | |
274 | %rename("_bt_ctf_get_string") bt_ctf_get_string(const struct bt_definition *field); | |
275 | %rename("_bt_ctf_get_float") bt_ctf_get_float(const struct bt_definition *field); | |
276 | %rename("_bt_ctf_get_variant") bt_ctf_get_variant(const struct bt_definition *field); | |
277 | %rename("_bt_ctf_field_get_error") bt_ctf_field_get_error(void); | |
278 | %rename("_bt_ctf_get_decl_event_name") bt_ctf_get_decl_event_name(const struct | |
279 | bt_ctf_event_decl *event); | |
280 | %rename("_bt_ctf_get_decl_event_id") bt_ctf_get_decl_event_id(const struct | |
281 | bt_ctf_event_decl *event); | |
282 | %rename("_bt_ctf_get_decl_field_name") bt_ctf_get_decl_field_name( | |
283 | const struct bt_ctf_field_decl *field); | |
284 | %rename("_bt_ctf_get_decl_from_def") bt_ctf_get_decl_from_def( | |
285 | const struct bt_definition *field); | |
286 | %rename("_bt_ctf_get_decl_from_field_decl") bt_ctf_get_decl_from_field_decl( | |
287 | const struct bt_ctf_field_decl *field); | |
288 | %rename("_bt_array_index") bt_array_index(struct definition_array *array, uint64_t i); | |
289 | %rename("_bt_sequence_len") bt_sequence_len(struct definition_sequence *sequence); | |
290 | %rename("_bt_sequence_index") bt_sequence_index(struct definition_sequence *sequence, uint64_t i); | |
291 | %rename("_bt_ctf_get_struct_field_count") bt_ctf_get_struct_field_count(const struct bt_definition *structure); | |
292 | %rename("_bt_ctf_get_struct_field_index") bt_ctf_get_struct_field_index(const struct bt_definition *structure, uint64_t i); | |
293 | ||
294 | const struct bt_definition *bt_ctf_get_top_level_scope(const struct bt_ctf_event *ctf_event, | |
46df6b28 | 295 | enum ctf_scope scope); |
6fd49698 | 296 | const char *bt_ctf_event_name(const struct bt_ctf_event *ctf_event); |
7a5f95fa | 297 | int bt_ctf_get_timestamp(const struct bt_ctf_event *ctf_event, int64_t *OUTPUT); |
6fd49698 PP |
298 | uint64_t bt_ctf_get_cycles(const struct bt_ctf_event *ctf_event); |
299 | const struct bt_definition *bt_ctf_get_field(const struct bt_ctf_event *ctf_event, | |
300 | const struct bt_definition *scope, | |
301 | const char *field); | |
302 | const struct bt_definition *bt_ctf_get_index(const struct bt_ctf_event *ctf_event, | |
303 | const struct bt_definition *field, | |
304 | unsigned int index); | |
305 | const char *bt_ctf_field_name(const struct bt_definition *field); | |
306 | enum ctf_type_id bt_ctf_field_type(const struct bt_declaration *field); | |
307 | int bt_ctf_get_int_signedness(const struct bt_declaration *field); | |
308 | int bt_ctf_get_int_base(const struct bt_declaration *field); | |
309 | int bt_ctf_get_int_byte_order(const struct bt_declaration *field); | |
310 | ssize_t bt_ctf_get_int_len(const struct bt_declaration *field); | |
311 | const struct bt_definition *bt_ctf_get_enum_int(const struct bt_definition *field); | |
312 | const char *bt_ctf_get_enum_str(const struct bt_definition *field); | |
313 | enum ctf_string_encoding bt_ctf_get_encoding(const struct bt_declaration *field); | |
314 | int bt_ctf_get_array_len(const struct bt_declaration *field); | |
315 | struct bt_definition *bt_array_index(struct definition_array *array, uint64_t i); | |
316 | uint64_t bt_ctf_get_uint64(const struct bt_definition *field); | |
317 | int64_t bt_ctf_get_int64(const struct bt_definition *field); | |
318 | char *bt_ctf_get_char_array(const struct bt_definition *field); | |
319 | char *bt_ctf_get_string(const struct bt_definition *field); | |
320 | double bt_ctf_get_float(const struct bt_definition *field); | |
321 | const struct bt_definition *bt_ctf_get_variant(const struct bt_definition *field); | |
322 | int bt_ctf_field_get_error(void); | |
323 | const char *bt_ctf_get_decl_event_name(const struct bt_ctf_event_decl *event); | |
324 | uint64_t bt_ctf_get_decl_event_id(const struct bt_ctf_event_decl *event); | |
325 | const char *bt_ctf_get_decl_field_name(const struct bt_ctf_field_decl *field); | |
326 | const struct bt_declaration *bt_ctf_get_decl_from_def(const struct bt_definition *field); | |
327 | const struct bt_declaration *bt_ctf_get_decl_from_field_decl(const struct bt_ctf_field_decl *field); | |
328 | uint64_t bt_sequence_len(struct definition_sequence *sequence); | |
329 | struct bt_definition *bt_sequence_index(struct definition_sequence *sequence, uint64_t i); | |
330 | uint64_t bt_ctf_get_struct_field_count(const struct bt_definition *structure); | |
331 | const struct bt_definition *bt_ctf_get_struct_field_index(const struct bt_definition *structure, uint64_t i); | |
332 | ||
333 | ||
334 | /* CTF Writer */ | |
335 | ||
336 | /* clock.h */ | |
337 | %rename("_bt_ctf_clock_create") bt_ctf_clock_create(const char *name); | |
338 | %rename("_bt_ctf_clock_get_name") bt_ctf_clock_get_name(struct bt_ctf_clock *clock); | |
339 | %rename("_bt_ctf_clock_get_description") bt_ctf_clock_get_description(struct bt_ctf_clock *clock); | |
340 | %rename("_bt_ctf_clock_set_description") bt_ctf_clock_set_description(struct bt_ctf_clock *clock, const char *desc); | |
341 | %rename("_bt_ctf_clock_get_frequency") bt_ctf_clock_get_frequency(struct bt_ctf_clock *clock); | |
342 | %rename("_bt_ctf_clock_set_frequency") bt_ctf_clock_set_frequency(struct bt_ctf_clock *clock, uint64_t freq); | |
343 | %rename("_bt_ctf_clock_get_precision") bt_ctf_clock_get_precision(struct bt_ctf_clock *clock); | |
344 | %rename("_bt_ctf_clock_set_precision") bt_ctf_clock_set_precision(struct bt_ctf_clock *clock, uint64_t precision); | |
61cf588b MD |
345 | %rename("_bt_ctf_clock_get_offset_s") bt_ctf_clock_get_offset_s(struct bt_ctf_clock *clock, int64_t *offset_s); |
346 | %rename("_bt_ctf_clock_set_offset_s") bt_ctf_clock_set_offset_s(struct bt_ctf_clock *clock, int64_t offset_s); | |
347 | %rename("_bt_ctf_clock_get_offset") bt_ctf_clock_get_offset(struct bt_ctf_clock *clock, int64_t *offset); | |
348 | %rename("_bt_ctf_clock_set_offset") bt_ctf_clock_set_offset(struct bt_ctf_clock *clock, int64_t offset); | |
6fd49698 PP |
349 | %rename("_bt_ctf_clock_get_is_absolute") bt_ctf_clock_get_is_absolute(struct bt_ctf_clock *clock); |
350 | %rename("_bt_ctf_clock_set_is_absolute") bt_ctf_clock_set_is_absolute(struct bt_ctf_clock *clock, int is_absolute); | |
61cf588b MD |
351 | %rename("_bt_ctf_clock_get_time") bt_ctf_clock_get_time(struct bt_ctf_clock *clock, int64_t *time); |
352 | %rename("_bt_ctf_clock_set_time") bt_ctf_clock_set_time(struct bt_ctf_clock *clock, int64_t time); | |
6fd49698 PP |
353 | %rename("_bt_ctf_clock_get") bt_ctf_clock_get(struct bt_ctf_clock *clock); |
354 | %rename("_bt_ctf_clock_put") bt_ctf_clock_put(struct bt_ctf_clock *clock); | |
355 | ||
356 | struct bt_ctf_clock *bt_ctf_clock_create(const char *name); | |
357 | const char *bt_ctf_clock_get_name(struct bt_ctf_clock *clock); | |
358 | const char *bt_ctf_clock_get_description(struct bt_ctf_clock *clock); | |
359 | int bt_ctf_clock_set_description(struct bt_ctf_clock *clock, const char *desc); | |
360 | uint64_t bt_ctf_clock_get_frequency(struct bt_ctf_clock *clock); | |
361 | int bt_ctf_clock_set_frequency(struct bt_ctf_clock *clock, uint64_t freq); | |
362 | uint64_t bt_ctf_clock_get_precision(struct bt_ctf_clock *clock); | |
363 | int bt_ctf_clock_set_precision(struct bt_ctf_clock *clock, uint64_t precision); | |
7a5f95fa | 364 | int bt_ctf_clock_get_offset_s(struct bt_ctf_clock *clock, int64_t *OUTPUT); |
61cf588b | 365 | int bt_ctf_clock_set_offset_s(struct bt_ctf_clock *clock, int64_t offset_s); |
7a5f95fa | 366 | int bt_ctf_clock_get_offset(struct bt_ctf_clock *clock, int64_t *OUTPUT); |
61cf588b | 367 | int bt_ctf_clock_set_offset(struct bt_ctf_clock *clock, int64_t offset); |
6fd49698 PP |
368 | int bt_ctf_clock_get_is_absolute(struct bt_ctf_clock *clock); |
369 | int bt_ctf_clock_set_is_absolute(struct bt_ctf_clock *clock, int is_absolute); | |
7a5f95fa | 370 | int bt_ctf_clock_get_time(struct bt_ctf_clock *clock, int64_t *OUTPUT); |
61cf588b | 371 | int bt_ctf_clock_set_time(struct bt_ctf_clock *clock, int64_t time); |
6fd49698 PP |
372 | void bt_ctf_clock_get(struct bt_ctf_clock *clock); |
373 | void bt_ctf_clock_put(struct bt_ctf_clock *clock); | |
374 | ||
375 | ||
376 | /* event-types.h */ | |
377 | %rename("_bt_ctf_field_type_integer_create") bt_ctf_field_type_integer_create(unsigned int size); | |
378 | %rename("_bt_ctf_field_type_integer_get_size") bt_ctf_field_type_integer_get_size(struct bt_ctf_field_type *integer); | |
379 | %rename("_bt_ctf_field_type_integer_get_signed") bt_ctf_field_type_integer_get_signed(struct bt_ctf_field_type *integer); | |
380 | %rename("_bt_ctf_field_type_integer_set_signed") bt_ctf_field_type_integer_set_signed(struct bt_ctf_field_type *integer, int is_signed); | |
381 | %rename("_bt_ctf_field_type_integer_get_base") bt_ctf_field_type_integer_get_base(struct bt_ctf_field_type *integer); | |
382 | %rename("_bt_ctf_field_type_integer_set_base") bt_ctf_field_type_integer_set_base(struct bt_ctf_field_type *integer, enum bt_ctf_integer_base base); | |
383 | %rename("_bt_ctf_field_type_integer_get_encoding") bt_ctf_field_type_integer_get_encoding(struct bt_ctf_field_type *integer); | |
384 | %rename("_bt_ctf_field_type_integer_set_encoding") bt_ctf_field_type_integer_set_encoding(struct bt_ctf_field_type *integer, enum ctf_string_encoding encoding); | |
385 | %rename("_bt_ctf_field_type_enumeration_create") bt_ctf_field_type_enumeration_create(struct bt_ctf_field_type *integer_container_type); | |
386 | %rename("_bt_ctf_field_type_enumeration_get_container_type") bt_ctf_field_type_enumeration_get_container_type(struct bt_ctf_field_type *enumeration); | |
387 | %rename("_bt_ctf_field_type_enumeration_add_mapping") bt_ctf_field_type_enumeration_add_mapping(struct bt_ctf_field_type *enumeration, const char *name, int64_t range_start, int64_t range_end); | |
388 | %rename("_bt_ctf_field_type_enumeration_add_mapping_unsigned") bt_ctf_field_type_enumeration_add_mapping_unsigned(struct bt_ctf_field_type *enumeration, const char *name, uint64_t range_start, uint64_t range_end); | |
389 | %rename("_bt_ctf_field_type_enumeration_get_mapping_count") bt_ctf_field_type_enumeration_get_mapping_count(struct bt_ctf_field_type *enumeration); | |
390 | %rename("_bt_ctf_field_type_enumeration_get_mapping") bt_ctf_field_type_enumeration_get_mapping(struct bt_ctf_field_type *enumeration, int index, const char **name, int64_t *range_start, int64_t *range_end); | |
391 | %rename("_bt_ctf_field_type_enumeration_get_mapping_unsigned") bt_ctf_field_type_enumeration_get_mapping_unsigned(struct bt_ctf_field_type *enumeration, int index, const char **name, uint64_t *range_start, uint64_t *range_end); | |
392 | %rename("_bt_ctf_field_type_enumeration_get_mapping_index_by_name") bt_ctf_field_type_enumeration_get_mapping_index_by_name(struct bt_ctf_field_type *enumeration, const char *name); | |
393 | %rename("_bt_ctf_field_type_enumeration_get_mapping_index_by_value") bt_ctf_field_type_enumeration_get_mapping_index_by_value(struct bt_ctf_field_type *enumeration, int64_t value); | |
394 | %rename("_bt_ctf_field_type_enumeration_get_mapping_index_by_unsigned_value") bt_ctf_field_type_enumeration_get_mapping_index_by_unsigned_value(struct bt_ctf_field_type *enumeration, uint64_t value); | |
395 | %rename("_bt_ctf_field_type_floating_point_create") bt_ctf_field_type_floating_point_create(void); | |
396 | %rename("_bt_ctf_field_type_floating_point_get_exponent_digits") bt_ctf_field_type_floating_point_get_exponent_digits(struct bt_ctf_field_type *floating_point); | |
397 | %rename("_bt_ctf_field_type_floating_point_set_exponent_digits") bt_ctf_field_type_floating_point_set_exponent_digits(struct bt_ctf_field_type *floating_point, unsigned int exponent_digits); | |
398 | %rename("_bt_ctf_field_type_floating_point_get_mantissa_digits") bt_ctf_field_type_floating_point_get_mantissa_digits(struct bt_ctf_field_type *floating_point); | |
399 | %rename("_bt_ctf_field_type_floating_point_set_mantissa_digits") bt_ctf_field_type_floating_point_set_mantissa_digits(struct bt_ctf_field_type *floating_point, unsigned int mantissa_digits); | |
400 | %rename("_bt_ctf_field_type_structure_create") bt_ctf_field_type_structure_create(void); | |
401 | %rename("_bt_ctf_field_type_structure_add_field") bt_ctf_field_type_structure_add_field(struct bt_ctf_field_type *structure, struct bt_ctf_field_type *field_type, const char *field_name); | |
402 | %rename("_bt_ctf_field_type_structure_get_field_count") bt_ctf_field_type_structure_get_field_count(struct bt_ctf_field_type *structure); | |
403 | %rename("_bt_ctf_field_type_structure_get_field") bt_ctf_field_type_structure_get_field(struct bt_ctf_field_type *structure, const char **field_name, struct bt_ctf_field_type **field_type, int index); | |
404 | %rename("_bt_ctf_field_type_structure_get_field_type_by_name") bt_ctf_field_type_structure_get_field_type_by_name(struct bt_ctf_field_type *structure, const char *field_name); | |
405 | %rename("_bt_ctf_field_type_variant_create") bt_ctf_field_type_variant_create(struct bt_ctf_field_type *enum_tag, const char *tag_name); | |
406 | %rename("_bt_ctf_field_type_variant_get_tag_type") bt_ctf_field_type_variant_get_tag_type(struct bt_ctf_field_type *variant); | |
407 | %rename("_bt_ctf_field_type_variant_get_tag_name") bt_ctf_field_type_variant_get_tag_name(struct bt_ctf_field_type *variant); | |
408 | %rename("_bt_ctf_field_type_variant_add_field") bt_ctf_field_type_variant_add_field(struct bt_ctf_field_type *variant, struct bt_ctf_field_type *field_type, const char *field_name); | |
409 | %rename("_bt_ctf_field_type_variant_get_field_type_by_name") bt_ctf_field_type_variant_get_field_type_by_name(struct bt_ctf_field_type *variant, const char *field_name); | |
410 | %rename("_bt_ctf_field_type_variant_get_field_type_from_tag") bt_ctf_field_type_variant_get_field_type_from_tag(struct bt_ctf_field_type *variant, struct bt_ctf_field *tag); | |
411 | %rename("_bt_ctf_field_type_variant_get_field_count") bt_ctf_field_type_variant_get_field_count(struct bt_ctf_field_type *variant); | |
412 | %rename("_bt_ctf_field_type_variant_get_field") bt_ctf_field_type_variant_get_field(struct bt_ctf_field_type *variant, const char **field_name, struct bt_ctf_field_type **field_type, int index); | |
413 | %rename("_bt_ctf_field_type_array_create") bt_ctf_field_type_array_create(struct bt_ctf_field_type *element_type, unsigned int length); | |
414 | %rename("_bt_ctf_field_type_array_get_element_type") bt_ctf_field_type_array_get_element_type(struct bt_ctf_field_type *array); | |
415 | %rename("_bt_ctf_field_type_array_get_length") bt_ctf_field_type_array_get_length(struct bt_ctf_field_type *array); | |
416 | %rename("_bt_ctf_field_type_sequence_create") bt_ctf_field_type_sequence_create(struct bt_ctf_field_type *element_type, const char *length_field_name); | |
417 | %rename("_bt_ctf_field_type_sequence_get_element_type") bt_ctf_field_type_sequence_get_element_type(struct bt_ctf_field_type *sequence); | |
418 | %rename("_bt_ctf_field_type_sequence_get_length_field_name") bt_ctf_field_type_sequence_get_length_field_name(struct bt_ctf_field_type *sequence); | |
419 | %rename("_bt_ctf_field_type_string_create") bt_ctf_field_type_string_create(void); | |
420 | %rename("_bt_ctf_field_type_string_get_encoding") bt_ctf_field_type_string_get_encoding(struct bt_ctf_field_type *string_type); | |
421 | %rename("_bt_ctf_field_type_string_set_encoding") bt_ctf_field_type_string_set_encoding(struct bt_ctf_field_type *string_type, enum ctf_string_encoding encoding); | |
422 | %rename("_bt_ctf_field_type_get_alignment") bt_ctf_field_type_get_alignment(struct bt_ctf_field_type *type); | |
423 | %rename("_bt_ctf_field_type_set_alignment") bt_ctf_field_type_set_alignment(struct bt_ctf_field_type *type, unsigned int alignment); | |
424 | %rename("_bt_ctf_field_type_get_byte_order") bt_ctf_field_type_get_byte_order(struct bt_ctf_field_type *type); | |
425 | %rename("_bt_ctf_field_type_set_byte_order") bt_ctf_field_type_set_byte_order(struct bt_ctf_field_type *type, enum bt_ctf_byte_order byte_order); | |
426 | %rename("_bt_ctf_field_type_get_type_id") bt_ctf_field_type_get_type_id(struct bt_ctf_field_type *type); | |
427 | %rename("_bt_ctf_field_type_get") bt_ctf_field_type_get(struct bt_ctf_field_type *type); | |
428 | %rename("_bt_ctf_field_type_put") bt_ctf_field_type_put(struct bt_ctf_field_type *type); | |
429 | ||
430 | struct bt_ctf_field_type *bt_ctf_field_type_integer_create(unsigned int size); | |
431 | int bt_ctf_field_type_integer_get_size(struct bt_ctf_field_type *integer); | |
432 | int bt_ctf_field_type_integer_get_signed(struct bt_ctf_field_type *integer); | |
433 | int bt_ctf_field_type_integer_set_signed(struct bt_ctf_field_type *integer, int is_signed); | |
434 | enum bt_ctf_integer_base bt_ctf_field_type_integer_get_base(struct bt_ctf_field_type *integer); | |
435 | int bt_ctf_field_type_integer_set_base(struct bt_ctf_field_type *integer, enum bt_ctf_integer_base base); | |
436 | enum ctf_string_encoding bt_ctf_field_type_integer_get_encoding(struct bt_ctf_field_type *integer); | |
437 | int bt_ctf_field_type_integer_set_encoding(struct bt_ctf_field_type *integer, enum ctf_string_encoding encoding); | |
438 | struct bt_ctf_field_type *bt_ctf_field_type_enumeration_create(struct bt_ctf_field_type *integer_container_type); | |
439 | struct bt_ctf_field_type *bt_ctf_field_type_enumeration_get_container_type(struct bt_ctf_field_type *enumeration); | |
440 | int bt_ctf_field_type_enumeration_add_mapping(struct bt_ctf_field_type *enumeration, const char *name, int64_t range_start, int64_t range_end); | |
441 | int bt_ctf_field_type_enumeration_add_mapping_unsigned(struct bt_ctf_field_type *enumeration, const char *name, uint64_t range_start, uint64_t range_end); | |
442 | int bt_ctf_field_type_enumeration_get_mapping_count(struct bt_ctf_field_type *enumeration); | |
443 | int bt_ctf_field_type_enumeration_get_mapping(struct bt_ctf_field_type *enumeration, int index, const char **OUTPUT, int64_t *OUTPUT, int64_t *OUTPUT); | |
444 | int bt_ctf_field_type_enumeration_get_mapping_unsigned(struct bt_ctf_field_type *enumeration, int index, const char **OUTPUT, uint64_t *OUTPUT, uint64_t *OUTPUT); | |
445 | int bt_ctf_field_type_enumeration_get_mapping_index_by_name(struct bt_ctf_field_type *enumeration, const char *name); | |
446 | int bt_ctf_field_type_enumeration_get_mapping_index_by_value(struct bt_ctf_field_type *enumeration, int64_t value); | |
447 | int bt_ctf_field_type_enumeration_get_mapping_index_by_unsigned_value(struct bt_ctf_field_type *enumeration, uint64_t value); | |
448 | struct bt_ctf_field_type *bt_ctf_field_type_floating_point_create(void); | |
449 | int bt_ctf_field_type_floating_point_get_exponent_digits(struct bt_ctf_field_type *floating_point); | |
450 | int bt_ctf_field_type_floating_point_set_exponent_digits(struct bt_ctf_field_type *floating_point, unsigned int exponent_digits); | |
451 | int bt_ctf_field_type_floating_point_get_mantissa_digits(struct bt_ctf_field_type *floating_point); | |
452 | int bt_ctf_field_type_floating_point_set_mantissa_digits(struct bt_ctf_field_type *floating_point, unsigned int mantissa_digits); | |
453 | struct bt_ctf_field_type *bt_ctf_field_type_structure_create(void); | |
454 | int bt_ctf_field_type_structure_add_field(struct bt_ctf_field_type *structure, struct bt_ctf_field_type *field_type, const char *field_name); | |
455 | int bt_ctf_field_type_structure_get_field_count(struct bt_ctf_field_type *structure); | |
456 | int bt_ctf_field_type_structure_get_field(struct bt_ctf_field_type *structure, const char **OUTPUT, struct bt_ctf_field_type **OUTPUT, int index); | |
457 | struct bt_ctf_field_type *bt_ctf_field_type_structure_get_field_type_by_name(struct bt_ctf_field_type *structure, const char *field_name); | |
458 | struct bt_ctf_field_type *bt_ctf_field_type_variant_create(struct bt_ctf_field_type *enum_tag, const char *tag_name); | |
459 | struct bt_ctf_field_type *bt_ctf_field_type_variant_get_tag_type(struct bt_ctf_field_type *variant); | |
460 | const char *bt_ctf_field_type_variant_get_tag_name(struct bt_ctf_field_type *variant); | |
461 | int bt_ctf_field_type_variant_add_field(struct bt_ctf_field_type *variant, struct bt_ctf_field_type *field_type, const char *field_name); | |
462 | struct bt_ctf_field_type *bt_ctf_field_type_variant_get_field_type_by_name(struct bt_ctf_field_type *variant, const char *field_name); | |
463 | struct bt_ctf_field_type *bt_ctf_field_type_variant_get_field_type_from_tag(struct bt_ctf_field_type *variant, struct bt_ctf_field *tag); | |
464 | int bt_ctf_field_type_variant_get_field_count(struct bt_ctf_field_type *variant); | |
465 | int bt_ctf_field_type_variant_get_field(struct bt_ctf_field_type *variant, const char **OUTPUT, struct bt_ctf_field_type **OUTPUT, int index); | |
466 | struct bt_ctf_field_type *bt_ctf_field_type_array_create(struct bt_ctf_field_type *element_type, unsigned int length); | |
467 | struct bt_ctf_field_type *bt_ctf_field_type_array_get_element_type(struct bt_ctf_field_type *array); | |
468 | int64_t bt_ctf_field_type_array_get_length(struct bt_ctf_field_type *array); | |
469 | struct bt_ctf_field_type *bt_ctf_field_type_sequence_create(struct bt_ctf_field_type *element_type, const char *length_field_name); | |
470 | struct bt_ctf_field_type *bt_ctf_field_type_sequence_get_element_type(struct bt_ctf_field_type *sequence); | |
471 | const char *bt_ctf_field_type_sequence_get_length_field_name(struct bt_ctf_field_type *sequence); | |
472 | struct bt_ctf_field_type *bt_ctf_field_type_string_create(void); | |
473 | enum ctf_string_encoding bt_ctf_field_type_string_get_encoding(struct bt_ctf_field_type *string_type); | |
474 | int bt_ctf_field_type_string_set_encoding(struct bt_ctf_field_type *string_type, enum ctf_string_encoding encoding); | |
475 | int bt_ctf_field_type_get_alignment(struct bt_ctf_field_type *type); | |
476 | int bt_ctf_field_type_set_alignment(struct bt_ctf_field_type *type, unsigned int alignment); | |
477 | enum bt_ctf_byte_order bt_ctf_field_type_get_byte_order(struct bt_ctf_field_type *type); | |
478 | int bt_ctf_field_type_set_byte_order(struct bt_ctf_field_type *type, enum bt_ctf_byte_order byte_order); | |
479 | enum ctf_type_id bt_ctf_field_type_get_type_id(struct bt_ctf_field_type *type); | |
480 | void bt_ctf_field_type_get(struct bt_ctf_field_type *type); | |
481 | void bt_ctf_field_type_put(struct bt_ctf_field_type *type); | |
482 | ||
483 | ||
484 | /* event-fields.h */ | |
485 | %rename("_bt_ctf_field_create") bt_ctf_field_create(struct bt_ctf_field_type *type); | |
486 | %rename("_bt_ctf_field_structure_get_field") bt_ctf_field_structure_get_field(struct bt_ctf_field *structure, const char *name); | |
487 | %rename("_bt_ctf_field_array_get_field") bt_ctf_field_array_get_field(struct bt_ctf_field *array, uint64_t index); | |
488 | %rename("_bt_ctf_field_sequence_get_length") bt_ctf_field_sequence_get_length(struct bt_ctf_field *sequence); | |
489 | %rename("_bt_ctf_field_sequence_set_length") bt_ctf_field_sequence_set_length(struct bt_ctf_field *sequence, struct bt_ctf_field *length_field); | |
490 | %rename("_bt_ctf_field_sequence_get_field") bt_ctf_field_sequence_get_field(struct bt_ctf_field *sequence, uint64_t index); | |
491 | %rename("_bt_ctf_field_variant_get_field") bt_ctf_field_variant_get_field(struct bt_ctf_field *variant, struct bt_ctf_field *tag); | |
492 | %rename("_bt_ctf_field_enumeration_get_container") bt_ctf_field_enumeration_get_container(struct bt_ctf_field *enumeration); | |
493 | %rename("_bt_ctf_field_enumeration_get_mapping_name") bt_ctf_field_enumeration_get_mapping_name(struct bt_ctf_field *enumeration); | |
494 | %rename("_bt_ctf_field_signed_integer_get_value") bt_ctf_field_signed_integer_get_value(struct bt_ctf_field *integer, int64_t *value); | |
495 | %rename("_bt_ctf_field_signed_integer_set_value") bt_ctf_field_signed_integer_set_value(struct bt_ctf_field *integer, int64_t value); | |
496 | %rename("_bt_ctf_field_unsigned_integer_get_value") bt_ctf_field_unsigned_integer_get_value(struct bt_ctf_field *integer, uint64_t *value); | |
497 | %rename("_bt_ctf_field_unsigned_integer_set_value") bt_ctf_field_unsigned_integer_set_value(struct bt_ctf_field *integer, uint64_t value); | |
498 | %rename("_bt_ctf_field_floating_point_get_value") bt_ctf_field_floating_point_get_value(struct bt_ctf_field *floating_point, double *value); | |
499 | %rename("_bt_ctf_field_floating_point_set_value") bt_ctf_field_floating_point_set_value(struct bt_ctf_field *floating_point, double value); | |
500 | %rename("_bt_ctf_field_string_get_value") bt_ctf_field_string_get_value(struct bt_ctf_field *string_field); | |
501 | %rename("_bt_ctf_field_string_set_value") bt_ctf_field_string_set_value(struct bt_ctf_field *string_field, const char *value); | |
502 | %rename("_bt_ctf_field_get_type") bt_ctf_field_get_type(struct bt_ctf_field *field); | |
503 | %rename("_bt_ctf_field_get") bt_ctf_field_get(struct bt_ctf_field *field); | |
504 | %rename("_bt_ctf_field_put") bt_ctf_field_put(struct bt_ctf_field *field); | |
505 | ||
506 | struct bt_ctf_field *bt_ctf_field_create(struct bt_ctf_field_type *type); | |
507 | struct bt_ctf_field *bt_ctf_field_structure_get_field(struct bt_ctf_field *structure, const char *name); | |
508 | struct bt_ctf_field *bt_ctf_field_array_get_field(struct bt_ctf_field *array, uint64_t index); | |
509 | struct bt_ctf_field * bt_ctf_field_sequence_get_length(struct bt_ctf_field *sequence); | |
510 | int bt_ctf_field_sequence_set_length(struct bt_ctf_field *sequence, struct bt_ctf_field *length_field); | |
511 | struct bt_ctf_field *bt_ctf_field_sequence_get_field(struct bt_ctf_field *sequence, uint64_t index); | |
512 | struct bt_ctf_field *bt_ctf_field_variant_get_field(struct bt_ctf_field *variant, struct bt_ctf_field *tag); | |
513 | struct bt_ctf_field *bt_ctf_field_enumeration_get_container(struct bt_ctf_field *enumeration); | |
514 | const char *bt_ctf_field_enumeration_get_mapping_name(struct bt_ctf_field *enumeration); | |
515 | int bt_ctf_field_signed_integer_get_value(struct bt_ctf_field *integer, int64_t *OUTPUT); | |
516 | int bt_ctf_field_signed_integer_set_value(struct bt_ctf_field *integer, int64_t value); | |
517 | int bt_ctf_field_unsigned_integer_get_value(struct bt_ctf_field *integer, uint64_t *OUTPUT); | |
518 | int bt_ctf_field_unsigned_integer_set_value(struct bt_ctf_field *integer, uint64_t value); | |
519 | int bt_ctf_field_floating_point_get_value(struct bt_ctf_field *floating_point, double *OUTPUT); | |
520 | int bt_ctf_field_floating_point_set_value(struct bt_ctf_field *floating_point, double value); | |
521 | const char *bt_ctf_field_string_get_value(struct bt_ctf_field *string_field); | |
522 | int bt_ctf_field_string_set_value(struct bt_ctf_field *string_field, const char *value); | |
523 | struct bt_ctf_field_type *bt_ctf_field_get_type(struct bt_ctf_field *field); | |
524 | void bt_ctf_field_get(struct bt_ctf_field *field); | |
525 | void bt_ctf_field_put(struct bt_ctf_field *field); | |
526 | ||
527 | ||
528 | /* event-class.h */ | |
529 | %rename("_bt_ctf_event_class_create") bt_ctf_event_class_create(const char *name); | |
530 | %rename("_bt_ctf_event_class_get_name") bt_ctf_event_class_get_name(struct bt_ctf_event_class *event_class); | |
531 | %rename("_bt_ctf_event_class_get_id") bt_ctf_event_class_get_id(struct bt_ctf_event_class *event_class); | |
532 | %rename("_bt_ctf_event_class_set_id") bt_ctf_event_class_set_id(struct bt_ctf_event_class *event_class, uint32_t id); | |
533 | %rename("_bt_ctf_event_class_get_stream_class") bt_ctf_event_class_get_stream_class(struct bt_ctf_event_class *event_class); | |
534 | %rename("_bt_ctf_event_class_add_field") bt_ctf_event_class_add_field(struct bt_ctf_event_class *event_class, struct bt_ctf_field_type *type, const char *name); | |
535 | %rename("_bt_ctf_event_class_get_field_count") bt_ctf_event_class_get_field_count(struct bt_ctf_event_class *event_class); | |
536 | %rename("_bt_ctf_event_class_get_field") bt_ctf_event_class_get_field(struct bt_ctf_event_class *event_class, const char **field_name, struct bt_ctf_field_type **field_type, int index); | |
537 | %rename("_bt_ctf_event_class_get_field_by_name") bt_ctf_event_class_get_field_by_name(struct bt_ctf_event_class *event_class, const char *name); | |
538 | %rename("_bt_ctf_event_class_get") bt_ctf_event_class_get(struct bt_ctf_event_class *event_class); | |
539 | %rename("_bt_ctf_event_class_put") bt_ctf_event_class_put(struct bt_ctf_event_class *event_class); | |
540 | ||
541 | struct bt_ctf_event_class *bt_ctf_event_class_create(const char *name); | |
542 | const char *bt_ctf_event_class_get_name(struct bt_ctf_event_class *event_class); | |
543 | int64_t bt_ctf_event_class_get_id(struct bt_ctf_event_class *event_class); | |
544 | int bt_ctf_event_class_set_id(struct bt_ctf_event_class *event_class, uint32_t id); | |
545 | struct bt_ctf_stream_class *bt_ctf_event_class_get_stream_class(struct bt_ctf_event_class *event_class); | |
546 | int bt_ctf_event_class_add_field(struct bt_ctf_event_class *event_class, struct bt_ctf_field_type *type, const char *name); | |
547 | int bt_ctf_event_class_get_field_count(struct bt_ctf_event_class *event_class); | |
548 | int bt_ctf_event_class_get_field(struct bt_ctf_event_class *event_class, const char **field_name, struct bt_ctf_field_type **field_type, int index); | |
549 | struct bt_ctf_field_type *bt_ctf_event_class_get_field_by_name(struct bt_ctf_event_class *event_class, const char *name); | |
550 | void bt_ctf_event_class_get(struct bt_ctf_event_class *event_class); | |
551 | void bt_ctf_event_class_put(struct bt_ctf_event_class *event_class); | |
552 | ||
553 | ||
554 | /* event.h */ | |
555 | %rename("_bt_ctf_event_create") bt_ctf_event_create(struct bt_ctf_event_class *event_class); | |
556 | %rename("_bt_ctf_event_get_class") bt_ctf_event_get_class(struct bt_ctf_event *event); | |
557 | %rename("_bt_ctf_event_get_clock") bt_ctf_event_get_clock(struct bt_ctf_event *event); | |
558 | %rename("_bt_ctf_event_get_payload") bt_ctf_event_get_payload(struct bt_ctf_event *event, const char *name); | |
559 | %rename("_bt_ctf_event_set_payload") bt_ctf_event_set_payload(struct bt_ctf_event *event, const char *name, struct bt_ctf_field *value); | |
560 | %rename("_bt_ctf_event_get_payload_by_index") bt_ctf_event_get_payload_by_index(struct bt_ctf_event *event, int index); | |
561 | %rename("_bt_ctf_event_get") bt_ctf_event_get(struct bt_ctf_event *event); | |
562 | %rename("_bt_ctf_event_put") bt_ctf_event_put(struct bt_ctf_event *event); | |
563 | ||
564 | struct bt_ctf_event *bt_ctf_event_create(struct bt_ctf_event_class *event_class); | |
565 | struct bt_ctf_event_class *bt_ctf_event_get_class(struct bt_ctf_event *event); | |
566 | struct bt_ctf_clock *bt_ctf_event_get_clock(struct bt_ctf_event *event); | |
567 | struct bt_ctf_field *bt_ctf_event_get_payload(struct bt_ctf_event *event, const char *name); | |
568 | int bt_ctf_event_set_payload(struct bt_ctf_event *event, const char *name, struct bt_ctf_field *value); | |
569 | struct bt_ctf_field *bt_ctf_event_get_payload_by_index(struct bt_ctf_event *event, int index); | |
570 | void bt_ctf_event_get(struct bt_ctf_event *event); | |
571 | void bt_ctf_event_put(struct bt_ctf_event *event); | |
572 | ||
573 | ||
574 | /* stream-class.h */ | |
575 | %rename("_bt_ctf_stream_class_create") bt_ctf_stream_class_create(const char *name); | |
576 | %rename("_bt_ctf_stream_class_get_name") bt_ctf_stream_class_get_name(struct bt_ctf_stream_class *stream_class); | |
577 | %rename("_bt_ctf_stream_class_get_clock") bt_ctf_stream_class_get_clock(struct bt_ctf_stream_class *stream_class); | |
578 | %rename("_bt_ctf_stream_class_set_clock") bt_ctf_stream_class_set_clock(struct bt_ctf_stream_class *stream_class, struct bt_ctf_clock *clock); | |
579 | %rename("_bt_ctf_stream_class_get_id") bt_ctf_stream_class_get_id(struct bt_ctf_stream_class *stream_class); | |
580 | %rename("_bt_ctf_stream_class_set_id") bt_ctf_stream_class_set_id(struct bt_ctf_stream_class *stream_class, uint32_t id); | |
581 | %rename("_bt_ctf_stream_class_add_event_class") bt_ctf_stream_class_add_event_class(struct bt_ctf_stream_class *stream_class, struct bt_ctf_event_class *event_class); | |
582 | %rename("_bt_ctf_stream_class_get_event_class_count") bt_ctf_stream_class_get_event_class_count(struct bt_ctf_stream_class *stream_class); | |
583 | %rename("_bt_ctf_stream_class_get_event_class") bt_ctf_stream_class_get_event_class(struct bt_ctf_stream_class *stream_class, int index); | |
584 | %rename("_bt_ctf_stream_class_get_event_class_by_name") bt_ctf_stream_class_get_event_class_by_name(struct bt_ctf_stream_class *stream_class, const char *name); | |
585 | %rename("_bt_ctf_stream_class_get_packet_context_type") bt_ctf_stream_class_get_packet_context_type(struct bt_ctf_stream_class *stream_class); | |
586 | %rename("_bt_ctf_stream_class_set_packet_context_type") bt_ctf_stream_class_set_packet_context_type(struct bt_ctf_stream_class *stream_class, struct bt_ctf_field_type *packet_context_type); | |
587 | %rename("_bt_ctf_stream_class_get") bt_ctf_stream_class_get(struct bt_ctf_stream_class *stream_class); | |
588 | %rename("_bt_ctf_stream_class_put") bt_ctf_stream_class_put(struct bt_ctf_stream_class *stream_class); | |
589 | ||
590 | struct bt_ctf_stream_class *bt_ctf_stream_class_create(const char *name); | |
591 | const char *bt_ctf_stream_class_get_name(struct bt_ctf_stream_class *stream_class); | |
592 | struct bt_ctf_clock *bt_ctf_stream_class_get_clock(struct bt_ctf_stream_class *stream_class); | |
593 | int bt_ctf_stream_class_set_clock(struct bt_ctf_stream_class *stream_class, struct bt_ctf_clock *clock); | |
594 | int64_t bt_ctf_stream_class_get_id(struct bt_ctf_stream_class *stream_class); | |
595 | int bt_ctf_stream_class_set_id(struct bt_ctf_stream_class *stream_class, uint32_t id); | |
596 | int bt_ctf_stream_class_add_event_class(struct bt_ctf_stream_class *stream_class, struct bt_ctf_event_class *event_class); | |
597 | int bt_ctf_stream_class_get_event_class_count(struct bt_ctf_stream_class *stream_class); | |
598 | struct bt_ctf_event_class *bt_ctf_stream_class_get_event_class(struct bt_ctf_stream_class *stream_class, int index); | |
599 | struct bt_ctf_event_class *bt_ctf_stream_class_get_event_class_by_name(struct bt_ctf_stream_class *stream_class, const char *name); | |
600 | struct bt_ctf_field_type *bt_ctf_stream_class_get_packet_context_type(struct bt_ctf_stream_class *stream_class); | |
601 | int bt_ctf_stream_class_set_packet_context_type(struct bt_ctf_stream_class *stream_class, struct bt_ctf_field_type *packet_context_type); | |
602 | void bt_ctf_stream_class_get(struct bt_ctf_stream_class *stream_class); | |
603 | void bt_ctf_stream_class_put(struct bt_ctf_stream_class *stream_class); | |
604 | ||
605 | ||
606 | /* stream.h */ | |
607 | %rename("_bt_ctf_stream_get_discarded_events_count") bt_ctf_stream_get_discarded_events_count(struct bt_ctf_stream *stream, uint64_t *count); | |
608 | %rename("_bt_ctf_stream_append_discarded_events") bt_ctf_stream_append_discarded_events(struct bt_ctf_stream *stream, uint64_t event_count); | |
609 | %rename("_bt_ctf_stream_append_event") bt_ctf_stream_append_event(struct bt_ctf_stream *stream, struct bt_ctf_event *event); | |
610 | %rename("_bt_ctf_stream_get_packet_context") bt_ctf_stream_get_packet_context(struct bt_ctf_stream *stream); | |
611 | %rename("_bt_ctf_stream_set_packet_context") bt_ctf_stream_set_packet_context(struct bt_ctf_stream *stream, struct bt_ctf_field *packet_context); | |
612 | %rename("_bt_ctf_stream_flush") bt_ctf_stream_flush(struct bt_ctf_stream *stream); | |
613 | %rename("_bt_ctf_stream_get") bt_ctf_stream_get(struct bt_ctf_stream *stream); | |
614 | %rename("_bt_ctf_stream_put") bt_ctf_stream_put(struct bt_ctf_stream *stream); | |
615 | ||
616 | int bt_ctf_stream_get_discarded_events_count(struct bt_ctf_stream *stream, uint64_t *OUTPUT); | |
617 | void bt_ctf_stream_append_discarded_events(struct bt_ctf_stream *stream, uint64_t event_count); | |
618 | int bt_ctf_stream_append_event(struct bt_ctf_stream *stream, struct bt_ctf_event *event); | |
619 | struct bt_ctf_field *bt_ctf_stream_get_packet_context(struct bt_ctf_stream *stream); | |
620 | int bt_ctf_stream_set_packet_context(struct bt_ctf_stream *stream, struct bt_ctf_field *packet_context); | |
621 | int bt_ctf_stream_flush(struct bt_ctf_stream *stream); | |
622 | void bt_ctf_stream_get(struct bt_ctf_stream *stream); | |
623 | void bt_ctf_stream_put(struct bt_ctf_stream *stream); | |
624 | ||
625 | ||
626 | /* writer.h */ | |
627 | %rename("_bt_ctf_writer_create") bt_ctf_writer_create(const char *path); | |
628 | %rename("_bt_ctf_writer_create_stream") bt_ctf_writer_create_stream(struct bt_ctf_writer *writer, struct bt_ctf_stream_class *stream_class); | |
629 | %rename("_bt_ctf_writer_add_environment_field") bt_ctf_writer_add_environment_field(struct bt_ctf_writer *writer, const char *name, const char *value); | |
630 | %rename("_bt_ctf_writer_add_clock") bt_ctf_writer_add_clock(struct bt_ctf_writer *writer, struct bt_ctf_clock *clock); | |
631 | %newobject bt_ctf_writer_get_metadata_string; | |
632 | %rename("_bt_ctf_writer_get_metadata_string") bt_ctf_writer_get_metadata_string(struct bt_ctf_writer *writer); | |
633 | %rename("_bt_ctf_writer_flush_metadata") bt_ctf_writer_flush_metadata(struct bt_ctf_writer *writer); | |
634 | %rename("_bt_ctf_writer_set_byte_order") bt_ctf_writer_set_byte_order(struct bt_ctf_writer *writer, enum bt_ctf_byte_order byte_order); | |
635 | %rename("_bt_ctf_writer_get") bt_ctf_writer_get(struct bt_ctf_writer *writer); | |
636 | %rename("_bt_ctf_writer_put") bt_ctf_writer_put(struct bt_ctf_writer *writer); | |
637 | ||
638 | struct bt_ctf_writer *bt_ctf_writer_create(const char *path); | |
639 | struct bt_ctf_stream *bt_ctf_writer_create_stream(struct bt_ctf_writer *writer, struct bt_ctf_stream_class *stream_class); | |
640 | int bt_ctf_writer_add_environment_field(struct bt_ctf_writer *writer, const char *name, const char *value); | |
641 | int bt_ctf_writer_add_clock(struct bt_ctf_writer *writer, struct bt_ctf_clock *clock); | |
642 | char *bt_ctf_writer_get_metadata_string(struct bt_ctf_writer *writer); | |
643 | void bt_ctf_writer_flush_metadata(struct bt_ctf_writer *writer); | |
644 | int bt_ctf_writer_set_byte_order(struct bt_ctf_writer *writer, enum bt_ctf_byte_order byte_order); | |
645 | void bt_ctf_writer_get(struct bt_ctf_writer *writer); | |
646 | void bt_ctf_writer_put(struct bt_ctf_writer *writer); |