McProfile

McProfile

Synopsis

enum                McProfileCapabilityFlags;
                    McProfile;
                    McProfileClass;
McProfile*          mc_profile_lookup                   (const gchar *unique_name);
McProfile*          mc_profile_lookup_default_for_vcard_field
                                                        (const gchar *vcard_field);
gchar*              mc_profile_get_filename             (const gchar *unique_name);
void                mc_profile_clear_cache              (void);
GList*              mc_profiles_list                    (void);
GList*              mc_profiles_list_by_vcard_field     (const gchar *vcard_field);
GList*              mc_profiles_list_by_protocol        (const gchar *protocol);
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);
const gchar*        mc_profile_get_avatar_mime_type     (McProfile *id);
const TpConnectionPresenceType* mc_profile_get_supported_presences
                                                        (McProfile *id);
gboolean            mc_profile_supports_presence        (McProfile *id,
                                                         TpConnectionPresenceType presence);
gint                mc_profile_get_priority             (McProfile *id);
const gchar*        mc_profile_get_default_account_name (McProfile *id);
const gchar*        mc_profile_get_protocol_name        (McProfile *id);
const gchar*        mc_profile_get_manager_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);
const gchar*        mc_profile_get_vcard_mangle         (McProfile *id,
                                                         const gchar *vcard_field);
gchar*              mc_profile_presence_get_name        (McProfile *id,
                                                         const gchar *presence);
TpConnectionPresenceType mc_profile_presence_get_type   (McProfile *id,
                                                         const gchar *presence);
gchar*              mc_profile_presence_get_icon_name   (McProfile *id,
                                                         const gchar *presence);

Object Hierarchy

  GObject
   +----McProfile

Description

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,
    MC_PROFILE_CAPABILITY_VIDEO_P2P = 1 << 10,
    MC_PROFILE_CAPABILITY_CHAT_UPGRADE = 1 << 11,
} McProfileCapabilityFlags;


McProfile

typedef struct _McProfile McProfile;


McProfileClass

typedef struct {
        GObjectClass parent_class;
} McProfileClass;


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_get_filename ()

gchar*              mc_profile_get_filename             (const gchar *unique_name);

Get the .profile file path of the profile unique_name. This can be useful for applications which wants to parse the .profile file themselves, for the cases when the profile contains application specific data. Note that this function is not meant to be used for creating new profiles: if the .profile file does not exist, this functions fails.

unique_name : The unique name of the profile.
Returns : The path of the .profile file, or NULL.

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_list_by_protocol ()

GList*              mc_profiles_list_by_protocol        (const gchar *protocol);

Lists all configured profiles for the given protocol.

protocol : string id of the protocol.
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_avatar_mime_type ()

const gchar*        mc_profile_get_avatar_mime_type     (McProfile *id);

Get the preferred MIME type for the avatar.

id : The McProfile.
Returns : a string representing the MIME type (must not be freed).

mc_profile_get_supported_presences ()

const TpConnectionPresenceType* mc_profile_get_supported_presences
                                                        (McProfile *id);

Checks what presence states are supported by this profile.

id : The McProfile.
Returns : a zero-terminated array listing all the supported McPresence. It must not be freed.

mc_profile_supports_presence ()

gboolean            mc_profile_supports_presence        (McProfile *id,
                                                         TpConnectionPresenceType presence);

id :
presence :
Returns :

mc_profile_get_priority ()

gint                mc_profile_get_priority             (McProfile *id);

Get the priority of the profile, as an integer number.

id : The McProfile.
Returns : the profile priority (0 meaning normal).

mc_profile_get_default_account_name ()

const gchar*        mc_profile_get_default_account_name (McProfile *id);

Get the default account display name.

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

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_get_manager_name ()

const gchar*        mc_profile_get_manager_name         (McProfile *id);

Get the manager name of the profile.

id : The McProfile.
Returns : a string representing the manager 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).

mc_profile_get_vcard_mangle ()

const gchar*        mc_profile_get_vcard_mangle         (McProfile *id,
                                                         const gchar *vcard_field);

Get a mangle to transform a foreign address to a handle this profile understands

id : The McProfile.
vcard_field : The vcard field for which to get the mangle
Returns : a string representing the mangle from the profile (must not be freed).

mc_profile_presence_get_name ()

gchar*              mc_profile_presence_get_name        (McProfile *id,
                                                         const gchar *presence);

id : The McProfile.
presence : status name of the presence.
Returns : the localized name of the presence status.

mc_profile_presence_get_type ()

TpConnectionPresenceType mc_profile_presence_get_type   (McProfile *id,
                                                         const gchar *presence);

id : The McProfile.
presence : status name of the presence.
Returns : the TpConnectionPresenceType of presence.

mc_profile_presence_get_icon_name ()

gchar*              mc_profile_presence_get_icon_name   (McProfile *id,
                                                         const gchar *presence);

id : The McProfile.
presence : status name of the presence.
Returns : the branding icon name for presence.