def __init__(self, addr, dev_path=None, adapter_path=None, adapter_id=None, dev_id=None): if (dev_path): path = dev_path elif (dev_id): if (adapter_id or adapter_path): adapter = BTAdapter(adapter_path=adapter_path, adapter_id=adapter_id) else: adapter = BTAdapter() path = adapter.find_device(dev_id) else: raise BTDeviceNotSpecifiedException BTInterface.__init__(self, path, addr)
def __init__(self, path, fd=None, adapter_id=None, dev_path=None, dev_id=None): if (not path): fd_suffix = '/fd' + str(fd) if (dev_path): path = dev_path + fd_suffix elif (dev_id): if (adapter_id): adapter = BTAdapter(adapter_id) else: adapter = BTAdapter() path = adapter.find_device(dev_id) + fd_suffix else: raise BTDeviceNotSpecifiedException BTInterface.__init__(self, path, 'org.bluez.MediaTransport')
def __init__(self, adapter_path): BTInterface.__init__(self, adapter_path, 'org.bluez.Adapter1') self._register_signal_name(BTAdapter.SIGNAL_DEVICE_FOUND) self._register_signal_name(BTAdapter.SIGNAL_DEVICE_REMOVED) self._register_signal_name(BTAdapter.SIGNAL_DEVICE_CREATED) self._register_signal_name(BTAdapter.SIGNAL_DEVICE_DISAPPEARED)
def __init__(self): BTInterface.__init__(self, '/', 'org.freedesktop.DBus.ObjectManager') self._register_signal_name(BTManager.SIGNAL_INTERFACES_ADDED) self._register_signal_name(BTManager.SIGNAL_INTERFACES_REMOVED)
def __init__(self, adapter_path=None, **kwargs): manager = BTManager() if (adapter_path is None): adapter_path = manager.find_adapter(**kwargs) BTInterface.__init__(self, adapter_path, 'org.bluez.Adapter1')
def __init__(self): BTInterface.__init__(self, '/org/bluez', 'org.bluez.AgentManager1')
def __init__(self): BTInterface.__init__(self, '/', 'org.bluez.Manager') self._register_signal_name(BTManager.SIGNAL_ADAPTER_ADDED) self._register_signal_name(BTManager.SIGNAL_ADAPTER_REMOVED) self._register_signal_name(BTManager.SIGNAL_DEFAULT_ADAPTER_CHANGED)