- def __init__(self, is_private, component,
- get_port_by_name_fn, get_port_at_index_fn,
- get_port_count_fn):
- self._is_private = is_private
- self._component = component
- self._get_port_by_name_fn = get_port_by_name_fn
- self._get_port_at_index_fn = get_port_at_index_fn
- self._get_port_count_fn = get_port_count_fn
+
+ # component_ptr is a bt_component_source *, bt_component_filter * or
+ # bt_component_sink *. Its type must match the type expected by the
+ # functions passed as arguments.
+
+ def __init__(self, component_ptr,
+ borrow_port_ptr_by_name,
+ borrow_port_ptr_at_index,
+ get_port_count,
+ port_pycls):
+ self._component_ptr = component_ptr
+ self._borrow_port_ptr_by_name = borrow_port_ptr_by_name
+ self._borrow_port_ptr_at_index = borrow_port_ptr_at_index
+ self._get_port_count = get_port_count
+ self._port_pycls = port_pycls