Commit | Line | Data |
---|---|---|
fdafa2c0 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 | ||
44 | extern uint64_t bt_stream_class_get_id( | |
45 | const bt_stream_class *stream_class); | |
46 | ||
47 | extern const bt_field_class * | |
48 | bt_stream_class_borrow_packet_context_field_class_const( | |
49 | const bt_stream_class *stream_class); | |
50 | ||
51 | extern const bt_field_class * | |
52 | bt_stream_class_borrow_event_common_context_field_class_const( | |
53 | const bt_stream_class *stream_class); | |
54 | ||
55 | extern uint64_t bt_stream_class_get_event_class_count( | |
56 | const bt_stream_class *stream_class); | |
57 | ||
58 | extern const bt_event_class * | |
59 | bt_stream_class_borrow_event_class_by_index_const( | |
60 | const bt_stream_class *stream_class, uint64_t index); | |
61 | ||
62 | extern const bt_event_class * | |
63 | bt_stream_class_borrow_event_class_by_id_const( | |
64 | const bt_stream_class *stream_class, uint64_t id); | |
65 | ||
66 | extern const bt_clock_class * | |
67 | bt_stream_class_borrow_default_clock_class_const( | |
68 | const bt_stream_class *stream_class); | |
69 | ||
70 | extern bt_bool bt_stream_class_default_clock_is_always_known( | |
71 | const bt_stream_class *stream_class); | |
72 | ||
73 | extern void bt_stream_class_get_ref(const bt_stream_class *stream_class); | |
74 | ||
75 | extern void bt_stream_class_put_ref(const bt_stream_class *stream_class); | |
76 | ||
77 | /* From stream-class-const.h */ | |
78 | ||
79 | extern bt_stream_class *bt_stream_class_create( | |
80 | bt_trace_class *trace_class); | |
81 | ||
82 | extern bt_stream_class *bt_stream_class_create_with_id( | |
83 | bt_trace_class *trace_class, uint64_t id); | |
84 | ||
85 | extern bt_trace_class *bt_stream_class_borrow_trace_class( | |
86 | bt_stream_class *stream_class); | |
87 | ||
88 | extern bt_stream_class_status bt_stream_class_set_name( | |
89 | bt_stream_class *stream_class, const char *name); | |
90 | ||
91 | extern void bt_stream_class_set_assigns_automatic_event_class_id( | |
92 | bt_stream_class *stream_class, bt_bool value); | |
93 | ||
94 | extern void bt_stream_class_set_assigns_automatic_stream_id( | |
95 | bt_stream_class *stream_class, bt_bool value); | |
96 | ||
97 | extern bt_stream_class_status | |
98 | bt_stream_class_set_packet_context_field_class( | |
99 | bt_stream_class *stream_class, | |
100 | bt_field_class *field_class); | |
101 | ||
102 | extern bt_field_class * | |
103 | bt_stream_class_borrow_packet_context_field_class( | |
104 | bt_stream_class *stream_class); | |
105 | ||
106 | extern bt_stream_class_status | |
107 | bt_stream_class_set_event_common_context_field_class( | |
108 | bt_stream_class *stream_class, | |
109 | bt_field_class *field_class); | |
110 | ||
111 | extern bt_field_class * | |
112 | bt_stream_class_borrow_event_common_context_field_class( | |
113 | bt_stream_class *stream_class); | |
114 | ||
115 | extern bt_event_class * | |
116 | bt_stream_class_borrow_event_class_by_index( | |
117 | bt_stream_class *stream_class, uint64_t index); | |
118 | ||
119 | extern bt_event_class * | |
120 | bt_stream_class_borrow_event_class_by_id( | |
121 | bt_stream_class *stream_class, uint64_t id); | |
122 | ||
123 | extern bt_clock_class *bt_stream_class_borrow_default_clock_class( | |
124 | bt_stream_class *stream_class); | |
125 | ||
126 | extern bt_stream_class_status bt_stream_class_set_default_clock_class( | |
127 | bt_stream_class *stream_class, | |
128 | bt_clock_class *clock_class); |