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 DS |
30 | |
31 | /* File */ | |
32 | FILE *_bt_file_open(char *file_path, char *mode); | |
33 | void _bt_file_close(FILE *fp); | |
34 | ||
35 | /* ctf-field-list */ | |
2c0df204 | 36 | struct bt_definition **_bt_python_field_listcaller( |
24a3136a | 37 | const struct bt_ctf_event *ctf_event, |
cebae8c3 JG |
38 | const struct bt_definition *scope, |
39 | unsigned int *len); | |
2c0df204 XH |
40 | struct bt_definition *_bt_python_field_one_from_list( |
41 | struct bt_definition **list, int index); | |
24a3136a DS |
42 | |
43 | /* event_decl_list */ | |
44 | struct bt_ctf_event_decl **_bt_python_event_decl_listcaller( | |
cebae8c3 JG |
45 | int handle_id, |
46 | struct bt_context *ctx, | |
47 | unsigned int *len); | |
24a3136a DS |
48 | struct bt_ctf_event_decl *_bt_python_decl_one_from_list( |
49 | struct bt_ctf_event_decl **list, int index); | |
50 | ||
51 | /* decl_fields */ | |
52 | struct bt_ctf_field_decl **_by_python_field_decl_listcaller( | |
53 | struct bt_ctf_event_decl *event_decl, | |
cebae8c3 JG |
54 | enum bt_ctf_scope scope, |
55 | unsigned int *len); | |
24a3136a DS |
56 | struct bt_ctf_field_decl *_bt_python_field_decl_one_from_list( |
57 | struct bt_ctf_field_decl **list, int index); | |
3c2ce778 XH |
58 | |
59 | /* definitions */ | |
60 | struct definition_array *_bt_python_get_array_from_def( | |
61 | struct bt_definition *field); | |
786207e0 XH |
62 | struct definition_sequence *_bt_python_get_sequence_from_def( |
63 | struct bt_definition *field); | |
ec8c88d7 JG |
64 | |
65 | /* ctf writer */ | |
66 | int _bt_python_field_integer_get_signedness(const struct bt_ctf_field *field); | |
67 | enum ctf_type_id _bt_python_get_field_type(const struct bt_ctf_field *field); |