code: def addMatch(self, callback, mtype=None, sender=None, interface=None,
                   member=None, path=None, path_namespace=None, destination=None,
                   arg=None, arg_path=None, arg0namespace=None):
          
  
          l = []
  
          def add(k, v):
              if v is not None:
                  l.append("%s='%s'" % (k, v))
  
          add('type', mtype)
          add('sender', sender)
          add('interface', interface)
          add('member', member)
          add('path', path)
          add('path_namespace', path_namespace)
          add('destination', destination)
  
          if arg:
              for idx, v in arg:
                  add('arg%d' % (idx,), v)
  
          if arg_path:
              for idx, v in arg_path:
                  add('arg%dpath' % (idx,), v)
  
          add('arg0namespace', arg0namespace)
  
          rule = ','.join(l)
  
          d = self.callRemote(
              '/org/freedesktop/DBus',
              'AddMatch',
              interface='org.freedesktop.DBus',
              destination='org.freedesktop.DBus',
              body=[rule],
              signature='s',
          )
  
          def ok(_):
              rule_id = self.router.addMatch(
                  callback,
                  mtype,
                  sender,
                  interface,
                  member,
                  path,
                  path_namespace,
                  destination,
                  arg,
                  arg_path,
                  arg0namespace,
              )
              self.match_rules[rule_id] = rule
              return rule_id
  
          d.addCallbacks(ok)
  
          return d
docs: Creates a message matching rule, associates it with the specified
          callback function, and sends the match rule to the DBus daemon.
          The arguments to this function are exactly follow the DBus
          specification.  Refer to the \"Message Bus Message Routing\" section of
          the DBus specification for details.
  
          @rtype: C{int}
          @returns: a L{Deferred} to an integer id that may be used to unregister
              the match rule