[Telepathy-commits] [telepathy-mission-control/master] Add mc_profile_get_single_enable
Alberto Mardegan
alberto.mardegan at nokia.com
Thu Feb 19 06:56:30 PST 2009
---
libmcclient/mc-profile.c | 18 ++++++++++++++++++
libmcclient/mc-profile.h | 1 +
2 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/libmcclient/mc-profile.c b/libmcclient/mc-profile.c
index 4f71014..19f9fd3 100644
--- a/libmcclient/mc-profile.c
+++ b/libmcclient/mc-profile.c
@@ -92,6 +92,7 @@ typedef struct {
gchar **presences;
gint priority;
guint vcard_default : 1;
+ guint single_enable : 1;
McProfileCapabilityFlags capabilities;
GHashTable *default_settings;
GHashTable *vcard_mangle_hash;
@@ -399,6 +400,7 @@ _mc_profile_load (McProfile *profile)
priv->protocol = g_key_file_get_string (keyfile, PROFILE_GROUP, "Protocol", NULL);
priv->vcard_field = g_key_file_get_string (keyfile, PROFILE_GROUP, "VCardField", NULL);
priv->vcard_default = g_key_file_get_boolean (keyfile, PROFILE_GROUP, "VCardDefault", NULL);
+ priv->single_enable = g_key_file_get_boolean (keyfile, PROFILE_GROUP, "SingleEnable", NULL);
priv->default_account_domain = g_key_file_get_string (keyfile, PROFILE_GROUP, "DefaultAccountDomain", NULL);
priv->avatar_mime_type = g_key_file_get_string (keyfile, PROFILE_GROUP, "AvatarMimeType", NULL);
priv->default_account_name = g_key_file_get_string (keyfile, PROFILE_GROUP, "DefaultAccountName", NULL);
@@ -1034,6 +1036,22 @@ mc_profile_is_default_for_vcard_field (McProfile *id)
}
/**
+ * mc_profile_get_single_enable:
+ * @id: The #McProfile.
+ *
+ * Returns: #TRUE if no more than one account should be enabled for this
+ * service at the same time.
+ */
+gboolean
+mc_profile_get_single_enable (McProfile *id)
+{
+ McProfilePrivate *priv;
+
+ get_private_and_load_or_return_val (id, FALSE);
+ return priv->single_enable;
+}
+
+/**
* mc_profile_get_capabilities:
* @id: The #McProfile.
*
diff --git a/libmcclient/mc-profile.h b/libmcclient/mc-profile.h
index b52edfb..7b9074d 100644
--- a/libmcclient/mc-profile.h
+++ b/libmcclient/mc-profile.h
@@ -111,6 +111,7 @@ 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);
+gboolean mc_profile_get_single_enable (McProfile *id);
McProfileCapabilityFlags mc_profile_get_capabilities (McProfile *id);
const gchar *mc_profile_get_default_setting (McProfile *id,
const gchar *setting);
--
1.5.6.5
More information about the telepathy-commits
mailing list