71066ac61e19b7443c7ff7d6c27fc976a2b53e78
1 # SPDX-License-Identifier: MIT
3 # Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
5 from bt2
import native_bt
6 from bt2
import port
as bt2_port
7 from bt2
import object as bt2_object
10 class _ConnectionConst(bt2_object
._SharedObject
):
13 native_bt
.connection_get_ref(ptr
)
17 native_bt
.connection_put_ref(ptr
)
20 def downstream_port(self
):
21 port_ptr
= native_bt
.connection_borrow_downstream_port_const(self
._ptr
)
22 return bt2_port
._create
_from
_const
_ptr
_and
_get
_ref
(
23 port_ptr
, native_bt
.PORT_TYPE_INPUT
27 def upstream_port(self
):
28 port_ptr
= native_bt
.connection_borrow_upstream_port_const(self
._ptr
)
29 return bt2_port
._create
_from
_const
_ptr
_and
_get
_ref
(
30 port_ptr
, native_bt
.PORT_TYPE_OUTPUT
This page took 0.03932 seconds and 4 git commands to generate.