[empathy/next: 60/79] client-factory: create_channel() now takes a GVariant as props



commit 4faf2f61a600fa9a133860185ccd3b6b079ef40d
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Tue Mar 18 16:51:39 2014 +0100

    client-factory: create_channel() now takes a GVariant as props

 libempathy/empathy-client-factory.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/libempathy/empathy-client-factory.c b/libempathy/empathy-client-factory.c
index 16c09b7..960039e 100644
--- a/libempathy/empathy-client-factory.c
+++ b/libempathy/empathy-client-factory.c
@@ -38,18 +38,22 @@ static TpChannel *
 empathy_client_factory_create_channel (TpClientFactory *factory,
     TpConnection *conn,
     const gchar *path,
-    const GHashTable *properties,
+    GVariant *properties,
     GError **error)
 {
   const gchar *chan_type;
 
-  chan_type = tp_asv_get_string (properties, TP_PROP_CHANNEL_CHANNEL_TYPE);
+  chan_type = tp_vardict_get_string (properties, TP_PROP_CHANNEL_CHANNEL_TYPE);
 
   if (!tp_strdiff (chan_type, TP_IFACE_CHANNEL_TYPE_TEXT))
     {
-      return TP_CHANNEL (empathy_tp_chat_new (
-            TP_CLIENT_FACTORY (factory), conn, path,
-            properties));
+      GHashTable *asv = tp_asv_from_vardict (properties);
+      EmpathyTpChat *chat;
+
+      chat = empathy_tp_chat_new (TP_CLIENT_FACTORY (factory), conn, path, asv);
+
+      g_hash_table_unref (asv);
+      return TP_CHANNEL (chat);
     }
 
   return chainup->create_channel (factory, conn, path, properties, error);


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