Commit | Line | Data |
---|---|---|
c55a9f58 | 1 | /* |
0235b0db | 2 | * SPDX-License-Identifier: MIT |
c55a9f58 | 3 | * |
0235b0db | 4 | * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation |
c55a9f58 PP |
5 | */ |
6 | ||
0235b0db MJ |
7 | #ifndef BABELTRACE2_TYPES_H |
8 | #define BABELTRACE2_TYPES_H | |
9 | ||
f38da6ca SM |
10 | /* IWYU pragma: private, include <babeltrace2/babeltrace.h> */ |
11 | ||
4fa90f32 PP |
12 | #ifndef __BT_IN_BABELTRACE_H |
13 | # error "Please include <babeltrace2/babeltrace.h> instead." | |
14 | #endif | |
15 | ||
44c440bc PP |
16 | #include <stdint.h> |
17 | ||
c55a9f58 PP |
18 | #ifdef __cplusplus |
19 | extern "C" { | |
20 | #endif | |
21 | ||
b19ff26f | 22 | typedef struct bt_clock_class bt_clock_class; |
605e1019 | 23 | typedef struct bt_clock_snapshot bt_clock_snapshot; |
b19ff26f PP |
24 | typedef struct bt_component bt_component; |
25 | typedef struct bt_component_class bt_component_class; | |
26 | typedef struct bt_component_class_filter bt_component_class_filter; | |
27 | typedef struct bt_component_class_sink bt_component_class_sink; | |
28 | typedef struct bt_component_class_source bt_component_class_source; | |
55f09f52 | 29 | typedef struct bt_component_descriptor_set bt_component_descriptor_set; |
b19ff26f | 30 | typedef struct bt_component_filter bt_component_filter; |
b19ff26f PP |
31 | typedef struct bt_component_sink bt_component_sink; |
32 | typedef struct bt_component_source bt_component_source; | |
33 | typedef struct bt_connection bt_connection; | |
45c51519 PP |
34 | typedef struct bt_error bt_error; |
35 | typedef struct bt_error_cause bt_error_cause; | |
b19ff26f PP |
36 | typedef struct bt_event bt_event; |
37 | typedef struct bt_event_class bt_event_class; | |
b19ff26f PP |
38 | typedef struct bt_field bt_field; |
39 | typedef struct bt_field_class bt_field_class; | |
8f3ccfbc | 40 | typedef struct bt_field_class_enumeration_mapping bt_field_class_enumeration_mapping; |
9c08c816 | 41 | typedef struct bt_field_class_enumeration_signed_mapping bt_field_class_enumeration_signed_mapping; |
9c08c816 | 42 | typedef struct bt_field_class_enumeration_unsigned_mapping bt_field_class_enumeration_unsigned_mapping; |
b70d57a1 | 43 | typedef struct bt_field_class_structure_member bt_field_class_structure_member; |
1e6fd1d7 | 44 | typedef struct bt_field_class_variant_option bt_field_class_variant_option; |
de821fe5 PP |
45 | typedef struct bt_field_class_variant_with_selector_field_integer_signed_option bt_field_class_variant_with_selector_field_integer_signed_option; |
46 | typedef struct bt_field_class_variant_with_selector_field_integer_unsigned_option bt_field_class_variant_with_selector_field_integer_unsigned_option; | |
b19ff26f | 47 | typedef struct bt_field_path bt_field_path; |
66ddcddf | 48 | typedef struct bt_field_path_item bt_field_path_item; |
b19ff26f | 49 | typedef struct bt_graph bt_graph; |
fb91c0ef PP |
50 | typedef struct bt_integer_range_set bt_integer_range_set; |
51 | typedef struct bt_integer_range_set_signed bt_integer_range_set_signed; | |
52 | typedef struct bt_integer_range_set_unsigned bt_integer_range_set_unsigned; | |
53 | typedef struct bt_integer_range_signed bt_integer_range_signed; | |
54 | typedef struct bt_integer_range_unsigned bt_integer_range_unsigned; | |
b70d57a1 | 55 | typedef struct bt_interrupter bt_interrupter; |
d6e69534 PP |
56 | typedef struct bt_message bt_message; |
57 | typedef struct bt_message_iterator bt_message_iterator; | |
a3f0c7db | 58 | typedef struct bt_message_iterator_class bt_message_iterator_class; |
b19ff26f PP |
59 | typedef struct bt_object bt_object; |
60 | typedef struct bt_packet bt_packet; | |
b19ff26f PP |
61 | typedef struct bt_plugin bt_plugin; |
62 | typedef struct bt_plugin_set bt_plugin_set; | |
b19ff26f PP |
63 | typedef struct bt_port bt_port; |
64 | typedef struct bt_port_input bt_port_input; | |
65 | typedef struct bt_port_output bt_port_output; | |
d6e69534 | 66 | typedef struct bt_port_output_message_iterator bt_port_output_message_iterator; |
3c729b9a | 67 | typedef struct bt_private_query_executor bt_private_query_executor; |
b19ff26f PP |
68 | typedef struct bt_query_executor bt_query_executor; |
69 | typedef struct bt_self_component bt_self_component; | |
553c4bab | 70 | typedef struct bt_self_component_class bt_self_component_class; |
b19ff26f PP |
71 | typedef struct bt_self_component_class_filter bt_self_component_class_filter; |
72 | typedef struct bt_self_component_class_sink bt_self_component_class_sink; | |
73 | typedef struct bt_self_component_class_source bt_self_component_class_source; | |
74 | typedef struct bt_self_component_filter bt_self_component_filter; | |
59225a3e | 75 | typedef struct bt_self_component_filter_configuration bt_self_component_filter_configuration; |
b19ff26f PP |
76 | typedef struct bt_self_component_port bt_self_component_port; |
77 | typedef struct bt_self_component_port_input bt_self_component_port_input; | |
9a2c8b8e | 78 | typedef struct bt_message_iterator bt_message_iterator; |
b19ff26f PP |
79 | typedef struct bt_self_component_port_output bt_self_component_port_output; |
80 | typedef struct bt_self_component_sink bt_self_component_sink; | |
59225a3e | 81 | typedef struct bt_self_component_sink_configuration bt_self_component_sink_configuration; |
b19ff26f | 82 | typedef struct bt_self_component_source bt_self_component_source; |
59225a3e | 83 | typedef struct bt_self_component_source_configuration bt_self_component_source_configuration; |
d6e69534 | 84 | typedef struct bt_self_message_iterator bt_self_message_iterator; |
8d8b141d | 85 | typedef struct bt_self_message_iterator_configuration bt_self_message_iterator_configuration; |
d24d5663 | 86 | typedef struct bt_self_plugin bt_self_plugin; |
b19ff26f PP |
87 | typedef struct bt_stream bt_stream; |
88 | typedef struct bt_stream_class bt_stream_class; | |
89 | typedef struct bt_trace bt_trace; | |
90 | typedef struct bt_trace_class bt_trace_class; | |
91 | typedef struct bt_value bt_value; | |
92 | ||
43c59509 PP |
93 | /*! |
94 | @defgroup api-common-types Common C types | |
95 | ||
96 | @brief | |
97 | C types common to many parts of the API. | |
98 | */ | |
99 | ||
100 | /*! @{ */ | |
101 | ||
102 | /*! | |
103 | @brief | |
104 | \em True value for #bt_bool. | |
105 | */ | |
106 | #define BT_TRUE 1 | |
107 | ||
108 | /*! | |
109 | @brief | |
110 | \em False value for #bt_bool. | |
111 | */ | |
112 | #define BT_FALSE 0 | |
113 | ||
114 | /*! | |
115 | @brief | |
116 | \bt_name boolean type. | |
117 | ||
118 | The API uses #bt_bool instead of the C99 \c bool type for | |
119 | <a href="https://en.wikipedia.org/wiki/Application_binary_interface">application binary interface</a> | |
120 | reasons. | |
121 | ||
122 | Use #BT_TRUE and #BT_FALSE to set and compare #bt_bool variables. | |
123 | */ | |
124 | typedef int bt_bool; | |
125 | ||
126 | /*! | |
127 | @brief | |
128 | Numeric ID which identifies a user listener function. | |
129 | ||
130 | Some functions, such as bt_trace_add_destruction_listener(), return a | |
131 | listener ID when you add a user listener function to some object. You | |
132 | can then use this listener ID to remove the listener from the object. | |
133 | */ | |
134 | typedef uint64_t bt_listener_id; | |
135 | ||
136 | /*! | |
137 | @brief | |
138 | A | |
139 | <a href="https://en.wikipedia.org/wiki/Universally_unique_identifier">UUID</a>, | |
140 | that is, an array of 16 constant bytes. | |
141 | */ | |
142 | typedef uint8_t const *bt_uuid; | |
143 | ||
144 | /*! | |
145 | @brief | |
146 | Availability of an object's property. | |
147 | ||
148 | Some getter functions of the API, such as | |
149 | bt_event_class_get_log_level(), return, by output parameter, an optional | |
150 | object property which is not a pointer. In that case, the function | |
151 | either: | |
152 | ||
153 | - Returns #BT_PROPERTY_AVAILABILITY_AVAILABLE and sets an output | |
154 | parameter to the property's value. | |
155 | - Returns #BT_PROPERTY_AVAILABILITY_NOT_AVAILABLE. | |
156 | */ | |
157 | typedef enum bt_property_availability { | |
158 | /*! | |
159 | @brief | |
160 | Property is available. | |
161 | */ | |
162 | BT_PROPERTY_AVAILABILITY_AVAILABLE = 1, | |
163 | ||
164 | /*! | |
165 | @brief | |
166 | Property is not available. | |
167 | */ | |
168 | BT_PROPERTY_AVAILABILITY_NOT_AVAILABLE = 0, | |
169 | } bt_property_availability; | |
170 | ||
171 | /*! | |
172 | @brief | |
173 | Array of constant \bt_p_msg. | |
174 | ||
175 | Such an array is filled by the | |
176 | \link api-msg-iter-cls-meth-next "next" method\endlink of a | |
177 | \bt_msg_iter and consumed with bt_message_iterator_next() by another | |
178 | message iterator or by a \bt_sink_comp. | |
179 | */ | |
180 | typedef bt_message const **bt_message_array_const; | |
b19ff26f | 181 | |
43c59509 | 182 | /*! @} */ |
c55a9f58 PP |
183 | |
184 | #ifdef __cplusplus | |
185 | } | |
186 | #endif | |
187 | ||
924dc299 | 188 | #endif /* BABELTRACE2_TYPES_H */ |