Python plugin provider: only finalize interpreter if we initialized it
[babeltrace.git] / bindings / python / bt2 / bt2 / native_btport.i
CommitLineData
811644b8
PP
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/* Type */
26struct bt_port;
27struct bt_private_port;
28
29/* Status */
30enum bt_port_status {
31 BT_PORT_STATUS_OK = 0,
32 BT_PORT_STATUS_ERROR = -1,
33 BT_PORT_STATUS_INVALID = -2,
34};
35
36/* Port type */
37enum bt_port_type {
38 BT_PORT_TYPE_INPUT = 0,
39 BT_PORT_TYPE_OUTPUT = 1,
40 BT_PORT_TYPE_UNKOWN = -1,
41};
42
43/* Functions (public) */
44const char *bt_port_get_name(struct bt_port *port);
45enum bt_port_type bt_port_get_type(struct bt_port *port);
46struct bt_connection *bt_port_get_connection(struct bt_port *port);
47struct bt_component *bt_port_get_component(struct bt_port *port);
48enum bt_port_status bt_port_disconnect(struct bt_port *port);
49int bt_port_is_connected(struct bt_port *port);
50
51/* Functions (private) */
52struct bt_port *bt_port_from_private_port(struct bt_private_port *private_port);
53struct bt_private_connection *bt_private_port_get_private_connection(
54 struct bt_private_port *private_port);
55struct bt_private_component *bt_private_port_get_private_component(
56 struct bt_private_port *private_port);
57enum bt_port_status bt_private_port_remove_from_component(
58 struct bt_private_port *private_port);
59void *bt_private_port_get_user_data(
60 struct bt_private_port *private_port);
This page took 0.025336 seconds and 4 git commands to generate.