diff -r 9b0f74b6b3d9 -r 884a5385bb2c doc/reference/libpurple/signals_jabber.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/reference/libpurple/signals_jabber.xml Fri Jan 31 17:31:59 2014 +0530 @@ -0,0 +1,311 @@ + + + +Jabber signals + + +List of signals + + "jabber-receiving-iq" + "jabber-receiving-message" + "jabber-receiving-presence" + "jabber-watched-iq" + "jabber-register-namespace-watcher" + "jabber-unregister-namespace-watcher" + "jabber-sending-xmlnode" + "jabber-receiving-xmlnode" + + + + +Signal details + + + The <literal>"jabber-receiving-iq"</literal> signal + +gboolean user_function (PurpleConnection *gc, + const char *type, + const char *id, + const char *from, + PurpleXmlNode *iq, + gpointer user_data) + + +Emitted when an XMPP IQ stanza is received. Allows a plugin to process IQ stanzas. + + + + gc : + The connection on which the stanza is received. + + + type : + The IQ type ('get', 'set', 'result', or 'error'). + + + id : + The ID attribute from the stanza. MUST NOT be NULL. + + + from : + The originator of the stanza. MAY BE NULL if the stanza originated from the user's server. + + + iq : + The full stanza received. + + + user_data : + user data set when the signal handler was connected. + + + Returns : + TRUE if the plugin processed this stanza and *nobody else* should process it. FALSE otherwise. + + + + + + The <literal>"jabber-receiving-message"</literal> signal + +gboolean user_function (PurpleConnection *gc, + const char *type, + const char *id, + const char *from, + const char *to, + PurpleXmlNode *message, + gpointer user_data) + + +Emitted when an XMPP message stanza is received. Allows a plugin to process message stanzas. + + + + gc : + The connection on which the stanza is received. + + + type : + The message type (see rfc3921 or rfc3921bis). + + + id : + The ID attribute from the stanza. MAY BE NULL. + + + from : + The originator of the stanza. MAY BE NULL if the stanza originated from the user's server. + + + to : + The destination of the stanza. This is probably either the full JID of the receiver or the receiver's bare JID. + + + message : + The full stanza received. + + + user_data : + user data set when the signal handler was connected. + + + Returns : + TRUE if the plugin processed this stanza and *nobody else* should process it. FALSE otherwise. + + + + + + The <literal>"jabber-receiving-presence"</literal> signal + +gboolean user_function (PurpleConnection *gc, + const char *type, + const char *from, + PurpleXmlNode *presence, + gpointer user_data) + + +Emitted when an XMPP presence stanza is received. Allows a plugin to process presence stanzas. + + + + gc : + The connection on which the stanza is received. + + + type : + The presence type (see rfc3921 or rfc3921bis). NULL indicates this is an "available" (i.e. online) presence. + + + from : + The originator of the stanza. MAY BE NULL if the stanza originated from the user's server. + + + presence : + The full stanza received. + + + user_data : + user data set when the signal handler was connected. + + + Returns : + TRUE if the plugin processed this stanza and *nobody else* should process it. FALSE otherwise. + + + + + + The <literal>"jabber-watched-iq"</literal> signal + +gboolean user_function (PurpleConnection *gc, + const char *type, + const char *id, + const char *from, + PurpleXmlNode *child, + gpointer user_data) + + +Emitted when an IQ with a watched (child, namespace) pair is received. See jabber-register-namespace-watcher and jabber-unregister-namespace-watcher. + + + + gc : + The connection on which the stanza is received. + + + type : + The IQ type ('get', 'set', 'result', or 'error'). + + + id : + The ID attribute from the stanza. MUST NOT be NULL. + + + from : + The originator of the stanza. MAY BE NULL if the stanza originated from the user's server. + + + child : + The child node with namespace. + + + user_data : + user data set when the signal handler was connected. + + + Returns : + TRUE if the plugin processed this stanza and *nobody else* should process it. FALSE otherwise. + + + + + + The <literal>"jabber-register-namespace-watcher"</literal> signal + +void user_function (const char *node, + const char *namespace, + gpointer user_data) + + +Emit this signal to register your desire to have specific IQ stanzas to be emitted via the jabber-watched-iq signal when received. + + + + node : + The IQ child name to longer watch. + + + namespace : + The IQ child namespace to longer watch. + + + user_data : + user data set when the signal handler was connected. + + + + + + The <literal>"jabber-unregister-namespace-watcher"</literal> signal + +void user_function (const char *node, + const char *namespace, + gpointer user_data) + + +Emit this signal to unregister your desire to have specific IQ stanzas to be emitted via the jabber-watched-iq signal when received. + + + + node : + The IQ child name to no longer watch. + + + namespace : + The IQ child namespace to no longer watch. + + + user_data : + user data set when the signal handler was connected. + + + + + + The <literal>"jabber-sending-xmlnode"</literal> signal + +void user_function (PurpleConnection *gc, + PurpleXmlNode **stanza, + gpointer user_data) + + +Emit this signal (purple_signal_emit) to send a stanza. It is preferred to use this instead of purple_protocol_server_iface_send_raw. + + + + gc : + The connection on which to send the stanza. + + + stanza : + The stanza to send. If stanza is not NULL after being sent, the emitter should free it. + + + user_data : + user data set when the signal handler was connected. + + + + + + The <literal>"jabber-receiving-xmlnode"</literal> signal + +void user_function (PurpleConnection *gc, + PurpleXmlNode **stanza, + gpointer user_data) + + +Emitted when an XMPP stanza is received. Allows a plugin to process any stanza. + + + + gc : + The connection on which the stanza was received. + + + stanza : + The received stanza. Set stanza to NULL (and free it) to stop processing the stanza. + + + user_data : + user data set when the signal handler was connected. + + + + + + +