lib/plugin/plugin.c: do not use G_MODULE_BIND_LOCAL for Python plugin provider
[babeltrace.git] / bindings / python / bt2 / native_btfields.i
CommitLineData
81447b5b
PP
1/*
2 * The MIT License (MIT)
3 *
4 * Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
23 */
24
25%{
26#include <babeltrace/ctf-ir/fields.h>
27%}
28
29/* Type */
30struct bt_ctf_field;
31
32/* Common functions */
33struct bt_ctf_field *bt_ctf_field_create(
34 struct bt_ctf_field_type *type);
35struct bt_ctf_field_type *bt_ctf_field_get_type(
36 struct bt_ctf_field *field);
37struct bt_ctf_field *bt_ctf_field_copy(struct bt_ctf_field *field);
38
39/* Integer field functions */
40int bt_ctf_field_signed_integer_get_value(struct bt_ctf_field *integer,
41 int64_t *OUTPUT);
42int bt_ctf_field_signed_integer_set_value(struct bt_ctf_field *integer,
43 int64_t value);
44int bt_ctf_field_unsigned_integer_get_value(struct bt_ctf_field *integer,
45 uint64_t *OUTPUT);
46int bt_ctf_field_unsigned_integer_set_value(struct bt_ctf_field *integer,
47 uint64_t value);
48
49/* Floating point number field functions */
50int bt_ctf_field_floating_point_get_value(
51 struct bt_ctf_field *floating_point, double *OUTPUT);
52int bt_ctf_field_floating_point_set_value(
53 struct bt_ctf_field *floating_point,
54 double value);
55
56/* Enumeration field functions */
57struct bt_ctf_field *bt_ctf_field_enumeration_get_container(
58 struct bt_ctf_field *enumeration);
59struct bt_ctf_field_type_enumeration_mapping_iterator *
60bt_ctf_field_enumeration_get_mappings(struct bt_ctf_field *enum_field);
61
62/* String field functions */
63const char *bt_ctf_field_string_get_value(
64 struct bt_ctf_field *string_field);
65int bt_ctf_field_string_set_value(struct bt_ctf_field *string_field,
66 const char *value);
67int bt_ctf_field_string_append(struct bt_ctf_field *string_field,
68 const char *value);
69int bt_ctf_field_string_append_len(
70 struct bt_ctf_field *string_field, const char *value,
71 unsigned int length);
72
73/* Structure field functions */
74struct bt_ctf_field *bt_ctf_field_structure_get_field_by_index(
75 struct bt_ctf_field *structure, int index);
76struct bt_ctf_field *bt_ctf_field_structure_get_field(
77 struct bt_ctf_field *structure, const char *name);
78
79/* Array field functions */
80struct bt_ctf_field *bt_ctf_field_array_get_field(
81 struct bt_ctf_field *array, uint64_t index);
82
83/* Sequence field functions */
84struct bt_ctf_field *bt_ctf_field_sequence_get_length(
85 struct bt_ctf_field *sequence);
86int bt_ctf_field_sequence_set_length(struct bt_ctf_field *sequence,
87 struct bt_ctf_field *length_field);
88struct bt_ctf_field *bt_ctf_field_sequence_get_field(
89 struct bt_ctf_field *sequence, uint64_t index);
90
91/* Variant field functions */
92struct bt_ctf_field *bt_ctf_field_variant_get_field(
93 struct bt_ctf_field *variant, struct bt_ctf_field *tag);
94struct bt_ctf_field *bt_ctf_field_variant_get_current_field(
95 struct bt_ctf_field *variant);
96struct bt_ctf_field *bt_ctf_field_variant_get_tag(
97 struct bt_ctf_field *variant);
This page took 0.031623 seconds and 4 git commands to generate.