Commit | Line | Data |
---|---|---|
924dc299 PP |
1 | #ifndef BABELTRACE2_TRACE_IR_STREAM_CLASS_H |
2 | #define BABELTRACE2_TRACE_IR_STREAM_CLASS_H | |
56e18c4c PP |
3 | |
4 | /* | |
bbb7b5f0 | 5 | * Copyright (c) 2010-2019 EfficiOS Inc. and Linux Foundation |
56e18c4c | 6 | * |
56e18c4c PP |
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. | |
56e18c4c PP |
24 | */ |
25 | ||
4fa90f32 PP |
26 | #ifndef __BT_IN_BABELTRACE_H |
27 | # error "Please include <babeltrace2/babeltrace.h> instead." | |
28 | #endif | |
29 | ||
56e18c4c PP |
30 | #include <stdint.h> |
31 | ||
3fadfbc0 | 32 | #include <babeltrace2/types.h> |
56e18c4c PP |
33 | |
34 | #ifdef __cplusplus | |
35 | extern "C" { | |
36 | #endif | |
37 | ||
b19ff26f PP |
38 | extern bt_stream_class *bt_stream_class_create( |
39 | bt_trace_class *trace_class); | |
56e18c4c | 40 | |
b19ff26f PP |
41 | extern bt_stream_class *bt_stream_class_create_with_id( |
42 | bt_trace_class *trace_class, uint64_t id); | |
56e18c4c | 43 | |
c6962c96 PP |
44 | extern bt_value *bt_stream_class_borrow_user_attributes( |
45 | bt_stream_class *stream_class); | |
46 | ||
47 | extern void bt_stream_class_set_user_attributes( | |
48 | bt_stream_class *stream_class, const bt_value *user_attributes); | |
49 | ||
b19ff26f PP |
50 | extern bt_trace_class *bt_stream_class_borrow_trace_class( |
51 | bt_stream_class *stream_class); | |
56e18c4c | 52 | |
d24d5663 PP |
53 | typedef enum bt_stream_class_set_name_status { |
54 | BT_STREAM_CLASS_SET_NAME_STATUS_MEMORY_ERROR = __BT_FUNC_STATUS_MEMORY_ERROR, | |
55 | BT_STREAM_CLASS_SET_NAME_STATUS_OK = __BT_FUNC_STATUS_OK, | |
56 | } bt_stream_class_set_name_status; | |
57 | ||
58 | extern bt_stream_class_set_name_status bt_stream_class_set_name( | |
a6ae8edc | 59 | bt_stream_class *stream_class, const char *name); |
56e18c4c | 60 | |
40f4ba76 | 61 | extern void bt_stream_class_set_assigns_automatic_event_class_id( |
b19ff26f | 62 | bt_stream_class *stream_class, bt_bool value); |
56e18c4c | 63 | |
40f4ba76 | 64 | extern void bt_stream_class_set_assigns_automatic_stream_id( |
b19ff26f | 65 | bt_stream_class *stream_class, bt_bool value); |
56e18c4c | 66 | |
2e90378a PP |
67 | extern void bt_stream_class_set_supports_discarded_events( |
68 | bt_stream_class *stream_class, | |
69 | bt_bool supports_discarded_events, | |
70 | bt_bool with_default_clock_snapshots); | |
71 | ||
72 | extern void bt_stream_class_set_supports_discarded_packets( | |
73 | bt_stream_class *stream_class, | |
74 | bt_bool supports_discarded_packets, | |
75 | bt_bool with_default_clock_snapshots); | |
76 | ||
d24d5663 PP |
77 | typedef enum bt_stream_class_set_field_class_status { |
78 | BT_STREAM_CLASS_SET_FIELD_CLASS_STATUS_MEMORY_ERROR = __BT_FUNC_STATUS_MEMORY_ERROR, | |
79 | BT_STREAM_CLASS_SET_FIELD_CLASS_STATUS_OK = __BT_FUNC_STATUS_OK, | |
80 | } bt_stream_class_set_field_class_status; | |
81 | ||
26fc5aed PP |
82 | extern void bt_stream_class_set_supports_packets( |
83 | bt_stream_class *stream_class, bt_bool supports_packets, | |
84 | bt_bool with_beginning_default_clock_snapshot, | |
85 | bt_bool with_end_default_clock_snapshot); | |
86 | ||
d24d5663 | 87 | extern bt_stream_class_set_field_class_status |
a6ae8edc | 88 | bt_stream_class_set_packet_context_field_class( |
b19ff26f PP |
89 | bt_stream_class *stream_class, |
90 | bt_field_class *field_class); | |
56e18c4c | 91 | |
740faaf4 PP |
92 | extern bt_field_class * |
93 | bt_stream_class_borrow_packet_context_field_class( | |
94 | bt_stream_class *stream_class); | |
95 | ||
d24d5663 | 96 | extern bt_stream_class_set_field_class_status |
40f4ba76 | 97 | bt_stream_class_set_event_common_context_field_class( |
b19ff26f PP |
98 | bt_stream_class *stream_class, |
99 | bt_field_class *field_class); | |
56e18c4c | 100 | |
740faaf4 PP |
101 | extern bt_field_class * |
102 | bt_stream_class_borrow_event_common_context_field_class( | |
103 | bt_stream_class *stream_class); | |
104 | ||
b19ff26f | 105 | extern bt_event_class * |
40f4ba76 | 106 | bt_stream_class_borrow_event_class_by_index( |
b19ff26f | 107 | bt_stream_class *stream_class, uint64_t index); |
56e18c4c | 108 | |
b19ff26f | 109 | extern bt_event_class * |
40f4ba76 | 110 | bt_stream_class_borrow_event_class_by_id( |
b19ff26f | 111 | bt_stream_class *stream_class, uint64_t id); |
56e18c4c | 112 | |
b19ff26f PP |
113 | extern bt_clock_class *bt_stream_class_borrow_default_clock_class( |
114 | bt_stream_class *stream_class); | |
56e18c4c | 115 | |
d24d5663 PP |
116 | typedef enum bt_stream_class_set_default_clock_class_status { |
117 | BT_STREAM_CLASS_SET_DEFAULT_CLOCK_CLASS_STATUS_OK = __BT_FUNC_STATUS_OK, | |
118 | } bt_stream_class_set_default_clock_class_status; | |
119 | ||
120 | extern bt_stream_class_set_default_clock_class_status | |
121 | bt_stream_class_set_default_clock_class( | |
b19ff26f PP |
122 | bt_stream_class *stream_class, |
123 | bt_clock_class *clock_class); | |
56e18c4c | 124 | |
56e18c4c PP |
125 | #ifdef __cplusplus |
126 | } | |
127 | #endif | |
128 | ||
924dc299 | 129 | #endif /* BABELTRACE2_TRACE_IR_STREAM_CLASS_H */ |