Commit | Line | Data |
---|---|---|
3fd40f46 PP |
1 | #ifndef BABELTRACE2_TYPES_H |
2 | #define BABELTRACE2_TYPES_H | |
c55a9f58 PP |
3 | |
4 | /* | |
0dcb770f | 5 | * Copyright (c) 2010-2019 EfficiOS Inc. and Linux Foundation |
c55a9f58 PP |
6 | * |
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy | |
8 | * of this software and associated documentation files (the "Software"), to deal | |
9 | * in the Software without restriction, including without limitation the rights | |
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
11 | * copies of the Software, and to permit persons to whom the Software is | |
12 | * furnished to do so, subject to the following conditions: | |
13 | * | |
14 | * The above copyright notice and this permission notice shall be included in | |
15 | * all copies or substantial portions of the Software. | |
16 | * | |
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
23 | * SOFTWARE. | |
24 | */ | |
25 | ||
9df34b44 PP |
26 | #ifndef __BT_IN_BABELTRACE_H |
27 | # error "Please include <babeltrace2/babeltrace.h> instead." | |
28 | #endif | |
29 | ||
7b33a0e0 PP |
30 | #include <stdint.h> |
31 | ||
c55a9f58 PP |
32 | #ifdef __cplusplus |
33 | extern "C" { | |
34 | #endif | |
35 | ||
36 | /** | |
37 | @defgroup ctypes Babeltrace C types | |
38 | @ingroup apiref | |
39 | @brief Babeltrace C types. | |
40 | ||
41 | @code | |
71c5da58 | 42 | #include <babeltrace2/types.h> |
c55a9f58 PP |
43 | @endcode |
44 | ||
45 | This header contains custom type definitions used across the library. | |
46 | ||
47 | @file | |
48 | @brief Babeltrace C types. | |
49 | @sa ctypes | |
50 | ||
51 | @addtogroup ctypes | |
52 | @{ | |
53 | */ | |
54 | ||
55 | /// False boolean value for the #bt_bool type. | |
56 | #define BT_FALSE 0 | |
57 | ||
58 | /// True boolean value for the #bt_bool type. | |
59 | #define BT_TRUE 1 | |
60 | ||
61 | /** | |
62 | @brief Babeltrace's boolean type. | |
63 | ||
64 | Use only the #BT_FALSE and #BT_TRUE definitions for #bt_bool parameters. | |
65 | It is guaranteed that the library functions which return a #bt_bool | |
66 | value return either #BT_FALSE or #BT_TRUE. | |
67 | ||
68 | You can always test the truthness of a #bt_bool value directly, without | |
69 | comparing it to #BT_TRUE directly: | |
70 | ||
71 | @code | |
72 | bt_bool ret = bt_some_function(...); | |
73 | ||
74 | if (ret) { | |
75 | // ret is true | |
76 | } | |
77 | @endcode | |
78 | */ | |
79 | typedef int bt_bool; | |
80 | ||
eba7ea21 PP |
81 | typedef uint64_t bt_listener_id; |
82 | ||
7b33a0e0 PP |
83 | typedef const uint8_t *bt_uuid; |
84 | ||
8eee8ea2 | 85 | typedef struct bt_clock_class bt_clock_class; |
ecbb78c0 | 86 | typedef struct bt_clock_snapshot bt_clock_snapshot; |
8eee8ea2 PP |
87 | typedef struct bt_component bt_component; |
88 | typedef struct bt_component_class bt_component_class; | |
89 | typedef struct bt_component_class_filter bt_component_class_filter; | |
90 | typedef struct bt_component_class_sink bt_component_class_sink; | |
91 | typedef struct bt_component_class_source bt_component_class_source; | |
36e611bb | 92 | typedef struct bt_component_descriptor_set bt_component_descriptor_set; |
8eee8ea2 | 93 | typedef struct bt_component_filter bt_component_filter; |
8eee8ea2 PP |
94 | typedef struct bt_component_sink bt_component_sink; |
95 | typedef struct bt_component_source bt_component_source; | |
96 | typedef struct bt_connection bt_connection; | |
02b61fe0 PP |
97 | typedef struct bt_error bt_error; |
98 | typedef struct bt_error_cause bt_error_cause; | |
8eee8ea2 PP |
99 | typedef struct bt_event bt_event; |
100 | typedef struct bt_event_class bt_event_class; | |
101 | typedef struct bt_event_header_field bt_event_header_field; | |
102 | typedef struct bt_field bt_field; | |
103 | typedef struct bt_field_class bt_field_class; | |
b6baf3bb | 104 | typedef struct bt_field_class_enumeration_mapping bt_field_class_enumeration_mapping; |
60bbfc7c | 105 | typedef struct bt_field_class_enumeration_signed_mapping bt_field_class_enumeration_signed_mapping; |
60bbfc7c | 106 | typedef struct bt_field_class_enumeration_unsigned_mapping bt_field_class_enumeration_unsigned_mapping; |
33573333 | 107 | typedef struct bt_field_class_structure_member bt_field_class_structure_member; |
e24f271a | 108 | typedef struct bt_field_class_variant_option bt_field_class_variant_option; |
8bc207af PP |
109 | typedef struct bt_field_class_variant_with_selector_field_integer_signed_option bt_field_class_variant_with_selector_field_integer_signed_option; |
110 | typedef struct bt_field_class_variant_with_selector_field_integer_unsigned_option bt_field_class_variant_with_selector_field_integer_unsigned_option; | |
8eee8ea2 | 111 | typedef struct bt_field_path bt_field_path; |
1d4afa5f | 112 | typedef struct bt_field_path_item bt_field_path_item; |
8eee8ea2 | 113 | typedef struct bt_graph bt_graph; |
ba38aae7 PP |
114 | typedef struct bt_integer_range_set bt_integer_range_set; |
115 | typedef struct bt_integer_range_set_signed bt_integer_range_set_signed; | |
116 | typedef struct bt_integer_range_set_unsigned bt_integer_range_set_unsigned; | |
117 | typedef struct bt_integer_range_signed bt_integer_range_signed; | |
118 | typedef struct bt_integer_range_unsigned bt_integer_range_unsigned; | |
33573333 | 119 | typedef struct bt_interrupter bt_interrupter; |
b09a5592 PP |
120 | typedef struct bt_message bt_message; |
121 | typedef struct bt_message_iterator bt_message_iterator; | |
8eee8ea2 PP |
122 | typedef struct bt_object bt_object; |
123 | typedef struct bt_packet bt_packet; | |
124 | typedef struct bt_packet_context_field bt_packet_context_field; | |
125 | typedef struct bt_packet_header_field bt_packet_header_field; | |
126 | typedef struct bt_plugin bt_plugin; | |
127 | typedef struct bt_plugin_set bt_plugin_set; | |
128 | typedef struct bt_plugin_so_shared_lib_handle bt_plugin_so_shared_lib_handle; | |
129 | typedef struct bt_port bt_port; | |
130 | typedef struct bt_port_input bt_port_input; | |
131 | typedef struct bt_port_output bt_port_output; | |
b09a5592 | 132 | typedef struct bt_port_output_message_iterator bt_port_output_message_iterator; |
bf403eb2 | 133 | typedef struct bt_private_query_executor bt_private_query_executor; |
8eee8ea2 PP |
134 | typedef struct bt_query_executor bt_query_executor; |
135 | typedef struct bt_self_component bt_self_component; | |
c0e90f23 | 136 | typedef struct bt_self_component_class bt_self_component_class; |
8eee8ea2 PP |
137 | typedef struct bt_self_component_class_filter bt_self_component_class_filter; |
138 | typedef struct bt_self_component_class_sink bt_self_component_class_sink; | |
139 | typedef struct bt_self_component_class_source bt_self_component_class_source; | |
140 | typedef struct bt_self_component_filter bt_self_component_filter; | |
e3250e61 | 141 | typedef struct bt_self_component_filter_configuration bt_self_component_filter_configuration; |
8eee8ea2 PP |
142 | typedef struct bt_self_component_port bt_self_component_port; |
143 | typedef struct bt_self_component_port_input bt_self_component_port_input; | |
b09a5592 | 144 | typedef struct bt_self_component_port_input_message_iterator bt_self_component_port_input_message_iterator; |
8eee8ea2 PP |
145 | typedef struct bt_self_component_port_output bt_self_component_port_output; |
146 | typedef struct bt_self_component_sink bt_self_component_sink; | |
e3250e61 | 147 | typedef struct bt_self_component_sink_configuration bt_self_component_sink_configuration; |
8eee8ea2 | 148 | typedef struct bt_self_component_source bt_self_component_source; |
e3250e61 | 149 | typedef struct bt_self_component_source_configuration bt_self_component_source_configuration; |
b09a5592 | 150 | typedef struct bt_self_message_iterator bt_self_message_iterator; |
9415de1c | 151 | typedef struct bt_self_message_iterator_configuration bt_self_message_iterator_configuration; |
fb25b9e3 | 152 | typedef struct bt_self_plugin bt_self_plugin; |
8eee8ea2 PP |
153 | typedef struct bt_stream bt_stream; |
154 | typedef struct bt_stream_class bt_stream_class; | |
155 | typedef struct bt_trace bt_trace; | |
156 | typedef struct bt_trace_class bt_trace_class; | |
157 | typedef struct bt_value bt_value; | |
158 | ||
159 | typedef const char * const *bt_field_class_enumeration_mapping_label_array; | |
b09a5592 | 160 | typedef const struct bt_message **bt_message_array_const; |
8eee8ea2 | 161 | |
c55a9f58 PP |
162 | /** @} */ |
163 | ||
164 | #ifdef __cplusplus | |
165 | } | |
166 | #endif | |
167 | ||
3fd40f46 | 168 | #endif /* BABELTRACE2_TYPES_H */ |