TelepathyGLib.Connection¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
The Amount field of the Account Balance |
||
r |
The Currency field of the Account Balance |
||
r |
The Scale field of the Account Balance |
||
r |
The URI for managing the account balance |
||
r |
Blocked contacts |
||
r |
Whether the contact list can change |
||
r |
Can report abusive |
||
r |
A |
||
r |
The connection’s connection manager name |
||
r |
The connection’s connection manager name |
||
d/r |
Initially |
||
[ |
r |
All existing contact groups |
|
r |
Whether the contact list persists |
||
r |
The state of the contact list |
||
r |
Whether groups are disjoint |
||
r |
Group storage capabilities |
||
r |
The connection’s protocol name |
||
r |
Whether request uses message |
||
r |
The local user’s Contact object on this connection |
||
r |
The local user’s Contact handle on this connection |
||
r |
The status of this connection |
||
r |
The reason why |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted when at least one of the |
|
Notify of changes in |
|
Notify of changes in the list of contacts as returned by |
|
Emitted when a group is renamed, in protocols where this can be distinguished from group creation, removal and membership changes. |
|
Emitted when new, empty groups are created. |
|
Emitted when one or more groups are removed. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class TelepathyGLib.Connection(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A proxy object for a Telepathy connection. There are no interesting public struct fields.
(Changed in 0.7.12: the layout of the structure is visible, allowing subclassing.)
New in version 0.7.1.
- classmethod init_known_interfaces()¶
Ensure that the known interfaces for
TelepathyGLib.Connection
have been set up. This is done automatically when necessary, but for correct overriding of library interfaces by local extensions, you should call this function before calling tp_proxy_or_subclass_hook_on_interface_add() with first argument %TP_TYPE_CONNECTION.New in version 0.7.6.
- classmethod new(dbus, bus_name, object_path)¶
- Parameters:
dbus (
TelepathyGLib.DBusDaemon
) – a D-Bus daemon; may not beNone
bus_name (
str
orNone
) – the well-known or unique name of the connection process; if well-known, this function will make a blocking call to the bus daemon to resolve the unique name. May beNone
if object_path is not, in which case a well-known name will be derived from object_path.object_path (
str
orNone
) – the object path of the connection process. May beNone
if bus_name is a well-known name, in which case the object path will be derived from bus_name.
- Raises:
- Returns:
a new connection proxy, or
None
if unique-name resolution fails or on invalid arguments- Return type:
New in version 0.7.1.
Deprecated since version ???: Use
TelepathyGLib.SimpleClientFactory.ensure_connection
() instead.
- classmethod presence_type_cmp_availability(p1, p2)¶
- Parameters:
- Returns:
-1, 0 or 1, if p1 is <, == or > than p2.
- Return type:
Compares p1 and p2 like strcmp(). p1 > p2 means p1 is more available than p2.
The order used is: available > busy > away > xa > hidden > offline > error > unknown > unset
New in version 0.7.16.
- add_client_interest(interested_in)¶
- Parameters:
interested_in (
str
) – a string identifying an interface or part of an interface to which this connection will subscribe
Subscribe to any opt-in change notifications for interested_in.
For contact information, use
TelepathyGLib.Contact
instead, which will call this automatically.New in version 0.11.3.
- add_to_group_async(group, contacts, callback, *user_data)¶
- Parameters:
group (
str
) – the group to alter.contacts ([
TelepathyGLib.Contact
]) – An array ofTelepathyGLib.Contact
objects to include in the group.callback (
Gio.AsyncReadyCallback
orNone
) – a callback to call when the operation finishes
Add the given contacts to the given group, creating it if necessary.
For this to work properly self must have interface
TelepathyGLib.IFACE_CONNECTION_INTERFACE_CONTACT_GROUPS
.New in version 0.15.5.
- add_to_group_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes
TelepathyGLib.Connection.add_to_group_async
()New in version 0.15.5.
- authorize_publication_async(contacts, callback, *user_data)¶
- Parameters:
contacts ([
TelepathyGLib.Contact
]) – An array ofTelepathyGLib.Contact
objects to authorizecallback (
Gio.AsyncReadyCallback
orNone
) – a callback to call when the operation finishes
For each of the given contacts, request that the local user’s presence is sent to that contact, i.e. that their
TelepathyGLib.Contact
:publish-state
property becomesTelepathyGLib.SubscriptionState.YES
.For this to work properly self must have interface
TelepathyGLib.IFACE_CONNECTION_INTERFACE_CONTACT_LIST
.New in version 0.15.5.
- authorize_publication_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes
TelepathyGLib.Connection.authorize_publication_async
()New in version 0.15.5.
- bind_connection_status_to_property(target, target_property, invert)¶
- Parameters:
target (
object
orNone
) – the targetGObject.Object
target_property (
str
) – the property on target to bind (must beGObject.TYPE_BOOLEAN
)invert (
bool
) –True
if you wish to invert the value of target_property (i.e.False
if connected)
- Returns:
the
GObject.Binding
instance representing the binding between the self and the target. The binding is released whenever theGObject.Binding
reference count reaches zero.- Return type:
Binds the
:status
of self to the boolean property of another object using aGObject.Binding
such that the target_property will be set toTrue
when self is connected (and invert isFalse
).target_property will be synchronised immediately (
GObject.BindingFlags.SYNC_CREATE
). invert can be interpreted as analogous toGObject.BindingFlags.INVERT_BOOLEAN
.For instance, this function can be used to bind the GtkWidget:sensitive property to only make a widget sensitive when the account is connected.
See
GObject.Object.bind_property
() for more information.New in version 0.13.16.
- block_contacts_async(contacts, report_abusive, callback, *user_data)¶
- Parameters:
contacts ([
TelepathyGLib.Contact
]) – An array ofTelepathyGLib.Contact
objects to blockreport_abusive (
bool
) – IfTrue
, report these contacts as abusive to the server administrators as well as blocking them. SeeTelepathyGLib.Connection
:can-report-abusive
to discover whether reporting abuse is supported. IfTelepathyGLib.Connection
:can-report-abusive
isFalse
, this parameter will be ignored.callback (
Gio.AsyncReadyCallback
orNone
) – a callback to call when the operation finishes
Direct the server to block contacts.
New in version 0.17.0.
- block_contacts_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes
TelepathyGLib.Connection.block_contacts_async
()New in version 0.17.0.
- can_report_abusive()¶
- Returns:
the value of
TelepathyGLib.Connection
:can-report-abusive
- Return type:
New in version 0.17.0.
- disconnect_async(callback, *user_data)¶
- Parameters:
callback (
Gio.AsyncReadyCallback
orNone
) – a callback to call when the request is satisfied
Disconnect the connection.
This method is intended for use by AccountManager implementations, such as Mission Control. To disconnect a connection managed by an AccountManager, either use
TelepathyGLib.Account.request_presence_async
() orTelepathyGLib.Account.set_enabled_async
(), depending whether the intention is to put the account offline temporarily, or disable it longer-term.New in version 0.17.5.
- disconnect_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Interpret the result of
TelepathyGLib.Connection.disconnect_async
().New in version 0.17.5.
- dup_contact_by_id_async(id, features, callback, *user_data)¶
- Parameters:
id (
str
) – A strings representing the desired contact by its identifier in the IM protocol (an XMPP JID, SIP URI, MSN Passport, AOL screen-name etc.)features ([
TelepathyGLib.ContactFeature
] orNone
) – An array of features that must be ready for use (if supported) before the callback is called (may beNone
if n_features is 0)callback (
Gio.AsyncReadyCallback
orNone
) – A user callback to call when the contact is ready
Create a
TelepathyGLib.Contact
object and make any asynchronous method calls necessary to ensure that all the features specified in features are ready for use (if they are supported at all).It is not an error to put features in features even if the connection manager doesn’t support them - users of this method should have a static list of features they would like to use if possible, and use it for all connection managers.
New in version 0.19.0.
- dup_contact_by_id_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
a
TelepathyGLib.Contact
orNone
on error.- Return type:
Finishes
TelepathyGLib.Connection.dup_contact_by_id_async
().New in version 0.19.0.
- dup_contact_if_possible(handle, identifier)¶
- Parameters:
handle (
int
) – a handle of typeTelepathyGLib.HandleType.CONTACT
identifier (
str
) – the normalized identifier (XMPP JID, etc.) corresponding to handle, orNone
if not known
- Returns:
a contact or
None
- Return type:
Try to return an existing contact object or create a new contact object immediately.
If
TelepathyGLib.Connection.has_immortal_handles
() would returnTrue
and identifier is non-None
, this function always succeeds.On connections without immortal handles, it is not possible to guarantee that handle remains valid without making asynchronous D-Bus calls, so it might be necessary to delay processing of messages or other events until a
TelepathyGLib.Contact
can be constructed asynchronously, for instance by usingTelepathyGLib.Connection.get_contacts_by_id
().Similarly, if identifier is
None
, it might not be possible to find the identifier for handle without making asynchronous D-Bus calls, so it might be necessary to delay processing of messages or other events until aTelepathyGLib.Contact
can be constructed asynchronously, for instance by usingTelepathyGLib.Connection.get_contacts_by_handle
().New in version 0.13.9.
- dup_contact_info_supported_fields()¶
- Returns:
a
GLib.List
ofTelepathyGLib.ContactInfoFieldSpec
struct, orNone
if the feature is not yet prepared or the connection doesn’t have the necessary properties.- Return type:
Returns a newly allocated
GLib.List
of supported contact info fields for this connection. The list must be freed with tp_contact_info_spec_list_free().To wait for valid supported fields, call
TelepathyGLib.Proxy.prepare_async
() with the feature %TP_CONNECTION_FEATURE_CONTACT_INFO.This property cannot change after self goes to the Connected state.
New in version 0.19.9.
- dup_contact_list()¶
- Returns:
a new
GLib.PtrArray
ofTelepathyGLib.Contact
. Use g_ptr_array_unref() when done.- Return type:
Retrieves the user’s contact list. In general, blocked contacts are not included in this list. The
TelepathyGLib.Contact
objects returned are guaranteed to have all of the features previously passed toTelepathyGLib.SimpleClientFactory.add_contact_features
() prepared.Before calling this method, you must first call
TelepathyGLib.Proxy.prepare_async
() with the %TP_CONNECTION_FEATURE_CONTACT_LIST feature, and verify thatTelepathyGLib.Connection
:contact-list-state
is set toTelepathyGLib.ContactListState.SUCCESS
.New in version 0.15.5.
- dup_detailed_error_vardict()¶
- Returns:
a D-Bus error name, or
None
.- details:
optionally used to return a %G_VARIANT_TYPE_VARDICT with details of the error
- Return type:
(
str
orNone
, details:GLib.Variant
)
If the connection has disconnected, return the D-Bus error name with which it disconnected (in particular, this is %TP_ERROR_STR_CANCELLED if it was disconnected by a user request).
Otherwise, return
None
, without altering details.New in version 0.19.0.
- get_account()¶
- Returns:
the account associated with this connection, or
None
.- Return type:
Return the the
TelepathyGLib.Account
associated with this connection. Will returnNone
if self was not acquired from aTelepathyGLib.Account
viaTelepathyGLib.Account.get_connection
(), or if the account object got finalized in the meantime (TelepathyGLib.Connection
does not keep a strong ref on itsTelepathyGLib.Account
).New in version 0.15.5.
- get_avatar_requirements()¶
- Returns:
a
TelepathyGLib.AvatarRequirements
struct, orNone
if the feature is not yet prepared or the connection doesn’t have the necessary properties.- Return type:
To wait for valid avatar requirements, call
TelepathyGLib.Proxy.prepare_async
() with the feature %TP_CONNECTION_FEATURE_AVATAR_REQUIREMENTS.This property cannot change after self goes to the Connected state.
New in version 0.11.4.
- get_balance()¶
- Returns:
True
if the balance is valid (and the values set),False
if the balance is invalid.- Return type:
If self has a valid account balance, returns
True
and sets the variables pointed to by balance, scale and currency to the appropriate fields of the Balance.AccountBalance property.The monetary value of the balance is expressed as a fixed-point number, balance, with a decimal scale defined by scale; for instance a balance of 1234 with scale of 2 represents a value of “12.34” in the currency represented by currency.
Requires %TP_CONNECTION_FEATURE_BALANCE to be prepared.
New in version 0.15.1.
- get_balance_uri()¶
- Returns:
the
TelepathyGLib.Connection
:balance-uri
property.- Return type:
The value of Balance.ManageCreditURI.
Requires %TP_CONNECTION_FEATURE_BALANCE to be prepared.
New in version 0.15.1.
- get_blocked_contacts()¶
- Returns:
the value of
TelepathyGLib.Connection
:blocked-contacts
- Return type:
New in version 0.17.0.
- get_can_change_contact_list()¶
- Returns:
the value of
TelepathyGLib.Connection
:can-change-contact-list
property- Return type:
New in version 0.15.5.
- get_capabilities()¶
- Returns:
the same
TelepathyGLib.Capabilities
as theTelepathyGLib.Connection
:capabilities
property- Return type:
New in version 0.11.3.
- get_cm_name()¶
- Returns:
the same as the
TelepathyGLib.Connection
:cm-name
property- Return type:
New in version 0.19.3.
- get_connection_manager_name()¶
- Returns:
the same as the
TelepathyGLib.Connection
:connection-manager-name
property- Return type:
New in version 0.13.16.
Deprecated since version ???: Use
TelepathyGLib.Connection.get_cm_name
() instead.
- get_contact_attributes(timeout_ms, handles, interfaces, hold, callback, user_data, weak_object)¶
- Parameters:
timeout_ms (
int
) – the timeout in milliseconds, or -1 to use the defaulthandles ([
int
]) – an array of handlesinterfaces (
str
) – a #GStrv of interfaceshold (
bool
) – ifTrue
, the callback will hold one reference to each valid handlecallback (
GObject.Callback
) – called on success or failure (unless weak_object has become unreferenced)weak_object (
GObject.Object
) – if notNone
, an object to be weakly referenced: if it is destroyed, callback will not be called
Return (via a callback) any number of attributes of the given handles.
Since telepathy-glib version 0.13.8, the handles will remain valid until connection becomes invalid (signalled by
TelepathyGLib.Proxy
::invalidated
). In earlier versions, if hold wasTrue
, the callback would hold a reference to them which could be released withTelepathyGLib.Connection.unref_handles
().This is a thin wrapper around the GetContactAttributes D-Bus method, and should be used in preference to tp_cli_connection_interface_contacts_call_get_contact_attributes(); mixing this function,
TelepathyGLib.Connection.hold_handles
(),TelepathyGLib.Connection.unref_handles
(), andTelepathyGLib.Contact
with direct use of the RequestHandles, HoldHandles and GetContactAttributes D-Bus methods is unwise, asTelepathyGLib.Connection
andTelepathyGLib.Contact
perform client-side reference counting of handles. TheTelepathyGLib.Contact
API provides a higher-level abstraction which should usually be used instead.callback will later be called with the attributes of those of the given handles that were valid. Invalid handles are simply omitted from the parameter to the callback.
If hold is
True
, the callback is given one reference to each handle that appears as a key in the callback’s attributes parameter.Deprecated since version ???: Use
TelepathyGLib.SimpleClientFactory.ensure_contact
() instead.
- get_contact_groups()¶
- Returns:
the value of
TelepathyGLib.Connection
:contact-groups
- Return type:
[
str
]
New in version 0.15.5.
- get_contact_info_flags()¶
- Returns:
a set of
TelepathyGLib.ContactInfoFlags
- Return type:
Returns the flags describing how contact info (vCards) behaves on this connection
To wait for valid contact info flags, call
TelepathyGLib.Proxy.prepare_async
() with the feature %TP_CONNECTION_FEATURE_CONTACT_INFO.This property cannot change after self goes to the Connected state.
New in version 0.11.7.
- get_contact_info_supported_fields()¶
- Returns:
a
GLib.List
ofTelepathyGLib.ContactInfoFieldSpec
struct, orNone
if the feature is not yet prepared or the connection doesn’t have the necessary properties.- Return type:
Returns a newly allocated
GLib.List
of supported contact info fields for this connection. The list must be freed with g_list_free() after used.Note that the
TelepathyGLib.ContactInfoFieldSpec
s in the returnedGLib.List
are not dupped before returning from this function. One could copy every item in the list using tp_contact_info_field_spec_copy().To wait for valid supported fields, call
TelepathyGLib.Proxy.prepare_async
() with the feature %TP_CONNECTION_FEATURE_CONTACT_INFO.This property cannot change after self goes to the Connected state.
New in version 0.11.7.
Deprecated since version 0.19.9: New code should use
TelepathyGLib.Connection.dup_contact_info_supported_fields
() instead.
- get_contact_list_attributes(timeout_ms, interfaces, hold, callback, user_data, weak_object)¶
- Parameters:
timeout_ms (
int
) – the timeout in milliseconds (using a large timeout is recommended)interfaces (
str
) – a #GStrv of interfaceshold (
bool
) – ifTrue
, the callback will hold one reference to each handle it receivescallback (
GObject.Callback
) – called on success or failure (unless weak_object has become unreferenced)weak_object (
GObject.Object
) – if notNone
, an object to be weakly referenced: if it is destroyed, callback will not be called
Return (via a callback) the contacts on the contact list and any number of their attributes.
Since telepathy-glib version 0.13.8, the handles will remain valid until connection becomes invalid (signalled by
TelepathyGLib.Proxy
::invalidated
). In earlier versions, if hold wasTrue
, the callback would hold a reference to them which could be released withTelepathyGLib.Connection.unref_handles
().This is a thin wrapper around the RequestContactList D-Bus method, and should be used in preference to lower-level functions; it is similar to
TelepathyGLib.Connection.get_contact_attributes
().The
TelepathyGLib.Contact
API provides a higher-level abstraction which should usually be used instead.If hold is
True
, the callback is given a reference to each handle that appears as a key in the callback’s attributes parameter.Deprecated since version ???: Use
TelepathyGLib.Connection.dup_contact_list
() instead.
- get_contact_list_persists()¶
- Returns:
the value of
TelepathyGLib.Connection
:contact-list-persists
property- Return type:
New in version 0.15.5.
- get_contact_list_state()¶
- Returns:
the value of
TelepathyGLib.Connection
:contact-list-state
property- Return type:
New in version 0.15.5.
- get_contacts_by_handle(handles, features, callback, user_data, weak_object)¶
- Parameters:
handles ([
int
]) – An array of handles of typeTelepathyGLib.HandleType.CONTACT
representing the desired contactsfeatures ([
int
] orNone
) – An array of features that must be ready for use (if supported) before the callback is called (may beNone
if n_features is 0)callback (
TelepathyGLib.ConnectionContactsByHandleCb
) – A user callback to call when the contacts are readyweak_object (
GObject.Object
orNone
) – An object to pass to the callback, which will be weakly referenced; if this object is destroyed, the operation will be cancelled
Create a number of
TelepathyGLib.Contact
objects and make asynchronous method calls to hold their handles and ensure that all the features specified in features are ready for use (if they are supported at all).It is not an error to put features in features even if the connection manager doesn’t support them - users of this method should have a static list of features they would like to use if possible, and use it for all connection managers.
New in version 0.7.18.
Deprecated since version ???: Use
TelepathyGLib.SimpleClientFactory.ensure_contact
() instead.
- get_contacts_by_id(ids, features, callback, user_data, weak_object)¶
- Parameters:
ids ([
str
]) – An array of strings representing the desired contacts by their identifiers in the IM protocol (XMPP JIDs, SIP URIs, MSN Passports, AOL screen-names etc.)features ([
TelepathyGLib.ContactFeature
] orNone
) – An array of features that must be ready for use (if supported) before the callback is called (may beNone
if n_features is 0)callback (
TelepathyGLib.ConnectionContactsByIdCb
) – A user callback to call when the contacts are readyweak_object (
GObject.Object
orNone
) – An object to pass to the callback, which will be weakly referenced; if this object is destroyed, the operation will be cancelled
Create a number of
TelepathyGLib.Contact
objects and make asynchronous method calls to obtain their handles and ensure that all the features specified in features are ready for use (if they are supported at all).It is not an error to put features in features even if the connection manager doesn’t support them - users of this method should have a static list of features they would like to use if possible, and use it for all connection managers.
New in version 0.7.18.
Deprecated since version ???: Use
TelepathyGLib.Connection.dup_contact_by_id_async
() instead.
- get_detailed_error()¶
- Returns:
a D-Bus error name, or
None
.- details:
optionally used to return a map from string to
GObject.Value
, which must not be modified or destroyed by the caller
- Return type:
(
str
orNone
, details: {str
:GObject.Value
})
If the connection has disconnected, return the D-Bus error name with which it disconnected (in particular, this is %TP_ERROR_STR_CANCELLED if it was disconnected by a user request).
Otherwise, return
None
, without altering details.New in version 0.11.4.
- get_disjoint_groups()¶
- Returns:
the value of
TelepathyGLib.Connection
:disjoint-groups
- Return type:
New in version 0.15.5.
- get_group_storage()¶
- Returns:
the value of
TelepathyGLib.Connection
:group-storage
- Return type:
New in version 0.15.5.
- get_protocol_name()¶
- Returns:
the same as the
TelepathyGLib.Connection
:protocol-name
property- Return type:
New in version 0.13.16.
- get_request_uses_message()¶
- Returns:
the value of
TelepathyGLib.Connection
:request-uses-message
property- Return type:
New in version 0.15.5.
- get_self_contact()¶
- Returns:
the value of the
TelepathyGLib.Connection
:self-contact
property, which may beNone
- Return type:
Return a
TelepathyGLib.Contact
representing the local user on this connection.The returned object is not necessarily valid after the main loop is re-entered; ref it with
GObject.Object.ref
() if you want to keep it.New in version 0.13.9.
- get_self_handle()¶
- Returns:
the value of the
TelepathyGLib.Connection
:self-handle
property- Return type:
Return the
TelepathyGLib.HandleType.CONTACT
handle of the local user on this connection, or 0 if the self-handle is not known yet or the connection has become invalid (theTelepathyGLib.Proxy
::invalidated
signal).The returned handle is not necessarily valid forever (the notify::self-handle signal will be emitted if it changes, which can happen on protocols such as IRC). Construct a
TelepathyGLib.Contact
object if you want to track the local user’s identifier in the protocol, or other information like their presence status, over time.New in version 0.7.26.
Deprecated since version ???: Use
TelepathyGLib.Connection.get_self_contact
() instead.
- get_status()¶
- Returns:
This connection’s status, or
TelepathyGLib.UNKNOWN_CONNECTION_STATUS
if we don’t know yet.- reason:
- Return type:
(
TelepathyGLib.ConnectionStatus
, reason:TelepathyGLib.ConnectionStatusReason
)
If reason is not
None
it is set to the reason why “status” changed to its current value, orTelepathyGLib.ConnectionStatusReason.NONE_SPECIFIED
if unknown.New in version 0.7.14.
- has_immortal_handles()¶
-
Return
True
if this connection is known to not destroy handles (#TpHandle) until it disconnects.On such connections, if you know that a handle maps to a particular identifier now, then you can rely on that handle mapping to that identifier for the whole lifetime of the connection.
- hold_handles(timeout_ms, handle_type, handles, callback, user_data, weak_object)¶
- Parameters:
timeout_ms (
int
) – the timeout in milliseconds, or -1 to use the defaulthandle_type (
TelepathyGLib.HandleType
) – the handle typehandles ([
int
]) – an array of handlescallback (
TelepathyGLib.ConnectionHoldHandlesCb
) – called on success or failure (unless weak_object has become unreferenced)weak_object (
GObject.Object
) – if notNone
, an object to be weakly referenced: if it is destroyed, callback will not be called
Hold (ensure a reference to) the given handles, if they are valid.
If they are valid, the callback will later be called with the given handles; if not all of them are valid, the callback will be called with an error.
This function, along with
TelepathyGLib.Connection.unref_handles
(),TelepathyGLib.Connection.get_contact_attributes
() andTelepathyGLib.Contact
, keeps a client-side reference count of handles; you should not use the RequestHandles, HoldHandles and GetContactAttributes D-Bus methods directly as well as these functions.Deprecated since version ???: Holding handles is not needed with Connection Managers having immortal handles (any Connection Manager using telepathy-glib >= 0.13.8). Other Connection Managers are considered deprecated, clients wanting to still support them should continue using this deprecated function.
- parse_object_path()¶
-
If the object path of connection is in the correct form, set protocol and cm_name, return
True
. Otherwise leave them unchanged and returnFalse
.New in version 0.7.27.
Deprecated since version ???: Use
TelepathyGLib.Connection.get_protocol_name
() andTelepathyGLib.Connection.get_connection_manager_name
() instead.
- refresh_contact_info(contacts)¶
- Parameters:
contacts ([
TelepathyGLib.Contact
]) – An array ofTelepathyGLib.Contact
objects associated with self
Requests to refresh the
TelepathyGLib.Contact
:contact-info
property on each contact from contacts, requesting it from the network if an up-to-date version is not cached locally. “notify::contact-info” will be emitted when the contact’s information are updated.If
TelepathyGLib.ContactFeature.CONTACT_INFO
is not yet set on a contact, it will be set before its property gets updated.New in version 0.11.7.
- remove_contacts_async(contacts, callback, *user_data)¶
- Parameters:
contacts ([
TelepathyGLib.Contact
]) – An array ofTelepathyGLib.Contact
objects to removecallback (
Gio.AsyncReadyCallback
orNone
) – a callback to call when the operation finishes
Remove the given contacts from the contact list entirely. It is protocol-dependent whether this works, and under which circumstances.
For this to work properly self must have interface
TelepathyGLib.IFACE_CONNECTION_INTERFACE_CONTACT_LIST
.New in version 0.15.5.
- remove_contacts_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes
TelepathyGLib.Connection.remove_contacts_async
()New in version 0.15.5.
- remove_from_group_async(group, contacts, callback, *user_data)¶
- Parameters:
group (
str
) – the group to alter.contacts ([
TelepathyGLib.Contact
]) – An array ofTelepathyGLib.Contact
objects to remove from the group.callback (
Gio.AsyncReadyCallback
orNone
) – a callback to call when the operation finishes
Remove the given contacts from the given group. If there are no members left in the group afterwards, the group MAY itself be removed.
For this to work properly self must have interface
TelepathyGLib.IFACE_CONNECTION_INTERFACE_CONTACT_GROUPS
.New in version 0.15.5.
- remove_from_group_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes
TelepathyGLib.Connection.remove_from_group_async
()New in version 0.15.5.
- remove_group_async(group, callback, *user_data)¶
- Parameters:
group (
str
) – the group to remove.callback (
Gio.AsyncReadyCallback
orNone
) – a callback to call when the operation finishes
Remove all members from the given group, then remove the group itself.
For this to work properly self must have interface
TelepathyGLib.IFACE_CONNECTION_INTERFACE_CONTACT_GROUPS
.New in version 0.15.5.
- remove_group_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes
TelepathyGLib.Connection.remove_group_async
()New in version 0.15.5.
- rename_group_async(old_name, new_name, callback, *user_data)¶
- Parameters:
Rename the given old_name.
On protocols where groups behave like tags, this is an API short-cut for adding all of the group’s members to a group with the new name, then removing the old group.
For this to work properly self must have interface
TelepathyGLib.IFACE_CONNECTION_INTERFACE_CONTACT_GROUPS
.New in version 0.15.5.
- rename_group_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes
TelepathyGLib.Connection.rename_group_async
()New in version 0.15.5.
- request_handles(timeout_ms, handle_type, ids, callback, user_data, weak_object)¶
- Parameters:
timeout_ms (
int
) – the timeout in milliseconds, or -1 to use the defaulthandle_type (
TelepathyGLib.HandleType
) – the handle typeids ([
str
]) – an array of string identifiers for which handles are required, terminated byNone
(must not beNone
or empty)callback (
TelepathyGLib.ConnectionRequestHandlesCb
) – called on success or failure (unless weak_object has become unreferenced)weak_object (
GObject.Object
) – if notNone
, an object to be weakly referenced: if it is destroyed, callback will not be called
Request the handles corresponding to the given identifiers, and if they are valid, hold (ensure a reference to) the corresponding handles.
If they are valid, the callback will later be called with the given handles; if not all of them are valid, the callback will be called with an error.
Deprecated since version ???: If handle_type is
TelepathyGLib.HandleType.CONTACT
, useTelepathyGLib.Connection.dup_contact_by_id_async
() instead. For channel requests, useTelepathyGLib.AccountChannelRequest.set_target_id
() instead.
- request_subscription_async(contacts, message, callback, *user_data)¶
- Parameters:
contacts ([
TelepathyGLib.Contact
]) – An array ofTelepathyGLib.Contact
objects to whom requests are to be sent.message (
str
) – an optional plain-text message from the user, to send to those contacts with the subscription request.callback (
Gio.AsyncReadyCallback
orNone
) – a callback to call when the operation finishes
Request that the given contacts allow the local user to subscribe to their presence, i.e. that their
TelepathyGLib.Contact
:subscribe-state
property becomesTelepathyGLib.SubscriptionState.YES
.For this to work properly self must have interface
TelepathyGLib.IFACE_CONNECTION_INTERFACE_CONTACT_LIST
.New in version 0.15.5.
- request_subscription_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes
TelepathyGLib.Connection.request_subscription_async
()New in version 0.15.5.
- set_contact_info_async(info, callback, *user_data)¶
- Parameters:
info ([
TelepathyGLib.ContactInfoField
]) – aGLib.List
ofTelepathyGLib.ContactInfoField
callback (
Gio.AsyncReadyCallback
orNone
) – a callback to call when the request is satisfied
Requests an asynchronous set of the contact info of self. When the operation is finished, callback will be called. You can then call
TelepathyGLib.Connection.set_contact_info_finish
() to get the result of the operation.This method should not be expected to succeed if the result of
TelepathyGLib.Connection.get_contact_info_flags
() does not includeTelepathyGLib.ContactInfoFlags.CAN_SET
.New in version 0.11.7.
- set_contact_info_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes an async set of self info.
New in version 0.11.7.
- set_group_members_async(group, contacts, callback, *user_data)¶
- Parameters:
group (
str
) – the group to alter.contacts ([
TelepathyGLib.Contact
]) – An array ofTelepathyGLib.Contact
objects members for the group. If this set is empty, this method MAY remove the group.callback (
Gio.AsyncReadyCallback
orNone
) – a callback to call when the operation finishes
Add the given contacts to the given group (creating it if necessary), and remove all other members.
For this to work properly self must have interface
TelepathyGLib.IFACE_CONNECTION_INTERFACE_CONTACT_GROUPS
.New in version 0.15.5.
- set_group_members_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes
TelepathyGLib.Connection.set_group_members_async
()New in version 0.15.5.
- unblock_contacts_async(contacts, callback, *user_data)¶
- Parameters:
contacts ([
TelepathyGLib.Contact
]) – An array ofTelepathyGLib.Contact
objects to blockcallback (
Gio.AsyncReadyCallback
orNone
) – a callback to call when the operation finishes
Direct the server to unblock contacts.
New in version 0.17.0.
- unblock_contacts_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes
TelepathyGLib.Connection.unblock_contacts_async
()New in version 0.17.0.
- unpublish_async(contacts, callback, *user_data)¶
- Parameters:
contacts ([
TelepathyGLib.Contact
]) – An array ofTelepathyGLib.Contact
objects to removecallback (
Gio.AsyncReadyCallback
orNone
) – a callback to call when the operation finishes
Attempt to set the given contacts'
TelepathyGLib.Contact
:publish-state
property toTelepathyGLib.SubscriptionState.NO
, i.e. stop sending presence to them.For this to work properly self must have interface
TelepathyGLib.IFACE_CONNECTION_INTERFACE_CONTACT_LIST
.New in version 0.15.5.
- unpublish_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes
TelepathyGLib.Connection.unpublish_async
()New in version 0.15.5.
- unref_handles(handle_type, handles)¶
- Parameters:
handle_type (
TelepathyGLib.HandleType
) – a handle typehandles ([
int
]) – an array of n_handles handles
Do nothing. In versions of telepathy-glib prior to 0.13.8, this released a reference to the handles in handles.
Deprecated since version ???: This is no-op so can be safely removed.
- unsubscribe_async(contacts, callback, *user_data)¶
- Parameters:
contacts ([
TelepathyGLib.Contact
]) – An array ofTelepathyGLib.Contact
objects to removecallback (
Gio.AsyncReadyCallback
orNone
) – a callback to call when the operation finishes
Attempt to set the given contacts'
TelepathyGLib.Contact
:subscribe-state
property toTelepathyGLib.SubscriptionState.NO
, i.e. stop receiving their presence.For this to work properly self must have interface
TelepathyGLib.IFACE_CONNECTION_INTERFACE_CONTACT_LIST
.New in version 0.15.5.
- unsubscribe_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes
TelepathyGLib.Connection.unsubscribe_async
()New in version 0.15.5.
- upgrade_contacts(contacts, features, callback, user_data, weak_object)¶
- Parameters:
contacts ([
TelepathyGLib.Contact
]) – An array ofTelepathyGLib.Contact
objects associated with selffeatures ([
TelepathyGLib.ContactFeature
]) – An array of features that must be ready for use (if supported) before the callback is calledcallback (
TelepathyGLib.ConnectionUpgradeContactsCb
) – A user callback to call when the contacts are readyweak_object (
GObject.Object
orNone
) – An object to pass to the callback, which will be weakly referenced; if this object is destroyed, the operation will be cancelled
Given several
TelepathyGLib.Contact
objects, make asynchronous method calls ensure that all the features specified in features are ready for use (if they are supported at all).It is not an error to put features in features even if the connection manager doesn’t support them - users of this method should have a static list of features they would like to use if possible, and use it for all connection managers.
New in version 0.7.18.
Deprecated since version ???: Use
TelepathyGLib.Connection.upgrade_contacts_async
() instead.
- upgrade_contacts_async(contacts, features, callback, *user_data)¶
- Parameters:
contacts ([
TelepathyGLib.Contact
]) – An array ofTelepathyGLib.Contact
objects associated with selffeatures ([
TelepathyGLib.ContactFeature
]) – An array of features that must be ready for use (if supported) before the callback is calledcallback (
Gio.AsyncReadyCallback
orNone
) – A user callback to call when the contacts are ready
Given several
TelepathyGLib.Contact
objects, make asynchronous method calls ensure that all the features specified in features are ready for use (if they are supported at all).It is not an error to put features in features even if the connection manager doesn’t support them - users of this method should have a static list of features they would like to use if possible, and use it for all connection managers.
New in version 0.19.0.
- upgrade_contacts_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
True
on success,False
otherwise.- contacts:
a location to set a
GLib.PtrArray
of upgradedTelepathyGLib.Contact
, orNone
.
- Return type:
(
bool
, contacts: [TelepathyGLib.Contact
])
Finishes
TelepathyGLib.Connection.upgrade_contacts_async
().New in version 0.19.0.
Signal Details¶
- TelepathyGLib.Connection.signals.balance_changed(connection, balance, balance_scale, balance_currency)¶
- Signal Name:
balance-changed
- Flags:
- Parameters:
connection (
TelepathyGLib.Connection
) – The object which received the signalbalance (
int
) – the value of theTelepathyGLib.Connection
:balance
propertybalance_scale (
int
) – the value of theTelepathyGLib.Connection
:balance-scale
propertybalance_currency (
str
) – the value of theTelepathyGLib.Connection
:balance-currency
property
Emitted when at least one of the
TelepathyGLib.Connection
:balance
,TelepathyGLib.Connection
:balance-scale
orTelepathyGLib.Connection
:balance-currency
property is changed.For this signal to be emitted, you must first call
TelepathyGLib.Proxy.prepare_async
() with the feature %TP_CONNECTION_FEATURE_BALANCE.New in version 0.15.1.
- TelepathyGLib.Connection.signals.blocked_contacts_changed(connection, added, removed)¶
- Signal Name:
blocked-contacts-changed
- Flags:
- Parameters:
connection (
TelepathyGLib.Connection
) – The object which received the signaladded ([
TelepathyGLib.Contact
]) – aGLib.PtrArray
ofTelepathyGLib.Contact
which have been blockedremoved ([
TelepathyGLib.Contact
]) – aGLib.PtrArray
ofTelepathyGLib.Contact
which are no longer blocked
Notify of changes in
TelepathyGLib.Connection
:blocked-contacts
. It is guaranteed that all contacts have desired features prepared. SeeTelepathyGLib.SimpleClientFactory.add_contact_features
() to define which features needs to be prepared.This signal is also emitted for the initial set of blocked contacts once retrieved.
For this signal to be emitted, you must first call
TelepathyGLib.Proxy.prepare_async
() with the feature %TP_CONNECTION_FEATURE_CONTACT_BLOCKING.New in version 0.17.0.
- TelepathyGLib.Connection.signals.contact_list_changed(connection, added, removed)¶
- Signal Name:
contact-list-changed
- Flags:
- Parameters:
connection (
TelepathyGLib.Connection
) – The object which received the signaladded ([
TelepathyGLib.Contact
]) – aGLib.PtrArray
ofTelepathyGLib.Contact
added to contacts listremoved ([
TelepathyGLib.Contact
]) – aGLib.PtrArray
ofTelepathyGLib.Contact
removed from contacts list
Notify of changes in the list of contacts as returned by
TelepathyGLib.Connection.dup_contact_list
(). It is guaranteed that all contacts have desired features prepared. SeeTelepathyGLib.SimpleClientFactory.add_contact_features
() to define which features needs to be prepared.This signal is also emitted for the initial set of contacts once retrieved.
For this signal to be emitted, you must first call
TelepathyGLib.Proxy.prepare_async
() with the feature %TP_CONNECTION_FEATURE_CONTACT_LIST.New in version 0.15.5.
- TelepathyGLib.Connection.signals.group_renamed(connection, old_name, new_name)¶
- Signal Name:
group-renamed
- Flags:
- Parameters:
connection (
TelepathyGLib.Connection
) – The object which received the signalold_name (
str
) – the old name of the group.new_name (
str
) – the new name of the group.
Emitted when a group is renamed, in protocols where this can be distinguished from group creation, removal and membership changes.
Immediately after this signal is emitted,
TelepathyGLib.Connection
::groups-created
signal the creation of a group with the new name, andTelepathyGLib.Connection
::groups-removed
signal the removal of a group with the old name. If the group was not empty, immediately after those signals are emitted,TelepathyGLib.Contact
::contact-groups-changed
signal that the members of that group were removed from the old name and added to the new name.When this signal is emitted,
TelepathyGLib.Connection
:contact-groups
property is already updated.For this signal to be emited, you must first call
TelepathyGLib.Proxy.prepare_async
() with the feature %TP_CONNECTION_FEATURE_CONTACT_GROUPS.New in version 0.15.5.
- TelepathyGLib.Connection.signals.groups_created(connection, added)¶
- Signal Name:
groups-created
- Flags:
- Parameters:
connection (
TelepathyGLib.Connection
) – The object which received the signaladded ([
str
]) – a #GStrv with the names of the new groups.
Emitted when new, empty groups are created. This will often be followed by
TelepathyGLib.Contact
::contact-groups-changed
signals that add some members. When this signal is emitted,TelepathyGLib.Connection
:contact-groups
property is already updated.For this signal to be emited, you must first call
TelepathyGLib.Proxy.prepare_async
() with the feature %TP_CONNECTION_FEATURE_CONTACT_GROUPS.New in version 0.15.5.
- TelepathyGLib.Connection.signals.groups_removed(connection, added)¶
- Signal Name:
groups-removed
- Flags:
- Parameters:
connection (
TelepathyGLib.Connection
) – The object which received the signaladded ([
str
]) – A #GStrv with the names of the groups.
Emitted when one or more groups are removed. If they had members at the time that they were removed, then immediately after this signal is emitted,
TelepathyGLib.Contact
::contact-groups-changed
signals that their members were removed. When this signal is emitted,TelepathyGLib.Connection
:contact-groups
property is already updated.For this signal to be emited, you must first call
TelepathyGLib.Proxy.prepare_async
() with the feature %TP_CONNECTION_FEATURE_CONTACT_GROUPS.New in version 0.15.5.
Property Details¶
- TelepathyGLib.Connection.props.balance¶
-
The Amount field of the Balance.AccountBalance property.
For this property to be valid, you must first call
TelepathyGLib.Proxy.prepare_async
() with the feature %TP_CONNECTION_FEATURE_BALANCE.See Also:
TelepathyGLib.Connection.get_balance
()
- TelepathyGLib.Connection.props.balance_currency¶
-
The Currency field of the Balance.AccountBalance property.
For this property to be valid, you must first call
TelepathyGLib.Proxy.prepare_async
() with the feature %TP_CONNECTION_FEATURE_BALANCE.See Also:
TelepathyGLib.Connection.get_balance
()
- TelepathyGLib.Connection.props.balance_scale¶
-
The Scale field of the Balance.AccountBalance property.
For this property to be valid, you must first call
TelepathyGLib.Proxy.prepare_async
() with the feature %TP_CONNECTION_FEATURE_BALANCE.See Also:
TelepathyGLib.Connection.get_balance
()
- TelepathyGLib.Connection.props.balance_uri¶
-
The Balance.ManageCreditURI property.
For this property to be valid, you must first call
TelepathyGLib.Proxy.prepare_async
() with the feature %TP_CONNECTION_FEATURE_BALANCE.
- TelepathyGLib.Connection.props.blocked_contacts¶
- Name:
blocked-contacts
- Type:
- Default Value:
- Flags:
A
GLib.PtrArray
of blockedTelepathyGLib.Contact
. Changes are notified using theTelepathyGLib.Connection
::blocked-contacts-changed
signal.These
TelepathyGLib.Contact
objects have been prepared with the desired features. SeeTelepathyGLib.SimpleClientFactory.add_contact_features
() to define which features needs to be prepared on them.For this property to be valid, you must first call
TelepathyGLib.Proxy.prepare_async
() with the feature %TP_CONNECTION_FEATURE_CONTACT_BLOCKING.New in version 0.17.0.
- TelepathyGLib.Connection.props.can_change_contact_list¶
-
If true, presence subscription and publication can be changed using the RequestSubscription, AuthorizePublication and RemoveContacts methods.
Rational: link-local XMPP, presence is implicitly published to everyone in the local subnet, so the user cannot control their presence publication.
For this property to be valid, you must first call
TelepathyGLib.Proxy.prepare_async
() with the feature %TP_CONNECTION_FEATURE_CONTACT_LIST_PROPERTIES or %TP_CONNECTION_FEATURE_CONTACT_LIST.New in version 0.15.5.
- TelepathyGLib.Connection.props.can_report_abusive¶
-
If this property is
True
, contacts may be reported as abusive to the server administrators by setting report_abusive toTrue
when callingTelepathyGLib.Connection.block_contacts_async
().For this property to be valid, you must first call
TelepathyGLib.Proxy.prepare_async
() with the feature %TP_CONNECTION_FEATURE_CONTACT_BLOCKING.New in version 0.17.0.
- TelepathyGLib.Connection.props.capabilities¶
- Name:
capabilities
- Type:
- Default Value:
- Flags:
The
TelepathyGLib.Capabilities
object representing the capabilities of this connection, orNone
if we don’t know yet.To wait for valid capability information, call
TelepathyGLib.Proxy.prepare_async
() with the feature %TP_CONNECTION_FEATURE_CAPABILITIES.
- TelepathyGLib.Connection.props.cm_name¶
-
This connection’s connection manager name.
New in version 0.19.3.
- TelepathyGLib.Connection.props.connection_manager_name¶
-
This connection’s connection manager name.
New in version 0.13.16.
Deprecated since version ???: Use
TelepathyGLib.Connection
:cm-name
instead.
- TelepathyGLib.Connection.props.connection_ready¶
- Name:
connection-ready
- Type:
- Default Value:
- Flags:
Initially
False
; changes toTrue
when the connection has gone to CONNECTED status, introspection has finished and it’s ready for use.By the time this property becomes
True
, any extra interfaces will have been set up and theTelepathyGLib.Proxy
:interfaces
property will have been populated.This is similar to %TP_CONNECTION_FEATURE_CONNECTED, except that once it has changed to
True
, it remainsTrue
even if the connection has been invalidated.Deprecated since version 0.17.6: use
TelepathyGLib.Proxy.is_prepared
() with %TP_CHANNEL_FEATURE_CONNECTED for checks, orTelepathyGLib.Proxy.prepare_async
() for notification
- TelepathyGLib.Connection.props.contact_groups¶
-
The names of all groups that currently exist. This may be a larger set than the union of all
TelepathyGLib.Contact
:contact-groups
properties, if the connection allows groups to be empty.This property’s value is not meaningful until the
TelepathyGLib.Connection
:contact-list-state
property has becomeTelepathyGLib.ContactListState.SUCCESS
.For this property to be valid, you must first call
TelepathyGLib.Proxy.prepare_async
() with the feature %TP_CONNECTION_FEATURE_CONTACT_GROUPS.New in version 0.15.5.
- TelepathyGLib.Connection.props.contact_list_persists¶
-
If true, presence subscriptions (in both directions) on this connection are stored by the server or other infrastructure.
If false, presence subscriptions on this connection are not stored.
For this property to be valid, you must first call
TelepathyGLib.Proxy.prepare_async
() with the feature %TP_CONNECTION_FEATURE_CONTACT_LIST_PROPERTIES or %TP_CONNECTION_FEATURE_CONTACT_LIST.New in version 0.15.5.
- TelepathyGLib.Connection.props.contact_list_state¶
-
The progress made in retrieving the contact list.
For this property to be valid, you must first call
TelepathyGLib.Proxy.prepare_async
() with the feature %TP_CONNECTION_FEATURE_CONTACT_LIST_PROPERTIES or %TP_CONNECTION_FEATURE_CONTACT_LIST.New in version 0.15.5.
- TelepathyGLib.Connection.props.disjoint_groups¶
-
True if each contact can be in at most one group; false if each contact can be in many groups.
This property cannot change after the connection has moved to the
TelepathyGLib.ConnectionStatus.CONNECTED
state. Until then, its value is undefined, and it may change at any time, without notification.For this property to be valid, you must first call
TelepathyGLib.Proxy.prepare_async
() with the feature %TP_CONNECTION_FEATURE_CONTACT_GROUPS.New in version 0.15.5.
- TelepathyGLib.Connection.props.group_storage¶
-
Indicates the extent to which contacts’ groups can be set and stored.
This property cannot change after the connection has moved to the
TelepathyGLib.ConnectionStatus.CONNECTED
state. Until then, its value is undefined, and it may change at any time, without notification.For this property to be valid, you must first call
TelepathyGLib.Proxy.prepare_async
() with the feature %TP_CONNECTION_FEATURE_CONTACT_GROUPS.New in version 0.15.5.
- TelepathyGLib.Connection.props.protocol_name¶
-
The connection’s machine-readable protocol name, such as “jabber”, “msn” or “local-xmpp”. Recommended names for most protocols can be found in the Telepathy D-Bus Interface Specification.
New in version 0.13.16.
- TelepathyGLib.Connection.props.request_uses_message¶
-
If true, the Message parameter to RequestSubscription is likely to be significant, and user interfaces SHOULD prompt the user for a message to send with the request; a message such as “I would like to add you to my contact list”, translated into the local user’s language, might make a suitable default.
For this property to be valid, you must first call
TelepathyGLib.Proxy.prepare_async
() with the feature %TP_CONNECTION_FEATURE_CONTACT_LIST_PROPERTIES or %TP_CONNECTION_FEATURE_CONTACT_LIST.New in version 0.15.5.
- TelepathyGLib.Connection.props.self_contact¶
- Name:
self-contact
- Type:
- Default Value:
- Flags:
A
TelepathyGLib.Contact
representing the local user on this connection, orNone
if not yet available.If the local user’s unique identifier changes (for instance by using /nick on IRC), this property will change to a different
TelepathyGLib.Contact
object representing the new identifier, andGObject.Object
::notify
will be emitted.The
TelepathyGLib.Contact
object is guaranteed to have all of the features previously passed toTelepathyGLib.SimpleClientFactory.add_contact_features
() prepared.To wait for a non-
None
self-contact (and other properties), callTelepathyGLib.Proxy.prepare_async
() with the feature %TP_CONNECTION_FEATURE_CONNECTED.New in version 0.13.9.
- TelepathyGLib.Connection.props.self_handle¶
-
The
TelepathyGLib.HandleType.CONTACT
handle of the local user on this connection, or 0 if we don’t know yet or if the connection has become invalid.This may change if the local user’s unique identifier changes (for instance by using /nick on IRC), in which case
GObject.Object
::notify
will be emitted.To wait for a valid self-handle (and other properties), call
TelepathyGLib.Proxy.prepare_async
() with the feature %TP_CONNECTION_FEATURE_CONNECTED.Deprecated since version ???: Use
TelepathyGLib.Connection
:self-contact
instead.
- TelepathyGLib.Connection.props.status¶
-
This connection’s status, or
TelepathyGLib.UNKNOWN_CONNECTION_STATUS
if we don’t know yet.To wait for a valid status (and other properties), call
TelepathyGLib.Proxy.prepare_async
() with the feature %TP_CONNECTION_FEATURE_CORE.Since version 0.11.3, the change to status
TelepathyGLib.ConnectionStatus.CONNECTED
is delayed slightly, until introspection of the connection has finished.
- TelepathyGLib.Connection.props.status_reason¶
-
To wait for a valid status (and other properties), call
TelepathyGLib.Proxy.prepare_async
() with the feature %TP_CONNECTION_FEATURE_CORE.The reason why
TelepathyGLib.Connection
:status
changed to its current value, orTelepathyGLib.ConnectionStatusReason.NONE_SPECIFIED
if unknown. know yet.