def unregister(event, uid=None): """ Unregister callbacks for an event. If uid is not None, then only the callback identified by the given uid is removed. Otherwise, all callbacks for the event are removed. :param event: The event that triggers the callback. :type event: Event :param uid: The callback uid. :type uid: str """ return client.unregister(event, uid)
def unregister(signal, uid=None, reqcbk=None, timeout=1000): """ Unregister a callback. If C{uid} is specified, unregisters only the callback identified by that unique id. Otherwise, unregisters all callbacks registered for C{signal}. :param signal: the signal that causes the callback to be launched :type signal: int (see the `events.proto` file) :param uid: a unique id for the callback :type uid: int :param reqcbk: a callback to be called when a response from server is received :type reqcbk: function(proto.UnregisterRequest, proto.EventResponse) :param timeout: the timeout for synch calls :type timeout: int :return: the response from server for synch calls or nothing for asynch calls. :rtype: leap.common.events.events_pb2.EventsResponse or None """ return client.unregister(signal, uid, reqcbk, timeout)