TelepathyGLib.Contact

g GObject.Object GObject.Object TelepathyGLib.Contact TelepathyGLib.Contact GObject.Object->TelepathyGLib.Contact

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

add_to_group_async (group, callback, *user_data)

add_to_group_finish (result)

authorize_publication_async (callback, *user_data)

authorize_publication_finish (result)

block_async (report_abusive, callback, *user_data)

block_finish (result)

dup_contact_info ()

dup_location ()

get_account ()

get_alias ()

get_avatar_file ()

get_avatar_mime_type ()

get_avatar_token ()

get_capabilities ()

get_client_types ()

get_connection ()

get_contact_groups ()

get_contact_info ()

get_handle ()

get_identifier ()

get_location ()

get_presence_message ()

get_presence_status ()

get_presence_type ()

get_publish_request ()

get_publish_state ()

get_subscribe_state ()

has_feature (feature)

is_blocked ()

remove_async (callback, *user_data)

remove_finish (result)

remove_from_group_async (group, callback, *user_data)

remove_from_group_finish (result)

request_contact_info_async (cancellable, callback, *user_data)

request_contact_info_finish (result)

request_subscription_async (message, callback, *user_data)

request_subscription_finish (result)

set_contact_groups_async (groups, callback, *user_data)

set_contact_groups_finish (result)

unblock_async (callback, *user_data)

unblock_finish (result)

unpublish_async (callback, *user_data)

unpublish_finish (result)

unsubscribe_async (callback, *user_data)

unsubscribe_finish (result)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

alias

str

r

The contact’s alias (display name)

avatar-file

Gio.File

r

File to the latest cached avatar image, or None

avatar-mime-type

str

r

MIME type of the latest cached avatar image, or None

avatar-token

str

r

Opaque string representing the contact’s avatar, or “”, or None

capabilities

TelepathyGLib.Capabilities

r

Capabilities of the contact, or None

client-types

[str]

r

Client types of the contact, or None

connection

TelepathyGLib.Connection

r

Connection object that owns this channel

contact-groups

[str]

r

Groups of the contact

contact-info

r

Information of the contact, or None

handle

int

r

The TelepathyGLib.HandleType.CONTACT handle for this contact

identifier

str

r

The contact’s identifier in the instant messaging protocol (e.g. XMPP JID, SIP URI, AOL screenname or IRC nick)

is-blocked

bool

r

True if contact is blocked

location-vardict

GLib.Variant

r

User-defined location, or None

presence-message

str

r

User-defined status message, or an empty string

presence-status

str

r

Possibly connection-manager-specific string representing the contact’s presence status

presence-type

int

r

The TelepathyGLib.ConnectionPresenceType for this contact

publish-request

str

r

Publish request message of the contact

publish-state

int

r

Publish state of the contact

subscribe-state

int

r

Subscribe state of the contact

Signals

Inherited:

GObject.Object (1)

Name

Short Description

contact-groups-changed

Emitted when this contact’s groups changes.

presence-changed

Emitted when this contact’s presence changes.

subscription-states-changed

Emitted when this contact’s subscription states changes.

Fields

Inherited:

GObject.Object (1)

Class Details

class TelepathyGLib.Contact(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

TelepathyGLib.ContactClass

An object representing a contact on a TelepathyGLib.Connection.

Contact objects support tracking a number of attributes of contacts, as described by the TelepathyGLib.ContactFeature flags. Features can be specified when instantiating contact objects (with TelepathyGLib.Connection.get_contacts_by_id() or TelepathyGLib.Connection.get_contacts_by_handle()), or added to an existing contact object with TelepathyGLib.Connection.upgrade_contacts(). For example, a client wishing to keep track of a contact’s alias would set TelepathyGLib.ContactFeature.ALIAS, and then listen for the “notify::alias” signal, emitted whenever the TelepathyGLib.Contact :alias property changes.

Note that releasing a TelepathyGLib.Contact object might release handle references held by calling tp_cli_connection_call_request_handles(), tp_cli_connection_run_request_handles(), tp_cli_connection_call_hold_handles(), tp_cli_connection_run_hold_handles(), tp_cli_connection_interface_contacts_call_get_contact_attributes() or tp_cli_connection_interface_contacts_run_get_contact_attributes() directly. Those functions should be avoided in favour of using TelepathyGLib.Contact, TelepathyGLib.Connection.hold_handles(), TelepathyGLib.Connection.request_handles() and TelepathyGLib.Connection.get_contact_attributes().

New in version 0.7.18.

add_to_group_async(group, callback, *user_data)
Parameters:

Convenience wrapper for TelepathyGLib.Connection.add_to_group_async() on a single contact.

New in version 0.15.5.

add_to_group_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if the operation was successful, otherwise False.

Return type:

bool

Finishes TelepathyGLib.Contact.add_to_group_async()

New in version 0.15.5.

authorize_publication_async(callback, *user_data)
Parameters:

Convenience wrapper for TelepathyGLib.Connection.authorize_publication_async() on a single contact.

New in version 0.15.5.

authorize_publication_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if the operation was successful, otherwise False.

Return type:

bool

Finishes TelepathyGLib.Contact.authorize_publication_async()

New in version 0.15.5.

block_async(report_abusive, callback, *user_data)
Parameters:

Block communications with a contact, optionally reporting the contact as abusive to the server administrators. To block more than one contact at once, see TelepathyGLib.Connection.block_contacts_async().

New in version 0.17.0.

block_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if the operation was successful, otherwise False.

Return type:

bool

Finishes TelepathyGLib.Contact.block_async()

New in version 0.17.0.

dup_contact_info()
Returns:

a GLib.List of TelepathyGLib.ContactInfoField, or None if the feature is not yet prepared.

Return type:

[TelepathyGLib.ContactInfoField]

Returns a newly allocated GLib.List of contact’s vCard fields. The list must be freed with tp_contact_info_list_free() after used.

Same as the TelepathyGLib.Contact :contact-info property.

New in version 0.19.9.

dup_location()
Returns:

a variant of type %G_VARIANT_TYPE_VARDICT, the same as the TelepathyGLib.Contact :location-vardict property

Return type:

GLib.Variant

Return the contact’s user-defined location, or None if the location is unspecified.

This function returns the same information as TelepathyGLib.Contact.get_location(), but in a different format.

New in version 0.19.10.

get_account()
Returns:

a borrowed reference to self's account (it must be referenced with GObject.Object.ref if it must remain valid longer than the contact)

Return type:

TelepathyGLib.Account

Return the TelepathyGLib.Account of self's TelepathyGLib.Contact :connection. See TelepathyGLib.Connection.get_account() for details.

New in version 0.19.0.

get_alias()
Returns:

the same non-None alias as the TelepathyGLib.Contact :alias

Return type:

str

Return the contact’s alias. This remains valid until the main loop is re-entered; if the caller requires a string that will persist for longer than that, it must be copied with GLib.strdup().

New in version 0.7.18.

get_avatar_file()
Returns:

the same Gio.File as the TelepathyGLib.Contact :avatar-file property (possibly None)

Return type:

Gio.File

Return the contact’s avatar file. This remains valid until the main loop is re-entered; if the caller requires a Gio.File that will persist for longer than that, it must be reffed with GObject.Object.ref().

New in version 0.11.6.

get_avatar_mime_type()
Returns:

the same MIME type as the TelepathyGLib.Contact :avatar-mime-type property (possibly None)

Return type:

str

Return the contact’s avatar MIME type. This remains valid until the main loop is re-entered; if the caller requires a string that will persist for longer than that, it must be copied with GLib.strdup().

New in version 0.11.6.

get_avatar_token()
Returns:

the same token as the TelepathyGLib.Contact :avatar-token property (possibly None)

Return type:

str

Return the contact’s avatar token. This remains valid until the main loop is re-entered; if the caller requires a string that will persist for longer than that, it must be copied with GLib.strdup().

New in version 0.7.18.

get_capabilities()
Returns:

the same TelepathyGLib.Capabilities (or None) as the TelepathyGLib.Contact :capabilities property

Return type:

TelepathyGLib.Capabilities

New in version 0.11.3.

get_client_types()
Returns:

the same #GStrv as the TelepathyGLib.Contact :client-types property

Return type:

[str]

Return the contact’s client types or None if the client types are unspecified.

New in version 0.13.1.

get_connection()
Returns:

a borrowed reference to the TelepathyGLib.Contact :connection (it must be referenced with GObject.Object.ref if it must remain valid longer than the contact)

Return type:

TelepathyGLib.Connection

nothing more to say

New in version 0.7.18.

get_contact_groups()
Returns:

the same #GStrv as the TelepathyGLib.Contact :contact-groups property

Return type:

[str]

Return names of groups of which a contact is a member. It is incorrect to call this method before TelepathyGLib.ContactFeature.CONTACT_GROUPS has been prepared. This remains valid until the main loop is re-entered; if the caller requires a #GStrv that will persist for longer than that, it must be copied with GLib.strdupv().

New in version 0.13.14.

get_contact_info()
Returns:

a GLib.List of TelepathyGLib.ContactInfoField, or None if the feature is not yet prepared.

Return type:

[TelepathyGLib.ContactInfoField]

Returns a newly allocated GLib.List of contact’s vCard fields. The list must be freed with g_list_free() after used.

Note that the TelepathyGLib.ContactInfoField s in the returned GLib.List are not dupped before returning from this function. One could copy every item in the list using tp_contact_info_field_copy().

Same as the TelepathyGLib.Contact :contact-info property.

New in version 0.11.7.

Deprecated since version 0.19.9: New code should use TelepathyGLib.Contact.dup_contact_info() instead.

get_handle()
Returns:

the same handle as the TelepathyGLib.Contact :handle property

Return type:

int

Return the contact’s handle, which is of type TelepathyGLib.HandleType.CONTACT, or 0 if the TelepathyGLib.Contact :connection has become invalid.

This handle is referenced using the Telepathy D-Bus API and remains referenced for as long as self exists and the TelepathyGLib.Contact :connection remains valid.

However, the caller of this function does not gain an additional reference to the handle.

New in version 0.7.18.

get_identifier()
Returns:

the same non-None identifier as the TelepathyGLib.Contact :identifier property

Return type:

str

Return the contact’s identifier. This remains valid for as long as self exists; if the caller requires a string that will persist for longer than that, it must be copied with GLib.strdup().

New in version 0.7.18.

get_location()
Returns:

the same GLib.HashTable (or None) as the TelepathyGLib.Contact :location property

Return type:

{str: GObject.Value}

Return the contact’s user-defined location or None if the location is unspecified. This remains valid until the main loop is re-entered; if the caller requires a hash table that will persist for longer than that, it must be reffed with GLib.HashTable.ref().

New in version 0.11.1.

get_presence_message()
Returns:

the same non-None message as the TelepathyGLib.Contact :presence-message property

Return type:

str

Return the contact’s user-defined status message, or an empty string. This remains valid until the main loop is re-entered; if the caller requires a string that will persist for longer than that, it must be copied with GLib.strdup().

New in version 0.7.18.

get_presence_status()
Returns:

the same non-None status name as the TelepathyGLib.Contact :presence-status property

Return type:

str

Return the name of the contact’s presence status, or an empty string. This remains valid until the main loop is re-entered; if the caller requires a string that will persist for longer than that, it must be copied with GLib.strdup().

New in version 0.7.18.

get_presence_type()
Returns:

the same presence type as the TelepathyGLib.Contact :presence-type property

Return type:

TelepathyGLib.ConnectionPresenceType

If this object has been set up to track TelepathyGLib.ContactFeature.PRESENCE and the underlying connection supports either the Presence or SimplePresence interfaces, return the type of the contact’s presence.

Otherwise, return TelepathyGLib.ConnectionPresenceType.UNSET.

New in version 0.7.18.

get_publish_request()
Returns:

the value of TelepathyGLib.Contact :publish-request.

Return type:

str

If TelepathyGLib.Contact :publish-state is set to TelepathyGLib.SubscriptionState.ASK, return the message that this remote contact sent when they requested permission to see the local user’s presence, an empty string (“”) otherwise. This remains valid until the main loop is re-entered; if the caller requires a string that will persist for longer than that, it must be copied with GLib.strdup().

This is set to None until TelepathyGLib.ContactFeature.SUBSCRIPTION_STATES has been prepared, and it is guaranteed to be non-None afterward.

New in version 0.13.12.

get_publish_state()
Returns:

the value of TelepathyGLib.Contact :publish-state.

Return type:

TelepathyGLib.SubscriptionState

Return the state of this remote contact’s subscription to the local user’s presence.

This is set to TelepathyGLib.SubscriptionState.UNKNOWN until TelepathyGLib.ContactFeature.SUBSCRIPTION_STATES has been prepared

New in version 0.13.12.

get_subscribe_state()
Returns:

the value of TelepathyGLib.Contact :subscribe-state.

Return type:

TelepathyGLib.SubscriptionState

Return the state of the local user’s subscription to this remote contact’s presence.

This is set to TelepathyGLib.SubscriptionState.UNKNOWN until TelepathyGLib.ContactFeature.SUBSCRIPTION_STATES has been prepared

New in version 0.13.12.

has_feature(feature)
Parameters:

feature (TelepathyGLib.ContactFeature) – a desired feature

Returns:

True if self has been set up to track the feature feature

Return type:

bool

New in version 0.7.18.

is_blocked()
Returns:

the value of TelepathyGLib.Contact :is-blocked.

Return type:

bool

New in version 0.17.0.

remove_async(callback, *user_data)
Parameters:

Convenience wrapper for TelepathyGLib.Connection.remove_contacts_async() on a single contact.

New in version 0.15.5.

remove_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if the operation was successful, otherwise False.

Return type:

bool

Finishes TelepathyGLib.Contact.remove_async()

New in version 0.15.5.

remove_from_group_async(group, callback, *user_data)
Parameters:

Convenience wrapper for TelepathyGLib.Connection.remove_from_group_async() on a single contact.

New in version 0.15.5.

remove_from_group_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if the operation was successful, otherwise False.

Return type:

bool

Finishes TelepathyGLib.Contact.remove_from_group_async()

New in version 0.15.5.

request_contact_info_async(cancellable, callback, *user_data)
Parameters:

Requests an asynchronous request of the contact info of self. When the operation is finished, callback will be called. You can then call TelepathyGLib.Contact.request_contact_info_finish() to get the result of the operation.

If the operation is successful, the TelepathyGLib.Contact :contact-info property will be updated (emitting “notify::contact-info” signal) before callback is called. That means you can call TelepathyGLib.Contact.get_contact_info() to get the new vCard inside callback.

Note that requesting the vCard from the network can take significant time, so a bigger timeout is set on the underlying D-Bus call. cancellable can be cancelled to free resources used in the D-Bus call if the caller is no longer interested in the vCard.

If TelepathyGLib.ContactFeature.CONTACT_INFO is not yet set on self, it will be set before its property gets updated and callback is called.

New in version 0.11.7.

request_contact_info_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if the request call was successful, otherwise False

Return type:

bool

Finishes an async request of self info. If the operation was successful, the contact’s vCard can be accessed using TelepathyGLib.Contact.get_contact_info().

New in version 0.11.7.

request_subscription_async(message, callback, *user_data)
Parameters:

Convenience wrapper for TelepathyGLib.Connection.request_subscription_async() on a single contact.

New in version 0.15.5.

request_subscription_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if the operation was successful, otherwise False.

Return type:

bool

Finishes TelepathyGLib.Contact.request_subscription_async()

New in version 0.15.5.

set_contact_groups_async(groups, callback, *user_data)
Parameters:
  • groups ([str] or None) – the set of groups which the contact should be in (may be None if n_groups is 0)

  • callback (Gio.AsyncReadyCallback or None) – a callback to call when the request is satisfied

  • user_data (object or None) – data to pass to callback

Add self to the given groups (creating new groups if necessary), and remove it from all other groups. If the user is removed from a group of which they were the only member, the group MAY be removed automatically. You can then call TelepathyGLib.Contact.set_contact_groups_finish() to get the result of the operation.

If the operation is successful and TelepathyGLib.ContactFeature.CONTACT_GROUPS is prepared, the TelepathyGLib.Contact :contact-groups property will be updated (emitting “notify::contact-groups” signal) and TelepathyGLib.Contact ::contact-groups-changed signal will be emitted before callback is called. That means you can call TelepathyGLib.Contact.get_contact_groups() to get the new contact groups inside callback.

New in version 0.13.14.

set_contact_groups_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if the request call was successful, otherwise False

Return type:

bool

Finishes an async set of self contact groups.

New in version 0.13.14.

unblock_async(callback, *user_data)
Parameters:

Unblock communications with a contact. To unblock more than one contact at once, see TelepathyGLib.Connection.unblock_contacts_async().

New in version 0.17.0.

unblock_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if the operation was successful, otherwise False.

Return type:

bool

Finishes TelepathyGLib.Contact.unblock_async()

New in version 0.17.0.

unpublish_async(callback, *user_data)
Parameters:

Convenience wrapper for TelepathyGLib.Connection.unpublish_async() on a single contact.

New in version 0.15.5.

unpublish_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if the operation was successful, otherwise False.

Return type:

bool

Finishes TelepathyGLib.Contact.unpublish_async()

New in version 0.15.5.

unsubscribe_async(callback, *user_data)
Parameters:

Convenience wrapper for TelepathyGLib.Connection.unsubscribe_async() on a single contact.

New in version 0.15.5.

unsubscribe_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if the operation was successful, otherwise False.

Return type:

bool

Finishes TelepathyGLib.Contact.unsubscribe_async()

New in version 0.15.5.

Signal Details

TelepathyGLib.Contact.signals.contact_groups_changed(contact, added, removed)
Signal Name:

contact-groups-changed

Flags:

RUN_LAST

Parameters:
  • contact (TelepathyGLib.Contact) – The object which received the signal

  • added ([str]) – A #GStrv with added contact groups

  • removed ([str]) – A #GStrv with removed contact groups

Emitted when this contact’s groups changes. When this signal is emitted, TelepathyGLib.Contact :contact-groups property is already updated.

New in version 0.13.14.

TelepathyGLib.Contact.signals.presence_changed(contact, type, status, message)
Signal Name:

presence-changed

Flags:

RUN_LAST

Parameters:

Emitted when this contact’s presence changes.

New in version 0.11.7.

TelepathyGLib.Contact.signals.subscription_states_changed(contact, subscribe, publish, publish_request)
Signal Name:

subscription-states-changed

Flags:

RUN_LAST

Parameters:

Emitted when this contact’s subscription states changes.

New in version 0.13.12.

Property Details

TelepathyGLib.Contact.props.alias
Name:

alias

Type:

str

Default Value:

None

Flags:

READABLE

The contact’s alias if available, falling back to their TelepathyGLib.Contact :identifier if no alias is available or if the TelepathyGLib.Contact has not been set up to track TelepathyGLib.ContactFeature.ALIAS.

This alias may have been supplied by the contact themselves, or by the local user, so it does not necessarily unambiguously identify the contact. However, it is suitable for use as a main “display name” for the contact.

This is never None for contact objects that are visible to library-user code.

TelepathyGLib.Contact.props.avatar_file
Name:

avatar-file

Type:

Gio.File

Default Value:

None

Flags:

READABLE

Gio.File to the latest cached avatar image, or None if this contact has no avatar, or if the avatar data is not yet retrieved.

When TelepathyGLib.Contact :avatar-token changes, this property is not updated immediately, but will be updated when the new avatar data is retrieved and stored in cache. Until then, the file will keep its old value of the latest cached avatar image.

This is set to None if TelepathyGLib.ContactFeature.AVATAR_DATA is not set on this contact. Note that setting TelepathyGLib.ContactFeature.AVATAR_DATA will also implicitly set TelepathyGLib.ContactFeature.AVATAR_TOKEN.

New in version 0.11.6.

TelepathyGLib.Contact.props.avatar_mime_type
Name:

avatar-mime-type

Type:

str

Default Value:

None

Flags:

READABLE

MIME type of the latest cached avatar image, or None if this contact has no avatar, or if the avatar data is not yet retrieved.

This is always the MIME type of the image given by TelepathyGLib.Contact :avatar-file.

New in version 0.11.6.

TelepathyGLib.Contact.props.avatar_token
Name:

avatar-token

Type:

str

Default Value:

None

Flags:

READABLE

An opaque string representing state of the contact’s avatar (depending on the protocol, this might be a hash, a timestamp or something else), or an empty string if there is no avatar.

This may be None if it is not known whether this contact has an avatar or not (either for network protocol reasons, or because this TelepathyGLib.Contact has not been set up to track TelepathyGLib.ContactFeature.AVATAR_TOKEN).

TelepathyGLib.Contact.props.capabilities
Name:

capabilities

Type:

TelepathyGLib.Capabilities

Default Value:

None

Flags:

READABLE

The capabilities supported by this contact. If the underlying Connection doesn’t support the ContactCapabilities interface, this property will contain the capabilities supported by the connection. Use TelepathyGLib.Capabilities.is_specific_to_contact() to check if the capabilities are specific to this TelepathyGLib.Contact or not.

This may be None if this TelepathyGLib.Contact object has not been set up to track TelepathyGLib.ContactFeature.CAPABILITIES.

New in version 0.11.3.

TelepathyGLib.Contact.props.client_types
Name:

client-types

Type:

[str]

Default Value:

[]

Flags:

READABLE

A #GStrv containing the client types of this contact.

This is set to None if TelepathyGLib.ContactFeature.CLIENT_TYPES is not set on this contact; it may also be None if that feature is prepared, but the contact’s client types are unknown.

New in version 0.13.1.

TelepathyGLib.Contact.props.connection
Name:

connection

Type:

TelepathyGLib.Connection

Default Value:

None

Flags:

READABLE

The TelepathyGLib.Connection to which this contact belongs.

TelepathyGLib.Contact.props.contact_groups
Name:

contact-groups

Type:

[str]

Default Value:

[]

Flags:

READABLE

a #GStrv with names of groups of which a contact is a member.

This is set to None if TelepathyGLib.ContactFeature.CONTACT_GROUPS is not prepared on this contact, or if the connection does not implement ContactGroups interface.

New in version 0.13.14.

TelepathyGLib.Contact.props.contact_info
Name:

contact-info

Type:

Default Value:

None

Flags:

READABLE

A GLib.List of TelepathyGLib.ContactInfoField representing the vCard of this contact.

This is set to None if TelepathyGLib.ContactFeature.CONTACT_INFO is not set on this contact.

New in version 0.11.7.

TelepathyGLib.Contact.props.handle
Name:

handle

Type:

int

Default Value:

0

Flags:

READABLE

The contact’s handle in the Telepathy D-Bus API, a handle of type TelepathyGLib.HandleType.CONTACT representing the string given by TelepathyGLib.Contact :identifier.

This handle is referenced using the Telepathy D-Bus API and remains referenced for as long as the TelepathyGLib.Contact exists and the TelepathyGLib.Contact :connection remains valid.

However, getting this property does not cause an additional reference to the handle to be held.

If the TelepathyGLib.Contact :connection becomes invalid, this property is no longer meaningful and will be set to 0.

TelepathyGLib.Contact.props.identifier
Name:

identifier

Type:

str

Default Value:

None

Flags:

READABLE

The contact’s identifier in the instant messaging protocol (e.g. XMPP JID, SIP URI, AOL screenname or IRC nick - whatever the underlying protocol uses to identify a user).

This is never None for contact objects that are visible to library-user code.

TelepathyGLib.Contact.props.is_blocked
Name:

is-blocked

Type:

bool

Default Value:

False

Flags:

READABLE

True if the contact has been blocked.

This is set to False if TelepathyGLib.ContactFeature.CONTACT_BLOCKING is not prepared on this contact, or if the connection does not implement ContactBlocking interface.

New in version 0.17.0.

TelepathyGLib.Contact.props.location_vardict
Name:

location-vardict

Type:

GLib.Variant

Default Value:

None

Flags:

READABLE

If this contact has set a user-defined location, a string to variant map containing his location. If not, None. tp_vardict_get_string() and similar functions can be used to access the contents.

This may be None even if the contact has set a location, if this TelepathyGLib.Contact object has not been set up to track TelepathyGLib.ContactFeature.LOCATION.

This property contains the same information as TelepathyGLib.Contact :location, in a different format.

New in version 0.19.10.

TelepathyGLib.Contact.props.presence_message
Name:

presence-message

Type:

str

Default Value:

''

Flags:

READABLE

If this contact has set a user-defined status message, that message; if not, an empty string (which user interfaces may replace with a localized form of the TelepathyGLib.Contact :presence-status or TelepathyGLib.Contact :presence-type).

This may be an empty string even if the contact has set a message, if this TelepathyGLib.Contact object has not been set up to track TelepathyGLib.ContactFeature.PRESENCE. It is never None.

TelepathyGLib.Contact.props.presence_status
Name:

presence-status

Type:

str

Default Value:

''

Flags:

READABLE

A string representing the presence status of this contact. This may be a well-known string from the Telepathy specification, like “available”, or a connection-manager-specific string, like “out-to-lunch”.

This may be an empty string if this TelepathyGLib.Contact object has not been set up to track TelepathyGLib.ContactFeature.PRESENCE. It is never None.

TelepathyGLib.Contact.props.presence_type
Name:

presence-type

Type:

int

Default Value:

0

Flags:

READABLE

The TelepathyGLib.ConnectionPresenceType representing the type of presence status for this contact.

This is provided so even unknown values for TelepathyGLib.Contact :presence-status can be classified into their fundamental types.

This may be TelepathyGLib.ConnectionPresenceType.UNSET if this TelepathyGLib.Contact has not been set up to track TelepathyGLib.ContactFeature.PRESENCE.

TelepathyGLib.Contact.props.publish_request
Name:

publish-request

Type:

str

Default Value:

None

Flags:

READABLE

The message that contact sent when they requested permission to see the local user’s presence, if TelepathyGLib.Contact :publish-state is TelepathyGLib.SubscriptionState.ASK, an empty string (“”) otherwise.

This is set to None until TelepathyGLib.ContactFeature.SUBSCRIPTION_STATES has been prepared, and it is guaranteed to be non-None afterward.

New in version 0.13.12.

TelepathyGLib.Contact.props.publish_state
Name:

publish-state

Type:

int

Default Value:

0

Flags:

READABLE

A TelepathyGLib.SubscriptionState indicating the state of this contact’s subscription to the local user’s presence.

This is set to TelepathyGLib.SubscriptionState.UNKNOWN until TelepathyGLib.ContactFeature.SUBSCRIPTION_STATES has been prepared

New in version 0.13.12.

TelepathyGLib.Contact.props.subscribe_state
Name:

subscribe-state

Type:

int

Default Value:

0

Flags:

READABLE

A TelepathyGLib.SubscriptionState indicating the state of the local user’s subscription to this contact’s presence.

This is set to TelepathyGLib.SubscriptionState.UNKNOWN until TelepathyGLib.ContactFeature.SUBSCRIPTION_STATES has been prepared

New in version 0.13.12.