Fix error in the documentation of our xmpp dispatcher fork.
Raise NodeProcessed if the stanza should NOT be handled by other user handlers.
This commit is contained in:
		
							parent
							
								
									01553e53c2
								
							
						
					
					
						commit
						ac5d0f24da
					
				
					 1 changed files with 4 additions and 6 deletions
				
			
		| 
						 | 
					@ -247,25 +247,23 @@ class XMPPDispatcher(PlugIn):
 | 
				
			||||||
		'''
 | 
							'''
 | 
				
			||||||
		Register user callback as stanzas handler of declared type.
 | 
							Register user callback as stanzas handler of declared type.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		Callback must take (if chained, see later) arguments:
 | 
							Callback arguments:
 | 
				
			||||||
		dispatcher instance (for replying), incoming return of previous handlers.
 | 
							dispatcher instance (for replying), incoming return of previous handlers.
 | 
				
			||||||
		The callback must raise xmpp.NodeProcessed just before return if it wants
 | 
							The callback must raise xmpp.NodeProcessed just before return if it wants
 | 
				
			||||||
		other callbacks to be called with the same stanza as argument _and_, more
 | 
							to prevent other callbacks to be called with the same stanza as argument
 | 
				
			||||||
		importantly	library from returning stanza to sender with error set.
 | 
							_and_, more	importantly	library from returning stanza to sender with error set.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		:param name: name of stanza. F.e. "iq".
 | 
							:param name: name of stanza. F.e. "iq".
 | 
				
			||||||
		:param handler: user callback.
 | 
							:param handler: user callback.
 | 
				
			||||||
		:param typ: value of stanza's "type" attribute. If not specified any
 | 
							:param typ: value of stanza's "type" attribute. If not specified any
 | 
				
			||||||
			value will match
 | 
								value will match
 | 
				
			||||||
		:param ns: namespace of child that stanza must contain.
 | 
							:param ns: namespace of child that stanza must contain.
 | 
				
			||||||
		:param chained: chain together output of several handlers.
 | 
							:param makefirst: insert handler in the beginning of handlers list instead
 | 
				
			||||||
		:param makefirst: insert handler in the beginning of handlers list instea
 | 
					 | 
				
			||||||
			of	adding it to the end. Note that more common handlers i.e. w/o "typ"
 | 
								of	adding it to the end. Note that more common handlers i.e. w/o "typ"
 | 
				
			||||||
			and " will be called first nevertheless.
 | 
								and " will be called first nevertheless.
 | 
				
			||||||
		:param system: call handler even if NodeProcessed Exception were raised
 | 
							:param system: call handler even if NodeProcessed Exception were raised
 | 
				
			||||||
			already.
 | 
								already.
 | 
				
			||||||
		'''
 | 
							'''
 | 
				
			||||||
		# FIXME: What does chain mean and where is it handled?
 | 
					 | 
				
			||||||
		if not xmlns:
 | 
							if not xmlns:
 | 
				
			||||||
			xmlns=self._owner.defaultNamespace
 | 
								xmlns=self._owner.defaultNamespace
 | 
				
			||||||
		log.debug('Registering handler %s for "%s" type->%s ns->%s(%s)' %
 | 
							log.debug('Registering handler %s for "%s" type->%s ns->%s(%s)' %
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue