pyxmpp.jabber.simple

Package pyxmpp :: Package jabber :: Module simple |
[show private | hide private]
[frames | no frames]

## Module pyxmpp.jabber.simple

Simple API for simple things like sendig messages or single stanzas.

Function Summary
| ``send_message`(my_jid, my_password, to_jid, body, subject, message_type, server, port)` Star an XMPP session and send a message, then exit.
| ``xmpp_do`(jid, password, function, server, port)` Connect as client to a Jabber/XMPP server and call the provided function when stream is ready for IM.

Variable Summary
`str` | `__revision__` = `'$Id: client.py 528 2005-01-20 21:14:53Z ...`

Function Details

### send_message(my_jid, my_password, to_jid, body, subject=None, message_type=None, server=None, port=None) Star an XMPP session and send a message, then exit. Parameters: `my_jid` - sender JID. (type=`pyxmpp.jid.JID`) `my_password` - sender password. (type=`unicode`) `to_jid` - recipient JID. (type=`pyxmpp.jid.JID`) `body` - message body. (type=`unicode`) `subject` - message subject. (type=`unicode`) `message_type` - message type. (type=`str`) `server` - server to connect to (default: derivied from `my_jid` using DNS records). (type=`unicode` or `str`) `port` - TCP port number to connect to (default: retrieved using SRV DNS record, or 5222). (type=`int`)

### xmpp_do(jid, password, function, server=None, port=None) Connect as client to a Jabber/XMPP server and call the provided function when stream is ready for IM. The function will be called with one argument -- the XMPP stream. After function returns the stream is closed.

Variable Details

    ### __revision__ Type: `str` Value:
        '$Id: client.py 528 2005-01-20 21:14:53Z jajcus $'