X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=src%2Fbindings%2Fpython%2Fbt2%2Fbt2%2Fgraph.py;h=b1d59700c8cc100c50d3c28809d82edf7495cf04;hp=79be1ca80905a94c8aab0de01044c96b41bf287f;hb=d9d764cc911fa4a1df6c611fd708ea3f41521275;hpb=ff3fcfe46b5219b9a4480fee94755f4aabbf29cd diff --git a/src/bindings/python/bt2/bt2/graph.py b/src/bindings/python/bt2/bt2/graph.py index 79be1ca8..b1d59700 100644 --- a/src/bindings/python/bt2/bt2/graph.py +++ b/src/bindings/python/bt2/bt2/graph.py @@ -40,32 +40,6 @@ def _graph_port_added_listener_from_native( user_listener(component, port) -def _graph_ports_connected_listener_from_native( - user_listener, - upstream_component_ptr, - upstream_component_type, - upstream_port_ptr, - downstream_component_ptr, - downstream_component_type, - downstream_port_ptr, -): - upstream_component = bt2_component._create_component_from_const_ptr_and_get_ref( - upstream_component_ptr, upstream_component_type - ) - upstream_port = bt2_port._create_from_const_ptr_and_get_ref( - upstream_port_ptr, native_bt.PORT_TYPE_OUTPUT - ) - downstream_component = bt2_component._create_component_from_const_ptr_and_get_ref( - downstream_component_ptr, downstream_component_type - ) - downstream_port = bt2_port._create_from_const_ptr_and_get_ref( - downstream_port_ptr, native_bt.PORT_TYPE_INPUT - ) - user_listener( - upstream_component, upstream_port, downstream_component, downstream_port - ) - - class Graph(object._SharedObject): _get_ref = staticmethod(native_bt.graph_get_ref) _put_ref = staticmethod(native_bt.graph_put_ref) @@ -166,19 +140,6 @@ class Graph(object._SharedObject): if listener_ids is None: raise bt2._Error('cannot add listener to graph object') - def add_ports_connected_listener(self, listener): - if not callable(listener): - raise TypeError("'listener' parameter is not callable") - - fn = native_bt.bt2_graph_add_ports_connected_listener - listener_from_native = functools.partial( - _graph_ports_connected_listener_from_native, listener - ) - - listener_ids = fn(self._ptr, listener_from_native) - if listener_ids is None: - raise bt2._Error('cannot add listener to graph object') - def run_once(self): status = native_bt.graph_run_once(self._ptr) utils._handle_func_status(status, 'graph object could not run once')