|
|
Here are the different events that Gajim generates, and that plugins can register to. Each event have attributes that plugins can use. There are 2 types of events: [#incoming incoming events] and [#outgoing outgoing events].
|
|
|
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)
|
|
|
|
|
|
[Outgoing Events](#outgoing)
|
|
|
|
|
|
[Example](#example)
|
|
|
|
|
|
|
|
|
## Incoming Events:<a name="incoming"></a>
|
|
|
|
|
|
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.
|
|
|
|
|
|
|*Event name*|*attributes*|*Event description*|
|
|
|
|------------|------------|-------------------|
|
|
|
|*Event name*|*attributes*|
|
|
|
|---|---|
|
|
|
|account-created|account_info|
|
|
|
|account-not-created|reason|
|
|
|
|agent-info-error-received|stanza, fjid, jid, resource, id_|
|
... | ... | @@ -21,18 +28,14 @@ They are generated when Gajim receives some stanza. Plugins can listen to them a |
|
|
|bad-gpg-passphrase|account, use_gpg_agent, keyID|
|
|
|
|bookmarks-received|bookmarks|
|
|
|
|caps-disco-received|fjid, jid, resource, client_caps|
|
|
|
|caps-presence-received|stanza, fjid, jid, resource, ptype, show, hash_method, node, caps_hash.
|
|
|
*Added at CORE level:* client_caps||
|
|
|
|caps-presence-received|stanza, fjid, jid, resource, ptype, show, hash_method, node, caps_hash **Added at CORE level:** client_caps|
|
|
|
|caps-received|fjid, jid, resource, client_caps|
|
|
|
|-------------|--------------------------------|
|
|
|
|chatstate-received|msg_obj, stanza, jid, fjid, resource, chatstate|
|
|
|
|client-cert-passphrase|con, port, secure_tuple|
|
|
|
|connection-lost|title, msg|
|
|
|
|connection-type|connection_type|
|
|
|
|decrypted-message-received|msg_obj, stanza, id_, fjid, jid, resource, mtype, invite_tag, thread_id, msgtxt, gc_control, session, timestamp, encrypted, forwarded, sent, popup, msg_id, receipt_request_tag, receipt_received_tag, subject, displaymarking, seclabel, form_node, xhtml, user_nick, chatstate, msghash, additional_data
|
|
|
*Modified at CORE level (oob handling):* msgtxt||
|
|
|
|decrypted-message-received|msg_obj, stanza, id_, fjid, jid, resource, mtype, invite_tag, thread_id, msgtxt, gc_control, session, timestamp, encrypted, forwarded, sent, popup, msg_id, receipt_request_tag, receipt_received_tag, subject, displaymarking, seclabel, form_node, xhtml, user_nick, chatstate, msghash, additional_data **Modified at CORE level (oob handling):** msgtxt|
|
|
|
|error-received|stanza, id_, fjid, jid, resource, errmsg, errcode|
|
|
|
|--------------|-------------------------------------------------|
|
|
|
|failed-decrypt|msg_obj, fjid, timestamp, session|
|
|
|
|file-request-error|jid, file_props, error_msg|
|
|
|
|file-request-received|stanza, id_, fjid, jid, file_props, dataform|
|
... | ... | @@ -42,10 +45,8 @@ They are generated when Gajim receives some stanza. Plugins can listen to them a |
|
|
|gc-config-changed-received|msg_event, stanza, room_jid, status_code|
|
|
|
|gc-invitation|msg_obj, room_jid, jid_from, reason, password, is_continued|
|
|
|
|gc-message-received|msg_obj, stanza, fjid, msgtxt, jid, room_jid, nickname, timestamp, xhtml_msgtxt, nick, has_timestamp, subject, status_code, displaymarking, captcha_form, additional_data|
|
|
|
|gc-presence-received|stanza, ptype, fjid, jid, room_jid, nick, show, status, avatar_sha, errcode, errmsg, errcon, gc_control, gc_contact, presence_obj (see presence-received event)
|
|
|
*if ptype != 'error':* status_code, reason, role, affiliation, real_jid, actor, new_nick||
|
|
|
|gc-presence-received|stanza, ptype, fjid, jid, room_jid, nick, show, status, avatar_sha, errcode, errmsg, errcon, gc_control, gc_contact, presence_obj (see presence-received event) **if ptype != 'error':** status_code, reason, role, affiliation, real_jid, actor, new_nick|
|
|
|
|gc-subject-received|msg_event, stanza, room_jid, nickname, fjid, subject, msgtxt, has_timestamp|
|
|
|
|-------------------|---------------------------------------------------------------------------|
|
|
|
|gmail-new-mail-received|stanza|
|
|
|
|gmail-notify|stanza, newmsgs, gmail_messages_list (list of dict {'From':, 'Subject':, 'Snippet':, 'url':, 'participation':, 'messages':, 'date':}), jid (our jid)|
|
|
|
|gpg-trust-key|callback|
|
... | ... | @@ -64,19 +65,15 @@ They are generated when Gajim receives some stanza. Plugins can listen to them a |
|
|
|mam-message-received|stanza, tim, msg_, msgtxt, with_, direction, resource, enc_tag, additional_data|
|
|
|
|message-error|fjid, error_code, error_msg, msg, time_, session, stanza|
|
|
|
|message-not-sent|jid, message, error, time_, session|
|
|
|
|message-received|stanza, id_, fjid, jid, resource, enc_tag, invite_tag, thread_id, mtype, msgtxt, gc_control, session, timestamp, encrypted, forwarded, sent, additional_data
|
|
|
*Modified at CORE level (decryption):* stanza, msgtxt||
|
|
|
|message-received|stanza, id_, fjid, jid, resource, enc_tag, invite_tag, thread_id, mtype, msgtxt, gc_control, session, timestamp, encrypted, forwarded, sent, additional_data **Modified at CORE level (decryption):** stanza, msgtxt|
|
|
|
|message-sent|jid, message, keyID, chatstate, msg_id, automatic_message, additional_data|
|
|
|
|------------|--------------------------------------------------------------------------|
|
|
|
|metacontacts-received|stanza, meta_list|
|
|
|
|muc-admin-received|stanza, fjid, jid, resource, users_dict|
|
|
|
|muc-owner-received|stanza, fjid, jid, resource, form_node, dataform|
|
|
|
|new-account-connected|config, is_form, errnum, ssl_msg, ssl_cert, ssl_fingerprint|
|
|
|
|new-account-not-connected|reason|
|
|
|
|notification|jid, control, control_focused, first_unread, do_sound, sound_file, sound_event, show_popup, do_popup, popup_title, popup_text, popup_event_type, popup_msg_type, popup_image, do_command, command, show_in_notification_area, show_in_roster, notif_type
|
|
|
*if notif_type == 'msg':* control_focused
|
|
|
|our-show|show|Event arrive when account status changed|
|
|
|
|--------|----|----------------------------------------|
|
|
|
|notification|jid, control, control_focused, first_unread, do_sound, sound_file, sound_event, show_popup, do_popup, popup_title, popup_text, popup_event_type, popup_msg_type, popup_image, do_command, command, show_in_notification_area, show_in_roster, notif_type **if notif_type == 'msg':** control_focused|
|
|
|
|our-show|show (Event arrive when account status changed)|
|
|
|
|password-required| |
|
|
|
|pep-config-received|node, form|
|
|
|
|pep-received|stanza, fjid, jid, resource, event_tag, pep_type|
|
... | ... | @@ -85,10 +82,8 @@ They are generated when Gajim receives some stanza. Plugins can listen to them a |
|
|
|ping-reply|contact, seconds|
|
|
|
|ping-sent|contact|
|
|
|
|plain-connection|xmpp_client|
|
|
|
|presence-received|stanza, id_, fjid, jid, resource, need_add_in_roster, need_redraw, popup, ptype, timestamp, is_gc, user_nick, contact_nickname, status, show, prio, keyID, avatar_sha, transport_auto_auth, errcode, errmsg
|
|
|
*Added at CORE level:* old_show, new_show, contact_list, was_highest, contact||
|
|
|
|presence-received|stanza, id_, fjid, jid, resource, need_add_in_roster, need_redraw, popup, ptype, timestamp, is_gc, user_nick, contact_nickname, status, show, prio, keyID, avatar_sha, transport_auto_auth, errcode, errmsg **Added at CORE level:** old_show, new_show, contact_list, was_highest, contact|
|
|
|
|privacy-list-active-default|active_list|
|
|
|
|---------------------------|-----------|
|
|
|
|privacy-list-received|list_name, rules|
|
|
|
|privacy-list-removed|list_name|
|
|
|
|privacy-lists-received|lists_list|
|
... | ... | @@ -129,7 +124,20 @@ They are generated when Gajim receives some stanza. Plugins can listen to them a |
|
|
|version-result-received|stanza, id_, fjid, jid, resource, client_info, os_info|
|
|
|
|zeroconf-name-conflict|alt_name|
|
|
|
|
|
|
### Example of usage
|
|
|
|
|
|
## Outgoing events:<a name="outgoing"></a>
|
|
|
|
|
|
They are generated when Gajim is about to send stanza. Plugins can listen to them and eventually modify them before they are really sent.
|
|
|
|
|
|
|
|
|
|*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>
|
|
|
|
|
|
|
|
|
from common import gajim, ged
|
... | ... | @@ -156,13 +164,3 @@ They are generated when Gajim receives some stanza. Plugins can listen to them a |
|
|
...
|
|
|
|
|
|
|
|
|
|
|
|
== Outgoing events: == #outgoing
|
|
|
|
|
|
They are generated when Gajim is about to send stanza. Plugins can listen to them and eventually modify them before they are really sent.
|
|
|
|
|
|
|*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| |
|
|
\ No newline at end of file |