## Connection Addressing interface Connection Addressing interface — client-side wrappers for the Addressing interface |

## Functions

TpProxyPendingCall * | tp_cli_connection_interface_addressing_call_get_contacts_by_uri ()
TpProxyPendingCall * | tp_cli_connection_interface_addressing_call_get_contacts_by_vcard_field ()
void | (*tp_cli_connection_interface_addressing_callback_for_get_contacts_by_uri) ()
void | (*tp_cli_connection_interface_addressing_callback_for_get_contacts_by_vcard_field) ()

## Object Hierarchy

## Includes

    #include <telepathy-glib/telepathy-glib-dbus.h>

## Description

An interface for connections in protocols where contacts' unique identifiers can be expressed as vCard fields and/or URIs.

## Functions

### tp_cli_connection_interface_addressing_call_get_contacts_by_uri ()

    TpProxyPendingCall *
    tp_cli_connection_interface_addressing_call_get_contacts_by_uri
                                   (TpConnection *proxy,
                                    gint timeout_ms,
                                    const gchar **in_URIs,
                                    const gchar **in_Interfaces,
                                    tp_cli_connection_interface_addressing_callback_for_get_contacts_by_uri callback,
                                    gpointer user_data,
                                    GDestroyNotify destroy,
                                    GObject *weak_object);

Start a GetContactsByURI method call.

<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>Request contacts and retrieve their attributes using URI addresses.</p> <p>The connection manager should record that these handles are in use by the client who invokes this method, and must not deallocate the handles until the client disconnects from the bus or calls the <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.ReleaseHandles</tp:dbus-ref> method.</p>

#### Parameters

proxy | the TpProxy |
timeout_ms | the timeout in milliseconds, or -1 to use the default |
in_URIs | Used to pass an 'in' argument: The URI addresses to get contact handles for. Supported schemes can be found in <tp:dbus-ref namespace="org.freedesktop.Telepathy.Protocol.Interface.Addressing">AddressableURISchemes</tp:dbus-ref>. |
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>Attributes from this interface and from <tp:dbus-ref>org.freedesktop.Telepathy.Connection</tp:dbus-ref> are always returned, and need not be requested explicitly.</p> <p>The behavior of this parameter is similar to the same parameter in <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface">Contacts.GetContactAttributes</tp:dbus-ref>.</p> |
callback | called when the method call succeeds or fails; may be `NULL` to make a "fire and forget" call with no reply tracking |
user_data | user-supplied data passed to the callback; must be `NULL` if `callback` is `NULL` |
destroy | called with the user_data as argument, after the call has succeeded, failed or been cancelled; must be `NULL` if `callback` is `NULL` |
weak_object | If not `NULL`, a GObject which will be weakly referenced; if it is destroyed, this call will automatically be cancelled. Must be `NULL` if `callback` is `NULL` |

#### Returns

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.

### tp_cli_connection_interface_addressing_call_get_contacts_by_vcard_field ()

    TpProxyPendingCall *
    tp_cli_connection_interface_addressing_call_get_contacts_by_vcard_field
                                   (TpConnection *proxy,
                                    gint timeout_ms,
                                    const gchar *in_Field,
                                    const gchar **in_Addresses,
                                    const gchar **in_Interfaces,
                                    tp_cli_connection_interface_addressing_callback_for_get_contacts_by_vcard_field callback,
                                    gpointer user_data,
                                    GDestroyNotify destroy,
                                    GObject *weak_object);

Start a GetContactsByVCardField method call.

<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>Request contacts and retrieve their attributes using a given field in their vCards.</p> <p>The connection manager should record that these handles are in use by the client who invokes this method, and must not deallocate the handles until the client disconnects from the bus or calls the <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.ReleaseHandles</tp:dbus-ref> method.</p>

#### Parameters

proxy | the TpProxy |
timeout_ms | the timeout in milliseconds, or -1 to use the default |
in_Field | Used to pass an 'in' argument: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>The vCard field of the addresses we are requesting. The field name SHOULD be in lower case. Supported fields can be found in <tp:dbus-ref namespace="org.freedesktop.Telepathy.Protocol.Interface.Addressing">AddressableVCardFields</tp:dbus-ref>.</p> <p>The <code>url</code> vCard field MUST NOT appear here; see <tp:member-ref>GetContactsByURI</tp:member-ref> instead.</p> <tp:rationale> <p>In practice, protocols have a limited set of URI schemes that make sense to resolve as a contact.</p> </tp:rationale> |
in_Addresses | Used to pass an 'in' argument: The addresses to get contact handles for. The address types should match the given vCard field. |
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>Attributes from this interface and from <tp:dbus-ref>org.freedesktop.Telepathy.Connection</tp:dbus-ref> are always returned, and need not be requested explicitly.</p> <p>The behavior of this parameter is similar to the same parameter in <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface">Contacts.GetContactAttributes</tp:dbus-ref>.</p> |
callback | called when the method call succeeds or fails; may be `NULL` to make a "fire and forget" call with no reply tracking |
user_data | user-supplied data passed to the callback; must be `NULL` if `callback` is `NULL` |
destroy | called with the user_data as argument, after the call has succeeded, failed or been cancelled; must be `NULL` if `callback` is `NULL` |
weak_object | If not `NULL`, a GObject which will be weakly referenced; if it is destroyed, this call will automatically be cancelled. Must be `NULL` if `callback` is `NULL` |

#### Returns

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.

### tp_cli_connection_interface_addressing_callback_for_get_contacts_by_uri ()

    void
    (*tp_cli_connection_interface_addressing_callback_for_get_contacts_by_uri)
                                   (TpConnection *proxy,
                                    GHashTable *out_Requested,
                                    GHashTable *out_Attributes,
                                    const GError *error,
                                    gpointer user_data,
                                    GObject *weak_object);

Signature of the callback called when a GetContactsByURI method call succeeds or fails.

#### Parameters

proxy | the proxy on which the call was made |
out_Requested | Used to return an 'out' argument if `error` is `NULL`: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>A mapping of requested URIs to the corresponding contact handles.</p> <p>Requested URIs that are not valid or understood for this protocol MUST be omitted from the mapping.</p> |
out_Attributes | Used to return an 'out' argument if `error` is `NULL`: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>A dictionary mapping the contact handles to contact attributes. If any of the requested addresses are in fact invalid, they are simply omitted from this mapping. If contact attributes are not immediately known, the behaviour is defined by the interface; the attribute should either be omitted from the result or replaced with a default value.</p> <p>Requested URIs that are not valid or understood for this protocol MUST be omitted from the mapping.</p> <p>Each contact's attributes will always include at least the identifier that would be obtained by inspecting the handle (<code>org.freedesktop.Telepathy.Connection/contact-id</code>). </p> |
error | `NULL` on success, or an error on failure |
user_data | user-supplied data |
weak_object | user-supplied object |

### tp_cli_connection_interface_addressing_callback_for_get_contacts_by_vcard_field ()

    void
    (*tp_cli_connection_interface_addressing_callback_for_get_contacts_by_vcard_field)
                                   (TpConnection *proxy,
                                    GHashTable *out_Requested,
                                    GHashTable *out_Attributes,
                                    const GError *error,
                                    gpointer user_data,
                                    GObject *weak_object);

`tp_cli_connection_interface_addressing_callback_for_get_contacts_by_vcard_field` is deprecated and should not be used in newly-written code.

Signature of the callback called when a GetContactsByVCardField method call succeeds or fails.

#### Parameters

proxy | the proxy on which the call was made |
out_Requested | Used to return an 'out' argument if `error` is `NULL`: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>A mapping from requested vCard addresses to the corresponding contact handles.</p> <p>Requested addresses that are not valid or understood for this protocol MUST be omitted from the mapping.</p> |
out_Attributes | Used to return an 'out' argument if `error` is `NULL`: <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>A dictionary mapping the contact handles to contact attributes. If any of the requested addresses are in fact invalid, they are simply omitted from this mapping. If contact attributes are not immediately known, the behaviour is defined by the interface; the attribute should either be omitted from the result or replaced with a default value.</p> <p>Requested addresses that are not valid or understood for this protocol MUST be omitted from the mapping.</p> <p>Each contact's attributes will always include at least the identifier that would be obtained by inspecting the handle (<code>org.freedesktop.Telepathy.Connection/contact-id</code>). </p> |
error | `NULL` on success, or an error on failure |
user_data | user-supplied data |
weak_object | user-supplied object |

## Types and Values

## See Also

TpConnection