Commit | Line | Data |
---|---|---|
24a3136a DS |
1 | /* |
2 | * python-complements.h | |
3 | * | |
4 | * Babeltrace Python module complements header, required for Python bindings | |
5 | * | |
6 | * Copyright 2012 EfficiOS Inc. | |
7 | * | |
8 | * Author: Danny Serres <danny.serres@efficios.com> | |
9 | * | |
10 | * Permission is hereby granted, free of charge, to any person obtaining a copy | |
11 | * of this software and associated documentation files (the "Software"), to deal | |
12 | * in the Software without restriction, including without limitation the rights | |
13 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
14 | * copies of the Software, and to permit persons to whom the Software is | |
15 | * furnished to do so, subject to the following conditions: | |
16 | * | |
17 | * The above copyright notice and this permission notice shall be included in | |
18 | * all copies or substantial portions of the Software. | |
19 | */ | |
20 | ||
21 | #include <stdio.h> | |
22 | #include <glib.h> | |
23 | #include <babeltrace/babeltrace.h> | |
24 | #include <babeltrace/format.h> | |
25 | #include <babeltrace/ctf-ir/metadata.h> | |
26 | #include <babeltrace/ctf/events.h> | |
27 | #include <babeltrace/iterator-internal.h> | |
28 | #include <babeltrace/ctf/events-internal.h> | |
ec8c88d7 | 29 | #include <babeltrace/ctf-writer/event-fields.h> |
24a3136a | 30 | |
24a3136a | 31 | /* ctf-field-list */ |
2c0df204 | 32 | struct bt_definition **_bt_python_field_listcaller( |
24a3136a | 33 | const struct bt_ctf_event *ctf_event, |
cebae8c3 JG |
34 | const struct bt_definition *scope, |
35 | unsigned int *len); | |
2c0df204 XH |
36 | struct bt_definition *_bt_python_field_one_from_list( |
37 | struct bt_definition **list, int index); | |
24a3136a DS |
38 | |
39 | /* event_decl_list */ | |
40 | struct bt_ctf_event_decl **_bt_python_event_decl_listcaller( | |
cebae8c3 JG |
41 | int handle_id, |
42 | struct bt_context *ctx, | |
43 | unsigned int *len); | |
24a3136a DS |
44 | struct bt_ctf_event_decl *_bt_python_decl_one_from_list( |
45 | struct bt_ctf_event_decl **list, int index); | |
46 | ||
47 | /* decl_fields */ | |
48 | struct bt_ctf_field_decl **_by_python_field_decl_listcaller( | |
49 | struct bt_ctf_event_decl *event_decl, | |
cebae8c3 JG |
50 | enum bt_ctf_scope scope, |
51 | unsigned int *len); | |
24a3136a DS |
52 | struct bt_ctf_field_decl *_bt_python_field_decl_one_from_list( |
53 | struct bt_ctf_field_decl **list, int index); | |
3c2ce778 XH |
54 | |
55 | /* definitions */ | |
56 | struct definition_array *_bt_python_get_array_from_def( | |
57 | struct bt_definition *field); | |
786207e0 XH |
58 | struct definition_sequence *_bt_python_get_sequence_from_def( |
59 | struct bt_definition *field); | |
5792eb34 JG |
60 | struct bt_declaration *_bt_python_get_array_element_declaration( |
61 | struct bt_declaration *field); | |
3866c850 JG |
62 | struct bt_declaration *_bt_python_get_sequence_element_declaration( |
63 | struct bt_declaration *field); | |
5792eb34 | 64 | const char *_bt_python_get_array_string(struct bt_definition *field); |
3866c850 | 65 | const char *_bt_python_get_sequence_string(struct bt_definition *field); |
ec8c88d7 | 66 | |
b4b5e4b5 | 67 | /* ctf ir */ |
ec8c88d7 JG |
68 | int _bt_python_field_integer_get_signedness(const struct bt_ctf_field *field); |
69 | enum ctf_type_id _bt_python_get_field_type(const struct bt_ctf_field *field); | |
b4b5e4b5 JG |
70 | const char *_bt_python_ctf_field_type_enumeration_get_mapping( |
71 | struct bt_ctf_field_type *enumeration, size_t index, | |
72 | int64_t *range_start, int64_t *range_end); | |
73 | const char *_bt_python_ctf_field_type_enumeration_get_mapping_unsigned( | |
74 | struct bt_ctf_field_type *enumeration, size_t index, | |
75 | uint64_t *range_start, uint64_t *range_end); | |
76 | const char *_bt_python_ctf_field_type_structure_get_field_name( | |
77 | struct bt_ctf_field_type *structure, size_t index); | |
78 | struct bt_ctf_field_type *_bt_python_ctf_field_type_structure_get_field_type( | |
79 | struct bt_ctf_field_type *structure, size_t index); | |
80 | const char *_bt_python_ctf_field_type_variant_get_field_name( | |
81 | struct bt_ctf_field_type *variant, size_t index); | |
82 | struct bt_ctf_field_type *_bt_python_ctf_field_type_variant_get_field_type( | |
83 | struct bt_ctf_field_type *variant, size_t index); | |
38f28df6 JG |
84 | const char *_bt_python_ctf_event_class_get_field_name( |
85 | struct bt_ctf_event_class *event_class, size_t index); | |
86 | struct bt_ctf_field_type *_bt_python_ctf_event_class_get_field_type( | |
87 | struct bt_ctf_event_class *event_class, size_t index); |