diff options
author | Marco Barisione <marco.barisione@collabora.co.uk> | 2013-05-10 23:08:28 +0800 |
---|---|---|
committer | Marco Barisione <marco.barisione@collabora.co.uk> | 2013-08-20 18:03:06 +0800 |
commit | 5c0d938cf15d07c0f7511c5acb9a3d8e42278e0d (patch) | |
tree | 6335337894b545d7c1a232ae4d214c4eeb9990a5 /libempathy/empathy-utils.c | |
parent | 4598bce7db6276a9f1f9e21adef8723b646bf44b (diff) | |
download | gsoc2013-empathy-5c0d938cf15d07c0f7511c5acb9a3d8e42278e0d.tar gsoc2013-empathy-5c0d938cf15d07c0f7511c5acb9a3d8e42278e0d.tar.gz gsoc2013-empathy-5c0d938cf15d07c0f7511c5acb9a3d8e42278e0d.tar.bz2 gsoc2013-empathy-5c0d938cf15d07c0f7511c5acb9a3d8e42278e0d.tar.lz gsoc2013-empathy-5c0d938cf15d07c0f7511c5acb9a3d8e42278e0d.tar.xz gsoc2013-empathy-5c0d938cf15d07c0f7511c5acb9a3d8e42278e0d.tar.zst gsoc2013-empathy-5c0d938cf15d07c0f7511c5acb9a3d8e42278e0d.zip |
tpaw-utils: move empathy_xml_validate_from_resource to tp-aw and rename it
This commit also changes the licence of the moved code (all copyrighted by
Collabora Ltd.) from GPL to LGPL.
https://bugzilla.gnome.org/show_bug.cgi?id=699492
Diffstat (limited to 'libempathy/empathy-utils.c')
-rw-r--r-- | libempathy/empathy-utils.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c index 659d4d507..ba39f49b7 100644 --- a/libempathy/empathy-utils.c +++ b/libempathy/empathy-utils.c @@ -107,41 +107,6 @@ empathy_init (void) g_object_unref (am); } -gboolean -empathy_xml_validate_from_resource (xmlDoc *doc, - const gchar *dtd_resourcename) -{ - GBytes *resourcecontents; - gconstpointer resourcedata; - gsize resourcesize; - xmlParserInputBufferPtr buffer; - xmlValidCtxt cvp; - xmlDtd *dtd; - GError *error = NULL; - gboolean ret; - - DEBUG ("Loading dtd resource %s", dtd_resourcename); - - resourcecontents = g_resources_lookup_data (dtd_resourcename, G_RESOURCE_LOOKUP_FLAGS_NONE, &error); - if (error != NULL) - { - g_warning ("Unable to load dtd resource '%s': %s", dtd_resourcename, error->message); - g_error_free (error); - return FALSE; - } - resourcedata = g_bytes_get_data (resourcecontents, &resourcesize); - buffer = xmlParserInputBufferCreateStatic (resourcedata, resourcesize, XML_CHAR_ENCODING_UTF8); - - memset (&cvp, 0, sizeof (cvp)); - dtd = xmlIOParseDTD (NULL, buffer, XML_CHAR_ENCODING_UTF8); - ret = xmlValidateDtd (&cvp, doc, dtd); - - xmlFreeDtd (dtd); - g_bytes_unref (resourcecontents); - - return ret; -} - xmlNodePtr empathy_xml_node_get_child (xmlNodePtr node, const gchar *child_name) |