| 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, |
| 77 | enum bt_ctf_scope scope, |
| 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); |
| 115 | struct bt_iter_pos *_bt_python_create_iter_pos(void); |
| 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 | |
| 130 | struct bt_context *bt_context_create(void); |
| 131 | int 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); |
| 134 | void bt_context_remove_trace(struct bt_context *ctx, int trace_id); |
| 135 | void bt_context_get(struct bt_context *ctx); |
| 136 | void bt_context_put(struct bt_context *ctx); |
| 137 | struct 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 | |
| 146 | extern struct format *bt_lookup_format(bt_intern_str qname); |
| 147 | extern void bt_fprintf_format_list(FILE *fp); |
| 148 | extern int bt_register_format(struct bt_format *format); |
| 149 | extern 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 | |
| 164 | struct bt_iter *bt_iter_create(struct bt_context *ctx, |
| 165 | const struct bt_iter_pos *begin_pos, const struct bt_iter_pos *end_pos); |
| 166 | void bt_iter_destroy(struct bt_iter *iter); |
| 167 | int bt_iter_next(struct bt_iter *iter); |
| 168 | struct bt_iter_pos *bt_iter_get_pos(struct bt_iter *iter); |
| 169 | void bt_iter_free_pos(struct bt_iter_pos *pos); |
| 170 | int bt_iter_set_pos(struct bt_iter *iter, const struct bt_iter_pos *pos); |
| 171 | struct 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 | */ |
| 185 | struct 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); |
| 203 | struct bt_trace_handle *bt_trace_handle_create(struct bt_context *ctx); |
| 204 | void 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( |
| 209 | struct bt_context *ctx, int handle_id, enum bt_clock_type type); |
| 210 | %rename("_bt_trace_handle_get_timestamp_end") bt_trace_handle_get_timestamp_end( |
| 211 | struct bt_context *ctx, int handle_id, enum bt_clock_type type); |
| 212 | const char *bt_trace_handle_get_path(struct bt_context *ctx, int handle_id); |
| 213 | uint64_t bt_trace_handle_get_timestamp_begin(struct bt_context *ctx, int handle_id, |
| 214 | enum bt_clock_type type); |
| 215 | uint64_t bt_trace_handle_get_timestamp_end(struct bt_context *ctx, int handle_id, |
| 216 | enum bt_clock_type type); |
| 217 | |
| 218 | %rename("_bt_ctf_event_get_handle_id") bt_ctf_event_get_handle_id( |
| 219 | const struct bt_ctf_event *event); |
| 220 | int bt_ctf_event_get_handle_id(const struct bt_ctf_event *event); |
| 221 | |
| 222 | |
| 223 | /* iterator.h, events.h */ |
| 224 | %rename("_bt_ctf_iter_create") bt_ctf_iter_create(struct bt_context *ctx, |
| 225 | const struct bt_iter_pos *begin_pos, |
| 226 | const struct bt_iter_pos *end_pos); |
| 227 | %rename("_bt_ctf_get_iter") bt_ctf_get_iter(struct bt_ctf_iter *iter); |
| 228 | %rename("_bt_ctf_iter_destroy") bt_ctf_iter_destroy(struct bt_ctf_iter *iter); |
| 229 | %rename("_bt_ctf_iter_read_event") bt_ctf_iter_read_event(struct bt_ctf_iter *iter); |
| 230 | |
| 231 | struct bt_ctf_iter *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 | struct bt_iter *bt_ctf_get_iter(struct bt_ctf_iter *iter); |
| 235 | void bt_ctf_iter_destroy(struct bt_ctf_iter *iter); |
| 236 | struct bt_ctf_event *bt_ctf_iter_read_event(struct bt_ctf_iter *iter); |
| 237 | |
| 238 | |
| 239 | /* events.h */ |
| 240 | %rename("_bt_ctf_get_top_level_scope") bt_ctf_get_top_level_scope(const struct |
| 241 | bt_ctf_event *event, enum bt_ctf_scope scope); |
| 242 | %rename("_bt_ctf_event_name") bt_ctf_event_name(const struct bt_ctf_event *ctf_event); |
| 243 | %rename("_bt_ctf_get_timestamp") bt_ctf_get_timestamp( |
| 244 | const struct bt_ctf_event *ctf_event); |
| 245 | %rename("_bt_ctf_get_cycles") bt_ctf_get_cycles( |
| 246 | const struct bt_ctf_event *ctf_event); |
| 247 | |
| 248 | %rename("_bt_ctf_get_field") bt_ctf_get_field(const struct bt_ctf_event *ctf_event, |
| 249 | const struct bt_definition *scope, const char *field); |
| 250 | %rename("_bt_ctf_get_index") bt_ctf_get_index(const struct bt_ctf_event *ctf_event, |
| 251 | const struct bt_definition *field, unsigned int index); |
| 252 | %rename("_bt_ctf_field_name") bt_ctf_field_name(const struct bt_definition *field); |
| 253 | %rename("_bt_ctf_field_type") bt_ctf_field_type(const struct bt_declaration *field); |
| 254 | %rename("_bt_ctf_get_int_signedness") bt_ctf_get_int_signedness( |
| 255 | const struct bt_declaration *field); |
| 256 | %rename("_bt_ctf_get_int_base") bt_ctf_get_int_base(const struct bt_declaration *field); |
| 257 | %rename("_bt_ctf_get_int_byte_order") bt_ctf_get_int_byte_order( |
| 258 | const struct bt_declaration *field); |
| 259 | %rename("_bt_ctf_get_int_len") bt_ctf_get_int_len(const struct bt_declaration *field); |
| 260 | %rename("_bt_ctf_get_enum_int") bt_ctf_get_enum_int(const struct bt_definition *field); |
| 261 | %rename("_bt_ctf_get_enum_str") bt_ctf_get_enum_str(const struct bt_definition *field); |
| 262 | %rename("_bt_ctf_get_encoding") bt_ctf_get_encoding(const struct bt_declaration *field); |
| 263 | %rename("_bt_ctf_get_array_len") bt_ctf_get_array_len(const struct bt_declaration *field); |
| 264 | %rename("_bt_ctf_get_uint64") bt_ctf_get_uint64(const struct bt_definition *field); |
| 265 | %rename("_bt_ctf_get_int64") bt_ctf_get_int64(const struct bt_definition *field); |
| 266 | %rename("_bt_ctf_get_char_array") bt_ctf_get_char_array(const struct bt_definition *field); |
| 267 | %rename("_bt_ctf_get_string") bt_ctf_get_string(const struct bt_definition *field); |
| 268 | %rename("_bt_ctf_get_float") bt_ctf_get_float(const struct bt_definition *field); |
| 269 | %rename("_bt_ctf_get_variant") bt_ctf_get_variant(const struct bt_definition *field); |
| 270 | %rename("_bt_ctf_field_get_error") bt_ctf_field_get_error(void); |
| 271 | %rename("_bt_ctf_get_decl_event_name") bt_ctf_get_decl_event_name(const struct |
| 272 | bt_ctf_event_decl *event); |
| 273 | %rename("_bt_ctf_get_decl_event_id") bt_ctf_get_decl_event_id(const struct |
| 274 | bt_ctf_event_decl *event); |
| 275 | %rename("_bt_ctf_get_decl_field_name") bt_ctf_get_decl_field_name( |
| 276 | const struct bt_ctf_field_decl *field); |
| 277 | %rename("_bt_ctf_get_decl_from_def") bt_ctf_get_decl_from_def( |
| 278 | const struct bt_definition *field); |
| 279 | %rename("_bt_ctf_get_decl_from_field_decl") bt_ctf_get_decl_from_field_decl( |
| 280 | const struct bt_ctf_field_decl *field); |
| 281 | %rename("_bt_array_index") bt_array_index(struct definition_array *array, uint64_t i); |
| 282 | %rename("_bt_sequence_len") bt_sequence_len(struct definition_sequence *sequence); |
| 283 | %rename("_bt_sequence_index") bt_sequence_index(struct definition_sequence *sequence, uint64_t i); |
| 284 | %rename("_bt_ctf_get_struct_field_count") bt_ctf_get_struct_field_count(const struct bt_definition *structure); |
| 285 | %rename("_bt_ctf_get_struct_field_index") bt_ctf_get_struct_field_index(const struct bt_definition *structure, uint64_t i); |
| 286 | |
| 287 | const struct bt_definition *bt_ctf_get_top_level_scope(const struct bt_ctf_event *ctf_event, |
| 288 | enum bt_ctf_scope scope); |
| 289 | const char *bt_ctf_event_name(const struct bt_ctf_event *ctf_event); |
| 290 | uint64_t bt_ctf_get_timestamp(const struct bt_ctf_event *ctf_event); |
| 291 | uint64_t bt_ctf_get_cycles(const struct bt_ctf_event *ctf_event); |
| 292 | const struct bt_definition *bt_ctf_get_field(const struct bt_ctf_event *ctf_event, |
| 293 | const struct bt_definition *scope, |
| 294 | const char *field); |
| 295 | const struct bt_definition *bt_ctf_get_index(const struct bt_ctf_event *ctf_event, |
| 296 | const struct bt_definition *field, |
| 297 | unsigned int index); |
| 298 | const char *bt_ctf_field_name(const struct bt_definition *field); |
| 299 | enum ctf_type_id bt_ctf_field_type(const struct bt_declaration *field); |
| 300 | int bt_ctf_get_int_signedness(const struct bt_declaration *field); |
| 301 | int bt_ctf_get_int_base(const struct bt_declaration *field); |
| 302 | int bt_ctf_get_int_byte_order(const struct bt_declaration *field); |
| 303 | ssize_t bt_ctf_get_int_len(const struct bt_declaration *field); |
| 304 | const struct bt_definition *bt_ctf_get_enum_int(const struct bt_definition *field); |
| 305 | const char *bt_ctf_get_enum_str(const struct bt_definition *field); |
| 306 | enum ctf_string_encoding bt_ctf_get_encoding(const struct bt_declaration *field); |
| 307 | int bt_ctf_get_array_len(const struct bt_declaration *field); |
| 308 | struct bt_definition *bt_array_index(struct definition_array *array, uint64_t i); |
| 309 | uint64_t bt_ctf_get_uint64(const struct bt_definition *field); |
| 310 | int64_t bt_ctf_get_int64(const struct bt_definition *field); |
| 311 | char *bt_ctf_get_char_array(const struct bt_definition *field); |
| 312 | char *bt_ctf_get_string(const struct bt_definition *field); |
| 313 | double bt_ctf_get_float(const struct bt_definition *field); |
| 314 | const struct bt_definition *bt_ctf_get_variant(const struct bt_definition *field); |
| 315 | int bt_ctf_field_get_error(void); |
| 316 | const char *bt_ctf_get_decl_event_name(const struct bt_ctf_event_decl *event); |
| 317 | uint64_t bt_ctf_get_decl_event_id(const struct bt_ctf_event_decl *event); |
| 318 | const char *bt_ctf_get_decl_field_name(const struct bt_ctf_field_decl *field); |
| 319 | const struct bt_declaration *bt_ctf_get_decl_from_def(const struct bt_definition *field); |
| 320 | const struct bt_declaration *bt_ctf_get_decl_from_field_decl(const struct bt_ctf_field_decl *field); |
| 321 | uint64_t bt_sequence_len(struct definition_sequence *sequence); |
| 322 | struct bt_definition *bt_sequence_index(struct definition_sequence *sequence, uint64_t i); |
| 323 | uint64_t bt_ctf_get_struct_field_count(const struct bt_definition *structure); |
| 324 | const struct bt_definition *bt_ctf_get_struct_field_index(const struct bt_definition *structure, uint64_t i); |
| 325 | |
| 326 | |
| 327 | /* CTF Writer */ |
| 328 | |
| 329 | /* clock.h */ |
| 330 | %rename("_bt_ctf_clock_create") bt_ctf_clock_create(const char *name); |
| 331 | %rename("_bt_ctf_clock_get_name") bt_ctf_clock_get_name(struct bt_ctf_clock *clock); |
| 332 | %rename("_bt_ctf_clock_get_description") bt_ctf_clock_get_description(struct bt_ctf_clock *clock); |
| 333 | %rename("_bt_ctf_clock_set_description") bt_ctf_clock_set_description(struct bt_ctf_clock *clock, const char *desc); |
| 334 | %rename("_bt_ctf_clock_get_frequency") bt_ctf_clock_get_frequency(struct bt_ctf_clock *clock); |
| 335 | %rename("_bt_ctf_clock_set_frequency") bt_ctf_clock_set_frequency(struct bt_ctf_clock *clock, uint64_t freq); |
| 336 | %rename("_bt_ctf_clock_get_precision") bt_ctf_clock_get_precision(struct bt_ctf_clock *clock); |
| 337 | %rename("_bt_ctf_clock_set_precision") bt_ctf_clock_set_precision(struct bt_ctf_clock *clock, uint64_t precision); |
| 338 | %rename("_bt_ctf_clock_get_offset_s") bt_ctf_clock_get_offset_s(struct bt_ctf_clock *clock); |
| 339 | %rename("_bt_ctf_clock_set_offset_s") bt_ctf_clock_set_offset_s(struct bt_ctf_clock *clock, uint64_t offset_s); |
| 340 | %rename("_bt_ctf_clock_get_offset") bt_ctf_clock_get_offset(struct bt_ctf_clock *clock); |
| 341 | %rename("_bt_ctf_clock_set_offset") bt_ctf_clock_set_offset(struct bt_ctf_clock *clock, uint64_t offset); |
| 342 | %rename("_bt_ctf_clock_get_is_absolute") bt_ctf_clock_get_is_absolute(struct bt_ctf_clock *clock); |
| 343 | %rename("_bt_ctf_clock_set_is_absolute") bt_ctf_clock_set_is_absolute(struct bt_ctf_clock *clock, int is_absolute); |
| 344 | %rename("_bt_ctf_clock_get_time") bt_ctf_clock_get_time(struct bt_ctf_clock *clock); |
| 345 | %rename("_bt_ctf_clock_set_time") bt_ctf_clock_set_time(struct bt_ctf_clock *clock, uint64_t time); |
| 346 | %rename("_bt_ctf_clock_get") bt_ctf_clock_get(struct bt_ctf_clock *clock); |
| 347 | %rename("_bt_ctf_clock_put") bt_ctf_clock_put(struct bt_ctf_clock *clock); |
| 348 | |
| 349 | struct bt_ctf_clock *bt_ctf_clock_create(const char *name); |
| 350 | const char *bt_ctf_clock_get_name(struct bt_ctf_clock *clock); |
| 351 | const char *bt_ctf_clock_get_description(struct bt_ctf_clock *clock); |
| 352 | int bt_ctf_clock_set_description(struct bt_ctf_clock *clock, const char *desc); |
| 353 | uint64_t bt_ctf_clock_get_frequency(struct bt_ctf_clock *clock); |
| 354 | int bt_ctf_clock_set_frequency(struct bt_ctf_clock *clock, uint64_t freq); |
| 355 | uint64_t bt_ctf_clock_get_precision(struct bt_ctf_clock *clock); |
| 356 | int bt_ctf_clock_set_precision(struct bt_ctf_clock *clock, uint64_t precision); |
| 357 | uint64_t bt_ctf_clock_get_offset_s(struct bt_ctf_clock *clock); |
| 358 | int bt_ctf_clock_set_offset_s(struct bt_ctf_clock *clock, uint64_t offset_s); |
| 359 | uint64_t bt_ctf_clock_get_offset(struct bt_ctf_clock *clock); |
| 360 | int bt_ctf_clock_set_offset(struct bt_ctf_clock *clock, uint64_t offset); |
| 361 | int bt_ctf_clock_get_is_absolute(struct bt_ctf_clock *clock); |
| 362 | int bt_ctf_clock_set_is_absolute(struct bt_ctf_clock *clock, int is_absolute); |
| 363 | uint64_t bt_ctf_clock_get_time(struct bt_ctf_clock *clock); |
| 364 | int bt_ctf_clock_set_time(struct bt_ctf_clock *clock, uint64_t time); |
| 365 | void bt_ctf_clock_get(struct bt_ctf_clock *clock); |
| 366 | void bt_ctf_clock_put(struct bt_ctf_clock *clock); |
| 367 | |
| 368 | |
| 369 | /* event-types.h */ |
| 370 | %rename("_bt_ctf_field_type_integer_create") bt_ctf_field_type_integer_create(unsigned int size); |
| 371 | %rename("_bt_ctf_field_type_integer_get_size") bt_ctf_field_type_integer_get_size(struct bt_ctf_field_type *integer); |
| 372 | %rename("_bt_ctf_field_type_integer_get_signed") bt_ctf_field_type_integer_get_signed(struct bt_ctf_field_type *integer); |
| 373 | %rename("_bt_ctf_field_type_integer_set_signed") bt_ctf_field_type_integer_set_signed(struct bt_ctf_field_type *integer, int is_signed); |
| 374 | %rename("_bt_ctf_field_type_integer_get_base") bt_ctf_field_type_integer_get_base(struct bt_ctf_field_type *integer); |
| 375 | %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); |
| 376 | %rename("_bt_ctf_field_type_integer_get_encoding") bt_ctf_field_type_integer_get_encoding(struct bt_ctf_field_type *integer); |
| 377 | %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); |
| 378 | %rename("_bt_ctf_field_type_enumeration_create") bt_ctf_field_type_enumeration_create(struct bt_ctf_field_type *integer_container_type); |
| 379 | %rename("_bt_ctf_field_type_enumeration_get_container_type") bt_ctf_field_type_enumeration_get_container_type(struct bt_ctf_field_type *enumeration); |
| 380 | %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); |
| 381 | %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); |
| 382 | %rename("_bt_ctf_field_type_enumeration_get_mapping_count") bt_ctf_field_type_enumeration_get_mapping_count(struct bt_ctf_field_type *enumeration); |
| 383 | %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); |
| 384 | %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); |
| 385 | %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); |
| 386 | %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); |
| 387 | %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); |
| 388 | %rename("_bt_ctf_field_type_floating_point_create") bt_ctf_field_type_floating_point_create(void); |
| 389 | %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); |
| 390 | %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); |
| 391 | %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); |
| 392 | %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); |
| 393 | %rename("_bt_ctf_field_type_structure_create") bt_ctf_field_type_structure_create(void); |
| 394 | %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); |
| 395 | %rename("_bt_ctf_field_type_structure_get_field_count") bt_ctf_field_type_structure_get_field_count(struct bt_ctf_field_type *structure); |
| 396 | %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); |
| 397 | %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); |
| 398 | %rename("_bt_ctf_field_type_variant_create") bt_ctf_field_type_variant_create(struct bt_ctf_field_type *enum_tag, const char *tag_name); |
| 399 | %rename("_bt_ctf_field_type_variant_get_tag_type") bt_ctf_field_type_variant_get_tag_type(struct bt_ctf_field_type *variant); |
| 400 | %rename("_bt_ctf_field_type_variant_get_tag_name") bt_ctf_field_type_variant_get_tag_name(struct bt_ctf_field_type *variant); |
| 401 | %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); |
| 402 | %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); |
| 403 | %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); |
| 404 | %rename("_bt_ctf_field_type_variant_get_field_count") bt_ctf_field_type_variant_get_field_count(struct bt_ctf_field_type *variant); |
| 405 | %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); |
| 406 | %rename("_bt_ctf_field_type_array_create") bt_ctf_field_type_array_create(struct bt_ctf_field_type *element_type, unsigned int length); |
| 407 | %rename("_bt_ctf_field_type_array_get_element_type") bt_ctf_field_type_array_get_element_type(struct bt_ctf_field_type *array); |
| 408 | %rename("_bt_ctf_field_type_array_get_length") bt_ctf_field_type_array_get_length(struct bt_ctf_field_type *array); |
| 409 | %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); |
| 410 | %rename("_bt_ctf_field_type_sequence_get_element_type") bt_ctf_field_type_sequence_get_element_type(struct bt_ctf_field_type *sequence); |
| 411 | %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); |
| 412 | %rename("_bt_ctf_field_type_string_create") bt_ctf_field_type_string_create(void); |
| 413 | %rename("_bt_ctf_field_type_string_get_encoding") bt_ctf_field_type_string_get_encoding(struct bt_ctf_field_type *string_type); |
| 414 | %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); |
| 415 | %rename("_bt_ctf_field_type_get_alignment") bt_ctf_field_type_get_alignment(struct bt_ctf_field_type *type); |
| 416 | %rename("_bt_ctf_field_type_set_alignment") bt_ctf_field_type_set_alignment(struct bt_ctf_field_type *type, unsigned int alignment); |
| 417 | %rename("_bt_ctf_field_type_get_byte_order") bt_ctf_field_type_get_byte_order(struct bt_ctf_field_type *type); |
| 418 | %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); |
| 419 | %rename("_bt_ctf_field_type_get_type_id") bt_ctf_field_type_get_type_id(struct bt_ctf_field_type *type); |
| 420 | %rename("_bt_ctf_field_type_get") bt_ctf_field_type_get(struct bt_ctf_field_type *type); |
| 421 | %rename("_bt_ctf_field_type_put") bt_ctf_field_type_put(struct bt_ctf_field_type *type); |
| 422 | |
| 423 | struct bt_ctf_field_type *bt_ctf_field_type_integer_create(unsigned int size); |
| 424 | int bt_ctf_field_type_integer_get_size(struct bt_ctf_field_type *integer); |
| 425 | int bt_ctf_field_type_integer_get_signed(struct bt_ctf_field_type *integer); |
| 426 | int bt_ctf_field_type_integer_set_signed(struct bt_ctf_field_type *integer, int is_signed); |
| 427 | enum bt_ctf_integer_base bt_ctf_field_type_integer_get_base(struct bt_ctf_field_type *integer); |
| 428 | int bt_ctf_field_type_integer_set_base(struct bt_ctf_field_type *integer, enum bt_ctf_integer_base base); |
| 429 | enum ctf_string_encoding bt_ctf_field_type_integer_get_encoding(struct bt_ctf_field_type *integer); |
| 430 | int bt_ctf_field_type_integer_set_encoding(struct bt_ctf_field_type *integer, enum ctf_string_encoding encoding); |
| 431 | struct bt_ctf_field_type *bt_ctf_field_type_enumeration_create(struct bt_ctf_field_type *integer_container_type); |
| 432 | struct bt_ctf_field_type *bt_ctf_field_type_enumeration_get_container_type(struct bt_ctf_field_type *enumeration); |
| 433 | 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); |
| 434 | 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); |
| 435 | int bt_ctf_field_type_enumeration_get_mapping_count(struct bt_ctf_field_type *enumeration); |
| 436 | 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); |
| 437 | 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); |
| 438 | int bt_ctf_field_type_enumeration_get_mapping_index_by_name(struct bt_ctf_field_type *enumeration, const char *name); |
| 439 | int bt_ctf_field_type_enumeration_get_mapping_index_by_value(struct bt_ctf_field_type *enumeration, int64_t value); |
| 440 | int bt_ctf_field_type_enumeration_get_mapping_index_by_unsigned_value(struct bt_ctf_field_type *enumeration, uint64_t value); |
| 441 | struct bt_ctf_field_type *bt_ctf_field_type_floating_point_create(void); |
| 442 | int bt_ctf_field_type_floating_point_get_exponent_digits(struct bt_ctf_field_type *floating_point); |
| 443 | int bt_ctf_field_type_floating_point_set_exponent_digits(struct bt_ctf_field_type *floating_point, unsigned int exponent_digits); |
| 444 | int bt_ctf_field_type_floating_point_get_mantissa_digits(struct bt_ctf_field_type *floating_point); |
| 445 | int bt_ctf_field_type_floating_point_set_mantissa_digits(struct bt_ctf_field_type *floating_point, unsigned int mantissa_digits); |
| 446 | struct bt_ctf_field_type *bt_ctf_field_type_structure_create(void); |
| 447 | 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); |
| 448 | int bt_ctf_field_type_structure_get_field_count(struct bt_ctf_field_type *structure); |
| 449 | 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); |
| 450 | 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); |
| 451 | struct bt_ctf_field_type *bt_ctf_field_type_variant_create(struct bt_ctf_field_type *enum_tag, const char *tag_name); |
| 452 | struct bt_ctf_field_type *bt_ctf_field_type_variant_get_tag_type(struct bt_ctf_field_type *variant); |
| 453 | const char *bt_ctf_field_type_variant_get_tag_name(struct bt_ctf_field_type *variant); |
| 454 | 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); |
| 455 | 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); |
| 456 | 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); |
| 457 | int bt_ctf_field_type_variant_get_field_count(struct bt_ctf_field_type *variant); |
| 458 | 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); |
| 459 | struct bt_ctf_field_type *bt_ctf_field_type_array_create(struct bt_ctf_field_type *element_type, unsigned int length); |
| 460 | struct bt_ctf_field_type *bt_ctf_field_type_array_get_element_type(struct bt_ctf_field_type *array); |
| 461 | int64_t bt_ctf_field_type_array_get_length(struct bt_ctf_field_type *array); |
| 462 | struct bt_ctf_field_type *bt_ctf_field_type_sequence_create(struct bt_ctf_field_type *element_type, const char *length_field_name); |
| 463 | struct bt_ctf_field_type *bt_ctf_field_type_sequence_get_element_type(struct bt_ctf_field_type *sequence); |
| 464 | const char *bt_ctf_field_type_sequence_get_length_field_name(struct bt_ctf_field_type *sequence); |
| 465 | struct bt_ctf_field_type *bt_ctf_field_type_string_create(void); |
| 466 | enum ctf_string_encoding bt_ctf_field_type_string_get_encoding(struct bt_ctf_field_type *string_type); |
| 467 | int bt_ctf_field_type_string_set_encoding(struct bt_ctf_field_type *string_type, enum ctf_string_encoding encoding); |
| 468 | int bt_ctf_field_type_get_alignment(struct bt_ctf_field_type *type); |
| 469 | int bt_ctf_field_type_set_alignment(struct bt_ctf_field_type *type, unsigned int alignment); |
| 470 | enum bt_ctf_byte_order bt_ctf_field_type_get_byte_order(struct bt_ctf_field_type *type); |
| 471 | int bt_ctf_field_type_set_byte_order(struct bt_ctf_field_type *type, enum bt_ctf_byte_order byte_order); |
| 472 | enum ctf_type_id bt_ctf_field_type_get_type_id(struct bt_ctf_field_type *type); |
| 473 | void bt_ctf_field_type_get(struct bt_ctf_field_type *type); |
| 474 | void bt_ctf_field_type_put(struct bt_ctf_field_type *type); |
| 475 | |
| 476 | |
| 477 | /* event-fields.h */ |
| 478 | %rename("_bt_ctf_field_create") bt_ctf_field_create(struct bt_ctf_field_type *type); |
| 479 | %rename("_bt_ctf_field_structure_get_field") bt_ctf_field_structure_get_field(struct bt_ctf_field *structure, const char *name); |
| 480 | %rename("_bt_ctf_field_array_get_field") bt_ctf_field_array_get_field(struct bt_ctf_field *array, uint64_t index); |
| 481 | %rename("_bt_ctf_field_sequence_get_length") bt_ctf_field_sequence_get_length(struct bt_ctf_field *sequence); |
| 482 | %rename("_bt_ctf_field_sequence_set_length") bt_ctf_field_sequence_set_length(struct bt_ctf_field *sequence, struct bt_ctf_field *length_field); |
| 483 | %rename("_bt_ctf_field_sequence_get_field") bt_ctf_field_sequence_get_field(struct bt_ctf_field *sequence, uint64_t index); |
| 484 | %rename("_bt_ctf_field_variant_get_field") bt_ctf_field_variant_get_field(struct bt_ctf_field *variant, struct bt_ctf_field *tag); |
| 485 | %rename("_bt_ctf_field_enumeration_get_container") bt_ctf_field_enumeration_get_container(struct bt_ctf_field *enumeration); |
| 486 | %rename("_bt_ctf_field_enumeration_get_mapping_name") bt_ctf_field_enumeration_get_mapping_name(struct bt_ctf_field *enumeration); |
| 487 | %rename("_bt_ctf_field_signed_integer_get_value") bt_ctf_field_signed_integer_get_value(struct bt_ctf_field *integer, int64_t *value); |
| 488 | %rename("_bt_ctf_field_signed_integer_set_value") bt_ctf_field_signed_integer_set_value(struct bt_ctf_field *integer, int64_t value); |
| 489 | %rename("_bt_ctf_field_unsigned_integer_get_value") bt_ctf_field_unsigned_integer_get_value(struct bt_ctf_field *integer, uint64_t *value); |
| 490 | %rename("_bt_ctf_field_unsigned_integer_set_value") bt_ctf_field_unsigned_integer_set_value(struct bt_ctf_field *integer, uint64_t value); |
| 491 | %rename("_bt_ctf_field_floating_point_get_value") bt_ctf_field_floating_point_get_value(struct bt_ctf_field *floating_point, double *value); |
| 492 | %rename("_bt_ctf_field_floating_point_set_value") bt_ctf_field_floating_point_set_value(struct bt_ctf_field *floating_point, double value); |
| 493 | %rename("_bt_ctf_field_string_get_value") bt_ctf_field_string_get_value(struct bt_ctf_field *string_field); |
| 494 | %rename("_bt_ctf_field_string_set_value") bt_ctf_field_string_set_value(struct bt_ctf_field *string_field, const char *value); |
| 495 | %rename("_bt_ctf_field_get_type") bt_ctf_field_get_type(struct bt_ctf_field *field); |
| 496 | %rename("_bt_ctf_field_get") bt_ctf_field_get(struct bt_ctf_field *field); |
| 497 | %rename("_bt_ctf_field_put") bt_ctf_field_put(struct bt_ctf_field *field); |
| 498 | |
| 499 | struct bt_ctf_field *bt_ctf_field_create(struct bt_ctf_field_type *type); |
| 500 | struct bt_ctf_field *bt_ctf_field_structure_get_field(struct bt_ctf_field *structure, const char *name); |
| 501 | struct bt_ctf_field *bt_ctf_field_array_get_field(struct bt_ctf_field *array, uint64_t index); |
| 502 | struct bt_ctf_field * bt_ctf_field_sequence_get_length(struct bt_ctf_field *sequence); |
| 503 | int bt_ctf_field_sequence_set_length(struct bt_ctf_field *sequence, struct bt_ctf_field *length_field); |
| 504 | struct bt_ctf_field *bt_ctf_field_sequence_get_field(struct bt_ctf_field *sequence, uint64_t index); |
| 505 | struct bt_ctf_field *bt_ctf_field_variant_get_field(struct bt_ctf_field *variant, struct bt_ctf_field *tag); |
| 506 | struct bt_ctf_field *bt_ctf_field_enumeration_get_container(struct bt_ctf_field *enumeration); |
| 507 | const char *bt_ctf_field_enumeration_get_mapping_name(struct bt_ctf_field *enumeration); |
| 508 | int bt_ctf_field_signed_integer_get_value(struct bt_ctf_field *integer, int64_t *OUTPUT); |
| 509 | int bt_ctf_field_signed_integer_set_value(struct bt_ctf_field *integer, int64_t value); |
| 510 | int bt_ctf_field_unsigned_integer_get_value(struct bt_ctf_field *integer, uint64_t *OUTPUT); |
| 511 | int bt_ctf_field_unsigned_integer_set_value(struct bt_ctf_field *integer, uint64_t value); |
| 512 | int bt_ctf_field_floating_point_get_value(struct bt_ctf_field *floating_point, double *OUTPUT); |
| 513 | int bt_ctf_field_floating_point_set_value(struct bt_ctf_field *floating_point, double value); |
| 514 | const char *bt_ctf_field_string_get_value(struct bt_ctf_field *string_field); |
| 515 | int bt_ctf_field_string_set_value(struct bt_ctf_field *string_field, const char *value); |
| 516 | struct bt_ctf_field_type *bt_ctf_field_get_type(struct bt_ctf_field *field); |
| 517 | void bt_ctf_field_get(struct bt_ctf_field *field); |
| 518 | void bt_ctf_field_put(struct bt_ctf_field *field); |
| 519 | |
| 520 | |
| 521 | /* event-class.h */ |
| 522 | %rename("_bt_ctf_event_class_create") bt_ctf_event_class_create(const char *name); |
| 523 | %rename("_bt_ctf_event_class_get_name") bt_ctf_event_class_get_name(struct bt_ctf_event_class *event_class); |
| 524 | %rename("_bt_ctf_event_class_get_id") bt_ctf_event_class_get_id(struct bt_ctf_event_class *event_class); |
| 525 | %rename("_bt_ctf_event_class_set_id") bt_ctf_event_class_set_id(struct bt_ctf_event_class *event_class, uint32_t id); |
| 526 | %rename("_bt_ctf_event_class_get_stream_class") bt_ctf_event_class_get_stream_class(struct bt_ctf_event_class *event_class); |
| 527 | %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); |
| 528 | %rename("_bt_ctf_event_class_get_field_count") bt_ctf_event_class_get_field_count(struct bt_ctf_event_class *event_class); |
| 529 | %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); |
| 530 | %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); |
| 531 | %rename("_bt_ctf_event_class_get") bt_ctf_event_class_get(struct bt_ctf_event_class *event_class); |
| 532 | %rename("_bt_ctf_event_class_put") bt_ctf_event_class_put(struct bt_ctf_event_class *event_class); |
| 533 | |
| 534 | struct bt_ctf_event_class *bt_ctf_event_class_create(const char *name); |
| 535 | const char *bt_ctf_event_class_get_name(struct bt_ctf_event_class *event_class); |
| 536 | int64_t bt_ctf_event_class_get_id(struct bt_ctf_event_class *event_class); |
| 537 | int bt_ctf_event_class_set_id(struct bt_ctf_event_class *event_class, uint32_t id); |
| 538 | struct bt_ctf_stream_class *bt_ctf_event_class_get_stream_class(struct bt_ctf_event_class *event_class); |
| 539 | int bt_ctf_event_class_add_field(struct bt_ctf_event_class *event_class, struct bt_ctf_field_type *type, const char *name); |
| 540 | int bt_ctf_event_class_get_field_count(struct bt_ctf_event_class *event_class); |
| 541 | 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); |
| 542 | struct bt_ctf_field_type *bt_ctf_event_class_get_field_by_name(struct bt_ctf_event_class *event_class, const char *name); |
| 543 | void bt_ctf_event_class_get(struct bt_ctf_event_class *event_class); |
| 544 | void bt_ctf_event_class_put(struct bt_ctf_event_class *event_class); |
| 545 | |
| 546 | |
| 547 | /* event.h */ |
| 548 | %rename("_bt_ctf_event_create") bt_ctf_event_create(struct bt_ctf_event_class *event_class); |
| 549 | %rename("_bt_ctf_event_get_class") bt_ctf_event_get_class(struct bt_ctf_event *event); |
| 550 | %rename("_bt_ctf_event_get_clock") bt_ctf_event_get_clock(struct bt_ctf_event *event); |
| 551 | %rename("_bt_ctf_event_get_payload") bt_ctf_event_get_payload(struct bt_ctf_event *event, const char *name); |
| 552 | %rename("_bt_ctf_event_set_payload") bt_ctf_event_set_payload(struct bt_ctf_event *event, const char *name, struct bt_ctf_field *value); |
| 553 | %rename("_bt_ctf_event_get_payload_by_index") bt_ctf_event_get_payload_by_index(struct bt_ctf_event *event, int index); |
| 554 | %rename("_bt_ctf_event_get") bt_ctf_event_get(struct bt_ctf_event *event); |
| 555 | %rename("_bt_ctf_event_put") bt_ctf_event_put(struct bt_ctf_event *event); |
| 556 | |
| 557 | struct bt_ctf_event *bt_ctf_event_create(struct bt_ctf_event_class *event_class); |
| 558 | struct bt_ctf_event_class *bt_ctf_event_get_class(struct bt_ctf_event *event); |
| 559 | struct bt_ctf_clock *bt_ctf_event_get_clock(struct bt_ctf_event *event); |
| 560 | struct bt_ctf_field *bt_ctf_event_get_payload(struct bt_ctf_event *event, const char *name); |
| 561 | int bt_ctf_event_set_payload(struct bt_ctf_event *event, const char *name, struct bt_ctf_field *value); |
| 562 | struct bt_ctf_field *bt_ctf_event_get_payload_by_index(struct bt_ctf_event *event, int index); |
| 563 | void bt_ctf_event_get(struct bt_ctf_event *event); |
| 564 | void bt_ctf_event_put(struct bt_ctf_event *event); |
| 565 | |
| 566 | |
| 567 | /* stream-class.h */ |
| 568 | %rename("_bt_ctf_stream_class_create") bt_ctf_stream_class_create(const char *name); |
| 569 | %rename("_bt_ctf_stream_class_get_name") bt_ctf_stream_class_get_name(struct bt_ctf_stream_class *stream_class); |
| 570 | %rename("_bt_ctf_stream_class_get_clock") bt_ctf_stream_class_get_clock(struct bt_ctf_stream_class *stream_class); |
| 571 | %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); |
| 572 | %rename("_bt_ctf_stream_class_get_id") bt_ctf_stream_class_get_id(struct bt_ctf_stream_class *stream_class); |
| 573 | %rename("_bt_ctf_stream_class_set_id") bt_ctf_stream_class_set_id(struct bt_ctf_stream_class *stream_class, uint32_t id); |
| 574 | %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); |
| 575 | %rename("_bt_ctf_stream_class_get_event_class_count") bt_ctf_stream_class_get_event_class_count(struct bt_ctf_stream_class *stream_class); |
| 576 | %rename("_bt_ctf_stream_class_get_event_class") bt_ctf_stream_class_get_event_class(struct bt_ctf_stream_class *stream_class, int index); |
| 577 | %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); |
| 578 | %rename("_bt_ctf_stream_class_get_packet_context_type") bt_ctf_stream_class_get_packet_context_type(struct bt_ctf_stream_class *stream_class); |
| 579 | %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); |
| 580 | %rename("_bt_ctf_stream_class_get") bt_ctf_stream_class_get(struct bt_ctf_stream_class *stream_class); |
| 581 | %rename("_bt_ctf_stream_class_put") bt_ctf_stream_class_put(struct bt_ctf_stream_class *stream_class); |
| 582 | |
| 583 | struct bt_ctf_stream_class *bt_ctf_stream_class_create(const char *name); |
| 584 | const char *bt_ctf_stream_class_get_name(struct bt_ctf_stream_class *stream_class); |
| 585 | struct bt_ctf_clock *bt_ctf_stream_class_get_clock(struct bt_ctf_stream_class *stream_class); |
| 586 | int bt_ctf_stream_class_set_clock(struct bt_ctf_stream_class *stream_class, struct bt_ctf_clock *clock); |
| 587 | int64_t bt_ctf_stream_class_get_id(struct bt_ctf_stream_class *stream_class); |
| 588 | int bt_ctf_stream_class_set_id(struct bt_ctf_stream_class *stream_class, uint32_t id); |
| 589 | int bt_ctf_stream_class_add_event_class(struct bt_ctf_stream_class *stream_class, struct bt_ctf_event_class *event_class); |
| 590 | int bt_ctf_stream_class_get_event_class_count(struct bt_ctf_stream_class *stream_class); |
| 591 | struct bt_ctf_event_class *bt_ctf_stream_class_get_event_class(struct bt_ctf_stream_class *stream_class, int index); |
| 592 | struct bt_ctf_event_class *bt_ctf_stream_class_get_event_class_by_name(struct bt_ctf_stream_class *stream_class, const char *name); |
| 593 | struct bt_ctf_field_type *bt_ctf_stream_class_get_packet_context_type(struct bt_ctf_stream_class *stream_class); |
| 594 | int bt_ctf_stream_class_set_packet_context_type(struct bt_ctf_stream_class *stream_class, struct bt_ctf_field_type *packet_context_type); |
| 595 | void bt_ctf_stream_class_get(struct bt_ctf_stream_class *stream_class); |
| 596 | void bt_ctf_stream_class_put(struct bt_ctf_stream_class *stream_class); |
| 597 | |
| 598 | |
| 599 | /* stream.h */ |
| 600 | %rename("_bt_ctf_stream_get_discarded_events_count") bt_ctf_stream_get_discarded_events_count(struct bt_ctf_stream *stream, uint64_t *count); |
| 601 | %rename("_bt_ctf_stream_append_discarded_events") bt_ctf_stream_append_discarded_events(struct bt_ctf_stream *stream, uint64_t event_count); |
| 602 | %rename("_bt_ctf_stream_append_event") bt_ctf_stream_append_event(struct bt_ctf_stream *stream, struct bt_ctf_event *event); |
| 603 | %rename("_bt_ctf_stream_get_packet_context") bt_ctf_stream_get_packet_context(struct bt_ctf_stream *stream); |
| 604 | %rename("_bt_ctf_stream_set_packet_context") bt_ctf_stream_set_packet_context(struct bt_ctf_stream *stream, struct bt_ctf_field *packet_context); |
| 605 | %rename("_bt_ctf_stream_flush") bt_ctf_stream_flush(struct bt_ctf_stream *stream); |
| 606 | %rename("_bt_ctf_stream_get") bt_ctf_stream_get(struct bt_ctf_stream *stream); |
| 607 | %rename("_bt_ctf_stream_put") bt_ctf_stream_put(struct bt_ctf_stream *stream); |
| 608 | |
| 609 | int bt_ctf_stream_get_discarded_events_count(struct bt_ctf_stream *stream, uint64_t *OUTPUT); |
| 610 | void bt_ctf_stream_append_discarded_events(struct bt_ctf_stream *stream, uint64_t event_count); |
| 611 | int bt_ctf_stream_append_event(struct bt_ctf_stream *stream, struct bt_ctf_event *event); |
| 612 | struct bt_ctf_field *bt_ctf_stream_get_packet_context(struct bt_ctf_stream *stream); |
| 613 | int bt_ctf_stream_set_packet_context(struct bt_ctf_stream *stream, struct bt_ctf_field *packet_context); |
| 614 | int bt_ctf_stream_flush(struct bt_ctf_stream *stream); |
| 615 | void bt_ctf_stream_get(struct bt_ctf_stream *stream); |
| 616 | void bt_ctf_stream_put(struct bt_ctf_stream *stream); |
| 617 | |
| 618 | |
| 619 | /* writer.h */ |
| 620 | %rename("_bt_ctf_writer_create") bt_ctf_writer_create(const char *path); |
| 621 | %rename("_bt_ctf_writer_create_stream") bt_ctf_writer_create_stream(struct bt_ctf_writer *writer, struct bt_ctf_stream_class *stream_class); |
| 622 | %rename("_bt_ctf_writer_add_environment_field") bt_ctf_writer_add_environment_field(struct bt_ctf_writer *writer, const char *name, const char *value); |
| 623 | %rename("_bt_ctf_writer_add_clock") bt_ctf_writer_add_clock(struct bt_ctf_writer *writer, struct bt_ctf_clock *clock); |
| 624 | %newobject bt_ctf_writer_get_metadata_string; |
| 625 | %rename("_bt_ctf_writer_get_metadata_string") bt_ctf_writer_get_metadata_string(struct bt_ctf_writer *writer); |
| 626 | %rename("_bt_ctf_writer_flush_metadata") bt_ctf_writer_flush_metadata(struct bt_ctf_writer *writer); |
| 627 | %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); |
| 628 | %rename("_bt_ctf_writer_get") bt_ctf_writer_get(struct bt_ctf_writer *writer); |
| 629 | %rename("_bt_ctf_writer_put") bt_ctf_writer_put(struct bt_ctf_writer *writer); |
| 630 | |
| 631 | struct bt_ctf_writer *bt_ctf_writer_create(const char *path); |
| 632 | struct bt_ctf_stream *bt_ctf_writer_create_stream(struct bt_ctf_writer *writer, struct bt_ctf_stream_class *stream_class); |
| 633 | int bt_ctf_writer_add_environment_field(struct bt_ctf_writer *writer, const char *name, const char *value); |
| 634 | int bt_ctf_writer_add_clock(struct bt_ctf_writer *writer, struct bt_ctf_clock *clock); |
| 635 | char *bt_ctf_writer_get_metadata_string(struct bt_ctf_writer *writer); |
| 636 | void bt_ctf_writer_flush_metadata(struct bt_ctf_writer *writer); |
| 637 | int bt_ctf_writer_set_byte_order(struct bt_ctf_writer *writer, enum bt_ctf_byte_order byte_order); |
| 638 | void bt_ctf_writer_get(struct bt_ctf_writer *writer); |
| 639 | void bt_ctf_writer_put(struct bt_ctf_writer *writer); |