Top |
Connection Contacts interfaceConnection Contacts interface — client-side wrappers for the Contacts interface |
This interface allows a client to get information from various connection interfaces in one dbus call.
This section documents the auto-generated C wrappers for the Contacts interface, used with TpConnection objects.
TpProxyPendingCall * tp_cli_connection_interface_contacts_call_get_contact_attributes (TpConnection *proxy
,gint timeout_ms
,const GArray *in_Handles
,const gchar **in_Interfaces
,gboolean in_Hold
,tp_cli_connection_interface_contacts_callback_for_get_contact_attributes callback
,gpointer user_data
,GDestroyNotify destroy
,GObject *weak_object
);
Start a GetContactAttributes method call.
Return any number of contact attributes for the given handles.
proxy |
the TpProxy |
|
timeout_ms |
the timeout in milliseconds, or -1 to use the default |
|
in_Handles |
Used to pass an 'in' argument: An array of handles representing contacts. |
|
in_Interfaces |
Used to pass an 'in' argument: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>A list of strings indicating which D-Bus interfaces the calling process is interested in. All supported attributes from these interfaces, whose values can be obtained without additional network activity, will be in the reply.</p> <p>Connection managers SHOULD ignore interfaces requested which they do not support (i.e. those not mentioned in the <tp:member-ref>ContactAttributeInterfaces</tp:member-ref> property.)</p> <tp:rationale> <p>This simplifies client-side code. Clients which care may distinguish between unsupported interfaces (e.g. this Connection does not support Avatars), and interfaces on which no information is known for these contacts (e.g. we don't know the avatar tokens of any of the contacts, so we omitted them all) by inspecting <tp:member-ref>ContactAttributeInterfaces</tp:member-ref>.</p> </tp:rationale> <p>Attributes from the interface <tp:dbus-ref>org.freedesktop.Telepathy.Connection</tp:dbus-ref> are always returned, and need not be requested explicitly.</p> <p>As well as returning cached information immediately, the connection MAY start asynchronous requests to obtain better values for the contact attributes. If better values are later obtained by this process, they will be indicated with the usual signals (such as <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface.Aliasing">AliasesChanged</tp:dbus-ref>).</p> <tp:rationale> For instance, an XMPP connection manager could download vCards in response to a request for <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface">Aliasing</tp:dbus-ref> attributes. </tp:rationale> |
|
in_Hold |
Used to pass an 'in' argument: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>If true, all handles that appear as keys in the result have been held on behalf of the calling process, as if by a call to <tp:dbus-ref namespace="ofdT">Connection.HoldHandles</tp:dbus-ref>. (If <tp:dbus-ref namespace="ofdT.Connection">HasImmortalHandles</tp:dbus-ref> is true, which SHOULD be the case in all new connection managers, this has no effect.)</p> <tp:rationale> <p>For further round-trip avoidance.</p> </tp:rationale> |
|
callback |
called when the method call succeeds or fails;
may be |
|
user_data |
user-supplied data passed to the callback;
must be |
|
destroy |
called with the user_data as argument, after the
call has succeeded, failed or been cancelled;
must be |
|
weak_object |
If not |
a TpProxyPendingCall representing the call in progress. It is borrowed from the object, and will become invalid when the callback is called, the call is cancelled or the TpProxy becomes invalid.
void (*tp_cli_connection_interface_contacts_callback_for_get_contact_attributes) (TpConnection *proxy
,GHashTable *out_Attributes
,const GError *error
,gpointer user_data
,GObject *weak_object
);
Signature of the callback called when a GetContactAttributes method call succeeds or fails.
proxy |
the proxy on which the call was made |
|
out_Attributes |
Used to return an 'out' argument if |
|
error |
|
|
user_data |
user-supplied data |
|
weak_object |
user-supplied object |
gboolean tp_cli_connection_interface_contacts_run_get_contact_attributes (TpConnection *proxy
,gint timeout_ms
,const GArray *in_Handles
,const gchar **in_Interfaces
,gboolean in_Hold
,GHashTable **out_Attributes
,GError **error
,GMainLoop **loop
);
tp_cli_connection_interface_contacts_run_get_contact_attributes
is deprecated and should not be used in newly-written code.
Call the method GetContactAttributes and run the main loop until it returns. Before calling this method, you must add a reference to any borrowed objects you need to keep, and generally ensure that everything is in a consistent state.
Return any number of contact attributes for the given handles.
proxy |
A TpConnection or subclass |
|
timeout_ms |
Timeout in milliseconds, or -1 for default |
|
in_Handles |
Used to pass an 'in' argument: An array of handles representing contacts. |
|
in_Interfaces |
Used to pass an 'in' argument: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>A list of strings indicating which D-Bus interfaces the calling process is interested in. All supported attributes from these interfaces, whose values can be obtained without additional network activity, will be in the reply.</p> <p>Connection managers SHOULD ignore interfaces requested which they do not support (i.e. those not mentioned in the <tp:member-ref>ContactAttributeInterfaces</tp:member-ref> property.)</p> <tp:rationale> <p>This simplifies client-side code. Clients which care may distinguish between unsupported interfaces (e.g. this Connection does not support Avatars), and interfaces on which no information is known for these contacts (e.g. we don't know the avatar tokens of any of the contacts, so we omitted them all) by inspecting <tp:member-ref>ContactAttributeInterfaces</tp:member-ref>.</p> </tp:rationale> <p>Attributes from the interface <tp:dbus-ref>org.freedesktop.Telepathy.Connection</tp:dbus-ref> are always returned, and need not be requested explicitly.</p> <p>As well as returning cached information immediately, the connection MAY start asynchronous requests to obtain better values for the contact attributes. If better values are later obtained by this process, they will be indicated with the usual signals (such as <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface.Aliasing">AliasesChanged</tp:dbus-ref>).</p> <tp:rationale> For instance, an XMPP connection manager could download vCards in response to a request for <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface">Aliasing</tp:dbus-ref> attributes. </tp:rationale> |
|
in_Hold |
Used to pass an 'in' argument: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>If true, all handles that appear as keys in the result have been held on behalf of the calling process, as if by a call to <tp:dbus-ref namespace="ofdT">Connection.HoldHandles</tp:dbus-ref>. (If <tp:dbus-ref namespace="ofdT.Connection">HasImmortalHandles</tp:dbus-ref> is true, which SHOULD be the case in all new connection managers, this has no effect.)</p> <tp:rationale> <p>For further round-trip avoidance.</p> </tp:rationale> |
|
out_Attributes |
Used to return an 'out' argument if |
|
error |
If not |
|
loop |
If not |
TpProxyPendingCall * tp_cli_connection_interface_contacts_call_get_contact_by_id (TpConnection *proxy
,gint timeout_ms
,const gchar *in_Identifier
,const gchar **in_Interfaces
,tp_cli_connection_interface_contacts_callback_for_get_contact_by_id callback
,gpointer user_data
,GDestroyNotify destroy
,GObject *weak_object
);
Start a GetContactByID method call.
Return any number of contact attributes for the given identifier. <tp:rationale> This is for a single identifier to make it simpler to use for the most common use case. For multiple contacts case, <tp:member-ref>GetContactAttributes</tp:member-ref> should be used. </tp:rationale>
proxy |
the TpProxy |
|
timeout_ms |
the timeout in milliseconds, or -1 to use the default |
|
in_Identifier |
Used to pass an 'in' argument: An identifier representing a contact. |
|
in_Interfaces |
Used to pass an 'in' argument: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>A list of strings indicating which D-Bus interfaces the calling process is interested in. All supported attributes from these interfaces, whose values can be obtained without additional network activity, will be in the reply.</p> <p>See <tp:member-ref>GetContactAttributes</tp:member-ref> for details.</p> |
|
callback |
called when the method call succeeds or fails;
may be |
|
user_data |
user-supplied data passed to the callback;
must be |
|
destroy |
called with the user_data as argument, after the
call has succeeded, failed or been cancelled;
must be |
|
weak_object |
If not |
a TpProxyPendingCall representing the call in progress. It is borrowed from the object, and will become invalid when the callback is called, the call is cancelled or the TpProxy becomes invalid.
void (*tp_cli_connection_interface_contacts_callback_for_get_contact_by_id) (TpConnection *proxy
,guint out_Handle
,GHashTable *out_Attributes
,const GError *error
,gpointer user_data
,GObject *weak_object
);
Signature of the callback called when a GetContactByID method call succeeds or fails.
proxy |
the proxy on which the call was made |
|
out_Handle |
Used to return an 'out' argument if |
|
out_Attributes |
Used to return an 'out' argument if |
|
error |
|
|
user_data |
user-supplied data |
|
weak_object |
user-supplied object |