[telepathy-glib/master] account: add @reconnect_required to _update_parameters_finish

Jonny Lamb jonny.lamb at collabora.co.uk
Fri Sep 25 10:00:32 PDT 2009


Signed-off-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
---
 telepathy-glib/account.c |   13 +++++++++++++
 telepathy-glib/account.h |    2 +-
 2 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/telepathy-glib/account.c b/telepathy-glib/account.c
index 8b72d87..3ccc600 100644
--- a/telepathy-glib/account.c
+++ b/telepathy-glib/account.c
@@ -1783,6 +1783,10 @@ _tp_account_updated_cb (TpAccount *proxy,
 
   if (error != NULL)
     g_simple_async_result_set_from_error (result, (GError *) error);
+  else
+    g_simple_async_result_set_op_res_gpointer (result,
+        g_strdupv ((gchar **) reconnect_required),
+        (GDestroyNotify) g_strfreev);
 
   g_simple_async_result_complete (result);
   g_object_unref (G_OBJECT (result));
@@ -1823,6 +1827,8 @@ tp_account_update_parameters_async (TpAccount *account,
  * tp_account_update_parameters_finish:
  * @account: a #TpAccount
  * @result: a #GAsyncResult
+ * @reconnect_required: a #GStrv to fill with properties that need a reconnect
+ *                      to take effect
  * @error: a #GError to fill
  *
  * Finishes an async update of the parameters on @account.
@@ -1834,8 +1840,11 @@ tp_account_update_parameters_async (TpAccount *account,
 gboolean
 tp_account_update_parameters_finish (TpAccount *account,
     GAsyncResult *result,
+    gchar ***reconnect_required,
     GError **error)
 {
+  GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result);
+
   if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result),
       error))
     return FALSE;
@@ -1843,6 +1852,10 @@ tp_account_update_parameters_finish (TpAccount *account,
   g_return_val_if_fail (g_simple_async_result_is_valid (result,
     G_OBJECT (account), tp_account_update_parameters_finish), FALSE);
 
+  if (reconnect_required != NULL)
+    *reconnect_required =
+      g_strdupv (g_simple_async_result_get_op_res_gpointer (simple));
+
   return TRUE;
 }
 
diff --git a/telepathy-glib/account.h b/telepathy-glib/account.h
index 7692d9a..7ae9a2f 100644
--- a/telepathy-glib/account.h
+++ b/telepathy-glib/account.h
@@ -113,7 +113,7 @@ void tp_account_update_parameters_async (TpAccount *account,
     GAsyncReadyCallback callback, gpointer user_data);
 
 gboolean tp_account_update_parameters_finish (TpAccount *account,
-    GAsyncResult *result, GError **error);
+    GAsyncResult *result, gchar ***reconnect_required, GError **error);
 
 void tp_account_remove_async (TpAccount *account,
     GAsyncReadyCallback callback, gpointer user_data);
-- 
1.5.6.5




More information about the telepathy-commits mailing list