Example #1
0
 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)
Example #2
0
 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')
Example #3
0
 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)
Example #4
0
 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')
Example #5
0
 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)
Example #6
0
 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)
Example #7
0
 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')
Example #8
0
 def __init__(self):
     BTInterface.__init__(self, '/org/bluez', 'org.bluez.AgentManager1')
Example #9
0
 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')
Example #10
0
 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)
Example #11
0
 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)