2 * The MIT License (MIT)
4 * Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
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:
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
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
25 /* Output argument typemap for initialized event class log level output
26 * parameter (always appends).
28 %typemap(in, numinputs=0)
29 (bt_event_class_log_level *OUT)
30 (bt_event_class_log_level temp = -1) {
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));
39 /* From event-class-const.h */
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;
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;
64 extern const bt_stream_class *bt_event_class_borrow_stream_class_const(
65 const bt_event_class *event_class);
67 extern const char *bt_event_class_get_name(const bt_event_class *event_class);
69 extern uint64_t bt_event_class_get_id(const bt_event_class *event_class);
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);
75 extern const char *bt_event_class_get_emf_uri(
76 const bt_event_class *event_class);
78 extern const bt_field_class *
79 bt_event_class_borrow_specific_context_field_class_const(
80 const bt_event_class *event_class);
82 extern const bt_field_class *bt_event_class_borrow_payload_field_class_const(
83 const bt_event_class *event_class);
85 extern void bt_event_class_get_ref(const bt_event_class *event_class);
87 extern void bt_event_class_put_ref(const bt_event_class *event_class);
89 /* From event-class.h */
91 extern bt_event_class *bt_event_class_create(
92 bt_stream_class *stream_class);
94 extern bt_event_class *bt_event_class_create_with_id(
95 bt_stream_class *stream_class, uint64_t id);
97 extern bt_stream_class *bt_event_class_borrow_stream_class(
98 bt_event_class *event_class);
100 extern bt_event_class_status bt_event_class_set_name(
101 bt_event_class *event_class, const char *name);
103 extern void bt_event_class_set_log_level(bt_event_class *event_class,
104 bt_event_class_log_level log_level);
106 extern bt_event_class_status bt_event_class_set_emf_uri(
107 bt_event_class *event_class, const char *emf_uri);
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);
113 extern bt_field_class *
114 bt_event_class_borrow_specific_context_field_class(bt_event_class *event_class);
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);
120 extern bt_field_class *bt_event_class_borrow_payload_field_class(
121 bt_event_class *event_class);