[tracker] tracker-extract: Add dummy extractor



commit ba4944fbe3fee0a4c24b7d1b8731f809c6178500
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Aug 28 16:35:00 2014 +0200

    tracker-extract: Add dummy extractor
    
    For use with data types that don't have any additional metadata
    inside the file, but need tagging with specific RDF types.
    
    Note that the use of a dummy extractor is only temporary, and rule files
    should instead allow not having a ModulePath entry.
    See https://bugzilla.gnome.org/show_bug.cgi?id=735610
    
    https://bugzilla.gnome.org/show_bug.cgi?id=735460

 src/tracker-extract/Makefile.am             |   13 +++++++++++
 src/tracker-extract/tracker-extract-dummy.c |   31 +++++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-extract/Makefile.am b/src/tracker-extract/Makefile.am
index bf21626..6b872e5 100644
--- a/src/tracker-extract/Makefile.am
+++ b/src/tracker-extract/Makefile.am
@@ -185,6 +185,8 @@ endif
 extractmodules_LTLIBRARIES += libextract-bmp.la
 rules_DATA += 10-bmp.rule
 
+extractmodules_LTLIBRARIES += libextract-dummy.la
+
 # ABW
 libextract_abw_la_SOURCES = tracker-extract-abw.c
 libextract_abw_la_CFLAGS = $(TRACKER_EXTRACT_MODULES_CFLAGS)
@@ -508,6 +510,17 @@ libextract_bmp_la_LIBADD = \
        $(BUILD_LIBS) \
        $(TRACKER_EXTRACT_MODULES_LIBS)
 
+# Dummy
+libextract_dummy_la_SOURCES = tracker-extract-dummy.c
+libextract_dummy_la_CFLAGS = \
+       $(TRACKER_EXTRACT_MODULES_CFLAGS)
+libextract_dummy_la_LDFLAGS = $(module_flags)
+libextract_dummy_la_LIBADD = \
+       $(top_builddir)/src/libtracker-extract/libtracker-extract.la \
+       $(top_builddir)/src/libtracker-common/libtracker-common.la \
+       $(BUILD_LIBS) \
+       $(TRACKER_EXTRACT_MODULES_LIBS)
+
 #
 # Binaries
 #
diff --git a/src/tracker-extract/tracker-extract-dummy.c b/src/tracker-extract/tracker-extract-dummy.c
new file mode 100644
index 0000000..392c491
--- /dev/null
+++ b/src/tracker-extract/tracker-extract-dummy.c
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2013-2014 Jolla Ltd. <andrew den exter jollamobile com>
+ * Author: Philip Van Hoof <philip codeminded be>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA  02110-1301, USA.
+ */
+
+#include "config.h"
+
+#include <libtracker-common/tracker-common.h>
+#include <libtracker-extract/tracker-extract.h>
+
+G_MODULE_EXPORT gboolean
+tracker_extract_get_metadata (TrackerExtractInfo *info)
+{
+       /* Nothing */
+       return TRUE;
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]