Replace empathy_connection_get_protocol by tp_connection_parse_object_path
authorXavier Claessens <xclaesse@gmail.com>
Mon, 20 Apr 2009 23:14:34 +0000 (01:14 +0200)
committerXavier Claessens <xclaesse@gmail.com>
Wed, 22 Apr 2009 10:21:15 +0000 (12:21 +0200)
configure.ac
libempathy/empathy-tp-contact-list.c
libempathy/empathy-utils.c
libempathy/empathy-utils.h

index a387b0e36019d07aaa6712c8802fec175dd2fd68..0ff17396d009a367aefc24d767f078f00b004221 100644 (file)
@@ -29,7 +29,7 @@ GLIB_REQUIRED=2.16.0
 GTK_REQUIRED=2.16.0
 GCONF_REQUIRED=1.2.0
 LIBPANELAPPLET_REQUIRED=2.10.0
-TELEPATHY_GLIB_REQUIRED=0.7.26
+TELEPATHY_GLIB_REQUIRED=0.7.27
 MISSION_CONTROL_REQUIRED=4.61
 ENCHANT_REQUIRED=1.2.0
 ISO_CODES_REQUIRED=0.35
index 1e4ea5f289cbb1bd6c6b56aa87531a82e084c683..6868e84a66d8911603f978a05912813b942bbe13 100644 (file)
@@ -759,9 +759,8 @@ tp_contact_list_constructed (GObject *list)
 
        /* Check for protocols that does not support contact groups. We can
         * put all contacts into a special group in that case.
-        * FIXME: Default group should be an information in the profile
-        * FIXME: replace with tp_connection_parse_object_path once released */
-       protocol_name = empathy_connection_get_protocol (priv->connection, NULL);
+        * FIXME: Default group should be an information in the profile */
+       tp_connection_parse_object_path (priv->connection, &protocol_name, NULL);
        if (!tp_strdiff (protocol_name, "local-xmpp")) {
                priv->protocol_group = _("People nearby");
        }
index 8b140ad4359ad97593a1fbbea0a3cf3373bcb162..210c3504856b90d7eeec2587beb003f6c921009c 100644 (file)
@@ -379,31 +379,3 @@ empathy_check_available_state (void)
        return TRUE;
 }
 
-gchar *
-empathy_connection_get_protocol (TpConnection    *connection,
-                                gchar          **ret_cmname)
-{
-       const gchar *object_path;
-       const gchar *cmname;
-       const gchar *proto;
-       const gchar *account;
-       gchar *ret;
-
-       g_return_val_if_fail (TP_IS_CONNECTION (connection), NULL);
-
-       /* Object path is in the form:
-        * /org/freedesktop/Telepathy/Connection/cmname/proto/account */
-       object_path = tp_proxy_get_object_path (TP_PROXY (connection));
-       cmname = object_path + strlen ("/org/freedesktop/Telepathy/Connection/");
-       proto = strstr (cmname, "/") + 1;
-       account = strstr (proto, "/") + 1;
-
-       if (ret_cmname) {
-               *ret_cmname = g_strndup (cmname, proto - cmname - 1);
-               g_strdelimit (*ret_cmname, "_", '-');
-       }
-
-       ret = g_strndup (proto, account - proto - 1);
-       return g_strdelimit (ret, "_", '-');
-}
-
index 090de9dfd0a18a386322483dd50e9f9eb3819312..e6bcfebfc68e017145953ee407a3b5d00effd520 100644 (file)
@@ -78,8 +78,7 @@ gboolean     empathy_proxy_equal                    (gconstpointer    a,
                                                     gconstpointer    b);
 guint        empathy_proxy_hash                     (gconstpointer    key);
 gboolean     empathy_check_available_state          (void);
-gchar *      empathy_connection_get_protocol        (TpConnection    *connection,
-                                                    gchar          **cm_name);
+
 G_END_DECLS
 
 #endif /*  __EMPATHY_UTILS_H__ */