]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-plist.c
Merge branch 'gnome-3-8'
[empathy.git] / libempathy-gtk / empathy-plist.c
index 4cc392becf15deebda18c380c85fdf5d5b61c67a..e1113a073f91d69fa4aec1d71587b4ca5091d251 100644 (file)
  */
 
 #include "config.h"
+#include "empathy-plist.h"
 
 #include <string.h>
-#include <libxml/parser.h>
 #include <libxml/tree.h>
-#include <telepathy-glib/util.h>
-#include <telepathy-glib/dbus.h>
-
-#include "empathy-plist.h"
+#include <telepathy-glib/telepathy-glib.h>
 
 static GValue *empathy_plist_parse_node (xmlNode *a_node);
 
@@ -169,34 +166,6 @@ empathy_plist_parse_dict (xmlNode *a_node)
        return tp_g_value_slice_new_take_boxed (G_TYPE_HASH_TABLE, dict);
 }
 
-static GValue *
-empathy_plist_parse_array (xmlNode *a_node)
-{
-       xmlNode *cur_node = a_node->children;
-       GValueArray *array;
-
-       array = g_value_array_new (4);
-
-       while (cur_node) {
-               GValue *cur_value;
-
-               cur_value = empathy_plist_parse_node (cur_node);
-               if (cur_value) {
-                       g_value_array_append (array, cur_value);
-                       tp_g_value_slice_free (cur_value);
-               }
-
-               /* When an array contains an element enclosed in "unknown" tags (ie
-                * non-type ones), we silently skip them since early
-                * SysInfoExtended files used to have <key> values enclosed within
-                * <array> tags.
-                */
-               cur_node = cur_node->next;
-       }
-
-       return tp_g_value_slice_new_take_boxed (G_TYPE_VALUE_ARRAY, array);
-}
-
 typedef GValue *(*ParseCallback) (xmlNode *);
 
 struct Parser {
@@ -211,7 +180,6 @@ static const struct Parser parsers[] = { {"integer", empathy_plist_parse_integer
                                         {"false",   empathy_plist_parse_boolean},
                                         {"data",    empathy_plist_parse_data},
                                         {"dict",    empathy_plist_parse_dict},
-                                        {"array",   empathy_plist_parse_array},
                                         {NULL,   NULL} };
 
 static ParseCallback
@@ -294,7 +262,6 @@ empathy_plist_parse_from_file (const char *filename)
        parsed_doc = empathy_plist_parse (root_element);
 
        xmlFreeDoc (doc);
-       xmlCleanupParser ();
 
        return parsed_doc;
 }
@@ -329,7 +296,6 @@ empathy_plist_parse_from_memory (const char *data, gsize len)
        parsed_doc = empathy_plist_parse (root_element);
 
        xmlFreeDoc (doc);
-       xmlCleanupParser ();
 
        return parsed_doc;
 }