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
):
11 _get_ref
= staticmethod(native_bt
.connection_get_ref
)
12 _put_ref
= staticmethod(native_bt
.connection_put_ref
)
15 def downstream_port(self
):
16 port_ptr
= native_bt
.connection_borrow_downstream_port_const(self
._ptr
)
17 return bt2_port
._create
_from
_const
_ptr
_and
_get
_ref
(
18 port_ptr
, native_bt
.PORT_TYPE_INPUT
22 def upstream_port(self
):
23 port_ptr
= native_bt
.connection_borrow_upstream_port_const(self
._ptr
)
24 return bt2_port
._create
_from
_const
_ptr
_and
_get
_ref
(
25 port_ptr
, native_bt
.PORT_TYPE_OUTPUT
This page took 0.033282 seconds and 4 git commands to generate.