McProfile

## McProfile McProfile — Account profiles. |

## Synopsis

    enum                McProfileCapabilityFlags;
                        McProfile;
    McProfile*          mc_profile_lookup                   (const gchar *unique_name);
    McProfile*          mc_profile_lookup_default_for_vcard_field
                                                            (const gchar *vcard_field);
    void                mc_profile_free                     (McProfile *id);
    void                mc_profile_clear_cache              (void);
    GList*              mc_profiles_list                    (void);
    GList*              mc_profiles_list_by_vcard_field     (const gchar *vcard_field);
    void                mc_profiles_free_list               (GList *list);
    const gchar*        mc_profile_get_unique_name          (McProfile *id);
    const gchar*        mc_profile_get_configuration_ui     (McProfile *id);
    const gchar*        mc_profile_get_display_name         (McProfile *id);
    const gchar*        mc_profile_get_icon_name            (McProfile *id);
    const gchar*        mc_profile_get_branding_icon_name   (McProfile *id);
    const gchar*        mc_profile_get_vcard_field          (McProfile *id);
    const gchar*        mc_profile_get_default_account_domain
                                                            (McProfile *id);
    McProtocol*         mc_profile_get_protocol             (McProfile *id);
    const gchar*        mc_profile_get_protocol_name        (McProfile *id);
    gboolean            mc_profile_is_default_for_vcard_field
                                                            (McProfile *id);
    McProfileCapabilityFlags mc_profile_get_capabilities    (McProfile *id);
    const gchar*        mc_profile_get_default_setting      (McProfile *id,
                                                             const gchar *setting);

## Object Hierarchy

      GObject
       +----McProfile

## Description

A McProfile represent a network service and stores some relevant about it, such as the underlying protocol, the supported channel types, the default server, etc. as well as some client-side information, such as the filename of the icon to be shown in association with it.

The McProfile API provides a way for managing profiles.

## Details

### enum McProfileCapabilityFlags

    typedef enum
    {
        MC_PROFILE_CAPABILITY_NONE = 0,
        MC_PROFILE_CAPABILITY_CHAT_P2P = 1 << 0,
        MC_PROFILE_CAPABILITY_CHAT_ROOM = 1 << 1,
        MC_PROFILE_CAPABILITY_CHAT_ROOM_LIST = 1 << 2,
        MC_PROFILE_CAPABILITY_VOICE_P2P = 1 << 3,
        MC_PROFILE_CAPABILITY_CONTACT_SEARCH = 1 << 4,
        MC_PROFILE_CAPABILITY_SPLIT_ACCOUNT = 1 << 5,
        MC_PROFILE_CAPABILITY_REGISTRATION_UI = 1 << 6,
        MC_PROFILE_CAPABILITY_SUPPORTS_AVATARS = 1 << 7,
        MC_PROFILE_CAPABILITY_SUPPORTS_ALIAS = 1 << 8,
        MC_PROFILE_CAPABILITY_SUPPORTS_ROSTER = 1 << 9,
    } McProfileCapabilityFlags;

### McProfile

    typedef struct _McProfile McProfile;

### mc_profile_lookup ()

    McProfile*          mc_profile_lookup                   (const gchar *unique_name);

Get the profile whose unique name is the one specified. If no profile with that name exists, a new one is created. The returned object's reference count is incremented.

`unique_name` : | The unique name of the profile.
Returns : | The McProfile.

### mc_profile_lookup_default_for_vcard_field ()

    McProfile*          mc_profile_lookup_default_for_vcard_field
                                                            (const gchar *vcard_field);

Get the profile whose vcard field is the one specified. The returned object's reference count is incremented.

`vcard_field` : | The vcard field.
Returns : | The McProfile.

### mc_profile_free ()

    void                mc_profile_free                     (McProfile *id);

Frees (unref) the given profile. DEPRECATED, use `g_object_unref()` instead.

`id` : | The McProfile.

### mc_profile_clear_cache ()

    void                mc_profile_clear_cache              (void);

Clears the profiles cache.

### mc_profiles_list ()

    GList*              mc_profiles_list                    (void);

Lists all configured profiles.

Returns : | a GList of the profiles (must be freed with mc_profiles_free_list).

### mc_profiles_list_by_vcard_field ()

    GList*              mc_profiles_list_by_vcard_field     (const gchar *vcard_field);

Lists all configured profiles with the given vcard field..

`vcard_field` : | The vcard field.
Returns : | a GList of the profiles (must be freed with mc_profiles_free_list).

### mc_profiles_free_list ()

    void                mc_profiles_free_list               (GList *list);

Frees a list of profiles.

`list` : | The GList of McProfile.

### mc_profile_get_unique_name ()

    const gchar*        mc_profile_get_unique_name          (McProfile *id);

Get the unique name of the profile.

`id` : | The McProfile.
Returns : | a string representing the unique name (must not be freed).

### mc_profile_get_configuration_ui ()

    const gchar*        mc_profile_get_configuration_ui     (McProfile *id);

Get the configuration ui of the profile.

`id` : | The McProfile.
Returns : | a string representing the configuration ui (must not be freed).

### mc_profile_get_display_name ()

    const gchar*        mc_profile_get_display_name         (McProfile *id);

Get the display name of the profile.

`id` : | The McProfile.
Returns : | a string representing the display name (must not be freed).

### mc_profile_get_icon_name ()

    const gchar*        mc_profile_get_icon_name            (McProfile *id);

Get the icon name of the profile.

`id` : | The McProfile.
Returns : | a string representing the icon name (must not be freed).

### mc_profile_get_branding_icon_name ()

    const gchar*        mc_profile_get_branding_icon_name   (McProfile *id);

Get the branding icon name of the profile.

`id` : | The McProfile.
Returns : | a string representing the branding icon name (must not be freed).

### mc_profile_get_vcard_field ()

    const gchar*        mc_profile_get_vcard_field          (McProfile *id);

Get the vcard field of the profile.

`id` : | The McProfile.
Returns : | a string representing the vcard field (must not be freed).

### mc_profile_get_default_account_domain ()

    const gchar*        mc_profile_get_default_account_domain
                                                            (McProfile *id);

Get the default account domain of the profile.

`id` : | The McProfile.
Returns : | a string representing the default account domain (must not be freed).

### mc_profile_get_protocol ()

    McProtocol*         mc_profile_get_protocol             (McProfile *id);

gets the protocol in use for this profile.

`id` : | The McProfile.
Returns : | a McProtocol, or NULL if some error occurs.

### mc_profile_get_protocol_name ()

    const gchar*        mc_profile_get_protocol_name        (McProfile *id);

Get the protocol name of the profile.

`id` : | The McProfile.
Returns : | a string representing the protocol name (must not be freed).

### mc_profile_is_default_for_vcard_field ()

    gboolean            mc_profile_is_default_for_vcard_field
                                                            (McProfile *id);

Checks if this is the default profile for the given vcard field.

`id` : | The McProfile.
Returns : | a gboolean.

### mc_profile_get_capabilities ()

    McProfileCapabilityFlags mc_profile_get_capabilities    (McProfile *id);

Gets the capabilities of this profile.

`id` : | The McProfile.
Returns : | a combination of McProfileCapabilityFlags.

### mc_profile_get_default_setting ()

    const gchar*        mc_profile_get_default_setting      (McProfile *id,
                                                             const gchar *setting);

Get the default value of a setting of the profile.

`id` : | The McProfile.
`setting` : | The setting for which default value has to be retrieved.
Returns : | a string representing the default setting (must not be freed).