|
|
# Events that can be used in plugins development
|
|
|
|
|
|
*This page has to be revised for Gajim 1.0.*
|
|
|
|
|
|
Here are the different events that Gajim generates, and that plugins can register to. Each event have attributes that plugins can use.
|
|
|
|
|
|
[Incoming Events](#incoming)
|
|
|
[Incoming Events](#incoming-events)
|
|
|
|
|
|
[Outgoing Events](#outgoing)
|
|
|
[Outgoing Events](#outgoing-events)
|
|
|
|
|
|
[Example](#example)
|
|
|
|
|
|
|
|
|
## Incoming Events:<a name="incoming"></a>
|
|
|
## Incoming Events
|
|
|
|
|
|
They are generated when Gajim receives some stanza. Plugins can listen to them and eventually modify them before they are handled by GUI for example. All events have conn attribute that is the Connection instance.
|
|
|
They are generated when Gajim receives some stanza. Plugins can listen to them and eventually modify them before they are handled by the GUI for example. All events have a conn attribute that is the Connection instance.
|
|
|
|
|
|
|*Event name*|*attributes*|
|
|
|
|---|---|
|
|
|
|**Event name**|**Attributes**|
|
|
|
|--------------|--------------|
|
|
|
|account-created|account_info|
|
|
|
|account-not-created|reason|
|
|
|
|agent-info-error-received|stanza, fjid, jid, resource, id_|
|
... | ... | @@ -125,19 +129,19 @@ They are generated when Gajim receives some stanza. Plugins can listen to them a |
|
|
|zeroconf-name-conflict|alt_name|
|
|
|
|
|
|
|
|
|
## Outgoing events:<a name="outgoing"></a>
|
|
|
## Outgoing events
|
|
|
|
|
|
They are generated when Gajim is about to send stanza. Plugins can listen to them and eventually modify them before they are really sent.
|
|
|
Outgoing events are generated when Gajim is about to send a stanza. Plugins can listen to them and eventually modify them before they are really sent.
|
|
|
|
|
|
|
|
|
|*Event name*|*attributes*|
|
|
|
|------------|------------|
|
|
|
|**Event name**|**Attributes**|
|
|
|
|--------------|--------------|
|
|
|
|message-outgoing|account, jid, chatstate, msg_id, control, message, keyID, type_, subject, chatstate, msg_id, resource, user_nick, xhtml, label, session, forward_from, form_node, original_message, delayed, callback, callback_args, now, is_loggable, control, automatic_message, additional_data|
|
|
|
|gc-message-outgoing|account, jid, control, message, xhtml, label, callback, callback_args, is_loggable, correction_msg, automatic_message, additional_data|
|
|
|
|stanza-message-outgoing|conn, msg_iq, now, automatic_message, additional_data|
|
|
|
|
|
|
|
|
|
## Example of usage<a name="example"></a>
|
|
|
## Example
|
|
|
|
|
|
|
|
|
from common import gajim, ged
|
... | ... | |