pidgin 2.14.14dev
Jabber Signals

Signals:


jabber-receiving-iq

gboolean (*iq_received)(PurpleConnection *gc, const char *type, const char *id,
const char *from, xmlnode *iq);
Description:
Emitted when an XMPP IQ stanza is received. Allows a plugin to process IQ stanzas.
Parameters
gcThe connection on which the stanza is received
typeThe IQ type ('get', 'set', 'result', or 'error')
idThe ID attribute from the stanza. MUST NOT be NULL.
fromThe originator of the stanza. MAY BE NULL if the stanza originated from the user's server.
iqThe full stanza received.
Returns
TRUE if the plugin processed this stanza and nobody else should process it. FALSE otherwise.

jabber-receiving-message

gboolean (*message_received)(PurpleConnection *gc, const char *type,
const char *id, const char *from, const char *to,
xmlnode *message);
Description:
Emitted when an XMPP message stanza is received. Allows a plugin to process message stanzas.
Parameters
gcThe connection on which the stanza is received
typeThe message type (see rfc3921 or rfc3921bis)
idThe ID attribute from the stanza. MAY BE NULL.
fromThe originator of the stanza. MAY BE NULL if the stanza originated from the user's server.
toThe destination of the stanza. This is probably either the full JID of the receiver or the receiver's bare JID.
messageThe full stanza received.
Returns
TRUE if the plugin processed this stanza and nobody else should process it. FALSE otherwise.

jabber-receiving-presence

gboolean (*presence_received)(PurpleConnection *gc, const char *type,
const char *from, xmlnode *presence);
Description:
Emitted when an XMPP presence stanza is received. Allows a plugin to process presence stanzas.
Parameters
gcThe connection on which the stanza is received
typeThe presence type (see rfc3921 or rfc3921bis). NULL indicates this is an "available" (i.e. online) presence.
fromThe originator of the stanza. MAY BE NULL if the stanza originated from the user's server.
presenceThe full stanza received.
Returns
TRUE if the plugin processed this stanza and nobody else should process it. FALSE otherwise.

jabber-watched-iq

gboolean (*watched_iq)(PurpleConnection *gc, const char *type, const char *id,
const char *from, xmlnode *child);
Description:
Emitted when an IQ with a watched (child, namespace) pair is received. See jabber-register-namespace-watcher and jabber-unregister-namespace-watcher.
Parameters
gcThe connection on which the stanza is received
typeThe IQ type ('get', 'set', 'result', or 'error')
idThe ID attribute from the stanza. MUST NOT be NULL.
fromThe originator of the stanza. MAY BE NULL if the stanza originated from the user's server.
childThe child node with namespace.
Returns
TRUE if the plugin processed this stanza and nobody else should process it. FALSE otherwise.

jabber-register-namespace-watcher

void (register_namespace_watcher)(const char *node, const char *namespace);
Description:
Emit this signal to register your desire to have specific IQ stanzas to be emitted via the jabber-watched-iq signal when received.
Parameters
nodeThe IQ child name to longer watch.
namespaceThe IQ child namespace to longer watch.

jabber-unregister-namespace-watcher

void (unregister_namespace_watcher)(const char *node, const char *namespace);
Description:
Emit this signal to unregister your desire to have specific IQ stanzas to be emitted via the jabber-watched-iq signal when received.
Parameters
nodeThe IQ child name to no longer watch.
namespaceThe IQ child namespace to no longer watch.

jabber-sending-xmlnode

void (sending_xmlnode)(PurpleConnection *gc, xmlnode **stanza);
Description:
Emit this signal (purple_signal_emit) to send a stanza. It is preferred to use this instead of prpl_info->send_raw.
Parameters
gcThe connection on which to send the stanza.
stanzaThe stanza to send. If stanza is not NULL after being sent, the emitter should free it.

jabber-receiving-xmlnode

void (receiving_xmlnode)(PurpleConnection *gc, xmlnode **stanza);
Description:
Emitted when an XMPP stanza is received. Allows a plugin to process any stanza.
Parameters
gcThe connection on which the stanza was received.
stanzaThe received stanza. Set stanza to NULL (and free it) to stop processing the stanza.