Commit | Line | Data |
---|---|---|
3fd40f46 PP |
1 | #ifndef BABELTRACE2_TRACE_IR_EVENT_CLASS_H |
2 | #define BABELTRACE2_TRACE_IR_EVENT_CLASS_H | |
108b91d0 PP |
3 | |
4 | /* | |
0dcb770f | 5 | * Copyright (c) 2010-2019 EfficiOS Inc. and Linux Foundation |
108b91d0 | 6 | * |
108b91d0 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. | |
108b91d0 PP |
24 | */ |
25 | ||
9df34b44 PP |
26 | #ifndef __BT_IN_BABELTRACE_H |
27 | # error "Please include <babeltrace2/babeltrace.h> instead." | |
28 | #endif | |
29 | ||
fb25b9e3 PP |
30 | #include <stdint.h> |
31 | ||
71c5da58 | 32 | #include <babeltrace2/trace-ir/event-class-const.h> |
71c5da58 | 33 | #include <babeltrace2/types.h> |
8eee8ea2 | 34 | |
108b91d0 PP |
35 | #ifdef __cplusplus |
36 | extern "C" { | |
37 | #endif | |
38 | ||
8eee8ea2 PP |
39 | extern bt_event_class *bt_event_class_create( |
40 | bt_stream_class *stream_class); | |
78cf9df6 | 41 | |
8eee8ea2 PP |
42 | extern bt_event_class *bt_event_class_create_with_id( |
43 | bt_stream_class *stream_class, uint64_t id); | |
108b91d0 | 44 | |
8eee8ea2 PP |
45 | extern bt_stream_class *bt_event_class_borrow_stream_class( |
46 | bt_event_class *event_class); | |
108b91d0 | 47 | |
fb25b9e3 PP |
48 | typedef enum bt_event_class_set_name_status { |
49 | BT_EVENT_CLASS_SET_NAME_STATUS_MEMORY_ERROR = __BT_FUNC_STATUS_MEMORY_ERROR, | |
50 | BT_EVENT_CLASS_SET_NAME_STATUS_OK = __BT_FUNC_STATUS_OK, | |
51 | } bt_event_class_set_name_status; | |
52 | ||
53 | extern bt_event_class_set_name_status bt_event_class_set_name( | |
4caa7d56 | 54 | bt_event_class *event_class, const char *name); |
108b91d0 | 55 | |
ee78f405 PP |
56 | extern void bt_event_class_set_log_level(bt_event_class *event_class, |
57 | bt_event_class_log_level log_level); | |
108b91d0 | 58 | |
fb25b9e3 PP |
59 | typedef enum bt_event_class_set_emf_uri_status { |
60 | BT_EVENT_CLASS_SET_EMF_URI_STATUS_MEMORY_ERROR = __BT_FUNC_STATUS_MEMORY_ERROR, | |
61 | BT_EVENT_CLASS_SET_EMF_URI_STATUS_OK = __BT_FUNC_STATUS_OK, | |
62 | } bt_event_class_set_emf_uri_status; | |
63 | ||
64 | extern bt_event_class_set_emf_uri_status bt_event_class_set_emf_uri( | |
ee78f405 | 65 | bt_event_class *event_class, const char *emf_uri); |
108b91d0 | 66 | |
fb25b9e3 PP |
67 | typedef enum bt_event_class_set_field_class_status { |
68 | BT_EVENT_CLASS_SET_FIELD_CLASS_STATUS_MEMORY_ERROR = __BT_FUNC_STATUS_MEMORY_ERROR, | |
69 | BT_EVENT_CLASS_SET_FIELD_CLASS_STATUS_OK = __BT_FUNC_STATUS_OK, | |
70 | } bt_event_class_set_field_class_status; | |
71 | ||
72 | extern bt_event_class_set_field_class_status | |
4caa7d56 | 73 | bt_event_class_set_specific_context_field_class(bt_event_class *event_class, |
8eee8ea2 | 74 | bt_field_class *field_class); |
108b91d0 | 75 | |
909d0a89 PP |
76 | extern bt_field_class * |
77 | bt_event_class_borrow_specific_context_field_class(bt_event_class *event_class); | |
78 | ||
fb25b9e3 PP |
79 | extern bt_event_class_set_field_class_status |
80 | bt_event_class_set_payload_field_class( | |
8eee8ea2 PP |
81 | bt_event_class *event_class, |
82 | bt_field_class *field_class); | |
108b91d0 | 83 | |
909d0a89 PP |
84 | extern bt_field_class *bt_event_class_borrow_payload_field_class( |
85 | bt_event_class *event_class); | |
86 | ||
108b91d0 PP |
87 | #ifdef __cplusplus |
88 | } | |
89 | #endif | |
90 | ||
3fd40f46 | 91 | #endif /* BABELTRACE2_TRACE_IR_EVENT_CLASS_H */ |