code: def notifyOnSignal(self, signalName, callback, interface=None):
          
          iface = None
          signal = None
  
          for i in self.interfaces:
              if interface and not i.name == interface:
                  continue
  
              if signalName in i.signals:
                  signal = i.signals[signalName]
                  iface = i
                  break
  
          def callback_caller(sig_msg):
              if isSignatureValid(signal.sig, sig_msg.signature):
                  if sig_msg.body:
                      callback(*sig_msg.body)
                  else:
                      callback()
  
          if iface is None:
              raise AttributeError(
                  'Requested signal "%s" is not a member of any of the '
                  'supported interfaces' % (signalName,),
              )
  
          d = self.objHandler.conn.addMatch(
              callback_caller,
              mtype='signal',
              path=self.objectPath,
              member=signalName,
              interface=iface.name,
          )
  
          def on_ok(rule_id):
  
              if self._signalRules is None:
                  self._signalRules = set()
  
              self._signalRules.add(rule_id)
  
              return rule_id
  
          d.addCallback(on_ok)
  
          return d
docs: Informs the DBus daemon of the process's interest in the specified
          signal and registers the callback function to be called when the
          signal arrives. Multiple callbacks may be registered.
  
          @type signalName: C{string}
          @param signalName: Name of the signal to register the callback for
  
          @type callback: Callable object
          @param callback: Callback to be called on signal arrival. The callback
              will be passed signals arguments as positional function arguments.
  
          @type interface: C{string}
          @param interface: Optional DBus interface emitting the signal. This is
              only needed if more than one interface shares a signal with the
              same name
  
          @rtype: L{twisted.internet.defer.Deferred}
          @returns: a Deferred to an integer rule_id that may be passed to
              cancelSignalNotification to prevent the delivery of future signals
              to the callback