Home | Trees | Index | Help |
---|
Package xmpp :: Module commands :: Class Commands |
|
PlugIn
--+
|
Commands
Commands is an ancestor of PlugIn and can be attached to any session. The commands class provides a lookup and browse mechnism. It follows the same priciple of the Browser class, for Service Discovery to provide the list of commands, it adds the 'list' disco type to your existing disco handler function. How it works: The commands are added into the existing Browser on the correct nodes. When the command list is built the supplied discovery handler function needs to have a 'list' option in type. This then gets enumerated, all results returned as None are ignored. The command executed is then called using it's Execute method. All session management is handled by the command itself.
Method Summary | |
---|---|
Initialises class and sets up local variables | |
The method to call if adding a new command to the session, the requred parameters of cmddisco and cmdexecute are the methods to enable that command to be executed | |
Removed command from the session | |
Returns the command tuple | |
Makes handlers within the session | |
Removes handlers from the session | |
Inherited from PlugIn | |
Feed a provided debug line to main instance's debug facility along with our ID string. | |
Attach to main instance and register ourself and all our staff in it. | |
Unregister all our staff from main instance and detach from it. |
Method Details |
---|
__init__(self,
browser)
Initialises class and sets up local variables
|
addCommand(self, name, cmddisco, cmdexecute, jid='')The method to call if adding a new command to the session, the requred parameters of cmddisco and cmdexecute are the methods to enable that command to be executed |
delCommand(self, name, jid='')Removed command from the session |
getCommand(self, name, jid='')Returns the command tuple |
plugin(self, owner)Makes handlers within the session |
plugout(self)Removes handlers from the session |
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Thu Oct 5 23:57:38 2006 | http://epydoc.sf.net |