[telepathy-mission-control/master] Add an API to get the GKeyFile.
Alberto Mardegan
alberto.mardegan at nokia.com
Tue Jun 2 00:38:29 PDT 2009
---
libmcclient/mc-profile.c | 21 +++++++++++++++++++++
libmcclient/mc-profile.h | 2 ++
2 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/libmcclient/mc-profile.c b/libmcclient/mc-profile.c
index 3ebb0cf..e2c9641 100644
--- a/libmcclient/mc-profile.c
+++ b/libmcclient/mc-profile.c
@@ -1118,6 +1118,27 @@ mc_profile_get_vcard_mangle (McProfile *id, const gchar *vcard_field)
}
/**
+ * mc_profile_get_keyfile:
+ * @profile: the #McProfile.
+ *
+ * Gets the #GKeyFile which holds the profile data. This function should be
+ * used only when there is not a specific function to access the desired
+ * information, and it may be that in future version it will just return %NULL
+ * if the McProfile implementation changes and is not based on #GKeyfile
+ * anymore.
+ *
+ * Returns: the #GKeyfile associated with @profile, or %NULL.
+ */
+GKeyFile *
+mc_profile_get_keyfile (McProfile *profile)
+{
+ McProfilePrivate *priv;
+
+ get_private_and_load_or_return_val (profile, NULL);
+ return priv->keyfile;
+}
+
+/**
* mc_profile_presences_list:
* @id: The #McProfile.
*
diff --git a/libmcclient/mc-profile.h b/libmcclient/mc-profile.h
index 7b9074d..3ede75d 100644
--- a/libmcclient/mc-profile.h
+++ b/libmcclient/mc-profile.h
@@ -117,6 +117,8 @@ 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);
+GKeyFile *mc_profile_get_keyfile (McProfile *profile);
+
/* presences */
const gchar * const *mc_profile_presences_list (McProfile *id);
gchar *mc_profile_presence_get_name (McProfile *id,
--
1.5.6.5
More information about the telepathy-commits
mailing list