Commit | Line | Data |
---|---|---|
6fa6bfa1 SM |
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 | /* From stream-class-const.h */ | |
26 | ||
27 | typedef enum bt_stream_class_status { | |
28 | BT_STREAM_CLASS_STATUS_OK = 0, | |
29 | BT_STREAM_CLASS_STATUS_NOMEM = -12, | |
30 | } bt_stream_class_status; | |
31 | ||
32 | extern const bt_trace_class *bt_stream_class_borrow_trace_class_const( | |
33 | const bt_stream_class *stream_class); | |
34 | ||
35 | extern const char *bt_stream_class_get_name( | |
36 | const bt_stream_class *stream_class); | |
37 | ||
38 | extern bt_bool bt_stream_class_assigns_automatic_event_class_id( | |
39 | const bt_stream_class *stream_class); | |
40 | ||
41 | extern bt_bool bt_stream_class_assigns_automatic_stream_id( | |
42 | const bt_stream_class *stream_class); | |
43 | ||
5ef34326 | 44 | extern bt_bool bt_stream_class_packets_have_beginning_default_clock_snapshot( |
060aee52 SM |
45 | const bt_stream_class *stream_class); |
46 | ||
5ef34326 | 47 | extern bt_bool bt_stream_class_packets_have_end_default_clock_snapshot( |
060aee52 SM |
48 | const bt_stream_class *stream_class); |
49 | ||
77037b2b PP |
50 | extern bt_bool bt_stream_class_supports_discarded_events( |
51 | const bt_stream_class *stream_class); | |
52 | ||
53 | extern bt_bool bt_stream_class_supports_discarded_packets( | |
54 | const bt_stream_class *stream_class); | |
55 | ||
56 | extern bt_bool bt_stream_class_discarded_events_have_default_clock_snapshots( | |
57 | const bt_stream_class *stream_class); | |
58 | ||
59 | extern bt_bool bt_stream_class_discarded_packets_have_default_clock_snapshots( | |
60 | const bt_stream_class *stream_class); | |
61 | ||
6fa6bfa1 SM |
62 | extern uint64_t bt_stream_class_get_id( |
63 | const bt_stream_class *stream_class); | |
64 | ||
65 | extern const bt_field_class * | |
66 | bt_stream_class_borrow_packet_context_field_class_const( | |
67 | const bt_stream_class *stream_class); | |
68 | ||
69 | extern const bt_field_class * | |
70 | bt_stream_class_borrow_event_common_context_field_class_const( | |
71 | const bt_stream_class *stream_class); | |
72 | ||
73 | extern uint64_t bt_stream_class_get_event_class_count( | |
74 | const bt_stream_class *stream_class); | |
75 | ||
76 | extern const bt_event_class * | |
77 | bt_stream_class_borrow_event_class_by_index_const( | |
78 | const bt_stream_class *stream_class, uint64_t index); | |
79 | ||
80 | extern const bt_event_class * | |
81 | bt_stream_class_borrow_event_class_by_id_const( | |
82 | const bt_stream_class *stream_class, uint64_t id); | |
83 | ||
84 | extern const bt_clock_class * | |
85 | bt_stream_class_borrow_default_clock_class_const( | |
86 | const bt_stream_class *stream_class); | |
87 | ||
6fa6bfa1 SM |
88 | extern void bt_stream_class_get_ref(const bt_stream_class *stream_class); |
89 | ||
90 | extern void bt_stream_class_put_ref(const bt_stream_class *stream_class); | |
91 | ||
92 | /* From stream-class-const.h */ | |
93 | ||
94 | extern bt_stream_class *bt_stream_class_create( | |
95 | bt_trace_class *trace_class); | |
96 | ||
97 | extern bt_stream_class *bt_stream_class_create_with_id( | |
98 | bt_trace_class *trace_class, uint64_t id); | |
99 | ||
100 | extern bt_trace_class *bt_stream_class_borrow_trace_class( | |
101 | bt_stream_class *stream_class); | |
102 | ||
103 | extern bt_stream_class_status bt_stream_class_set_name( | |
104 | bt_stream_class *stream_class, const char *name); | |
105 | ||
106 | extern void bt_stream_class_set_assigns_automatic_event_class_id( | |
107 | bt_stream_class *stream_class, bt_bool value); | |
108 | ||
109 | extern void bt_stream_class_set_assigns_automatic_stream_id( | |
110 | bt_stream_class *stream_class, bt_bool value); | |
060aee52 | 111 | |
5ef34326 | 112 | extern void bt_stream_class_set_packets_have_beginning_default_clock_snapshot( |
060aee52 SM |
113 | bt_stream_class *stream_class, bt_bool value); |
114 | ||
5ef34326 | 115 | extern void bt_stream_class_set_packets_have_end_default_clock_snapshot( |
060aee52 | 116 | bt_stream_class *stream_class, bt_bool value); |
6fa6bfa1 | 117 | |
77037b2b PP |
118 | extern void bt_stream_class_set_supports_discarded_events( |
119 | bt_stream_class *stream_class, | |
120 | bt_bool supports_discarded_events, | |
121 | bt_bool with_default_clock_snapshots); | |
122 | ||
123 | extern void bt_stream_class_set_supports_discarded_packets( | |
124 | bt_stream_class *stream_class, | |
125 | bt_bool supports_discarded_packets, | |
126 | bt_bool with_default_clock_snapshots); | |
127 | ||
6fa6bfa1 SM |
128 | extern bt_stream_class_status |
129 | bt_stream_class_set_packet_context_field_class( | |
130 | bt_stream_class *stream_class, | |
131 | bt_field_class *field_class); | |
132 | ||
133 | extern bt_field_class * | |
134 | bt_stream_class_borrow_packet_context_field_class( | |
135 | bt_stream_class *stream_class); | |
136 | ||
137 | extern bt_stream_class_status | |
138 | bt_stream_class_set_event_common_context_field_class( | |
139 | bt_stream_class *stream_class, | |
140 | bt_field_class *field_class); | |
141 | ||
142 | extern bt_field_class * | |
143 | bt_stream_class_borrow_event_common_context_field_class( | |
144 | bt_stream_class *stream_class); | |
145 | ||
146 | extern bt_event_class * | |
147 | bt_stream_class_borrow_event_class_by_index( | |
148 | bt_stream_class *stream_class, uint64_t index); | |
149 | ||
150 | extern bt_event_class * | |
151 | bt_stream_class_borrow_event_class_by_id( | |
152 | bt_stream_class *stream_class, uint64_t id); | |
153 | ||
154 | extern bt_clock_class *bt_stream_class_borrow_default_clock_class( | |
155 | bt_stream_class *stream_class); | |
156 | ||
157 | extern bt_stream_class_status bt_stream_class_set_default_clock_class( | |
158 | bt_stream_class *stream_class, | |
159 | bt_clock_class *clock_class); |