aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmanuele Aina <emanuele.aina@collabora.com>2013-03-26 22:13:53 +0800
committerEmanuele Aina <emanuele.aina@collabora.com>2013-04-01 17:50:29 +0800
commitf9ba3c0721715bb8d6dbf4315188e4397134ee6b (patch)
tree4cbb38c005824eff1d3d55c7d13b14129447d1b9
parent3992967e7a3015a48b5db9c7e652105abe38856e (diff)
downloadgsoc2013-empathy-f9ba3c0721715bb8d6dbf4315188e4397134ee6b.tar
gsoc2013-empathy-f9ba3c0721715bb8d6dbf4315188e4397134ee6b.tar.gz
gsoc2013-empathy-f9ba3c0721715bb8d6dbf4315188e4397134ee6b.tar.bz2
gsoc2013-empathy-f9ba3c0721715bb8d6dbf4315188e4397134ee6b.tar.lz
gsoc2013-empathy-f9ba3c0721715bb8d6dbf4315188e4397134ee6b.tar.xz
gsoc2013-empathy-f9ba3c0721715bb8d6dbf4315188e4397134ee6b.tar.zst
gsoc2013-empathy-f9ba3c0721715bb8d6dbf4315188e4397134ee6b.zip
utils: Drop the file-based empathy_xml_validate()
After embedding all the DTDs with GResource the file-based empathy_xml_validate() is no longer needed, replaced by empathy_xml_validate_from_resource(). https://bugzilla.gnome.org/show_bug.cgi?id=696974
-rw-r--r--libempathy/empathy-utils.c35
-rw-r--r--libempathy/empathy-utils.h2
2 files changed, 0 insertions, 37 deletions
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index e074327b6..235b02246 100644
--- a/libempathy/empathy-utils.c
+++ b/libempathy/empathy-utils.c
@@ -143,41 +143,6 @@ empathy_xml_validate_from_resource (xmlDoc *doc,
return ret;
}
-gboolean
-empathy_xml_validate (xmlDoc *doc,
- const gchar *dtd_filename)
-{
- gchar *path;
- xmlChar *escaped;
- xmlValidCtxt cvp;
- xmlDtd *dtd;
- gboolean ret;
-
- path = g_build_filename (g_getenv ("EMPATHY_SRCDIR"), "libempathy",
- dtd_filename, NULL);
- if (!g_file_test (path, G_FILE_TEST_EXISTS))
- {
- g_free (path);
- path = g_build_filename (DATADIR, "empathy", dtd_filename, NULL);
- }
-
- DEBUG ("Loading dtd file %s", path);
-
- /* The list of valid chars is taken from libxml. */
- escaped = xmlURIEscapeStr ((const xmlChar *) path,
- (const xmlChar *)":@&=+$,/?;");
- g_free (path);
-
- memset (&cvp, 0, sizeof (cvp));
- dtd = xmlParseDTD (NULL, escaped);
- ret = xmlValidateDtd (&cvp, doc, dtd);
-
- xmlFree (escaped);
- xmlFreeDtd (dtd);
-
- return ret;
-}
-
xmlNodePtr
empathy_xml_node_get_child (xmlNodePtr node,
const gchar *child_name)
diff --git a/libempathy/empathy-utils.h b/libempathy/empathy-utils.h
index 7077d835e..935b501a4 100644
--- a/libempathy/empathy-utils.h
+++ b/libempathy/empathy-utils.h
@@ -46,8 +46,6 @@ void empathy_init (void);
/* XML */
gboolean empathy_xml_validate_from_resource (xmlDoc *doc,
const gchar *dtd_resourcename);
-gboolean empathy_xml_validate (xmlDoc *doc,
- const gchar *dtd_filename);
xmlNodePtr empathy_xml_node_get_child (xmlNodePtr node,
const gchar *child_name);
xmlChar * empathy_xml_node_get_child_content (xmlNodePtr node,