def RegisterProtocol(self,tag_name,Proto,xmlns=None,order='info'):
        """ Used to declare some top-level stanza name to dispatcher.
           Needed to start registering handlers for such stanzas.
           Iq, message and presence protocols are registered by default. """
        if not xmlns: xmlns=self._owner.defaultNamespace
        self.DEBUG('Registering protocol "%s" as %s(%s)'%(tag_name,Proto,xmlns), order)
        self.handlers[xmlns][tag_name]={type:Proto, 'default':[]}
 Used to declare some top-level stanza name to dispatcher.
           Needed to start registering handlers for such stanzas.
           Iq, message and presence protocols are registered by default. 
chrome-cordova/gcmServer/xmpp/dispatcher.py