Trace IR and notification APIs: split into private and public APIs
[babeltrace.git] / include / babeltrace / trace-ir / private-field-classes.h
1 #ifndef BABELTRACE_TRACE_IR_PRIVATE_FIELD_CLASSES_H
2 #define BABELTRACE_TRACE_IR_PRIVATE_FIELD_CLASSES_H
3
4 /*
5 * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 *
7 * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25 * SOFTWARE.
26 *
27 * The Common Trace Format (CTF) Specification is available at
28 * http://www.efficios.com/ctf
29 */
30
31 /* For bt_bool */
32 #include <babeltrace/types.h>
33
34 /* For enum bt_field_class_integer_preferred_display_base */
35 #include <babeltrace/trace-ir/field-classes.h>
36
37 #include <stdint.h>
38 #include <stddef.h>
39
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43
44 struct bt_field_class;
45 struct bt_private_field_class;
46 struct bt_private_field_path;
47 struct bt_private_field_class_signed_enumeration_mapping_ranges;
48 struct bt_private_field_class_unsigned_enumeration_mapping_ranges;
49
50 extern struct bt_field_class *bt_field_class_borrow_from_private(
51 struct bt_private_field_class *priv_field_class);
52
53 extern struct bt_private_field_class *
54 bt_private_field_class_unsigned_integer_create(void);
55
56 extern struct bt_private_field_class *
57 bt_private_field_class_signed_integer_create(void);
58
59 extern int bt_private_field_class_integer_set_field_value_range(
60 struct bt_private_field_class *field_class, uint64_t size);
61
62 extern int bt_private_field_class_integer_set_preferred_display_base(
63 struct bt_private_field_class *field_class,
64 enum bt_field_class_integer_preferred_display_base base);
65
66 extern struct bt_private_field_class *bt_private_field_class_real_create(void);
67
68 extern int bt_private_field_class_real_set_is_single_precision(
69 struct bt_private_field_class *field_class,
70 bt_bool is_single_precision);
71
72 extern struct bt_private_field_class *
73 bt_private_field_class_unsigned_enumeration_create(void);
74
75 extern struct bt_private_field_class *
76 bt_private_field_class_signed_enumeration_create(void);
77
78 extern uint64_t bt_private_field_class_enumeration_get_mapping_count(
79 struct bt_private_field_class *field_class);
80
81 extern int bt_private_field_class_unsigned_enumeration_map_range(
82 struct bt_private_field_class *field_class, const char *label,
83 uint64_t range_lower, uint64_t range_upper);
84
85 extern int bt_private_field_class_signed_enumeration_map_range(
86 struct bt_private_field_class *field_class, const char *label,
87 int64_t range_lower, int64_t range_upper);
88
89 extern struct bt_private_field_class *
90 bt_private_field_class_string_create(void);
91
92 extern struct bt_private_field_class *
93 bt_private_field_class_structure_create(void);
94
95 extern void bt_private_field_class_structure_borrow_private_member_by_index(
96 struct bt_private_field_class *struct_field_class,
97 uint64_t index, const char **name,
98 struct bt_private_field_class **field_class);
99
100 extern
101 struct bt_private_field_class *
102 bt_private_field_class_structure_borrow_member_private_field_class_by_name(
103 struct bt_private_field_class *field_class, const char *name);
104
105 extern int bt_private_field_class_structure_append_private_member(
106 struct bt_private_field_class *struct_field_class,
107 const char *name, struct bt_private_field_class *field_class);
108
109 extern struct bt_private_field_class *
110 bt_private_field_class_static_array_create(
111 struct bt_private_field_class *elem_field_class,
112 uint64_t length);
113
114 extern struct bt_private_field_class *
115 bt_private_field_class_dynamic_array_create(
116 struct bt_private_field_class *elem_field_class);
117
118 extern struct bt_private_field_class *
119 bt_private_field_class_array_borrow_element_private_field_class(
120 struct bt_private_field_class *field_class);
121
122 extern int bt_private_field_class_dynamic_array_set_length_private_field_class(
123 struct bt_private_field_class *field_class,
124 struct bt_private_field_class *length_field_class);
125
126 extern struct bt_private_field_class *
127 bt_private_field_class_variant_create(void);
128
129 extern int bt_private_field_class_variant_set_selector_private_field_class(
130 struct bt_private_field_class *field_class,
131 struct bt_private_field_class *selector_field_class);
132
133 extern void bt_private_field_class_variant_borrow_private_option_by_index(
134 struct bt_private_field_class *variant_field_class,
135 uint64_t index, const char **name,
136 struct bt_private_field_class **field_class);
137
138 extern
139 struct bt_private_field_class *
140 bt_private_field_class_variant_borrow_option_private_field_class_by_name(
141 struct bt_private_field_class *field_class, const char *name);
142
143 extern int bt_private_field_class_variant_append_private_option(
144 struct bt_private_field_class *var_field_class,
145 const char *name, struct bt_private_field_class *field_class);
146
147 #ifdef __cplusplus
148 }
149 #endif
150
151 #endif /* BABELTRACE_TRACE_IR_PRIVATE_FIELD_CLASSES_H */
This page took 0.032226 seconds and 4 git commands to generate.