Build Python bindings with distutils for consistent installs
[babeltrace.git] / bindings / python / bt2 / bt2 / native_btcomponent.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 /* Types */
26 struct bt_component;
27
28 /* Status */
29 enum bt_component_status {
30 BT_COMPONENT_STATUS_OK = 0,
31 BT_COMPONENT_STATUS_END = 1,
32 BT_COMPONENT_STATUS_AGAIN = 11,
33 BT_COMPONENT_STATUS_REFUSE_PORT_CONNECTION = 111,
34 BT_COMPONENT_STATUS_ERROR = -1,
35 BT_COMPONENT_STATUS_UNSUPPORTED = -2,
36 BT_COMPONENT_STATUS_INVALID = -22,
37 BT_COMPONENT_STATUS_NOMEM = -12,
38 BT_COMPONENT_STATUS_NOT_FOUND = -19,
39 BT_COMPONENT_STATUS_GRAPH_IS_CANCELED = 125,
40 };
41
42 /* General functions */
43 const char *bt_component_get_name(struct bt_component *component);
44 struct bt_component_class *bt_component_get_class(
45 struct bt_component *component);
46 enum bt_component_class_type bt_component_get_class_type(
47 struct bt_component *component);
48 struct bt_graph *bt_component_get_graph(struct bt_component *component);
49 struct bt_component *bt_component_from_private_component(
50 struct bt_private_component *private_component);
51
52 /* Source component functions */
53 int64_t bt_component_source_get_output_port_count(
54 struct bt_component *component);
55 struct bt_port *bt_component_source_get_output_port_by_name(
56 struct bt_component *component, const char *name);
57 struct bt_port *bt_component_source_get_output_port_by_index(
58 struct bt_component *component, uint64_t index);
59
60 /* Private source component functions */
61 struct bt_private_port *
62 bt_private_component_source_get_output_private_port_by_name(
63 struct bt_private_component *private_component,
64 const char *name);
65 struct bt_private_port *
66 bt_private_component_source_get_output_private_port_by_index(
67 struct bt_private_component *private_component,
68 uint64_t index);
69 enum bt_component_status
70 bt_private_component_source_add_output_private_port(
71 struct bt_private_component *private_component,
72 const char *name, void *user_data,
73 struct bt_private_port **BTOUTPRIVPORT);
74
75 /* Filter component functions */
76 int64_t bt_component_filter_get_input_port_count(
77 struct bt_component *component);
78 struct bt_port *bt_component_filter_get_input_port_by_name(
79 struct bt_component *component, const char *name);
80 struct bt_port *bt_component_filter_get_input_port_by_index(
81 struct bt_component *component, uint64_t index);
82 int64_t bt_component_filter_get_output_port_count(
83 struct bt_component *component);
84 struct bt_port *bt_component_filter_get_output_port_by_name(
85 struct bt_component *component, const char *name);
86 struct bt_port *bt_component_filter_get_output_port_by_index(
87 struct bt_component *component, uint64_t index);
88
89 /* Private filter component functions */
90 struct bt_private_port *
91 bt_private_component_filter_get_output_private_port_by_name(
92 struct bt_private_component *private_component,
93 const char *name);
94 struct bt_private_port *
95 bt_private_component_filter_get_output_private_port_by_index(
96 struct bt_private_component *private_component, uint64_t index);
97 enum bt_component_status
98 bt_private_component_filter_add_output_private_port(
99 struct bt_private_component *private_component,
100 const char *name, void *user_data,
101 struct bt_private_port **BTOUTPRIVPORT);
102 struct bt_private_port *
103 bt_private_component_filter_get_input_private_port_by_name(
104 struct bt_private_component *private_component,
105 const char *name);
106 struct bt_private_port *
107 bt_private_component_filter_get_input_private_port_by_index(
108 struct bt_private_component *private_component, uint64_t index);
109 enum bt_component_status
110 bt_private_component_filter_add_input_private_port(
111 struct bt_private_component *private_component,
112 const char *name, void *user_data,
113 struct bt_private_port **BTOUTPRIVPORT);
114
115 /* Sink component functions */
116 int64_t bt_component_sink_get_input_port_count(
117 struct bt_component *component);
118 struct bt_port *bt_component_sink_get_input_port_by_name(
119 struct bt_component *component, const char *name);
120 struct bt_port *bt_component_sink_get_input_port_by_index(
121 struct bt_component *component, uint64_t index);
122
123 /* Private sink component functions */
124 struct bt_private_port *
125 bt_private_component_sink_get_input_private_port_by_name(
126 struct bt_private_component *private_component,
127 const char *name);
128 struct bt_private_port *
129 bt_private_component_sink_get_input_private_port_by_index(
130 struct bt_private_component *private_component, uint64_t index);
131 enum bt_component_status
132 bt_private_component_sink_add_input_private_port(
133 struct bt_private_component *private_component,
134 const char *name, void *user_data,
135 struct bt_private_port **BTOUTPRIVPORT);
This page took 0.031657 seconds and 4 git commands to generate.