Home | Trees | Index | Help |
|
---|
Package pyxmpp :: Package jabber :: Module client :: Class JabberClient |
|
Client
--+
|
JabberClient
Base class for a Jabber client. :Ivariables: - `disco_items`: default Disco#items reply for a query to an empty node. - `disco_info`: default Disco#info reply for a query to an empty node -- provides information about the client and its supported fetures. - `disco_identity`: default identity of the default `disco_info`. - `register`: when `True` than registration will be started instead of authentication. :Types: - `disco_items`: `DiscoItems` - `disco_info`: `DiscoInfo` - `register`: `bool`
Method Summary | |
---|---|
Initialize a JabberClient object. | |
Handle "authorized" event. | |
Connect to the server and set up the stream. | |
Return Disco#info data for a node. | |
Return Disco#items data for a node. | |
Fill-in the registration form provided by the server. | |
Register a feature to be announced by Service Discovery. | |
Submit a registration form... | |
Unregister a feature to be announced by Service Discovery. | |
Handle a disco#info request. | |
Handle a disco#items request. | |
Inherited from Client | |
Handle "authenticated" event. | |
Handle "connected" event. | |
Disconnect from the server. | |
Handle "disconnected" event. | |
Get the socket object of the active connection. | |
Get the connected stream object. | |
Do some "housekeeping" work like cache expiration or timeout handling. | |
Simple "main loop" for the client. | |
Request the user's roster. | |
Request an IM session. | |
Handle roster update event. | |
Handle session started event. | |
Handle stream closure event. | |
Handle stream creation event. | |
Handle stream error received. | |
Handle any stream state change. |
Method Details |
---|
__init__(self,
jid=None,
password=None,
server=None,
port=5222,
auth_methods=('sasl:DIGEST-MD5', 'digest'),
tls_settings=None,
keepalive=0,
disco_name=u'pyxmpp based Jabber client',
disco_category=u'client',
disco_type=u'pc')
|
authorized(self)Handle "authorized" event. May be overriden in derived classes. By default: request an IM session and setup Disco handlers.
|
connect(self, register=False)Connect to the server and set up the stream. Set `self.stream` and notify `self.state_changed` when connection succeeds. Additionally, initialize Disco items and info of the client.
|
disco_get_info(self, node, iq)Return Disco#info data for a node. :Parameters: - `node`: the node queried. - `iq`: the request stanza received. :Types: - `node`: `unicode` - `iq`: `pyxmpp.iq.Iq` :return: self.disco_info if `node` is empty or `None` otherwise. :returntype: `DiscoInfo` |
disco_get_items(self, node, iq)Return Disco#items data for a node. :Parameters: - `node`: the node queried. - `iq`: the request stanza received. :Types: - `node`: `unicode` - `iq`: `pyxmpp.iq.Iq` :return: self.disco_info if `node` is empty or `None` otherwise. :returntype: `DiscoInfo` |
process_registration_form(self, stanza, form)Fill-in the registration form provided by the server. This default implementation fills-in "username" and "passwords" fields only and instantly submits the form. :Parameters: - `stanza`: the stanza received. - `form`: the registration form. :Types: - `stanza`: `pyxmpp.iq.Iq` - `form`: `pyxmpp.jabber.dataforms.Form` |
register_feature(self, feature_name)Register a feature to be announced by Service Discovery. :Parameters: - `feature_name`: feature namespace or name. :Types: - `feature_name`: `unicode` |
submit_registration_form(self, form)Submit a registration form :Parameters: - `form`: the form to submit :Types: - `form`: `pyxmpp.jabber.dataforms.Form` |
unregister_feature(self, feature_name)Unregister a feature to be announced by Service Discovery. :Parameters: - `feature_name`: feature namespace or name. :Types: - `feature_name`: `unicode` |
__disco_info(self, iq)Handle a disco#info request. `self.disco_get_info` method will be used to prepare the query response. :Parameters: - `iq`: the IQ stanza received. :Types: - `iq`: `pyxmpp.iq.Iq` |
__disco_items(self, iq)Handle a disco#items request. `self.disco_get_items` method will be used to prepare the query response. :Parameters: - `iq`: the IQ stanza received. :Types: - `iq`: `pyxmpp.iq.Iq` |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Wed May 31 22:37:00 2006 | http://epydoc.sf.net |