Loudmouth is an async XMPP library written in C.
Example usage:
| ||
connect
Connects to the server. Returns
disconnect
self .
Disconnects from server and returns
handleAuthenticated
true if it succeeds.
Slot called upon successful authentication.
handleAuthenticationFailure
Slot called if username/password combinaton is wrong.
handleConnect
Slot called once connection is established.
handleConnectFailure
Slot called when server is not reachable.
handleDisconnect
Slot called upon closing the connection with the server.
handleMessage(xmppMessage)
Slot called when a message arrives via XMPP stream.
handleSslFailure
xmppMessage is a LoudmouthMessage object.
Slot called if SSL-related problems arrive. Method should return
isConnected
true if it wishes to make a connection without SSL, false otherwise.
Registers a new account at XMPP server. Returns
send(toJid, message)
true or false .
Sends a message (
sendRaw(body)
Sequence ) to provided JID (Sequence ). Returns true or false .
Sends raw text over XMPP stream. Returns
setPresence(presence[, statusMessage])
true if no errors occur.
Sets availability/presence and status message.
setStatusMessage(statusMessage)
Sets status message.
startMainLoop
Starts GMainLoop. Should be called after a connection is established with the server.
status
Returns status connection. Possible return values are:
stopMainLoop
Object containing status codes and message types.
Creates a new Loudmouth clone with server details provided in
jid .
|