Top |
gchar * | alias | Read |
GFile * | avatar-file | Read |
gchar * | avatar-mime-type | Read |
gchar * | avatar-token | Read |
TpCapabilities * | capabilities | Read |
GStrv | client-types | Read |
TpConnection * | connection | Read / Write / Construct Only |
GStrv | contact-groups | Read |
TpContactInfoList * | contact-info | Read |
guint | handle | Read / Write / Construct Only |
gchar * | identifier | Read / Write / Construct Only |
gboolean | is-blocked | Read |
GVariant * | location | Read |
gchar * | presence-message | Read |
gchar * | presence-status | Read |
guint | presence-type | Read |
gchar * | publish-request | Read |
guint | publish-state | Read |
guint | subscribe-state | Read |
void | contact-groups-changed | Run Last |
void | presence-changed | Run Last |
void | subscription-states-changed | Run Last |
TpContact | |
#define | TP_CONTACT_FEATURE_ALIAS |
#define | TP_CONTACT_FEATURE_AVATAR_TOKEN |
#define | TP_CONTACT_FEATURE_AVATAR_DATA |
#define | TP_CONTACT_FEATURE_CLIENT_TYPES |
#define | TP_CONTACT_FEATURE_PRESENCE |
#define | TP_CONTACT_FEATURE_LOCATION |
#define | TP_CONTACT_FEATURE_CAPABILITIES |
#define | TP_CONTACT_FEATURE_CONTACT_INFO |
#define | TP_CONTACT_FEATURE_CONTACT_BLOCKING |
#define | TP_CONTACT_FEATURE_SUBSCRIPTION_STATES |
#define | TP_CONTACT_FEATURE_CONTACT_GROUPS |
TpContact * tp_connection_dup_contact_if_possible (TpConnection *connection
,TpHandle handle
,const gchar *identifier
);
Try to return an existing contact object or create a new contact object immediately.
If identifier
is non-NULL
, this function always succeeds.
If identifier
is NULL
, 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 a TpContact can be constructed asynchronously, for
instance by using tp_connection_get_contacts_by_handle()
.
connection |
a connection |
|
handle |
a handle of type |
|
identifier |
the normalized identifier (XMPP JID, etc.)
corresponding to |
[transfer none] |
Since 0.13.9
TpAccount *
tp_contact_get_account (TpContact *self
);
Return the TpAccount of self
's “connection”.
See tp_connection_get_account()
for details.
a borrowed reference to self
's account
(it must be referenced with g_object_ref if it must remain valid
longer than the contact).
[transfer none]
Since 0.19.0
TpConnection *
tp_contact_get_connection (TpContact *self
);
a borrowed reference to the “connection” (it must be referenced with g_object_ref if it must remain valid longer than the contact).
[transfer none]
Since 0.7.18
TpHandle
tp_contact_get_handle (TpContact *self
);
Return the contact's handle, which is of type TP_ENTITY_TYPE_CONTACT
,
or 0 if the “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
“connection” remains valid.
However, the caller of this function does not gain an additional reference to the handle.
Since 0.7.18
const gchar *
tp_contact_get_identifier (TpContact *self
);
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 g_strdup()
.
Since 0.7.18
gboolean tp_contact_has_feature (TpContact *self
,GQuark feature
);
Since 0.99.1
const gchar *
tp_contact_get_alias (TpContact *self
);
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 g_strdup()
.
Since 0.7.18
const gchar *
tp_contact_get_avatar_token (TpContact *self
);
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 g_strdup()
.
Since 0.7.18
GFile *
tp_contact_get_avatar_file (TpContact *self
);
Return the contact's avatar file. This remains valid until the main loop
is re-entered; if the caller requires a GFile that will persist for
longer than that, it must be reffed with g_object_ref()
.
Since 0.11.6
const gchar *
tp_contact_get_avatar_mime_type (TpContact *self
);
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 g_strdup()
.
Since 0.11.6
const gchar * const *
tp_contact_get_client_types (TpContact *self
);
Return the contact's client types or NULL
if the client types are
unspecified.
Since 0.13.1
const gchar *
tp_contact_get_presence_message (TpContact *self
);
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 g_strdup()
.
Since 0.7.18
const gchar *
tp_contact_get_presence_status (TpContact *self
);
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 g_strdup()
.
Since 0.7.18
TpConnectionPresenceType
tp_contact_get_presence_type (TpContact *self
);
If this object has been set up to track
TP_CONTACT_FEATURE_PRESENCE
and the underlying connection supports
the Presence interface, return the type of the contact's presence.
Otherwise, return TP_CONNECTION_PRESENCE_TYPE_UNSET
.
Since 0.7.18
GVariant *
tp_contact_dup_location (TpContact *self
);
Return the contact's user-defined location, or NULL
if the location is
unspecified.
This function returns the same information as tp_contact_get_location()
,
but in a different format.
Since 0.19.10
TpCapabilities *
tp_contact_get_capabilities (TpContact *self
);
Since 0.11.3
GList *
tp_contact_dup_contact_info (TpContact *self
);
Returns a newly allocated GList of contact's vCard fields. The list must be
freed with tp_contact_info_list_free()
after used.
Same as the “contact-info” property.
a GList of TpContactInfoField, or NULL
if the feature is not yet
prepared.
[element-type TelepathyGLib.ContactInfoField][transfer full]
Since 0.19.9
void tp_connection_refresh_contact_info (TpConnection *self
,guint n_contacts
,TpContact * const *contacts
);
Requests to refresh the “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 TP_CONTACT_FEATURE_CONTACT_INFO
is not yet set on a contact, it will be
set before its property gets updated.
self |
||
n_contacts |
The number of contacts in |
|
contacts |
An array of TpContact objects
associated with |
[array length=n_contacts] |
Since 0.11.7
void tp_contact_request_contact_info_async (TpContact *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Requests an asynchronous request of the contact info of self
. When
the operation is finished, callback
will be called. You can then call
tp_contact_request_contact_info_finish()
to get the result of the operation.
If the operation is successful, the “contact-info” property will be
updated (emitting "notify::contact-info" signal) before callback
is called.
That means you can call tp_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 TP_CONTACT_FEATURE_CONTACT_INFO
is not yet set on self
, it will be
set before its property gets updated and callback
is called.
self |
||
cancellable |
optional GCancellable object, |
|
callback |
a callback to call when the request is satisfied |
|
user_data |
data to pass to |
Since 0.11.7
gboolean tp_contact_request_contact_info_finish (TpContact *self
,GAsyncResult *result
,GError **error
);
Finishes an async request of self
info. If the operation was successful,
the contact's vCard can be accessed using tp_contact_get_contact_info()
.
Since 0.11.7
void tp_contact_block_async (TpContact *self
,gboolean report_abusive
,GAsyncReadyCallback callback
,gpointer user_data
);
Block communications with a contact, optionally reporting the contact as
abusive to the server administrators. To block more than one contact at once,
see tp_connection_block_contacts_async()
.
self |
||
report_abusive |
If |
|
callback |
a callback to call when the operation finishes |
|
user_data |
data to pass to |
Since 0.17.0
gboolean tp_contact_block_finish (TpContact *self
,GAsyncResult *result
,GError **error
);
Finishes tp_contact_block_async()
Since 0.17.0
void tp_contact_unblock_async (TpContact *self
,GAsyncReadyCallback callback
,gpointer user_data
);
Unblock communications with a contact. To unblock more than one contact
at once, see tp_connection_unblock_contacts_async()
.
self |
||
callback |
a callback to call when the operation finishes |
|
user_data |
data to pass to |
Since 0.17.0
gboolean tp_contact_unblock_finish (TpContact *self
,GAsyncResult *result
,GError **error
);
Finishes tp_contact_unblock_async()
Since 0.17.0
TpSubscriptionState
tp_contact_get_subscribe_state (TpContact *self
);
Return the state of the local user's subscription to this remote contact's presence.
This is set to TP_SUBSCRIPTION_STATE_UNKNOWN
until
TP_CONTACT_FEATURE_SUBSCRIPTION_STATES
has been prepared
Since 0.13.12
TpSubscriptionState
tp_contact_get_publish_state (TpContact *self
);
Return the state of this remote contact's subscription to the local user's presence.
This is set to TP_SUBSCRIPTION_STATE_UNKNOWN
until
TP_CONTACT_FEATURE_SUBSCRIPTION_STATES
has been prepared
Since 0.13.12
const gchar *
tp_contact_get_publish_request (TpContact *self
);
If “publish-state” is set to TP_SUBSCRIPTION_STATE_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 g_strdup()
.
This is set to NULL
until TP_CONTACT_FEATURE_SUBSCRIPTION_STATES
has been
prepared, and it is guaranteed to be non-NULL
afterward.
Since 0.13.12
void tp_connection_dup_contact_by_id_async (TpConnection *self
,const gchar *id
,const GQuark *features
,GAsyncReadyCallback callback
,gpointer user_data
);
Create a TpContact 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.
self |
A connection, which must have the |
|
id |
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 |
An array of features that must be ready for. |
[transfer none][array zero-terminated=1][allow-none][element-type GLib.Quark] |
callback |
A user callback to call when the contact is ready |
|
user_data |
Data to pass to the callback |
Since 0.19.0
TpContact * tp_connection_dup_contact_by_id_finish (TpConnection *self
,GAsyncResult *result
,GError **error
);
Finishes tp_connection_dup_contact_by_id_async()
.
Since 0.19.0
void tp_connection_upgrade_contacts_async (TpConnection *self
,guint n_contacts
,TpContact * const *contacts
,const GQuark *features
,GAsyncReadyCallback callback
,gpointer user_data
);
Given several TpContact 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.
self |
A connection, which must have the |
|
n_contacts |
The number of contacts in |
|
contacts |
An array of TpContact objects
associated with |
[array length=n_contacts] |
features |
An array of features that must be ready for. |
[transfer none][array zero-terminated=1][allow-none][element-type GLib.Quark] |
callback |
A user callback to call when the contacts are ready |
|
user_data |
Data to pass to the callback |
Since 0.19.0
gboolean tp_connection_upgrade_contacts_finish (TpConnection *self
,GAsyncResult *result
,GPtrArray **contacts
,GError **error
);
Finishes tp_connection_upgrade_contacts_async()
.
Since 0.19.0
void tp_contact_request_subscription_async (TpContact *self
,const gchar *message
,GAsyncReadyCallback callback
,gpointer user_data
);
Convenience wrapper for tp_connection_request_subscription_async()
on a single contact.
self |
||
message |
an optional message |
|
callback |
a callback to call when the operation finishes |
|
user_data |
data to pass to |
Since 0.15.5
gboolean tp_contact_request_subscription_finish (TpContact *self
,GAsyncResult *result
,GError **error
);
Finishes tp_contact_request_subscription_async()
Since 0.15.5
void tp_contact_authorize_publication_async (TpContact *self
,GAsyncReadyCallback callback
,gpointer user_data
);
Convenience wrapper for tp_connection_authorize_publication_async()
on a single contact.
self |
||
callback |
a callback to call when the operation finishes |
|
user_data |
data to pass to |
Since 0.15.5
gboolean tp_contact_authorize_publication_finish (TpContact *self
,GAsyncResult *result
,GError **error
);
Finishes tp_contact_authorize_publication_async()
Since 0.15.5
void tp_contact_remove_async (TpContact *self
,GAsyncReadyCallback callback
,gpointer user_data
);
Convenience wrapper for tp_connection_remove_contacts_async()
on a single contact.
self |
||
callback |
a callback to call when the operation finishes |
|
user_data |
data to pass to |
Since 0.15.5
gboolean tp_contact_remove_finish (TpContact *self
,GAsyncResult *result
,GError **error
);
Finishes tp_contact_remove_async()
Since 0.15.5
void tp_contact_unsubscribe_async (TpContact *self
,GAsyncReadyCallback callback
,gpointer user_data
);
Convenience wrapper for tp_connection_unsubscribe_async()
on a single contact.
self |
||
callback |
a callback to call when the operation finishes |
|
user_data |
data to pass to |
Since 0.15.5
gboolean tp_contact_unsubscribe_finish (TpContact *self
,GAsyncResult *result
,GError **error
);
Finishes tp_contact_unsubscribe_async()
Since 0.15.5
void tp_contact_unpublish_async (TpContact *self
,GAsyncReadyCallback callback
,gpointer user_data
);
Convenience wrapper for tp_connection_unpublish_async()
on a single contact.
self |
||
callback |
a callback to call when the operation finishes |
|
user_data |
data to pass to |
Since 0.15.5
gboolean tp_contact_unpublish_finish (TpContact *self
,GAsyncResult *result
,GError **error
);
Finishes tp_contact_unpublish_async()
Since 0.15.5
const gchar * const *
tp_contact_get_contact_groups (TpContact *self
);
Return names of groups of which a contact is a member. It is incorrect to
call this method before TP_CONTACT_FEATURE_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 g_strdupv()
.
Since 0.13.14
void tp_contact_set_contact_groups_async (TpContact *self
,gint n_groups
,const gchar * const *groups
,GAsyncReadyCallback callback
,gpointer user_data
);
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 tp_contact_set_contact_groups_finish()
to get the result of the
operation.
If the operation is successful and TP_CONTACT_FEATURE_CONTACT_GROUPS
is
prepared, the “contact-groups” property will be
updated (emitting "notify::contact-groups" signal) and
“contact-groups-changed” signal will be emitted before callback
is called. That means you can call tp_contact_get_contact_groups()
to get the
new contact groups inside callback
.
self |
||
n_groups |
the number of groups, or -1 if |
|
groups |
the set of
groups which the contact should be in (may be |
[array length=n_groups][element-type utf8][allow-none] |
callback |
a callback to call when the request is satisfied |
|
user_data |
data to pass to |
Since 0.13.14
gboolean tp_contact_set_contact_groups_finish (TpContact *self
,GAsyncResult *result
,GError **error
);
Finishes an async set of self
contact groups.
Since 0.13.14
void tp_contact_add_to_group_async (TpContact *self
,const gchar *group
,GAsyncReadyCallback callback
,gpointer user_data
);
Convenience wrapper for tp_connection_add_to_group_async()
on a single contact.
self |
||
group |
the group to alter. |
|
callback |
a callback to call when the operation finishes |
|
user_data |
data to pass to |
Since 0.15.5
gboolean tp_contact_add_to_group_finish (TpContact *self
,GAsyncResult *result
,GError **error
);
Finishes tp_contact_add_to_group_async()
Since 0.15.5
void tp_contact_remove_from_group_async (TpContact *self
,const gchar *group
,GAsyncReadyCallback callback
,gpointer user_data
);
Convenience wrapper for tp_connection_remove_from_group_async()
on a single contact.
self |
||
group |
the group to alter. |
|
callback |
a callback to call when the operation finishes |
|
user_data |
data to pass to |
Since 0.15.5
gboolean tp_contact_remove_from_group_finish (TpContact *self
,GAsyncResult *result
,GError **error
);
Finishes tp_contact_remove_from_group_async()
Since 0.15.5
typedef struct _TpContact TpContact;
An object representing a contact on a TpConnection.
Contact objects support tracking a number of attributes of contacts, as
described by the contact feature GQuarks. Features can be specified when
instantiating contact objects (with tp_connection_get_contacts_by_id()
or
tp_connection_get_contacts_by_handle()
), or added to an existing contact
object with tp_connection_upgrade_contacts()
. For example, a client wishing
to keep track of a contact's alias would set TP_CONTACT_FEATURE_ALIAS, and
then listen for the "notify::alias" signal, emitted whenever the
“alias” property changes.
Since 0.7.18
#define TP_CONTACT_FEATURE_ALIAS
Expands to a call to a function that returns a GQuark representing the "alias" feature.
When this feature is prepared, the contact's alias has been retrieved. In particular, the “alias” property has been set.
Since 0.99.1
#define TP_CONTACT_FEATURE_AVATAR_TOKEN
Expands to a call to a function that returns a GQuark representing the "avatar token" feature.
When this feature is prepared, the contact's avatar token has been retrieved. In particular, the “avatar-token” property has been set.
Since 0.19.0
#define TP_CONTACT_FEATURE_AVATAR_DATA
Expands to a call to a function that returns a GQuark representing the "avatar data" feature.
When this feature is prepared, the contact's avatar has been retrieved. In particular, the “avatar-file” property has been set.
This feature also implies the TP_CONTACT_FEATURE_AVATAR_TOKEN
.
Since 0.99.1
#define TP_CONTACT_FEATURE_CLIENT_TYPES
Expands to a call to a function that returns a GQuark representing the "client types" feature.
When this feature is prepared, the contact's client types have been retrieved. In particular, the “client-types” property has been set.
Since 0.99.1
#define TP_CONTACT_FEATURE_PRESENCE
Expands to a call to a function that returns a GQuark representing the "presence" feature.
When this feature is prepared, the contact's presence has been retrieved. In particular, the “presence-type”, “presence-status”, and “presence-message” properties have been set.
Since 0.99.1
#define TP_CONTACT_FEATURE_LOCATION
Expands to a call to a function that returns a GQuark representing the "location" feature.
When this feature is prepared, the contact's location has been retrieved. In particular, the “location” property has been set.
Since 0.99.1
#define TP_CONTACT_FEATURE_CAPABILITIES
Expands to a call to a function that returns a GQuark representing the "capabilities" feature.
When this feature is prepared, the contact's capabilities have been retrieved. In particular, the “capabilities” property has been set.
Since 0.99.1
#define TP_CONTACT_FEATURE_CONTACT_INFO
Expands to a call to a function that returns a GQuark representing the "contact info" feature.
When this feature is prepared, the contact's contact info has been retrieved. In particular, the “contact-info” property has been set.
Since 0.99.1
#define TP_CONTACT_FEATURE_CONTACT_BLOCKING
Expands to a call to a function that returns a GQuark representing the "contact blocking" feature.
When this feature is prepared, the contact's blocking state have been retrieved. In particular, the “is-blocked” property has been set.
This feature requires a Connection implementing the
TP_IFACE_CONNECTION_INTERFACE_CONTACT_BLOCKING1
interface.
Since 0.99.1
#define TP_CONTACT_FEATURE_SUBSCRIPTION_STATES
Expands to a call to a function that returns a GQuark representing the "subscription states" feature.
When this feature is prepared, the contact's subscription states have been retrieved. In particular, the “subscribe-state”, “publish-request”, and “publish-state” properties have been set.
This feature requires a Connection implementing the
TP_IFACE_CONNECTION_INTERFACE_CONTACT_LIST1
interface.
Since 0.99.1
#define TP_CONTACT_FEATURE_CONTACT_GROUPS
Expands to a call to a function that returns a GQuark representing the "contact groups" feature.
When this feature is prepared, the contact's contact groups have been retrieved. In particular, the “contact-groups” property has been set.
This feature requires a Connection implementing the
TP_IFACE_CONNECTION_INTERFACE_CONTACT_GROUPS1
interface.
Since 0.99.1
“alias”
property“alias” gchar *
The contact's alias if available, falling back to their
“identifier” if no alias is available or if the TpContact has
not been set up to track TP_CONTACT_FEATURE_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.
Flags: Read
Default value: NULL
“avatar-file”
property“avatar-file” GFile *
GFile to the latest cached avatar image, or NULL
if this contact has
no avatar, or if the avatar data is not yet retrieved.
When “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 NULL
if TP_CONTACT_FEATURE_AVATAR_DATA
is not set on this
contact. Note that setting TP_CONTACT_FEATURE_AVATAR_DATA
will also
implicitly set TP_CONTACT_FEATURE_AVATAR_TOKEN
.
Flags: Read
Since 0.11.6
“avatar-mime-type”
property“avatar-mime-type” gchar *
MIME type of the latest cached avatar image, or NULL
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 “avatar-file”.
Flags: Read
Default value: NULL
Since 0.11.6
“avatar-token”
property“avatar-token” gchar *
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 NULL
if it is not known whether this contact has an avatar
or not (either for network protocol reasons, or because this TpContact
has not been set up to track TP_CONTACT_FEATURE_AVATAR_TOKEN
).
Flags: Read
Default value: NULL
“capabilities”
property“capabilities” TpCapabilities *
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 tp_capabilities_is_specific_to_contact()
to check if the capabilities
are specific to this TpContact or not.
This may be NULL
if this TpContact object has not been set up to track
TP_CONTACT_FEATURE_CAPABILITIES
.
Flags: Read
Since 0.11.3
“client-types”
property“client-types” GStrv
A GStrv containing the client types of this contact.
This is set to NULL
if TP_CONTACT_FEATURE_CLIENT_TYPES
is not
set on this contact; it may also be NULL
if that feature is prepared, but
the contact's client types are unknown.
Flags: Read
Since 0.13.1
“connection”
property“connection” TpConnection *
The TpConnection to which this contact belongs.
Flags: Read / Write / Construct Only
“contact-groups”
property“contact-groups” GStrv
a GStrv with names of groups of which a contact is a member.
This is set to NULL
if TP_CONTACT_FEATURE_CONTACT_GROUPS
is not prepared
on this contact, or if the connection does not implement ContactGroups
interface.
Flags: Read
Since 0.13.14
“contact-info”
property“contact-info” TpContactInfoList *
A GList of TpContactInfoField representing the vCard of this contact.
This is set to NULL
if TP_CONTACT_FEATURE_CONTACT_INFO
is not set on this
contact.
Flags: Read
Since 0.11.7
“handle”
property“handle” guint
The contact's handle in the Telepathy D-Bus API, a handle of type
TP_ENTITY_TYPE_CONTACT
representing the string
given by “identifier”.
This handle is referenced using the Telepathy D-Bus API and remains referenced for as long as the TpContact exists and the “connection” remains valid.
However, getting this property does not cause an additional reference to the handle to be held.
If the “connection” becomes invalid, this property is no longer meaningful and will be set to 0.
Flags: Read / Write / Construct Only
Default value: 0
“identifier”
property“identifier” gchar *
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).
Flags: Read / Write / Construct Only
Default value: NULL
“is-blocked”
property“is-blocked” gboolean
TRUE
if the contact has been blocked.
This is set to FALSE
if TP_CONTACT_FEATURE_CONTACT_BLOCKING
is not
prepared on this contact, or if the connection does not implement
ContactBlocking interface.
Flags: Read
Default value: FALSE
Since 0.17.0
“location”
property“location” GVariant *
If this contact has set a user-defined location, a string to
variant map containing his location. If not, NULL
.
tp_vardict_get_string()
and similar functions can be used to access
the contents.
This may be NULL
even if the contact has set a location,
if this TpContact object has not been set up to track
TP_CONTACT_FEATURE_LOCATION
.
Flags: Read
Allowed values: GVariant<a{sv}>
Default value: NULL
“presence-message”
property“presence-message” gchar *
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 “presence-status” or “presence-type”).
This may be an empty string even if the contact has set a message,
if this TpContact object has not been set up to track
TP_CONTACT_FEATURE_PRESENCE
. It is never NULL
.
Flags: Read
Default value: ""
“presence-status”
property“presence-status” gchar *
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 TpContact object has not been set up
to track TP_CONTACT_FEATURE_PRESENCE
. It is never NULL
.
Flags: Read
Default value: ""
“presence-type”
property“presence-type” guint
The TpConnectionPresenceType representing the type of presence status for this contact.
This is provided so even unknown values for “presence-status” can be classified into their fundamental types.
This may be TP_CONNECTION_PRESENCE_TYPE_UNSET
if this TpContact
has not been set up to track TP_CONTACT_FEATURE_PRESENCE
.
Flags: Read
Default value: 0
“publish-request”
property“publish-request” gchar *
The message that contact sent when they requested permission to see the
local user's presence, if “publish-state” is
TP_SUBSCRIPTION_STATE_ASK
, an empty string ("") otherwise.
This is set to NULL
until TP_CONTACT_FEATURE_SUBSCRIPTION_STATES
has been
prepared, and it is guaranteed to be non-NULL
afterward.
Flags: Read
Default value: NULL
Since 0.13.12
“publish-state”
property“publish-state” guint
A TpSubscriptionState indicating the state of this contact's subscription to the local user's presence.
This is set to TP_SUBSCRIPTION_STATE_UNKNOWN
until
TP_CONTACT_FEATURE_SUBSCRIPTION_STATES
has been prepared
Flags: Read
Default value: 0
Since 0.13.12
“subscribe-state”
property“subscribe-state” guint
A TpSubscriptionState indicating the state of the local user's subscription to this contact's presence.
This is set to TP_SUBSCRIPTION_STATE_UNKNOWN
until
TP_CONTACT_FEATURE_SUBSCRIPTION_STATES
has been prepared
Flags: Read
Default value: 0
Since 0.13.12
“contact-groups-changed”
signalvoid user_function (TpContact *contact, GStrv added, GStrv removed, gpointer user_data)
Emitted when this contact's groups changes. When this signal is emitted, “contact-groups” property is already updated.
Flags: Run Last
Since 0.13.14
“presence-changed”
signalvoid user_function (TpContact *contact, guint type, gchar *status, gchar *message, gpointer user_data)
Emitted when this contact's presence changes.
contact |
||
type |
The new value of “presence-type” |
|
status |
The new value of “presence-status” |
|
message |
The new value of “presence-message” |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since 0.11.7
“subscription-states-changed”
signalvoid user_function (TpContact *contact, guint subscribe, guint publish, gchar *publish_request, gpointer user_data)
Emitted when this contact's subscription states changes.
contact |
||
subscribe |
the new value of “subscribe-state” |
|
publish |
the new value of “publish-state” |
|
publish_request |
the new value of “publish-request” |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since 0.13.12