コード例 #1
0
ファイル: Adapter.py プロジェクト: Pjotr123/blueman
 def RemoveDevice(self, device):
     '''
     This removes the remote device dbus object according to
     given Device instance. It will remove also the pairing information.
     '''
     raise_type_error(device, Device.Device)
     self.GetInterface().RemoveDevice(device.GetObjectPath())
コード例 #2
0
ファイル: Adapter.py プロジェクト: Pjotr123/blueman
 def UnregisterAgent(self, agent):
     '''
     This unregisters the agent that has been previously
     registered.
     '''
     raise_type_error(agent, Agent.Agent)
     self.GetInterface().UnregisterAgent(agent.GetObjectPath())
コード例 #3
0
 def UnregisterAgent(self, agent):
     '''
     This unregisters the agent that has been previously
     registered.
     '''
     raise_type_error(agent, Agent.Agent)
     self.GetInterface().UnregisterAgent(agent.GetObjectPath())
コード例 #4
0
 def RemoveDevice(self, device):
     '''
     This removes the remote device dbus object according to
     given Device instance. It will remove also the pairing information.
     '''
     raise_type_error(device, Device.Device)
     self.GetInterface().RemoveDevice(device.GetObjectPath())
コード例 #5
0
ファイル: BlueZInterface.py プロジェクト: namili/blueman
 def HandleSignal(self, handler, signal, **kwargs):
     """
     The handler function will be called when specific signal is emmited.
     For available signals of each interface, check BlueZ4 documents.
     """
     # raise_type_error(handler, types.FunctionType)
     raise_type_error(signal, types.StringType)
     self.__bus.add_signal_receiver(handler, signal, self.__interface_name, "org.bluez", self.__obj_path, **kwargs)
コード例 #6
0
 def UnHandleSignal(self, handler, signal, **kwargs):
     '''
     The handler function will be called when specific signal is emmited.
     For available signals of each interface, check BlueZ4 documents.
     '''
    # raise_type_error(handler, types.FunctionType)
     raise_type_error(signal, types.StringType)
     self.__bus.remove_signal_receiver(handler,
                                    signal,
                                    self.__interface_name,
                                    'org.bluez',
                                    self.__obj_path, **kwargs)
コード例 #7
0
ファイル: Adapter.py プロジェクト: Pjotr123/blueman
 def RegisterAgent(self, agent, capability=''):
     '''
     This registers the adapter wide agent.
     The agent should be an instance of Agent, the methods of Agent
     will be called when user input is needed.
     If an application disconnects from the dbus bus all
     of its registered agents will be removed.
     The capability parameter can have the values
     "DisplayOnly", "DisplayYesNo", "KeyboardOnly" and
     "NoInputNoOutput" which reflects the input and output
     capabilities of the agent. If an empty string is
     used it will fallback to "DisplayYesNo".
     '''
     raise_type_error(agent, Agent.Agent)
     self.GetInterface().RegisterAgent(agent.GetObjectPath(), capability)
コード例 #8
0
 def RegisterAgent(self, agent, capability=''):
     '''
     This registers the adapter wide agent.
     The agent should be an instance of Agent, the methods of Agent
     will be called when user input is needed.
     If an application disconnects from the dbus bus all
     of its registered agents will be removed.
     The capability parameter can have the values
     "DisplayOnly", "DisplayYesNo", "KeyboardOnly" and
     "NoInputNoOutput" which reflects the input and output
     capabilities of the agent. If an empty string is
     used it will fallback to "DisplayYesNo".
     '''
     raise_type_error(agent, Agent.Agent)
     self.GetInterface().RegisterAgent(agent.GetObjectPath(), capability)