Package common :: Module connection :: Class Connection
[hide private]
[frames] | no frames]

Class Connection

source code


Connection class
Instance Methods [hide private]
 
__init__(self, name) source code
 
put_event(self, ev) source code
 
dispatch(self, event, data)
always passes account name as first param
source code
 
_reconnect(self) source code
 
disconnect(self, on_purpose=False) source code
 
_disconnectedReconnCB(self)
Called when we are disconnected
source code
 
_connection_lost(self) source code
 
_event_dispatcher(self, realm, event, data) source code
 
_select_next_host(self, hosts)
Selects the next host according to RFC2782 p.3 based on it's priority.
source code
 
connect(self, data=None)
Start a connection to the Jabber server.
source code
 
_on_resolve(self, host, result_array) source code
 
_connect_to_next_host(self, retry=False) source code
 
connect_to_next_type(self, retry=False) source code
 
log_hosttype_info(self, port) source code
 
_connect_failure(self, con_type=None) source code
 
on_proxy_failure(self, reason) source code
 
_connect_success(self, con, con_type) source code
 
connection_accepted(self, con, con_type) source code
 
ssl_certificate_accepted(self) source code
 
_register_handlers(self, con, con_type) source code
 
__on_auth(self, con, auth) source code
 
quit(self, kill_core) source code
 
add_lang(self, stanza) source code
 
get_privacy_lists(self) source code
 
sendPing(self, pingTo=None)
Send XMPP Ping (XEP-0199) request.
source code
 
get_active_default_lists(self) source code
 
del_privacy_list(self, privacy_list) source code
 
get_privacy_list(self, title) source code
 
set_privacy_list(self, listname, tags) source code
 
set_active_list(self, listname) source code
 
set_default_list(self, listname) source code
 
build_privacy_rule(self, name, action)
Build a Privacy rule stanza for invisibility
source code
 
activate_privacy_rule(self, name)
activate a privacy rule
source code
 
send_invisible_presence(self, msg, signed, initial=False) source code
 
_continue_invisible(self, con, iq_obj, msg, signed, initial) source code
 
test_gpg_passphrase(self, password) source code
 
get_signed_presence(self, msg, callback=None) source code
 
get_signed_msg(self, msg, callback=None)
returns the signed message if possible or an empty string if gpg is not used or None if waiting for passphrase.
source code
 
connect_and_auth(self) source code
 
connect_and_init(self, show, msg, sign_msg) source code
 
_init_roster(self, con) source code
 
send_custom_status(self, show, msg, jid) source code
 
change_status(self, show, msg, auto=False) source code
 
_on_disconnected(self)
called when a disconnect request has completed successfully
source code
 
get_status(self) source code
 
send_motd(self, jid, subject='', msg='', xhtml=None) source code
 
send_message(self, jid, msg, keyID, type_='chat', subject='', chatstate=None, msg_id=None, composing_xep=None, resource=None, user_nick=None, xhtml=None, session=None, forward_from=None, form_node=None, original_message=None, delayed=None) source code
 
send_stanza(self, stanza)
send a stanza untouched
source code
 
ack_subscribed(self, jid) source code
 
ack_unsubscribed(self, jid) source code
 
request_subscription(self, jid, msg='', name='', groups=[], auto_auth=False, user_nick='') source code
 
send_authorization(self, jid) source code
 
refuse_authorization(self, jid) source code
 
unsubscribe(self, jid, remove_auth=True) source code
 
unsubscribe_agent(self, agent) source code
 
update_contact(self, jid, name, groups)
update roster item on jabber server
source code
 
send_new_account_infos(self, form, is_form) source code
 
new_account(self, name, config, sync=False) source code
 
_on_new_account(self, con=None, con_type=None) source code
 
account_changed(self, new_name) source code
 
request_last_status_time(self, jid, resource, groupchat_jid=None)
groupchat_jid is used when we want to send a request to a real jid and act as if the answer comes from the groupchat_jid
source code
 
request_os_info(self, jid, resource, groupchat_jid=None)
groupchat_jid is used when we want to send a request to a real jid and act as if the answer comes from the groupchat_jid
source code
 
get_settings(self)
Get Gajim settings as described in XEP 0049
source code
 
get_bookmarks(self)
Get Bookmarks from storage as described in XEP 0048
source code
 
store_bookmarks(self)
Send bookmarks to the storage namespace
source code
 
get_annotations(self)
Get Annonations from storage as described in XEP 0048, and XEP 0145
source code
 
store_annotations(self)
Set Annonations in private storage as described in XEP 0048, and XEP 0145
source code
 
get_metacontacts(self)
Get metacontacts list from storage as described in XEP 0049
source code
 
store_metacontacts(self, tags_list)
Send meta contacts to the storage namespace
source code
 
send_agent_status(self, agent, ptype) source code
 
check_unique_room_id_support(self, server, instance) source code
 
join_gc(self, nick, room_jid, password) source code
 
send_gc_message(self, jid, msg, xhtml=None) source code
 
send_gc_subject(self, jid, subject) source code
 
request_gc_config(self, room_jid) source code
 
destroy_gc_room(self, room_jid, reason='', jid='') source code
 
send_gc_status(self, nick, jid, show, status) source code
 
gc_got_disconnected(self, room_jid)
A groupchat got disconnected.
source code
 
gc_set_role(self, room_jid, nick, role, reason='')
role is for all the life of the room so it's based on nick
source code
 
gc_set_affiliation(self, room_jid, jid, affiliation, reason='')
affiliation is for all the life of the room so it's based on jid
source code
 
send_gc_affiliation_list(self, room_jid, users_dict) source code
 
get_affiliation_list(self, room_jid, affiliation) source code
 
send_gc_config(self, room_jid, form) source code
 
gpg_passphrase(self, passphrase) source code
 
ask_gpg_keys(self) source code
 
ask_gpg_secrete_keys(self) source code
 
change_password(self, password) source code
 
unregister_account(self, on_remove_success) source code
 
send_invite(self, room, to, reason='', continue_tag=False)
sends invitation
source code
 
check_keepalive(self) source code
 
_reconnect_alarm(self) source code
 
request_search_fields(self, jid) source code
 
send_search_form(self, jid, form, is_form) source code
Method Details [hide private]

__init__(self, name)
(Constructor)

source code 

put_event(self, ev)

source code 

dispatch(self, event, data)

source code 
always passes account name as first param

_reconnect(self)

source code 

disconnect(self, on_purpose=False)

source code 

_disconnectedReconnCB(self)

source code 
Called when we are disconnected

_connection_lost(self)

source code 

_event_dispatcher(self, realm, event, data)

source code 

_select_next_host(self, hosts)

source code 
Selects the next host according to RFC2782 p.3 based on it's priority. Chooses between hosts with the same priority randomly, where the probability of being selected is proportional to the weight of the host.

connect(self, data=None)

source code 
Start a connection to the Jabber server. Returns connection, and connection type ('tls', 'ssl', 'plain', '') data MUST contain hostname, usessl, proxy, use_custom_host, custom_host (if use_custom_host), custom_port (if use_custom_host)

_on_resolve(self, host, result_array)

source code 

_connect_to_next_host(self, retry=False)

source code 

connect_to_next_type(self, retry=False)

source code 

log_hosttype_info(self, port)

source code 

_connect_failure(self, con_type=None)

source code 

on_proxy_failure(self, reason)

source code 

_connect_success(self, con, con_type)

source code 

connection_accepted(self, con, con_type)

source code 

ssl_certificate_accepted(self)

source code 

_register_handlers(self, con, con_type)

source code 

__on_auth(self, con, auth)

source code 

quit(self, kill_core)

source code 

add_lang(self, stanza)

source code 

get_privacy_lists(self)

source code 

sendPing(self, pingTo=None)

source code 
Send XMPP Ping (XEP-0199) request. If pingTo is not set, ping is sent to server to detect connection failure at application level.

get_active_default_lists(self)

source code 

del_privacy_list(self, privacy_list)

source code 

get_privacy_list(self, title)

source code 

set_privacy_list(self, listname, tags)

source code 

set_active_list(self, listname)

source code 

set_default_list(self, listname)

source code 

build_privacy_rule(self, name, action)

source code 
Build a Privacy rule stanza for invisibility

activate_privacy_rule(self, name)

source code 
activate a privacy rule

send_invisible_presence(self, msg, signed, initial=False)

source code 

_continue_invisible(self, con, iq_obj, msg, signed, initial)

source code 

test_gpg_passphrase(self, password)

source code 

get_signed_presence(self, msg, callback=None)

source code 

get_signed_msg(self, msg, callback=None)

source code 
returns the signed message if possible or an empty string if gpg is not used or None if waiting for passphrase. callback is the function to call when user give the passphrase

connect_and_auth(self)

source code 

connect_and_init(self, show, msg, sign_msg)

source code 

_init_roster(self, con)

source code 

send_custom_status(self, show, msg, jid)

source code 

change_status(self, show, msg, auto=False)

source code 

_on_disconnected(self)

source code 
called when a disconnect request has completed successfully

get_status(self)

source code 

send_motd(self, jid, subject='', msg='', xhtml=None)

source code 

send_message(self, jid, msg, keyID, type_='chat', subject='', chatstate=None, msg_id=None, composing_xep=None, resource=None, user_nick=None, xhtml=None, session=None, forward_from=None, form_node=None, original_message=None, delayed=None)

source code 

send_stanza(self, stanza)

source code 
send a stanza untouched

ack_subscribed(self, jid)

source code 

ack_unsubscribed(self, jid)

source code 

request_subscription(self, jid, msg='', name='', groups=[], auto_auth=False, user_nick='')

source code 

send_authorization(self, jid)

source code 

refuse_authorization(self, jid)

source code 

unsubscribe(self, jid, remove_auth=True)

source code 

unsubscribe_agent(self, agent)

source code 

update_contact(self, jid, name, groups)

source code 
update roster item on jabber server

send_new_account_infos(self, form, is_form)

source code 

new_account(self, name, config, sync=False)

source code 

_on_new_account(self, con=None, con_type=None)

source code 

account_changed(self, new_name)

source code 

request_last_status_time(self, jid, resource, groupchat_jid=None)

source code 
groupchat_jid is used when we want to send a request to a real jid and act as if the answer comes from the groupchat_jid

request_os_info(self, jid, resource, groupchat_jid=None)

source code 
groupchat_jid is used when we want to send a request to a real jid and act as if the answer comes from the groupchat_jid

get_settings(self)

source code 
Get Gajim setting