params=None,
logging_level=bt2.logging.LoggingLevel.NONE,
):
- if isinstance(component_class, bt2.component._GenericSourceComponentClass):
+ if isinstance(component_class, bt2.component._SourceComponentClass):
cc_ptr = component_class._ptr
add_fn = native_bt.graph_add_source_component
cc_type = native_bt.COMPONENT_CLASS_TYPE_SOURCE
- elif isinstance(component_class, bt2.component._GenericFilterComponentClass):
+ elif isinstance(component_class, bt2.component._FilterComponentClass):
cc_ptr = component_class._ptr
add_fn = native_bt.graph_add_filter_component
cc_type = native_bt.COMPONENT_CLASS_TYPE_FILTER
- elif isinstance(component_class, bt2.component._GenericSinkComponentClass):
+ elif isinstance(component_class, bt2.component._SinkComponentClass):
cc_ptr = component_class._ptr
add_fn = native_bt.graph_add_sink_component
cc_type = native_bt.COMPONENT_CLASS_TYPE_SINK
if listener_ids is None:
raise bt2._Error('cannot add listener to graph object')
- return bt2._ListenerHandle(listener_ids, self)
+ return bt2.utils._ListenerHandle(listener_ids, self)
def add_ports_connected_listener(self, listener):
if not callable(listener):
if listener_ids is None:
raise bt2._Error('cannot add listener to graph object')
- return bt2._ListenerHandle(listener_ids, self)
+ return bt2.utils._ListenerHandle(listener_ids, self)
def run(self):
status = native_bt.graph_run(self._ptr)