| Babeltrace 2 C API 2.1.0-rc2
    Open-source trace manipulation framework | 
A connection is a link between an output port and an input port.
 
A connection is a shared object: get a new reference with bt_connection_get_ref() and put an existing reference with bt_connection_put_ref().
The type of a connection is bt_connection.
Borrow the upstream (output) port and downstream (input) port of a connection with bt_connection_borrow_upstream_port_const() and bt_connection_borrow_downstream_port_const().
| Port access | |
| const bt_port_input * | bt_connection_borrow_downstream_port_const (const bt_connection *connection) | 
| Borrows the upstream input port of the connection connection. | |
| const bt_port_output * | bt_connection_borrow_upstream_port_const (const bt_connection *connection) | 
| Borrows the downstream output port of the connection connection. | |
| Reference count | |
| void | bt_connection_get_ref (const bt_connection *connection) | 
| Increments the reference count of the connection connection. | |
| void | bt_connection_put_ref (const bt_connection *connection) | 
| Decrements the reference count of the connection connection. | |
| #define | BT_CONNECTION_PUT_REF_AND_RESET(_connection) | 
| Decrements the reference count of the connection _connection, and then sets _connection to NULL. | |
| #define | BT_CONNECTION_MOVE_REF(_dst, _src) | 
| Decrements the reference count of the connection _dst, sets _dst to _src, and then sets _src to NULL. | |
| Type | |
| typedef struct bt_connection | bt_connection | 
| Connection. | |
| #define BT_CONNECTION_PUT_REF_AND_RESET | ( | _connection | ) | 
Decrements the reference count of the connection _connection, and then sets _connection to NULL. 
| _connection | Connection of which to decrement the reference count. Can contain  | 
| #define BT_CONNECTION_MOVE_REF | ( | _dst, | |
| _src ) | 
Decrements the reference count of the connection _dst, sets _dst to _src, and then sets _src to NULL. 
This macro effectively moves a connection reference from the expression _src to the expression _dst, putting the existing _dst reference.
| _dst | Destination expression. Can contain  | 
| _src | Source expression. Can contain  | 
| 
 | extern | 
Borrows the upstream input port of the connection connection.
| [in] | connection | Connection of which to borrow the upstream port. | 
NULL. | 
 | extern | 
Borrows the downstream output port of the connection connection.
| [in] | connection | Connection of which to borrow the downstream port. | 
NULL. | 
 | extern | 
Increments the reference count of the connection connection.
| [in] | connection | Connection of which to increment the reference count. Can be  | 
| 
 | extern | 
Decrements the reference count of the connection connection.
| [in] | connection | Connection of which to decrement the reference count. Can be  |