def create_control_point():
    """ Creates the control point and binds callbacks to device events.
    """
    c = ControlPoint()
    c.subscribe('new_device_event', on_new_device)
    c.subscribe('removed_device_event', on_removed_device)
    return c
    def __init__(self, receive_notify=True):
        """ Constructor for the ControlPointAV class.

        @param receive_notify: if False, disables notify handling. This means
                               it will only listen for MSearch responses.
        @type receive_notify: bool
        """
        ControlPoint.__init__(self, receive_notify)
        self._current_server = None
        self._current_renderer = None
    def __init__(self, receive_notify=True):
        """ Constructor for the ControlPointAV class.

        @param receive_notify: if False, disables notify handling. This means
                               it will only listen for MSearch responses.
        @type receive_notify: bool
        """
        ControlPoint.__init__(self, receive_notify)
        self._current_server = None
        self._current_renderer = None
 def __init__(self):
     ControlPoint.__init__(self)
     self.running = False
     self._initial_subscribes()
     self.devices_found = []
     self.commands = {'search': self._search,
                      'stop': self._stop,
                      'exit': self._exit,
                      'list': self._cmd_list_devices,
                      'subscribe': self._cmd_subscribe,
                      'unsubscribe': self._cmd_unsubscribe,
                      'help': self._help}
Example #5
0
 def __init__(self):
     ControlPoint.__init__(self)
     self.running = False
     self._initial_subscribes()
     self.devices_found = []
     self.commands = {
         'search': self._search,
         'stop': self._stop,
         'exit': self._exit,
         'list': self._cmd_list_devices,
         'subscribe': self._cmd_subscribe,
         'unsubscribe': self._cmd_unsubscribe,
         'help': self._help
     }
def create_control_point():
    """ Creates the control point and binds callbacks to device events.
    """
    c = ControlPoint()
    c.subscribe('new_device_event', on_new_device)
    c.subscribe('removed_device_event', on_removed_device)
    return c