[tracker] tracker-fts: Moved tracker-parser here from libtracker-common



commit 9d162add80bcbe68dde8152bed2129b734f4e0c4
Author: Martyn Russell <martyn lanedo com>
Date:   Fri Oct 2 11:33:50 2009 +0100

    tracker-fts: Moved tracker-parser here from libtracker-common

 src/libtracker-common/Makefile.am                  |    2 -
 src/libtracker-common/tracker-common.h             |    1 -
 src/libtracker-data/tracker-data-manager.c         |    6 +--
 src/libtracker-data/tracker-data-query.c           |    5 +--
 src/tracker-fts/Makefile.am                        |   40 ++++++++++---------
 src/tracker-fts/tracker-fts.c                      |    3 +-
 .../tracker-parser.c                               |    2 -
 .../tracker-parser.h                               |   12 ++----
 8 files changed, 29 insertions(+), 42 deletions(-)
---
diff --git a/src/libtracker-common/Makefile.am b/src/libtracker-common/Makefile.am
index bb66499..9e9fed5 100644
--- a/src/libtracker-common/Makefile.am
+++ b/src/libtracker-common/Makefile.am
@@ -69,7 +69,6 @@ libtracker_common_la_SOURCES =	 			\
 	tracker-log.c	 				\
 	tracker-namespace.c				\
 	tracker-ontology.c				\
-	tracker-parser.c				\
 	tracker-property.c				\
 	tracker-statement-list.c			\
 	tracker-type-utils.c				\
@@ -94,7 +93,6 @@ libtracker_commoninclude_HEADERS =			\
 	tracker-language.h				\
 	tracker-namespace.h				\
 	tracker-ontology.h				\
-	tracker-parser.h				\
 	tracker-property.h				\
 	tracker-sparql-builder.h			\
 	tracker-statement-list.h			\
diff --git a/src/libtracker-common/tracker-common.h b/src/libtracker-common/tracker-common.h
index f000def..a5014f3 100644
--- a/src/libtracker-common/tracker-common.h
+++ b/src/libtracker-common/tracker-common.h
@@ -37,7 +37,6 @@ G_BEGIN_DECLS
 #include "tracker-language.h"
 #include "tracker-namespace.h"
 #include "tracker-ontology.h"
-#include "tracker-parser.h"
 #include "tracker-power.h"
 #include "tracker-property.h"
 #include "tracker-sparql-builder.h"
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index 5e31d04..7a67d7b 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -31,11 +31,7 @@
 
 #include <glib/gstdio.h>
 
-#include <libtracker-common/tracker-file-utils.h>
-#include <libtracker-common/tracker-parser.h>
-#include <libtracker-common/tracker-type-utils.h>
-#include <libtracker-common/tracker-utils.h>
-#include <libtracker-common/tracker-ontology.h>
+#include <libtracker-common/tracker-common.h>
 
 #include <tracker-fts/tracker-fts.h>
 
diff --git a/src/libtracker-data/tracker-data-query.c b/src/libtracker-data/tracker-data-query.c
index 4f599b6..8278857 100644
--- a/src/libtracker-data/tracker-data-query.c
+++ b/src/libtracker-data/tracker-data-query.c
@@ -26,10 +26,7 @@
 #include <string.h>
 #include <stdlib.h>
 
-#include <libtracker-common/tracker-file-utils.h>
-#include <libtracker-common/tracker-parser.h>
-#include <libtracker-common/tracker-type-utils.h>
-#include <libtracker-common/tracker-utils.h>
+#include <libtracker-common/tracker-common.h>
 
 #include <libtracker-db/tracker-db-dbus.h>
 #include <libtracker-db/tracker-db-interface-sqlite.h>
diff --git a/src/tracker-fts/Makefile.am b/src/tracker-fts/Makefile.am
index 810194e..9837c9b 100644
--- a/src/tracker-fts/Makefile.am
+++ b/src/tracker-fts/Makefile.am
@@ -1,29 +1,31 @@
 include $(top_srcdir)/Makefile.decl
 
-INCLUDES =							\
-	-I$(top_srcdir)/src					\
-	-DTRACKER_COMPILATION					\
-	-DNDEBUG						\
-	$(WARN_CFLAGS)						\
-	$(GLIB2_CFLAGS)						\
-	$(GCOV_CFLAGS)						\
-	$(PANGO_CFLAGS)						\
+INCLUDES =								\
+	-I$(top_srcdir)/src						\
+	-DTRACKER_COMPILATION						\
+	-DNDEBUG							\
+	$(WARN_CFLAGS)							\
+	$(GLIB2_CFLAGS)							\
+	$(GCOV_CFLAGS)							\
+	$(PANGO_CFLAGS)							\
 	$(SQLITE3_CFLAGS)
 
 noinst_LTLIBRARIES = libtracker-fts.la
 
-libtracker_fts_la_SOURCES = 					\
-	tracker-fts.c						\
-	tracker-fts.h						\
-	tracker-fts-config.c					\
-	tracker-fts-config.h					\
-	tracker-fts-hash.c					\
-	tracker-fts-hash.h
+libtracker_fts_la_SOURCES = 						\
+	tracker-fts.c							\
+	tracker-fts.h							\
+	tracker-fts-config.c						\
+	tracker-fts-config.h						\
+	tracker-fts-hash.c						\
+	tracker-fts-hash.h						\
+	tracker-parser.c						\
+	tracker-parser.h
 
 libtracker_fts_la_LIBADD =						\
 	$(top_builddir)/src/libtracker-common/libtracker-common.la	\
-	$(SQLITE3_LIBS)						\
-	$(GTHREAD_LIBS)						\
-	$(GCOV_LIBS)						\
-	$(PANGO_LIBS)						\
+	$(SQLITE3_LIBS)							\
+	$(GTHREAD_LIBS)							\
+	$(GCOV_LIBS)							\
+	$(PANGO_LIBS)							\
 	$(GLIB2_LIBS)							
diff --git a/src/tracker-fts/tracker-fts.c b/src/tracker-fts/tracker-fts.c
index 34a66b2..8fcb100 100644
--- a/src/tracker-fts/tracker-fts.c
+++ b/src/tracker-fts/tracker-fts.c
@@ -285,6 +285,7 @@
 #include "tracker-fts.h"
 #include "tracker-fts-config.h"
 #include "tracker-fts-hash.h"
+#include "tracker-parser.h"
 
 /* TODO(shess) MAN, this thing needs some refactoring.	At minimum, it
 ** would be nice to order the file better, perhaps something along the
@@ -3411,7 +3412,7 @@ static int constructVtab(
 
   v->max_words = tracker_fts_config_get_max_words_to_index (config);
 
-  v->parser =	tracker_parser_new (language, max_len, min_len);
+  v->parser = tracker_parser_new (language, max_len, min_len);
 
   /* disable stop words if TRACKER_FTS_STOP_WORDS is set to 0 - used by tests */
   v->stop_words = g_strcmp0 (g_getenv ("TRACKER_FTS_STOP_WORDS"), "0") != 0;
diff --git a/src/libtracker-common/tracker-parser.c b/src/tracker-fts/tracker-parser.c
similarity index 99%
rename from src/libtracker-common/tracker-parser.c
rename to src/tracker-fts/tracker-parser.c
index f1d7a23..9e2fff9 100644
--- a/src/libtracker-common/tracker-parser.c
+++ b/src/tracker-fts/tracker-parser.c
@@ -29,8 +29,6 @@
 #endif
 
 #include "tracker-parser.h"
-#include "tracker-log.h"
-#include "tracker-utils.h"
 
 #define INDEX_NUMBER_MIN_LENGTH 6
 
diff --git a/src/libtracker-common/tracker-parser.h b/src/tracker-fts/tracker-parser.h
similarity index 86%
rename from src/libtracker-common/tracker-parser.h
rename to src/tracker-fts/tracker-parser.h
index b5798dc..7b74933 100644
--- a/src/libtracker-common/tracker-parser.h
+++ b/src/tracker-fts/tracker-parser.h
@@ -19,19 +19,15 @@
  * Boston, MA  02110-1301, USA.
  */
 
-#ifndef __LIBTRACKER_TRACKER_COMMON_PARSER_H__
-#define __LIBTRACKER_TRACKER_COMMON_PARSER_H__
+#ifndef __LIBTRACKER_FTS_PARSER_H__
+#define __LIBTRACKER_FTS_PARSER_H__
 
 #include <glib.h>
 
-#include "tracker-language.h"
+#include <libtracker-common/tracker-language.h>
 
 G_BEGIN_DECLS
 
-#if !defined (__LIBTRACKER_COMMON_INSIDE__) && !defined (TRACKER_COMPILATION)
-#error "only <libtracker-common/tracker-common.h> must be included directly."
-#endif
-
 typedef struct TrackerParser TrackerParser;
 
 TrackerParser *tracker_parser_new	      (TrackerLanguage *language,
@@ -59,4 +55,4 @@ void	       tracker_parser_free	      (TrackerParser   *parser);
 
 G_END_DECLS
 
-#endif /* __TRACKERD_PARSER_H__ */
+#endif /* __LIBTRACKER_FTS_PARSER_H__ */



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