[empathy] add empathy_account_settings_set_storage_provider()



commit b0d6063cf84f1b75d4d1a72f80d2fbe3c900050b
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Wed Jul 18 11:03:18 2012 +0200

    add empathy_account_settings_set_storage_provider()

 libempathy/empathy-account-settings.c |   18 ++++++++++++++++++
 libempathy/empathy-account-settings.h |    4 ++++
 2 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/libempathy/empathy-account-settings.c b/libempathy/empathy-account-settings.c
index 40cfdb4..12154eb 100644
--- a/libempathy/empathy-account-settings.c
+++ b/libempathy/empathy-account-settings.c
@@ -76,6 +76,7 @@ struct _EmpathyAccountSettingsPriv
   gchar *service;
   gchar *display_name;
   gchar *icon_name;
+  gchar *storage_provider;
   gboolean display_name_overridden;
   gboolean ready;
 
@@ -397,6 +398,7 @@ empathy_account_settings_finalize (GObject *object)
   g_free (priv->icon_name);
   g_free (priv->password);
   g_free (priv->password_original);
+  g_free (priv->storage_provider);
 
   if (priv->required_params != NULL)
     {
@@ -1456,6 +1458,12 @@ empathy_account_settings_do_create_account (EmpathyAccountSettings *self)
       tp_account_request_set_parameter (account_req, key, value);
     }
 
+  if (priv->storage_provider != NULL)
+    {
+      tp_account_request_set_storage_provider (account_req,
+          priv->storage_provider);
+    }
+
   tp_account_request_create_account_async (account_req,
       empathy_account_settings_created_cb, self);
 }
@@ -1708,3 +1716,13 @@ empathy_account_settings_has_uri_scheme_tel (
 
   return priv->uri_scheme_tel;
 }
+
+void
+empathy_account_settings_set_storage_provider (EmpathyAccountSettings *self,
+    const gchar *storage)
+{
+  EmpathyAccountSettingsPriv *priv = GET_PRIV (self);
+
+  g_free (priv->storage_provider);
+  priv->storage_provider = g_strdup (storage);
+}
diff --git a/libempathy/empathy-account-settings.h b/libempathy/empathy-account-settings.h
index e48ce98..7f17e33 100644
--- a/libempathy/empathy-account-settings.h
+++ b/libempathy/empathy-account-settings.h
@@ -193,6 +193,10 @@ void empathy_account_settings_set_uri_scheme_tel (EmpathyAccountSettings *self,
 gboolean empathy_account_settings_has_uri_scheme_tel (
     EmpathyAccountSettings *self);
 
+void empathy_account_settings_set_storage_provider (
+    EmpathyAccountSettings *self,
+    const gchar *storage);
+
 G_END_DECLS
 
 #endif /* #ifndef __EMPATHY_ACCOUNT_SETTINGS_H__*/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]