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.)
- public int balance { get; }
The Amount field of the Balance.
- public string balance_currency { owned get; }
The Currency field of the Balance.
- public uint balance_scale { get; }
The Scale field of the Balance.
- public string balance_uri { get; }
The Balance.
- public GenericArray<void*> blocked_contacts { get; }
- public bool can_change_contact_list { get; }
If true, presence subscription and publication can be changed using
the RequestSubscription, AuthorizePublication and RemoveContacts methods.
- public bool can_report_abusive { get; }
If this property is true
, contacts may be reported as
abusive to the server administrators by setting report_abusive to true
when calling
block_contacts_async.
- public Capabilities capabilities { get; }
The
Capabilities object representing the capabilities of this connection, or NULL if we don't know yet.
- public string cm_name { get; }
This connection's connection manager name.
- public string connection_manager_name { get; }
This connection's connection manager name.
- public bool connection_ready { get; }
Initially false
; changes to true
when the
connection has gone to CONNECTED status, introspection has finished and it's ready for use.
- public string[] contact_groups { get; }
The names of all groups that currently exist.
- public bool contact_list_persists { get; }
If true, presence subscriptions (in both directions) on this
connection are stored by the server or other infrastructure.
- public uint contact_list_state { get; }
The progress made in retrieving the contact list.
- public bool disjoint_groups { get; }
True if each contact can be in at most one group; false if each
contact can be in many groups.
- public uint group_storage { get; }
Indicates the extent to which contacts' groups can be set and stored.
- public string protocol_name { get; }
The connection's machine-readable protocol name, such as "jabber",
"msn" or "local-xmpp".
- public bool request_uses_message { get; }
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.
- public Contact self_contact { get; }
A Contact
representing the local user on this connection, or null
if not yet available.
- public uint self_handle { get; }
The
CONTACT handle of the local user on this connection, or 0 if we don't know yet or if the connection has become invalid.
- public uint status { get; }
- public uint status_reason { get; }
To wait for a valid status (and other properties), call
prepare_async with the feature TP_CONNECTION_FEATURE_CORE
.
- public void add_client_interest (string interested_in)
Subscribe to any opt-in change notifications for interested_in
.
- public async bool add_to_group_async (string group, Contact[] contacts) throws Error
Add the given contacts
to the given group
,
creating it if necessary.
- public async bool authorize_publication_async (Contact[] contacts) throws Error
For each of the given contacts
, request that the local
user's presence is sent to that contact, i.e. that their
publish_state property becomes YES.
- public unowned Binding bind_connection_status_to_property (void* target, string target_property, bool invert)
Binds the
status of this to the boolean
property of another object using a Binding such that the target_property
will be set to
true
when this is connected (and invert
is false
).
- public async bool block_contacts_async (Contact[] contacts, bool report_abusive) throws Error
Direct the server to block contacts
.
- public bool can_set_contact_alias ()
- public async bool disconnect_async () throws Error
Disconnect the connection.
- public async Contact dup_contact_by_id_async (string id, ContactFeature[]? features) throws Error
Create a 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).
- public Contact dup_contact_if_possible (Handle handle, string identifier)
Try to return an existing contact object or create a new contact
object immediately.
- public List<ContactInfoFieldSpec> dup_contact_info_supported_fields ()
Returns a newly allocated List of supported
contact info fields for this connection.
- public GenericArray<unowned Contact> dup_contact_list ()
Retrieves the user's contact list.
- public string? dup_detailed_error_vardict (out Variant details)
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).
- public unowned Account get_account ()
Return the the
Account associated with this connection.
- public unowned AvatarRequirements get_avatar_requirements ()
To wait for valid avatar requirements, call
prepare_async with the feature
TP_CONNECTION_FEATURE_AVATAR_REQUIREMENTS
.
- public bool get_balance (out int balance, out uint scale, out unowned string currency)
If this 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.
- public unowned string get_balance_uri ()
The value of Balance.
- public unowned GenericArray<Contact> get_blocked_contacts ()
- public bool get_can_change_contact_list ()
- public unowned Capabilities get_capabilities ()
- public unowned string get_cm_name ()
- public unowned string get_connection_manager_name ()
- public void get_contact_attributes (int timeout_ms, Handle[] handles, string interfaces, bool hold, owned Callback callback, Object weak_object)
Return (via a callback) any number of attributes of the given handles.
- public unowned string[] get_contact_groups ()
- public ContactInfoFlags get_contact_info_flags ()
Returns the flags describing how contact info (vCards) behaves on this
connection
- public List<unowned ContactInfoFieldSpec> get_contact_info_supported_fields ()
Returns a newly allocated List of supported
contact info fields for this connection.
- public void get_contact_list_attributes (int timeout_ms, string interfaces, bool hold, owned Callback callback, Object weak_object)
Return (via a callback) the contacts on the contact list and any
number of their attributes.
- public bool get_contact_list_persists ()
- public ContactListState get_contact_list_state ()
- public void get_contacts_by_handle (uint[] handles, uint[]? features, owned ConnectionContactsByHandleCb callback, Object? weak_object)
Create a number of
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).
- public void get_contacts_by_id (string[] ids, ContactFeature[]? features, owned ConnectionContactsByIdCb callback, Object? weak_object)
Create a number of
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).
- public unowned string? get_detailed_error (out unowned HashTable<string,Value?> details)
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).
- public bool get_disjoint_groups ()
- public ContactMetadataStorageType get_group_storage ()
- public unowned string get_protocol_name ()
- public bool get_request_uses_message ()
- public unowned Contact get_self_contact ()
Return a Contact
representing the local user on this connection.
- public Handle get_self_handle ()
Return the
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 (the TpProxy::invalidated signal).
- public ConnectionStatus get_status (out ConnectionStatusReason reason)
If reason
is not null
it is set to the
reason why "status" changed to its current value, or
NONE_SPECIFIED if unknown.
- public bool has_immortal_handles ()
Return true
if this connection is known to not destroy
handles (#TpHandle) until it disconnects.
- public void hold_handles (int timeout_ms, HandleType handle_type, Handle[] handles, owned ConnectionHoldHandlesCb callback, Object weak_object)
Hold (ensure a reference to) the given handles, if they are valid.
- public bool parse_object_path (out string protocol, out string cm_name)
If the object path of connection
is in the correct form,
set protocol
and cm_name
, return TRUE.
- public void refresh_contact_info (Contact[] 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.
- public async bool remove_contacts_async (Contact[] contacts) throws Error
Remove the given contacts
from the contact list entirely.
- public async bool remove_from_group_async (string group, Contact[] contacts) throws Error
Remove the given contacts
from the given group
.
- public async bool remove_group_async (string group) throws Error
Remove all members from the given group, then remove the group itself.
- public async bool rename_group_async (string old_name, string new_name) throws Error
Rename the given old_name
.
- public void request_handles (int timeout_ms, HandleType handle_type, string[] ids, owned ConnectionRequestHandlesCb callback, Object weak_object)
Request the handles corresponding to the given identifiers, and if
they are valid, hold (ensure a reference to) the corresponding handles.
- public async bool request_subscription_async (Contact[] contacts, string message) throws Error
Request that the given contacts
allow the local user to
subscribe to their presence, i.e. that their subscribe_state
property becomes YES.
- public async bool set_contact_info_async (List<ContactInfoField> info) throws Error
Requests an asynchronous set of the contact info of
this.
- public async bool set_group_members_async (string group, Contact[] contacts) throws Error
Add the given contacts
to the given group
(creating it if necessary), and remove all other members.
- public async bool unblock_contacts_async (Contact[] contacts) throws Error
Direct the server to unblock contacts
.
- public async bool unpublish_async (Contact[] contacts) throws Error
Attempt to set the given contacts
'
publish_state property to
NO, i.e. stop sending presence to them.
- public void unref_handles (HandleType handle_type, Handle[] handles)
Do nothing.
- public async bool unsubscribe_async (Contact[] contacts) throws Error
Attempt to set the given contacts
'
subscribe_state property to
NO, i.e. stop receiving their presence.
- public void upgrade_contacts (Contact[] contacts, ContactFeature[] features, owned ConnectionUpgradeContactsCb callback, Object? weak_object)
Given several
Contact objects, make asynchronous method calls ensure that all the features specified in features
are ready for
use (if they are supported at all).
- public async bool upgrade_contacts_async (Contact[] contacts, ContactFeature[] features, out GenericArray<unowned Contact> contacts_out) throws Error
Given several
Contact objects, make asynchronous method calls ensure that all the features specified in features
are ready for
use (if they are supported at all).