## EmpathyContact EmpathyContact |

## Synopsis

                        EmpathyContact;
                        EmpathyAvatar;
    enum                EmpathyCapabilities;
    enum                EmpathyContactReady;
    EmpathyContact *    empathy_contact_new                 (McAccount *account);
    EmpathyContact *    empathy_contact_new_full            (McAccount *account,
                                                             const gchar *id,
                                                             const gchar *name);
    const gchar *       empathy_contact_get_id              (EmpathyContact *contact);
    void                empathy_contact_set_id              (EmpathyContact *contact,
                                                             const gchar *id);
    const gchar *       empathy_contact_get_name            (EmpathyContact *contact);
    void                empathy_contact_set_name            (EmpathyContact *contact,
                                                             const gchar *name);
    EmpathyAvatar *     empathy_contact_get_avatar          (EmpathyContact *contact);
    void                empathy_contact_set_avatar          (EmpathyContact *contact,
                                                             EmpathyAvatar *avatar);
    McAccount *         empathy_contact_get_account         (EmpathyContact *contact);
    void                empathy_contact_set_account         (EmpathyContact *contact,
                                                             McAccount *account);
    McPresence          empathy_contact_get_presence        (EmpathyContact *contact);
    void                empathy_contact_set_presence        (EmpathyContact *contact,
                                                             McPresence presence);
    const gchar *       empathy_contact_get_presence_message
                                                            (EmpathyContact *contact);
    void                empathy_contact_set_presence_message
                                                            (EmpathyContact *contact,
                                                             const gchar *message);
    guint               empathy_contact_get_handle          (EmpathyContact *contact);
    void                empathy_contact_set_handle          (EmpathyContact *contact,
                                                             guint handle);
    EmpathyCapabilities  empathy_contact_get_capabilities   (EmpathyContact *contact);
    void                empathy_contact_set_capabilities    (EmpathyContact *contact,
                                                             EmpathyCapabilities capabilities);
    EmpathyContactReady  empathy_contact_get_ready          (EmpathyContact *contact);
    gboolean            empathy_contact_is_user             (EmpathyContact *contact);
    void                empathy_contact_set_is_user         (EmpathyContact *contact,
                                                             gboolean is_user);
    gboolean            empathy_contact_is_online           (EmpathyContact *contact);
    const gchar *       empathy_contact_get_status          (EmpathyContact *contact);
    gboolean            empathy_contact_can_voip            (EmpathyContact *contact);
    gboolean            empathy_contact_can_send_files      (EmpathyContact *contact);
    gboolean            empathy_contact_equal               (gconstpointer v1,
                                                             gconstpointer v2);
    guint               empathy_contact_hash                (gconstpointer key);
    void                empathy_contact_call_when_ready     (EmpathyContact *contact,
                                                             EmpathyContactReady ready,
                                                             EmpathyContactReadyCb *callback,
                                                             gpointeruser_data ,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object);
    void                empathy_contact_run_until_ready     (EmpathyContact *contact,
                                                             EmpathyContactReady ready,
                                                             GMainLoop **loop);
    void                empathy_contact_load_avatar_data    (EmpathyContact *contact,
                                                             const guchar *data,
                                                             const gsize len,
                                                             const gchar *format,
                                                             const gchar *token);
    gboolean            empathy_contact_load_avatar_cache   (EmpathyContact *contact,
                                                             const gchar *token);
    #define             EMPATHY_TYPE_AVATAR
    GType               empathy_avatar_get_type             (void);
    EmpathyAvatar *     empathy_avatar_new                  (guchar *data,
                                                             gsize len,
                                                             gchar *format,
                                                             gchar *token);
    EmpathyAvatar *     empathy_avatar_ref                  (EmpathyAvatar *avatar);
    void                empathy_avatar_unref                (EmpathyAvatar *avatar);
    gboolean            empathy_avatar_save_to_file         (EmpathyAvatar *avatar,
                                                             const gchar *filename,
                                                             GError **error);

## Object Hierarchy

      GObject
       +----EmpathyContact

## Properties

      "account"                  McAccount*            : Read / Write
      "avatar"                   EmpathyAvatar*        : Read / Write
      "capabilities"             EmpathyCapabilities   : Read / Write / Construct
      "handle"                   guint                 : Read / Write
      "id"                       gchar*                : Read / Write
      "is-user"                  gboolean              : Read / Write
      "name"                     gchar*                : Read / Write
      "presence"                 guint                 : Read / Write
      "presence-message"         gchar*                : Read / Write
      "ready"                    EmpathyContactReady   : Read

## Signals

      "presence-changed"                               : Run Last

## Description

## Details

### EmpathyContact

    typedef struct _EmpathyContact EmpathyContact;

### EmpathyAvatar

    typedef struct {
      guchar *data;
      gsize len;
      gchar *format;
      gchar *token;
      guint refcount;
    } EmpathyAvatar;

### enum EmpathyCapabilities

    typedef enum {
      EMPATHY_CAPABILITIES_NONE = 0,
      EMPATHY_CAPABILITIES_AUDIO = 1 << 0,
      EMPATHY_CAPABILITIES_VIDEO = 1 << 1,
      EMPATHY_CAPABILITIES_FT = 1 << 2,
      EMPATHY_CAPABILITIES_UNKNOWN = 1 << 7
    } EmpathyCapabilities;

### enum EmpathyContactReady

    typedef enum {
      EMPATHY_CONTACT_READY_NONE = 0,
      EMPATHY_CONTACT_READY_ID = 1 << 0,
      EMPATHY_CONTACT_READY_HANDLE = 1 << 1,
      EMPATHY_CONTACT_READY_NAME = 1 << 2,
      EMPATHY_CONTACT_READY_ALL = (1 << 3) - 1,
    } EmpathyContactReady;

### empathy_contact_new ()

    EmpathyContact *    empathy_contact_new                 (McAccount *account);

`account` : |
Returns : |

### empathy_contact_new_full ()

    EmpathyContact *    empathy_contact_new_full            (McAccount *account,
                                                             const gchar *id,
                                                             const gchar *name);

`account` : |
`id` : |
`name` : |
Returns : |

### empathy_contact_get_id ()

    const gchar *       empathy_contact_get_id              (EmpathyContact *contact);

`contact` : |
Returns : |

### empathy_contact_set_id ()

    void                empathy_contact_set_id              (EmpathyContact *contact,
                                                             const gchar *id);

`contact` : |
`id` : |

### empathy_contact_get_name ()

    const gchar *       empathy_contact_get_name            (EmpathyContact *contact);

`contact` : |
Returns : |

### empathy_contact_set_name ()

    void                empathy_contact_set_name            (EmpathyContact *contact,
                                                             const gchar *name);

`contact` : |
`name` : |

### empathy_contact_get_avatar ()

    EmpathyAvatar *     empathy_contact_get_avatar          (EmpathyContact *contact);

`contact` : |
Returns : |

### empathy_contact_set_avatar ()

    void                empathy_contact_set_avatar          (EmpathyContact *contact,
                                                             EmpathyAvatar *avatar);

`contact` : |
`avatar` : |

### empathy_contact_get_account ()

    McAccount *         empathy_contact_get_account         (EmpathyContact *contact);

`contact` : |
Returns : |

### empathy_contact_set_account ()

    void                empathy_contact_set_account         (EmpathyContact *contact,
                                                             McAccount *account);

`contact` : |
`account` : |

### empathy_contact_get_presence ()

    McPresence          empathy_contact_get_presence        (EmpathyContact *contact);

`contact` : |
Returns : |

### empathy_contact_set_presence ()

    void                empathy_contact_set_presence        (EmpathyContact *contact,
                                                             McPresence presence);

`contact` : |
`presence` : |

### empathy_contact_get_presence_message ()

    const gchar *       empathy_contact_get_presence_message
                                                            (EmpathyContact *contact);

`contact` : |
Returns : |

### empathy_contact_set_presence_message ()

    void                empathy_contact_set_presence_message
                                                            (EmpathyContact *contact,
                                                             const gchar *message);

`contact` : |
`message` : |

### empathy_contact_get_handle ()

    guint               empathy_contact_get_handle          (EmpathyContact *contact);

`contact` : |
Returns : |

### empathy_contact_set_handle ()

    void                empathy_contact_set_handle          (EmpathyContact *contact,
                                                             guint handle);

`contact` : |
`handle` : |

### empathy_contact_get_capabilities ()

    EmpathyCapabilities  empathy_contact_get_capabilities   (EmpathyContact *contact);

`contact` : |
Returns : |

### empathy_contact_set_capabilities ()

    void                empathy_contact_set_capabilities    (EmpathyContact *contact,
                                                             EmpathyCapabilities capabilities);

`contact` : |
`capabilities` : |

### empathy_contact_get_ready ()

    EmpathyContactReady  empathy_contact_get_ready          (EmpathyContact *contact);

`contact` : |
Returns : |

### empathy_contact_is_user ()

    gboolean            empathy_contact_is_user             (EmpathyContact *contact);

`contact` : |
Returns : |

### empathy_contact_set_is_user ()

    void                empathy_contact_set_is_user         (EmpathyContact *contact,
                                                             gboolean is_user);

`contact` : |
`is_user` : |

### empathy_contact_is_online ()

    gboolean            empathy_contact_is_online           (EmpathyContact *contact);

`contact` : |
Returns : |

### empathy_contact_get_status ()

    const gchar *       empathy_contact_get_status          (EmpathyContact *contact);

`contact` : |
Returns : |

### empathy_contact_can_voip ()

    gboolean            empathy_contact_can_voip            (EmpathyContact *contact);

`contact` : |
Returns : |

### empathy_contact_can_send_files ()

    gboolean            empathy_contact_can_send_files      (EmpathyContact *contact);

`contact` : |
Returns : |

### empathy_contact_equal ()

    gboolean            empathy_contact_equal               (gconstpointer v1,
                                                             gconstpointer v2);

`v1` : |
`v2` : |
Returns : |

### empathy_contact_hash ()

    guint               empathy_contact_hash                (gconstpointer key);

`key` : |
Returns : |

### empathy_contact_call_when_ready ()

    void                empathy_contact_call_when_ready     (EmpathyContact *contact,
                                                             EmpathyContactReady ready,
                                                             EmpathyContactReadyCb *callback,
                                                             gpointeruser_data ,
                                                             GDestroyNotify destroy,
                                                             GObject *weak_object);

`contact` : |
`ready` : |
`callback` : |
`Param4` : |
`destroy` : |
`weak_object` : |

### empathy_contact_run_until_ready ()

    void                empathy_contact_run_until_ready     (EmpathyContact *contact,
                                                             EmpathyContactReady ready,
                                                             GMainLoop **loop);

`contact` : |
`ready` : |
`loop` : |

### empathy_contact_load_avatar_data ()

    void                empathy_contact_load_avatar_data    (EmpathyContact *contact,
                                                             const guchar *data,
                                                             const gsize len,
                                                             const gchar *format,
                                                             const gchar *token);

`contact` : |
`data` : |
`len` : |
`format` : |
`token` : |

### empathy_contact_load_avatar_cache ()

    gboolean            empathy_contact_load_avatar_cache   (EmpathyContact *contact,
                                                             const gchar *token);

`contact` : |
`token` : |
Returns : |

### EMPATHY_TYPE_AVATAR

    #define EMPATHY_TYPE_AVATAR (empathy_avatar_get_type ())

### empathy_avatar_get_type ()

    GType               empathy_avatar_get_type             (void);

Returns : |

### empathy_avatar_new ()

    EmpathyAvatar *     empathy_avatar_new                  (guchar *data,
                                                             gsize len,
                                                             gchar *format,
                                                             gchar *token);

`data` : |
`len` : |
`format` : |
`token` : |
Returns : |

### empathy_avatar_ref ()

    EmpathyAvatar *     empathy_avatar_ref                  (EmpathyAvatar *avatar);

`avatar` : |
Returns : |

### empathy_avatar_unref ()

    void                empathy_avatar_unref                (EmpathyAvatar *avatar);

`avatar` : |

### empathy_avatar_save_to_file ()

    gboolean            empathy_avatar_save_to_file         (EmpathyAvatar *avatar,
                                                             const gchar *filename,
                                                             GError **error);

Save the avatar to a file named filename

`avatar` : | the avatar
`filename` : | name of a file to write avatar to
`error` : | return location for a GError, or NULL
Returns : | `TRUE` on success, `FALSE` if an error occurred

## Property Details

### The `"account"` property

      "account"                  McAccount*            : Read / Write

The account associated with the contact.

### The `"avatar"` property

      "avatar"                   EmpathyAvatar*        : Read / Write

The avatar image.

### The `"capabilities"` property

      "capabilities"             EmpathyCapabilities   : Read / Write / Construct

Capabilities of the contact.

Default value: EMPATHY_CAPABILITIES_UNKNOWN

### The `"handle"` property

      "handle"                   guint                 : Read / Write

The handle of the contact.

Default value: 0

### The `"id"` property

      "id"                       gchar*                : Read / Write

String identifying contact.

Default value: NULL

### The `"is-user"` property

      "is-user"                  gboolean              : Read / Write

Is contact the user.

Default value: FALSE

### The `"name"` property

      "name"                     gchar*                : Read / Write

The name of the contact.

Default value: NULL

### The `"presence"` property

      "presence"                 guint                 : Read / Write

Presence of contact.

Allowed values: <= 7

Default value: 0

### The `"presence-message"` property

      "presence-message"         gchar*                : Read / Write

Presence message of contact.

Default value: NULL

### The `"ready"` property

      "ready"                    EmpathyContactReady   : Read

Flags for ready properties.

## Signal Details

### The `"presence-changed"` signal

    void                user_function                      (EmpathyContact *empathycontact,
                                                            McPresence      arg1,
                                                            McPresence      arg2,
                                                            gpointer        user_data)           : Run Last

`empathycontact` : | the object which received the signal.
`arg1` : |
`arg2` : |
`user_data` : | user data set when the signal handler was connected.