tap-driver.sh: flush stdout after each test result
[babeltrace.git] / bindings / python / bt2 / bt2 / native_bt_event_class.i
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 /* Output argument typemap for initialized event class log level output
26 * parameter (always appends).
27 */
28 %typemap(in, numinputs=0)
29 (bt_event_class_log_level *OUT)
30 (bt_event_class_log_level temp = -1) {
31 $1 = &temp;
32 }
33
34 %typemap(argout) bt_event_class_log_level *OUT {
35 /* SWIG_Python_AppendOutput() steals the created object */
36 $result = SWIG_Python_AppendOutput($result, SWIG_From_int(*$1));
37 }
38
39 /* From event-class-const.h */
40
41 typedef enum bt_event_class_status {
42 BT_EVENT_CLASS_STATUS_OK = 0,
43 BT_EVENT_CLASS_STATUS_NOMEM = -12,
44 } bt_event_class_status;
45
46 typedef enum bt_event_class_log_level {
47 BT_EVENT_CLASS_LOG_LEVEL_EMERGENCY,
48 BT_EVENT_CLASS_LOG_LEVEL_ALERT,
49 BT_EVENT_CLASS_LOG_LEVEL_CRITICAL,
50 BT_EVENT_CLASS_LOG_LEVEL_ERROR,
51 BT_EVENT_CLASS_LOG_LEVEL_WARNING,
52 BT_EVENT_CLASS_LOG_LEVEL_NOTICE,
53 BT_EVENT_CLASS_LOG_LEVEL_INFO,
54 BT_EVENT_CLASS_LOG_LEVEL_DEBUG_SYSTEM,
55 BT_EVENT_CLASS_LOG_LEVEL_DEBUG_PROGRAM,
56 BT_EVENT_CLASS_LOG_LEVEL_DEBUG_PROCESS,
57 BT_EVENT_CLASS_LOG_LEVEL_DEBUG_MODULE,
58 BT_EVENT_CLASS_LOG_LEVEL_DEBUG_UNIT,
59 BT_EVENT_CLASS_LOG_LEVEL_DEBUG_FUNCTION,
60 BT_EVENT_CLASS_LOG_LEVEL_DEBUG_LINE,
61 BT_EVENT_CLASS_LOG_LEVEL_DEBUG,
62 } bt_event_class_log_level;
63
64 extern const bt_stream_class *bt_event_class_borrow_stream_class_const(
65 const bt_event_class *event_class);
66
67 extern const char *bt_event_class_get_name(const bt_event_class *event_class);
68
69 extern uint64_t bt_event_class_get_id(const bt_event_class *event_class);
70
71 extern bt_property_availability bt_event_class_get_log_level(
72 const bt_event_class *event_class,
73 bt_event_class_log_level *OUT);
74
75 extern const char *bt_event_class_get_emf_uri(
76 const bt_event_class *event_class);
77
78 extern const bt_field_class *
79 bt_event_class_borrow_specific_context_field_class_const(
80 const bt_event_class *event_class);
81
82 extern const bt_field_class *bt_event_class_borrow_payload_field_class_const(
83 const bt_event_class *event_class);
84
85 extern void bt_event_class_get_ref(const bt_event_class *event_class);
86
87 extern void bt_event_class_put_ref(const bt_event_class *event_class);
88
89 /* From event-class.h */
90
91 extern bt_event_class *bt_event_class_create(
92 bt_stream_class *stream_class);
93
94 extern bt_event_class *bt_event_class_create_with_id(
95 bt_stream_class *stream_class, uint64_t id);
96
97 extern bt_stream_class *bt_event_class_borrow_stream_class(
98 bt_event_class *event_class);
99
100 extern bt_event_class_status bt_event_class_set_name(
101 bt_event_class *event_class, const char *name);
102
103 extern void bt_event_class_set_log_level(bt_event_class *event_class,
104 bt_event_class_log_level log_level);
105
106 extern bt_event_class_status bt_event_class_set_emf_uri(
107 bt_event_class *event_class, const char *emf_uri);
108
109 extern bt_event_class_status
110 bt_event_class_set_specific_context_field_class(bt_event_class *event_class,
111 bt_field_class *field_class);
112
113 extern bt_field_class *
114 bt_event_class_borrow_specific_context_field_class(bt_event_class *event_class);
115
116 extern bt_event_class_status bt_event_class_set_payload_field_class(
117 bt_event_class *event_class,
118 bt_field_class *field_class);
119
120 extern bt_field_class *bt_event_class_borrow_payload_field_class(
121 bt_event_class *event_class);
This page took 0.032515 seconds and 4 git commands to generate.