bindings/python/bt2: Make the bt2 Python bindings build
[babeltrace.git] / bindings / python / bt2 / bt2 / native_bt_port.i
1 /*
2 * The MIT License (MIT)
3 *
4 * Copyright (c) 2017 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 port-const.h */
26
27 typedef enum bt_port_type {
28 BT_PORT_TYPE_INPUT = 0,
29 BT_PORT_TYPE_OUTPUT = 1,
30 } bt_port_type;
31
32 extern const char *bt_port_get_name(const bt_port *port);
33
34 extern bt_port_type bt_port_get_type(const bt_port *port);
35
36 extern const bt_connection *bt_port_borrow_connection_const(
37 const bt_port *port);
38
39 extern const bt_component *bt_port_borrow_component_const(
40 const bt_port *port);
41
42 extern bt_bool bt_port_is_connected(const bt_port *port);
43
44 bt_bool bt_port_is_input(const bt_port *port);
45
46 bt_bool bt_port_is_output(const bt_port *port);
47
48 extern void bt_port_get_ref(const bt_port *port);
49
50 extern void bt_port_put_ref(const bt_port *port);
51
52 /* From port-output-const.h */
53
54 const bt_port *bt_port_output_as_port_const(const bt_port_output *port_output);
55
56 extern void bt_port_output_get_ref(const bt_port_output *port_output);
57
58 extern void bt_port_output_put_ref(const bt_port_output *port_output);
59
60 /* From port-input-const.h */
61
62 const bt_port *bt_port_input_as_port_const(const bt_port_input *port_input);
63
64 extern void bt_port_input_get_ref(const bt_port_input *port_input);
65
66 extern void bt_port_input_put_ref(const bt_port_input *port_input);
67
68 /* From self-component-port.h */
69
70 typedef enum bt_self_component_port_status {
71 BT_SELF_PORT_STATUS_OK = 0,
72 } bt_self_component_port_status;
73
74 const bt_port *bt_self_component_port_as_port(
75 bt_self_component_port *self_port);
76
77 extern bt_self_component *bt_self_component_port_borrow_component(
78 bt_self_component_port *self_port);
79
80 extern void *bt_self_component_port_get_data(
81 const bt_self_component_port *self_port);
82
83 /* From self-component-port-output.h */
84
85 bt_self_component_port *
86 bt_self_component_port_output_as_self_component_port(
87 bt_self_component_port_output *self_component_port);
88
89 const bt_port_output *bt_self_component_port_output_as_port_output(
90 bt_self_component_port_output *self_component_port);
91
92 /* From self-component-port-input.h */
93
94 bt_self_component_port *
95 bt_self_component_port_input_as_self_component_port(
96 bt_self_component_port_input *self_component_port);
97
98 const bt_port_input *bt_self_component_port_input_as_port_input(
99 const bt_self_component_port_input *self_component_port);
This page took 0.031289 seconds and 4 git commands to generate.