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