Example #1
0
    def __init__(self):
        self.event_bus = EventBus()
        self.bus = dbus.SystemBus()

        self.bus.add_signal_receiver(
            self.on_dbus_property_changed,
            bus_name='org.bluez',
            signal_name='PropertiesChanged',
            dbus_interface='org.freedesktop.DBus.Properties',
            path_keyword="path")

        mainEventBus.on('device:connected', self.__on_device_connected)
        mainEventBus.on('device:disconnected', self.__on_device_disconnected)
Example #2
0
 def __register_player_enabled_event(self):
     mainEventBus.on(
         'status-manager:media-player-enabled',
         lambda args: self.__on_player_enabled_change(args['enabled']))
Example #3
0
 def __register_steering_wheel_events(self):
     mainEventBus.on('steering-wheel:next', lambda args: self.next())
     mainEventBus.on('steering-wheel:prev', lambda args: self.previous())
     mainEventBus.on('steering-wheel:mute', lambda args: self.toggle_play())
Example #4
0
 def __register_player_change_event(self):
     mainEventBus.on('bt-device-manager:active-device',
                     lambda args: self._on_device_change(args['device']))
Example #5
0
 def __init__(self):
     super().__init__()
     self._menu = Menu(self)
     mainEventBus.on('steering-wheel:menu', self._show_menu_callback)