Connection Avatars interface

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

## Synopsis

    #include <telepathy-glib/connection.h>

    gboolean            tp_cli_connection_interface_avatars_run_clear_avatar
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             GError **error,
                                                             GMainLoop **loop);
    gboolean            tp_cli_connection_interface_avatars_run_get_avatar_requirements
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             gchar ***out0,
                                                             guint *out1,
                                                             guint *out2,
                                                             guint *out3,
                                                             guint *out4,
                                                             guint *out5,
                                                             GError **error,
                                                             GMainLoop **loop);
    gboolean            tp_cli_connection_interface_avatars_run_get_avatar_tokens
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             const GArray *in_contacts,
                                                             gchar ***out0,
                                                             GError **error,
                                                             GMainLoop **loop);
    gboolean            tp_cli_connection_interface_avatars_run_get_known_avatar_tokens
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             const GArray *in_contacts,
                                                             GHashTable **out0,
                                                             GError **error,
                                                             GMainLoop **loop);
    gboolean            tp_cli_connection_interface_avatars_run_request_avatar
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             guint in_contact,
                                                             GArray **out0,
                                                             gchar **out1,
                                                             GError **error,
                                                             GMainLoop **loop);
    gboolean            tp_cli_connection_interface_avatars_run_request_avatars
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             const GArray *in_contacts,
                                                             GError **error,
                                                             GMainLoop **loop);
    gboolean            tp_cli_connection_interface_avatars_run_set_avatar
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             const GArray *in_avatar,
                                                             const gchar *in_mime_type,
                                                             gchar **out0,
                                                             GError **error,
                                                             GMainLoop **loop);
    TpProxyPendingCall* tp_cli_connection_interface_avatars_call_clear_avatar
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             tp_cli_connection_interface_avatars_callback_for_clear_avatar callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object);
    TpProxyPendingCall* tp_cli_connection_interface_avatars_call_get_avatar_requirements
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             tp_cli_connection_interface_avatars_callback_for_get_avatar_requirements callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object);
    TpProxyPendingCall* tp_cli_connection_interface_avatars_call_get_avatar_tokens
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             const GArray *in_contacts,
                                                             tp_cli_connection_interface_avatars_callback_for_get_avatar_tokens callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object);
    TpProxyPendingCall* tp_cli_connection_interface_avatars_call_get_known_avatar_tokens
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             const GArray *in_contacts,
                                                             tp_cli_connection_interface_avatars_callback_for_get_known_avatar_tokens callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object);
    TpProxyPendingCall* tp_cli_connection_interface_avatars_call_request_avatar
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             guint in_contact,
                                                             tp_cli_connection_interface_avatars_callback_for_request_avatar callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object);
    TpProxyPendingCall* tp_cli_connection_interface_avatars_call_request_avatars
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             const GArray *in_contacts,
                                                             tp_cli_connection_interface_avatars_callback_for_request_avatars callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object);
    TpProxyPendingCall* tp_cli_connection_interface_avatars_call_set_avatar
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             const GArray *in_avatar,
                                                             const gchar *in_mime_type,
                                                             tp_cli_connection_interface_avatars_callback_for_set_avatar callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object);
    void                (*tp_cli_connection_interface_avatars_callback_for_clear_avatar)
                                                            (TpConnection *proxy,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);
    void                (*tp_cli_connection_interface_avatars_callback_for_get_avatar_requirements)
                                                            (TpConnection *proxy,
                                                             const gchar **out0,
                                                             guint out1,
                                                             guint out2,
                                                             guint out3,
                                                             guint out4,
                                                             guint out5,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);
    void                (*tp_cli_connection_interface_avatars_callback_for_get_avatar_tokens)
                                                            (TpConnection *proxy,
                                                             const gchar **out0,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);
    void                (*tp_cli_connection_interface_avatars_callback_for_get_known_avatar_tokens)
                                                            (TpConnection *proxy,
                                                             GHashTable *out0,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);
    void                (*tp_cli_connection_interface_avatars_callback_for_request_avatar)
                                                            (TpConnection *proxy,
                                                             const GArray *out0,
                                                             const gchar *out1,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);
    void                (*tp_cli_connection_interface_avatars_callback_for_request_avatars)
                                                            (TpConnection *proxy,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);
    void                (*tp_cli_connection_interface_avatars_callback_for_set_avatar)
                                                            (TpConnection *proxy,
                                                             const gchar *out0,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);
    TpProxySignalConnection* tp_cli_connection_interface_avatars_connect_to_avatar_retrieved
                                                            (TpConnection *proxy,
                                                             tp_cli_connection_interface_avatars_signal_callback_avatar_retrieved callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object,
                                                             GError **error);
    TpProxySignalConnection* tp_cli_connection_interface_avatars_connect_to_avatar_updated
                                                            (TpConnection *proxy,
                                                             tp_cli_connection_interface_avatars_signal_callback_avatar_updated callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object,
                                                             GError **error);
    void                (*tp_cli_connection_interface_avatars_signal_callback_avatar_retrieved)
                                                            (TpConnection *proxy,
                                                             guint arg_contact,
                                                             const gchar *arg_token,
                                                             const GArray *arg_avatar,
                                                             const gchar *arg_type,
                                                             gpointer user_data,
                                                             GObject *weak_object);
    void                (*tp_cli_connection_interface_avatars_signal_callback_avatar_updated)
                                                            (TpConnection *proxy,
                                                             guint arg_contact,
                                                             const gchar *arg_new_avatar_token,
                                                             gpointer user_data,
                                                             GObject *weak_object);

## Description

Most instant messaging protocols allow users to set an icon or avatar. This section documents the auto-generated C wrappers for the Avatar interface, used with TpConnection objects.

## Details

### tp_cli_connection_interface_avatars_run_clear_avatar ()

    gboolean            tp_cli_connection_interface_avatars_run_clear_avatar
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             GError **error,
                                                             GMainLoop **loop);

Call the method ClearAvatar 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.

Remove the avatar image for this connection.

`proxy` : | A TpConnection or subclass
`timeout_ms` : | Timeout in milliseconds, or -1 for default
`error` : | If not `NULL`, used to return errors if `FALSE` is returned
`loop` : | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED`
Returns : | TRUE on success, FALSE and sets `error` on error

### tp_cli_connection_interface_avatars_run_get_avatar_requirements ()

    gboolean            tp_cli_connection_interface_avatars_run_get_avatar_requirements
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             gchar ***out0,
                                                             guint *out1,
                                                             guint *out2,
                                                             guint *out3,
                                                             guint *out4,
                                                             guint *out5,
                                                             GError **error,
                                                             GMainLoop **loop);

Call the method GetAvatarRequirements 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.

Get the required format of avatars on this connection.

`proxy` : | A TpConnection or subclass
`timeout_ms` : | Timeout in milliseconds, or -1 for default
`out0` : | Used to return an 'out' argument if `TRUE` is returned: An array of supported MIME types (eg image/jpeg)
`out1` : | Used to return an 'out' argument if `TRUE` is returned: The minimum image width in pixels
`out2` : | Used to return an 'out' argument if `TRUE` is returned: The minimum image height in pixels
`out3` : | Used to return an 'out' argument if `TRUE` is returned: The maximum image width in pixels, or 0 if there is no limit
`out4` : | Used to return an 'out' argument if `TRUE` is returned: The maximum image height in pixels, or 0 if there is no limit
`out5` : | Used to return an 'out' argument if `TRUE` is returned: The maximum image size in bytes, or 0 if there is no limit
`error` : | If not `NULL`, used to return errors if `FALSE` is returned
`loop` : | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED`
Returns : | TRUE on success, FALSE and sets `error` on error

### tp_cli_connection_interface_avatars_run_get_avatar_tokens ()

    gboolean            tp_cli_connection_interface_avatars_run_get_avatar_tokens
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             const GArray *in_contacts,
                                                             gchar ***out0,
                                                             GError **error,
                                                             GMainLoop **loop);

Call the method GetAvatarTokens 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.

Get the unique tokens for all of the given contacts' avatars. Using this method in new Telepathy clients is deprecated; use GetKnownAvatarTokens instead.

`proxy` : | A TpConnection or subclass
`timeout_ms` : | Timeout in milliseconds, or -1 for default
`in_contacts` : | Used to pass an 'in' argument: An array of handles representing contacts
`out0` : | Used to return an 'out' argument if `TRUE` is returned: An array of avatar tokens or empty strings (if no avatar is set) in the same order as the given array of contact handles
`error` : | If not `NULL`, used to return errors if `FALSE` is returned
`loop` : | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED`
Returns : | TRUE on success, FALSE and sets `error` on error

### tp_cli_connection_interface_avatars_run_get_known_avatar_tokens ()

    gboolean            tp_cli_connection_interface_avatars_run_get_known_avatar_tokens
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             const GArray *in_contacts,
                                                             GHashTable **out0,
                                                             GError **error,
                                                             GMainLoop **loop);

Call the method GetKnownAvatarTokens 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.

Get the unique tokens for the given contacts' avatars. These tokens can be persisted across connections, and should be used by the client to check whether the avatars have been updated. A CM must always have the tokens for the self handle if one is set (even if it is set to no avatar). Otherwise, only tokens that are already known or that can be discovered without retrieving the complete avatar are returned. An empty token means the given contact has no avatar.

`proxy` : | A TpConnection or subclass
`timeout_ms` : | Timeout in milliseconds, or -1 for default
`in_contacts` : | Used to pass an 'in' argument: An array of handles representing contacts
`out0` : | Used to return an 'out' argument if `TRUE` is returned: A dictionary of handles mapped to avatar tokens, containing only the known avatar tokens.
`error` : | If not `NULL`, used to return errors if `FALSE` is returned
`loop` : | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED`
Returns : | TRUE on success, FALSE and sets `error` on error

### tp_cli_connection_interface_avatars_run_request_avatar ()

    gboolean            tp_cli_connection_interface_avatars_run_request_avatar
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             guint in_contact,
                                                             GArray **out0,
                                                             gchar **out1,
                                                             GError **error,
                                                             GMainLoop **loop);

Call the method RequestAvatar 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.

Request the avatar for a given contact. Using this method in new Telepathy clients is deprecated; use RequestAvatars instead.

`proxy` : | A TpConnection or subclass
`timeout_ms` : | Timeout in milliseconds, or -1 for default
`in_contact` : | Used to pass an 'in' argument: An integer handle for the contact to request the avatar for
`out0` : | Used to return an 'out' argument if `TRUE` is returned: An array of bytes containing the image data
`out1` : | Used to return an 'out' argument if `TRUE` is returned: A string containing the image MIME type (eg image/jpeg), or empty if unknown
`error` : | If not `NULL`, used to return errors if `FALSE` is returned
`loop` : | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED`
Returns : | TRUE on success, FALSE and sets `error` on error

### tp_cli_connection_interface_avatars_run_request_avatars ()

    gboolean            tp_cli_connection_interface_avatars_run_request_avatars
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             const GArray *in_contacts,
                                                             GError **error,
                                                             GMainLoop **loop);

Call the method RequestAvatars 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.

Request avatars for a number of contacts. The AvatarRetrieved signal is emitted for each avatar retrieved. If the handles are valid but retrieving an avatar fails (for any reason, including the contact not having an avatar) the AvatarRetrieved signal is not emitted for that contact.

`proxy` : | A TpConnection or subclass
`timeout_ms` : | Timeout in milliseconds, or -1 for default
`in_contacts` : | Used to pass an 'in' argument: The contacts to retrieve avatars for
`error` : | If not `NULL`, used to return errors if `FALSE` is returned
`loop` : | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED`
Returns : | TRUE on success, FALSE and sets `error` on error

### tp_cli_connection_interface_avatars_run_set_avatar ()

    gboolean            tp_cli_connection_interface_avatars_run_set_avatar
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             const GArray *in_avatar,
                                                             const gchar *in_mime_type,
                                                             gchar **out0,
                                                             GError **error,
                                                             GMainLoop **loop);

Call the method SetAvatar 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.

Set a new avatar image for this connection. The avatar image must respect the requirements obtained by GetAvatarRequirements.

`proxy` : | A TpConnection or subclass
`timeout_ms` : | Timeout in milliseconds, or -1 for default
`in_avatar` : | Used to pass an 'in' argument: An array of bytes representing the avatar image data
`in_mime_type` : | Used to pass an 'in' argument: A string representing the image MIME type
`out0` : | Used to return an 'out' argument if `TRUE` is returned: The string token of the new avatar
`error` : | If not `NULL`, used to return errors if `FALSE` is returned
`loop` : | If not `NULL`, set before re-entering the main loop, to point to a GMainLoop which can be used to cancel this call with `g_main_loop_quit()`, causing a return of `FALSE` with `error` set to `TP_DBUS_ERROR_CANCELLED`
Returns : | TRUE on success, FALSE and sets `error` on error

### tp_cli_connection_interface_avatars_call_clear_avatar ()

    TpProxyPendingCall* tp_cli_connection_interface_avatars_call_clear_avatar
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             tp_cli_connection_interface_avatars_callback_for_clear_avatar callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object);

Start a ClearAvatar method call.

Remove the avatar image for this connection.

`proxy` : | the TpProxy
`timeout_ms` : | the timeout in milliseconds, or -1 to use the default
`callback` : | called when the method call succeeds or fails
`user_data` : | user-supplied data passed to the callback
`destroy` : | called with the user_data as argument, after the call has succeeded, failed or been cancelled
`weak_object` : | A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected
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_avatars_call_get_avatar_requirements ()

    TpProxyPendingCall* tp_cli_connection_interface_avatars_call_get_avatar_requirements
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             tp_cli_connection_interface_avatars_callback_for_get_avatar_requirements callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object);

Start a GetAvatarRequirements method call.

Get the required format of avatars on this connection.

`proxy` : | the TpProxy
`timeout_ms` : | the timeout in milliseconds, or -1 to use the default
`callback` : | called when the method call succeeds or fails
`user_data` : | user-supplied data passed to the callback
`destroy` : | called with the user_data as argument, after the call has succeeded, failed or been cancelled
`weak_object` : | A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected
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_avatars_call_get_avatar_tokens ()

    TpProxyPendingCall* tp_cli_connection_interface_avatars_call_get_avatar_tokens
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             const GArray *in_contacts,
                                                             tp_cli_connection_interface_avatars_callback_for_get_avatar_tokens callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object);

Start a GetAvatarTokens method call.

Get the unique tokens for all of the given contacts' avatars. Using this method in new Telepathy clients is deprecated; use GetKnownAvatarTokens instead.

`proxy` : | the TpProxy
`timeout_ms` : | the timeout in milliseconds, or -1 to use the default
`in_contacts` : | Used to pass an 'in' argument: An array of handles representing contacts
`callback` : | called when the method call succeeds or fails
`user_data` : | user-supplied data passed to the callback
`destroy` : | called with the user_data as argument, after the call has succeeded, failed or been cancelled
`weak_object` : | A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected
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_avatars_call_get_known_avatar_tokens ()

    TpProxyPendingCall* tp_cli_connection_interface_avatars_call_get_known_avatar_tokens
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             const GArray *in_contacts,
                                                             tp_cli_connection_interface_avatars_callback_for_get_known_avatar_tokens callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object);

Start a GetKnownAvatarTokens method call.

Get the unique tokens for the given contacts' avatars. These tokens can be persisted across connections, and should be used by the client to check whether the avatars have been updated. A CM must always have the tokens for the self handle if one is set (even if it is set to no avatar). Otherwise, only tokens that are already known or that can be discovered without retrieving the complete avatar are returned. An empty token means the given contact has no avatar.

`proxy` : | the TpProxy
`timeout_ms` : | the timeout in milliseconds, or -1 to use the default
`in_contacts` : | Used to pass an 'in' argument: An array of handles representing contacts
`callback` : | called when the method call succeeds or fails
`user_data` : | user-supplied data passed to the callback
`destroy` : | called with the user_data as argument, after the call has succeeded, failed or been cancelled
`weak_object` : | A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected
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_avatars_call_request_avatar ()

    TpProxyPendingCall* tp_cli_connection_interface_avatars_call_request_avatar
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             guint in_contact,
                                                             tp_cli_connection_interface_avatars_callback_for_request_avatar callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object);

Start a RequestAvatar method call.

Request the avatar for a given contact. Using this method in new Telepathy clients is deprecated; use RequestAvatars instead.

`proxy` : | the TpProxy
`timeout_ms` : | the timeout in milliseconds, or -1 to use the default
`in_contact` : | Used to pass an 'in' argument: An integer handle for the contact to request the avatar for
`callback` : | called when the method call succeeds or fails
`user_data` : | user-supplied data passed to the callback
`destroy` : | called with the user_data as argument, after the call has succeeded, failed or been cancelled
`weak_object` : | A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected
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_avatars_call_request_avatars ()

    TpProxyPendingCall* tp_cli_connection_interface_avatars_call_request_avatars
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             const GArray *in_contacts,
                                                             tp_cli_connection_interface_avatars_callback_for_request_avatars callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object);

Start a RequestAvatars method call.

Request avatars for a number of contacts. The AvatarRetrieved signal is emitted for each avatar retrieved. If the handles are valid but retrieving an avatar fails (for any reason, including the contact not having an avatar) the AvatarRetrieved signal is not emitted for that contact.

`proxy` : | the TpProxy
`timeout_ms` : | the timeout in milliseconds, or -1 to use the default
`in_contacts` : | Used to pass an 'in' argument: The contacts to retrieve avatars for
`callback` : | called when the method call succeeds or fails
`user_data` : | user-supplied data passed to the callback
`destroy` : | called with the user_data as argument, after the call has succeeded, failed or been cancelled
`weak_object` : | A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected
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_avatars_call_set_avatar ()

    TpProxyPendingCall* tp_cli_connection_interface_avatars_call_set_avatar
                                                            (TpConnection *proxy,
                                                             gint timeout_ms,
                                                             const GArray *in_avatar,
                                                             const gchar *in_mime_type,
                                                             tp_cli_connection_interface_avatars_callback_for_set_avatar callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object);

Start a SetAvatar method call.

Set a new avatar image for this connection. The avatar image must respect the requirements obtained by GetAvatarRequirements.

`proxy` : | the TpProxy
`timeout_ms` : | the timeout in milliseconds, or -1 to use the default
`in_avatar` : | Used to pass an 'in' argument: An array of bytes representing the avatar image data
`in_mime_type` : | Used to pass an 'in' argument: A string representing the image MIME type
`callback` : | called when the method call succeeds or fails
`user_data` : | user-supplied data passed to the callback
`destroy` : | called with the user_data as argument, after the call has succeeded, failed or been cancelled
`weak_object` : | A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected
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_avatars_callback_for_clear_avatar ()

    void                (*tp_cli_connection_interface_avatars_callback_for_clear_avatar)
                                                            (TpConnection *proxy,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);

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

`proxy` : | the proxy on which the call was made
`error` : | `NULL` on success, or an error on failure
`user_data` : | user-supplied data
`weak_object` : | user-supplied object

### tp_cli_connection_interface_avatars_callback_for_get_avatar_requirements ()

    void                (*tp_cli_connection_interface_avatars_callback_for_get_avatar_requirements)
                                                            (TpConnection *proxy,
                                                             const gchar **out0,
                                                             guint out1,
                                                             guint out2,
                                                             guint out3,
                                                             guint out4,
                                                             guint out5,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);

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

`proxy` : | the proxy on which the call was made
`out0` : | Used to return an 'out' argument if `error` is `NULL`: An array of supported MIME types (eg image/jpeg)
`out1` : | Used to return an 'out' argument if `error` is `NULL`: The minimum image width in pixels
`out2` : | Used to return an 'out' argument if `error` is `NULL`: The minimum image height in pixels
`out3` : | Used to return an 'out' argument if `error` is `NULL`: The maximum image width in pixels, or 0 if there is no limit
`out4` : | Used to return an 'out' argument if `error` is `NULL`: The maximum image height in pixels, or 0 if there is no limit
`out5` : | Used to return an 'out' argument if `error` is `NULL`: The maximum image size in bytes, or 0 if there is no limit
`error` : | `NULL` on success, or an error on failure
`user_data` : | user-supplied data
`weak_object` : | user-supplied object

### tp_cli_connection_interface_avatars_callback_for_get_avatar_tokens ()

    void                (*tp_cli_connection_interface_avatars_callback_for_get_avatar_tokens)
                                                            (TpConnection *proxy,
                                                             const gchar **out0,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);

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

`proxy` : | the proxy on which the call was made
`out0` : | Used to return an 'out' argument if `error` is `NULL`: An array of avatar tokens or empty strings (if no avatar is set) in the same order as the given array of contact handles
`error` : | `NULL` on success, or an error on failure
`user_data` : | user-supplied data
`weak_object` : | user-supplied object

### tp_cli_connection_interface_avatars_callback_for_get_known_avatar_tokens ()

    void                (*tp_cli_connection_interface_avatars_callback_for_get_known_avatar_tokens)
                                                            (TpConnection *proxy,
                                                             GHashTable *out0,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);

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

`proxy` : | the proxy on which the call was made
`out0` : | Used to return an 'out' argument if `error` is `NULL`: A dictionary of handles mapped to avatar tokens, containing only the known avatar tokens.
`error` : | `NULL` on success, or an error on failure
`user_data` : | user-supplied data
`weak_object` : | user-supplied object

### tp_cli_connection_interface_avatars_callback_for_request_avatar ()

    void                (*tp_cli_connection_interface_avatars_callback_for_request_avatar)
                                                            (TpConnection *proxy,
                                                             const GArray *out0,
                                                             const gchar *out1,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);

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

`proxy` : | the proxy on which the call was made
`out0` : | Used to return an 'out' argument if `error` is `NULL`: An array of bytes containing the image data
`out1` : | Used to return an 'out' argument if `error` is `NULL`: A string containing the image MIME type (eg image/jpeg), or empty if unknown
`error` : | `NULL` on success, or an error on failure
`user_data` : | user-supplied data
`weak_object` : | user-supplied object

### tp_cli_connection_interface_avatars_callback_for_request_avatars ()

    void                (*tp_cli_connection_interface_avatars_callback_for_request_avatars)
                                                            (TpConnection *proxy,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);

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

`proxy` : | the proxy on which the call was made
`error` : | `NULL` on success, or an error on failure
`user_data` : | user-supplied data
`weak_object` : | user-supplied object

### tp_cli_connection_interface_avatars_callback_for_set_avatar ()

    void                (*tp_cli_connection_interface_avatars_callback_for_set_avatar)
                                                            (TpConnection *proxy,
                                                             const gchar *out0,
                                                             const GError *error,
                                                             gpointer user_data,
                                                             GObject *weak_object);

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

`proxy` : | the proxy on which the call was made
`out0` : | Used to return an 'out' argument if `error` is `NULL`: The string token of the new avatar
`error` : | `NULL` on success, or an error on failure
`user_data` : | user-supplied data
`weak_object` : | user-supplied object

### tp_cli_connection_interface_avatars_connect_to_avatar_retrieved ()

    TpProxySignalConnection* tp_cli_connection_interface_avatars_connect_to_avatar_retrieved
                                                            (TpConnection *proxy,
                                                             tp_cli_connection_interface_avatars_signal_callback_avatar_retrieved callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object,
                                                             GError **error);

Connect a handler to the signal AvatarRetrieved.

Emitted when the avatar for a contact has been retrieved.

`proxy` : | A TpConnection or subclass
`callback` : | Callback to be called when the signal is received
`user_data` : | User-supplied data for the callback
`destroy` : | Destructor for the user-supplied data, which will be called when this signal is disconnected, or before this function returns `NULL`
`weak_object` : | A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected
`error` : | If not `NULL`, used to raise an error if `NULL` is returned
Returns : | a TpProxySignalConnection containing all of the above, which can be used to disconnect the signal; or `NULL` if the proxy does not have the desired interface or has become invalid.

### tp_cli_connection_interface_avatars_connect_to_avatar_updated ()

    TpProxySignalConnection* tp_cli_connection_interface_avatars_connect_to_avatar_updated
                                                            (TpConnection *proxy,
                                                             tp_cli_connection_interface_avatars_signal_callback_avatar_updated callback,
                                                             gpointer user_data,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object,
                                                             GError **error);

Connect a handler to the signal AvatarUpdated.

Emitted when the avatar for a contact has been updated, or first discovered on this connection. If the token differs from the token associated with the client's cached avatar for this contact, the new avatar should be requested with RequestAvatar.

`proxy` : | A TpConnection or subclass
`callback` : | Callback to be called when the signal is received
`user_data` : | User-supplied data for the callback
`destroy` : | Destructor for the user-supplied data, which will be called when this signal is disconnected, or before this function returns `NULL`
`weak_object` : | A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected
`error` : | If not `NULL`, used to raise an error if `NULL` is returned
Returns : | a TpProxySignalConnection containing all of the above, which can be used to disconnect the signal; or `NULL` if the proxy does not have the desired interface or has become invalid.

### tp_cli_connection_interface_avatars_signal_callback_avatar_retrieved ()

    void                (*tp_cli_connection_interface_avatars_signal_callback_avatar_retrieved)
                                                            (TpConnection *proxy,
                                                             guint arg_contact,
                                                             const gchar *arg_token,
                                                             const GArray *arg_avatar,
                                                             const gchar *arg_type,
                                                             gpointer user_data,
                                                             GObject *weak_object);

Represents the signature of a callback for the signal AvatarRetrieved.

`proxy` : | The proxy on which `tp_cli_connection_interface_avatars_connect_to_avatar_retrieved()` was called
`arg_contact` : | The contact whose avatar has been retrieved
`arg_token` : | The token corresponding to the avatar
`arg_avatar` : | An array of bytes containing the image data
`arg_type` : | A string containing the image MIME type (eg image/jpeg), or empty if unknown
`user_data` : | User-supplied data
`weak_object` : | User-supplied weakly referenced object

### tp_cli_connection_interface_avatars_signal_callback_avatar_updated ()

    void                (*tp_cli_connection_interface_avatars_signal_callback_avatar_updated)
                                                            (TpConnection *proxy,
                                                             guint arg_contact,
                                                             const gchar *arg_new_avatar_token,
                                                             gpointer user_data,
                                                             GObject *weak_object);

Represents the signature of a callback for the signal AvatarUpdated.

`proxy` : | The proxy on which `tp_cli_connection_interface_avatars_connect_to_avatar_updated()` was called
`arg_contact` : | An integer handle for the contact whose avatar has changed
`arg_new_avatar_token` : | Unique token for their new avatar
`user_data` : | User-supplied data
`weak_object` : | User-supplied weakly referenced object

## See Also

TpConnection