[tracker/tracker-0.10] tracker-extract-epub: Port to 0.10 API
- From: JÃrg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.10] tracker-extract-epub: Port to 0.10 API
- Date: Thu, 13 Oct 2011 13:16:26 +0000 (UTC)
commit 5213875361ff2ee12095198679e145bdc18a9b22
Author: JÃrg Billeter <j bitron ch>
Date: Thu Oct 13 15:11:01 2011 +0200
tracker-extract-epub: Port to 0.10 API
Fixes NB#271751.
src/tracker-extract/10-epub.rule.in | 3 --
src/tracker-extract/tracker-extract-epub.c | 29 ++++++++++++++++++++-------
2 files changed, 21 insertions(+), 11 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-epub.c b/src/tracker-extract/tracker-extract-epub.c
index 1ba7a8b..8e63d2e 100644
--- a/src/tracker-extract/tracker-extract-epub.c
+++ b/src/tracker-extract/tracker-extract-epub.c
@@ -47,6 +47,15 @@ typedef struct {
gsize limit;
} OPFContentData;
+static void extract_epub (const gchar *uri,
+ TrackerSparqlBuilder *preupdate,
+ TrackerSparqlBuilder *metadata);
+
+static TrackerExtractData extract_data[] = {
+ { "application/epub+zip", extract_epub },
+ { NULL, NULL }
+};
+
/* Methods to parse the container.xml file
* pointing to the real metadata/content
*/
@@ -351,23 +360,27 @@ extract_opf (const gchar *uri,
return TRUE;
}
-G_MODULE_EXPORT gboolean
-tracker_extract_get_metadata (const gchar *uri,
- const gchar *mime_used,
- TrackerSparqlBuilder *preupdate,
- TrackerSparqlBuilder *metadata,
- GString *where)
+static void
+extract_epub (const gchar *uri,
+ TrackerSparqlBuilder *preupdate,
+ TrackerSparqlBuilder *metadata)
{
gchar *opf_path;
opf_path = extract_opf_path (uri);
if (!opf_path) {
- return FALSE;
+ return;
}
extract_opf (uri, opf_path, preupdate, metadata);
g_free (opf_path);
- return TRUE;
+ return;
+}
+
+TrackerExtractData *
+tracker_extract_get_data (void)
+{
+ return extract_data;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]