tracker r1536 - in branches/indexer-split: . data data/dbus src/libtracker src/tracker-indexer src/trackerd



Author: mr
Date: Thu May 29 17:51:24 2008
New Revision: 1536
URL: http://svn.gnome.org/viewvc/tracker?rev=1536&view=rev

Log:
	* configure.ac:
	* data/Makefile.am:
	* data/dbus/Makefile.am:
	* data/org.freedesktop.Tracker.Indexer.service.in:
	* data/org.freedesktop.Tracker.service.in:
	* data/tracker-dbus-daemon.xml:
	* data/tracker-dbus-files.xml:
	* data/tracker-dbus-keywords.xml:
	* data/tracker-dbus-metadata.xml:
	* data/tracker-dbus-search.xml:
	* data/tracker-dbus-xesam.xml:
	* data/tracker-indexer.xml: Moved to data/dbus/ and the -dbus-
	prefix has been removed from the daemon xml files.

	* data/tracker.cfg: Removed, it is generated initially now.

	* src/libtracker/Makefile.am:
	* src/libtracker/tracker.c: Used the new data/dbus/*.xml files and
	removed the -dbus- name space from the included generated files.

	* src/tracker-indexer/Makefile.am:
	* src/trackerd/Makefile.am:
	* src/trackerd/tracker-cache.c: 
	* src/trackerd/tracker-daemon.[ch]: 
	* src/trackerd/tracker-db-sqlite.c: 
	* src/trackerd/tracker-dbus-daemon.[ch]:
	* src/trackerd/tracker-dbus-files.[ch]:
	* src/trackerd/tracker-dbus-keywords.[ch]:
	* src/trackerd/tracker-dbus-metadata.[ch]:
	* src/trackerd/tracker-dbus-search.[ch]:
	* src/trackerd/tracker-dbus-xesam.[ch]:
	* src/trackerd/tracker-dbus.c:
	* src/trackerd/tracker-email-evolution.c:
	* src/trackerd/tracker-email-modest.c:
	* src/trackerd/tracker-email-utils.c:
	* src/trackerd/tracker-main.c:
	* src/trackerd/tracker-process-files.c:
	* src/trackerd/tracker-status.c:
	* src/trackerd/tracker-utils.c: Renamed all tracker_dbus_ files
	and functions to tracker_ to make things simpler.

	* src/trackerd/tracker-xesam-live-search.c:
	* src/trackerd/tracker-xesam-session.[ch]: Improved the code here
	as well as changed all tracker_xesam_() to tracker_xesam_manager_().


Added:
   branches/indexer-split/data/dbus/
   branches/indexer-split/data/dbus/Makefile.am
   branches/indexer-split/data/dbus/org.freedesktop.Tracker.Indexer.service.in
      - copied unchanged from r1535, /branches/indexer-split/data/org.freedesktop.Tracker.Indexer.service.in
   branches/indexer-split/data/dbus/org.freedesktop.Tracker.service.in
      - copied unchanged from r1535, /branches/indexer-split/data/org.freedesktop.Tracker.service.in
   branches/indexer-split/data/dbus/tracker-daemon.xml
      - copied unchanged from r1535, /branches/indexer-split/data/tracker-dbus-daemon.xml
   branches/indexer-split/data/dbus/tracker-files.xml
      - copied unchanged from r1535, /branches/indexer-split/data/tracker-dbus-files.xml
   branches/indexer-split/data/dbus/tracker-indexer.xml
      - copied unchanged from r1535, /branches/indexer-split/data/tracker-indexer.xml
   branches/indexer-split/data/dbus/tracker-keywords.xml
      - copied unchanged from r1535, /branches/indexer-split/data/tracker-dbus-keywords.xml
   branches/indexer-split/data/dbus/tracker-metadata.xml
      - copied unchanged from r1535, /branches/indexer-split/data/tracker-dbus-metadata.xml
   branches/indexer-split/data/dbus/tracker-search.xml
      - copied unchanged from r1535, /branches/indexer-split/data/tracker-dbus-search.xml
   branches/indexer-split/data/dbus/tracker-xesam.xml
      - copied unchanged from r1535, /branches/indexer-split/data/tracker-dbus-xesam.xml
   branches/indexer-split/src/trackerd/tracker-daemon.c
      - copied, changed from r1535, /branches/indexer-split/src/trackerd/tracker-dbus-daemon.c
   branches/indexer-split/src/trackerd/tracker-daemon.h
      - copied, changed from r1535, /branches/indexer-split/src/trackerd/tracker-dbus-daemon.h
   branches/indexer-split/src/trackerd/tracker-files.c
      - copied, changed from r1535, /branches/indexer-split/src/trackerd/tracker-dbus-files.c
   branches/indexer-split/src/trackerd/tracker-files.h
      - copied, changed from r1535, /branches/indexer-split/src/trackerd/tracker-dbus-files.h
   branches/indexer-split/src/trackerd/tracker-keywords.c
      - copied, changed from r1535, /branches/indexer-split/src/trackerd/tracker-dbus-keywords.c
   branches/indexer-split/src/trackerd/tracker-keywords.h
      - copied, changed from r1535, /branches/indexer-split/src/trackerd/tracker-dbus-keywords.h
   branches/indexer-split/src/trackerd/tracker-metadata.c
      - copied, changed from r1535, /branches/indexer-split/src/trackerd/tracker-dbus-metadata.c
   branches/indexer-split/src/trackerd/tracker-metadata.h
      - copied, changed from r1535, /branches/indexer-split/src/trackerd/tracker-dbus-metadata.h
   branches/indexer-split/src/trackerd/tracker-search.c
      - copied, changed from r1535, /branches/indexer-split/src/trackerd/tracker-dbus-search.c
   branches/indexer-split/src/trackerd/tracker-search.h
      - copied, changed from r1535, /branches/indexer-split/src/trackerd/tracker-dbus-search.h
   branches/indexer-split/src/trackerd/tracker-xesam-manager.c
      - copied, changed from r1535, /branches/indexer-split/src/trackerd/tracker-xesam.c
   branches/indexer-split/src/trackerd/tracker-xesam-manager.h
      - copied, changed from r1535, /branches/indexer-split/src/trackerd/tracker-xesam.h
   branches/indexer-split/src/trackerd/tracker-xesam.c
      - copied, changed from r1535, /branches/indexer-split/src/trackerd/tracker-dbus-xesam.c
   branches/indexer-split/src/trackerd/tracker-xesam.h
      - copied, changed from r1535, /branches/indexer-split/src/trackerd/tracker-dbus-xesam.h
Removed:
   branches/indexer-split/data/org.freedesktop.Tracker.Indexer.service.in
   branches/indexer-split/data/org.freedesktop.Tracker.service.in
   branches/indexer-split/data/tracker-dbus-daemon.xml
   branches/indexer-split/data/tracker-dbus-files.xml
   branches/indexer-split/data/tracker-dbus-keywords.xml
   branches/indexer-split/data/tracker-dbus-metadata.xml
   branches/indexer-split/data/tracker-dbus-search.xml
   branches/indexer-split/data/tracker-dbus-xesam.xml
   branches/indexer-split/data/tracker-indexer.xml
   branches/indexer-split/data/tracker.cfg
   branches/indexer-split/src/trackerd/tracker-dbus-daemon.c
   branches/indexer-split/src/trackerd/tracker-dbus-daemon.h
   branches/indexer-split/src/trackerd/tracker-dbus-files.c
   branches/indexer-split/src/trackerd/tracker-dbus-files.h
   branches/indexer-split/src/trackerd/tracker-dbus-keywords.c
   branches/indexer-split/src/trackerd/tracker-dbus-keywords.h
   branches/indexer-split/src/trackerd/tracker-dbus-metadata.c
   branches/indexer-split/src/trackerd/tracker-dbus-metadata.h
   branches/indexer-split/src/trackerd/tracker-dbus-search.c
   branches/indexer-split/src/trackerd/tracker-dbus-search.h
   branches/indexer-split/src/trackerd/tracker-dbus-xesam.c
   branches/indexer-split/src/trackerd/tracker-dbus-xesam.h
Modified:
   branches/indexer-split/ChangeLog
   branches/indexer-split/configure.ac
   branches/indexer-split/data/Makefile.am
   branches/indexer-split/src/libtracker/Makefile.am
   branches/indexer-split/src/libtracker/tracker.c
   branches/indexer-split/src/tracker-indexer/Makefile.am
   branches/indexer-split/src/trackerd/Makefile.am
   branches/indexer-split/src/trackerd/tracker-cache.c
   branches/indexer-split/src/trackerd/tracker-db-sqlite.c
   branches/indexer-split/src/trackerd/tracker-dbus.c
   branches/indexer-split/src/trackerd/tracker-email-evolution.c
   branches/indexer-split/src/trackerd/tracker-email-modest.c
   branches/indexer-split/src/trackerd/tracker-email-utils.c
   branches/indexer-split/src/trackerd/tracker-indexer.c
   branches/indexer-split/src/trackerd/tracker-main.c
   branches/indexer-split/src/trackerd/tracker-process-files.c
   branches/indexer-split/src/trackerd/tracker-status.c
   branches/indexer-split/src/trackerd/tracker-utils.c
   branches/indexer-split/src/trackerd/tracker-xesam-live-search.c
   branches/indexer-split/src/trackerd/tracker-xesam-session.c
   branches/indexer-split/src/trackerd/tracker-xesam-session.h

Modified: branches/indexer-split/configure.ac
==============================================================================
--- branches/indexer-split/configure.ac	(original)
+++ branches/indexer-split/configure.ac	Thu May 29 17:51:24 2008
@@ -800,6 +800,7 @@
 	libtracker-gtk.pc
 	docs/Makefile
 	data/Makefile
+	data/dbus/Makefile
 	data/languages/Makefile
 	data/icons/Makefile
 	data/icons/16x16/Makefile

Modified: branches/indexer-split/data/Makefile.am
==============================================================================
--- branches/indexer-split/data/Makefile.am	(original)
+++ branches/indexer-split/data/Makefile.am	Thu May 29 17:51:24 2008
@@ -1,15 +1,8 @@
-SUBDIRS = languages icons services
+SUBDIRS = dbus languages icons services
 
 configdir = $(datadir)/tracker
 
 config_DATA =						\
-	tracker-dbus-daemon.xml				\
-	tracker-dbus-files.xml				\
-	tracker-dbus-keywords.xml			\
-	tracker-dbus-metadata.xml			\
-	tracker-dbus-search.xml				\
-	tracker-dbus-xesam.xml				\
-	tracker-indexer.xml				\
 	sqlite-tracker.sql 				\
 	sqlite-cache.sql 				\
 	sqlite-contents.sql				\
@@ -23,21 +16,4 @@
 	sqlite-metadata.sql 				\
 	sqlite-xesam.sql
 
-# Services
-org.freedesktop.Tracker_servicedir = $(DBUS_SERVICES_DIR)
-org.freedesktop.Tracker_service_DATA = org.freedesktop.Tracker.service
-
-org.freedesktop.Tracker.Indexer_servicedir = $(DBUS_SERVICES_DIR)
-org.freedesktop.Tracker.Indexer_service_DATA = org.freedesktop.Tracker.Indexer.service
-
-%.service: %.service.in
-	@sed -e "s|\ bindir\@|$(bindir)|" $< > $@
-
-EXTRA_DIST = 						\
-	$(org.freedesktop.Tracker_service_DATA)		\
-	$(org.freedesktop.Tracker.Indexer_service_DATA)	\
-	$(config_DATA)
-
-CLEANFILES = 						\
-	$(org.freedesktop.Tracker_service_DATA)		\
-	$(org.freedesktop.Tracker.Indexer_service_DATA)
+EXTRA_DIST = $(config_DATA)

Added: branches/indexer-split/data/dbus/Makefile.am
==============================================================================
--- (empty file)
+++ branches/indexer-split/data/dbus/Makefile.am	Thu May 29 17:51:24 2008
@@ -0,0 +1,29 @@
+configdir = $(datadir)/tracker
+
+config_DATA =						\
+	tracker-daemon.xml				\
+	tracker-files.xml				\
+	tracker-keywords.xml				\
+	tracker-metadata.xml				\
+	tracker-search.xml				\
+	tracker-xesam.xml				\
+	tracker-indexer.xml
+
+# Services
+org.freedesktop.Tracker_servicedir = $(DBUS_SERVICES_DIR)
+org.freedesktop.Tracker_service_DATA = org.freedesktop.Tracker.service
+
+org.freedesktop.Tracker.Indexer_servicedir = $(DBUS_SERVICES_DIR)
+org.freedesktop.Tracker.Indexer_service_DATA = org.freedesktop.Tracker.Indexer.service
+
+%.service: %.service.in
+	@sed -e "s|\ bindir\@|$(bindir)|" $< > $@
+
+EXTRA_DIST = 						\
+	$(org.freedesktop.Tracker_service_DATA)		\
+	$(org.freedesktop.Tracker.Indexer_service_DATA)	\
+	$(config_DATA)
+
+CLEANFILES = 						\
+	$(org.freedesktop.Tracker_service_DATA)		\
+	$(org.freedesktop.Tracker.Indexer_service_DATA)

Modified: branches/indexer-split/src/libtracker/Makefile.am
==============================================================================
--- branches/indexer-split/src/libtracker/Makefile.am	(original)
+++ branches/indexer-split/src/libtracker/Makefile.am	Thu May 29 17:51:24 2008
@@ -54,13 +54,13 @@
 
 # Generate DBus files from XML data.
 dbus_sources = 					\
-	tracker-dbus-daemon-glue.h		\
-	tracker-dbus-files-glue.h		\
-	tracker-dbus-keywords-glue.h		\
-	tracker-dbus-metadata-glue.h		\
-	tracker-dbus-search-glue.h
+	tracker-daemon-glue.h		\
+	tracker-files-glue.h		\
+	tracker-keywords-glue.h		\
+	tracker-metadata-glue.h		\
+	tracker-search-glue.h
 
-%-glue.h: $(top_srcdir)/data/%.xml
+%-glue.h: $(top_srcdir)/data/dbus/%.xml
 	$(DBUSBINDINGTOOL) --mode=glib-client --output=$@ --prefix=$(subst -,_,$*) $^
 
 BUILT_SOURCES = $(dbus_sources)

Modified: branches/indexer-split/src/libtracker/tracker.c
==============================================================================
--- branches/indexer-split/src/libtracker/tracker.c	(original)
+++ branches/indexer-split/src/libtracker/tracker.c	Thu May 29 17:51:24 2008
@@ -19,11 +19,11 @@
 
 #include <string.h>
 
-#include "tracker-dbus-daemon-glue.h"
-#include "tracker-dbus-files-glue.h"
-#include "tracker-dbus-keywords-glue.h"
-#include "tracker-dbus-metadata-glue.h"
-#include "tracker-dbus-search-glue.h"
+#include "tracker-daemon-glue.h"
+#include "tracker-files-glue.h"
+#include "tracker-keywords-glue.h"
+#include "tracker-metadata-glue.h"
+#include "tracker-search-glue.h"
 
 #include "tracker.h"
 

Modified: branches/indexer-split/src/tracker-indexer/Makefile.am
==============================================================================
--- branches/indexer-split/src/tracker-indexer/Makefile.am	(original)
+++ branches/indexer-split/src/tracker-indexer/Makefile.am	Thu May 29 17:51:24 2008
@@ -44,7 +44,7 @@
 dbus_sources = 								\
 	tracker-indexer-glue.h
 
-%-glue.h: $(top_srcdir)/data/%.xml
+%-glue.h: $(top_srcdir)/data/dbus/%.xml
 	$(DBUSBINDINGTOOL) --mode=glib-server --output=$@ --prefix=$(subst -,_,$*) $^
 
 BUILT_SOURCES = $(dbus_sources)

Modified: branches/indexer-split/src/trackerd/Makefile.am
==============================================================================
--- branches/indexer-split/src/trackerd/Makefile.am	(original)
+++ branches/indexer-split/src/trackerd/Makefile.am	Thu May 29 17:51:24 2008
@@ -67,6 +67,8 @@
 	$(unix_sources)							\
 	tracker-cache.c							\
 	tracker-cache.h							\
+	tracker-daemon.c						\
+	tracker-daemon.h						\
 	tracker-db.c							\
 	tracker-db.h							\
 	tracker-db-email.c						\
@@ -75,22 +77,14 @@
 	tracker-db-sqlite.h						\
 	tracker-dbus.c							\
 	tracker-dbus.h							\
-	tracker-dbus-daemon.c						\
-	tracker-dbus-daemon.h						\
-	tracker-dbus-files.c						\
-	tracker-dbus-files.h						\
-	tracker-dbus-keywords.c						\
-	tracker-dbus-keywords.h						\
-	tracker-dbus-metadata.c						\
-	tracker-dbus-metadata.h						\
-	tracker-dbus-search.c						\
-	tracker-dbus-search.h						\
-	tracker-dbus-xesam.c						\
-	tracker-dbus-xesam.h						\
 	tracker-email.c							\
 	tracker-email.h							\
 	tracker-email-utils.c						\
 	tracker-email-utils.h						\
+	tracker-files.c							\
+	tracker-files.h							\
+	tracker-keywords.c						\
+	tracker-keywords.h						\
 	tracker-indexer.c						\
 	tracker-indexer.h						\
 	tracker-index-stage.c						\
@@ -98,21 +92,27 @@
 	tracker-main.c							\
 	tracker-main.h							\
 	tracker-marshal-main.c						\
+	tracker-metadata.c						\
+	tracker-metadata.h						\
 	tracker-process-files.c						\
 	tracker-process-files.h						\
 	tracker-query-tree.c						\
 	tracker-query-tree.h						\
 	tracker-rdf-query.c						\
 	tracker-rdf-query.h						\
+	tracker-search.c						\
+	tracker-search.h						\
+	tracker-status.c						\
+	tracker-status.h						\
 	tracker-utils.c							\
 	tracker-utils.h							\
 	tracker-watch.h							\
-	tracker-status.c						\
-	tracker-status.h						\
-	tracker-xesam.h							\
 	tracker-xesam.c							\
+	tracker-xesam.h							\
 	tracker-xesam-ontology.c					\
 	tracker-xesam-ontology.h					\
+	tracker-xesam-manager.c						\
+	tracker-xesam-manager.h						\
 	tracker-xesam-query.c						\
 	tracker-xesam-query.h						\
 	tracker-xesam-session.c						\
@@ -156,18 +156,18 @@
         tracker-marshal.c
 
 dbus_sources = 								\
-	tracker-dbus-daemon-glue.h					\
-	tracker-dbus-files-glue.h					\
-	tracker-dbus-keywords-glue.h					\
-	tracker-dbus-metadata-glue.h					\
-	tracker-dbus-search-glue.h					\
-	tracker-dbus-xesam-glue.h					\
+	tracker-daemon-glue.h						\
+	tracker-files-glue.h						\
+	tracker-keywords-glue.h						\
+	tracker-metadata-glue.h						\
+	tracker-search-glue.h						\
+	tracker-xesam-glue.h						\
 	tracker-indexer-client.h
 
-%-glue.h: $(top_srcdir)/data/%.xml
+%-glue.h: $(top_srcdir)/data/dbus/%.xml
 	$(DBUSBINDINGTOOL) --mode=glib-server --output=$@ --prefix=$(subst -,_,$*) $^
 
-%-client.h: $(top_srcdir)/data/%.xml
+%-client.h: $(top_srcdir)/data/dbus/%.xml
 	$(DBUSBINDINGTOOL) --mode=glib-client --output=$@ --prefix=$(subst -,_,$*) $^
 
 BUILT_SOURCES = 							\

Modified: branches/indexer-split/src/trackerd/tracker-cache.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-cache.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-cache.c	Thu May 29 17:51:24 2008
@@ -30,7 +30,7 @@
 #include "tracker-utils.h"
 #include "tracker-db-sqlite.h"
 #include "tracker-dbus.h"
-#include "tracker-dbus-daemon.h"
+#include "tracker-daemon.h"
 #include "tracker-cache.h"
 #include "tracker-main.h"
 #include "tracker-status.h"
@@ -365,7 +365,7 @@
         GObject  *object;
 	gboolean stopped_trans = FALSE;
 	
-        object = tracker_dbus_get_object (TRACKER_TYPE_DBUS_DAEMON);
+        object = tracker_dbus_get_object (TRACKER_TYPE_DAEMON);
 	
 	while (TRUE) {
 		gboolean sleep = FALSE;

Copied: branches/indexer-split/src/trackerd/tracker-daemon.c (from r1535, /branches/indexer-split/src/trackerd/tracker-dbus-daemon.c)
==============================================================================
--- /branches/indexer-split/src/trackerd/tracker-dbus-daemon.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-daemon.c	Thu May 29 17:51:24 2008
@@ -31,19 +31,19 @@
 #include <libtracker-db/tracker-db-dbus.h>
 
 #include "tracker-dbus.h"
-#include "tracker-dbus-daemon.h"
+#include "tracker-daemon.h"
 #include "tracker-db.h"
 #include "tracker-status.h"
 #include "tracker-marshal.h"
 
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TRACKER_TYPE_DBUS_DAEMON, TrackerDBusDaemonPriv))
+#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TRACKER_TYPE_DAEMON, TrackerDaemonPriv))
 
 typedef struct {
 	DBusGProxy    *fd_proxy;
 	DBConnection  *db_con;
 	TrackerConfig *config;
 	Tracker       *tracker;
-} TrackerDBusDaemonPriv;
+} TrackerDaemonPriv;
 
 enum {
 	PROP_0,
@@ -59,25 +59,25 @@
         LAST_SIGNAL
 };
 
-static void dbus_daemon_finalize     (GObject      *object);
-static void dbus_daemon_set_property (GObject      *object,
-				      guint         param_id,
-				      const GValue *value,
-				      GParamSpec   *pspec);
+static void daemon_finalize     (GObject      *object);
+static void daemon_set_property (GObject      *object,
+				 guint         param_id,
+				 const GValue *value,
+				 GParamSpec   *pspec);
 
 static guint signals[LAST_SIGNAL] = {0};
 
-G_DEFINE_TYPE(TrackerDBusDaemon, tracker_dbus_daemon, G_TYPE_OBJECT)
+G_DEFINE_TYPE(TrackerDaemon, tracker_daemon, G_TYPE_OBJECT)
 
 static void
-tracker_dbus_daemon_class_init (TrackerDBusDaemonClass *klass)
+tracker_daemon_class_init (TrackerDaemonClass *klass)
 {
 	GObjectClass *object_class;
 
 	object_class = G_OBJECT_CLASS (klass);
 
-	object_class->finalize = dbus_daemon_finalize;
-	object_class->set_property = dbus_daemon_set_property;
+	object_class->finalize = daemon_finalize;
+	object_class->set_property = daemon_set_property;
 
 	g_object_class_install_property (object_class,
 					 PROP_DB_CONNECTION,
@@ -140,18 +140,18 @@
 			      G_TYPE_INT,
 			      G_TYPE_INT);
 
-	g_type_class_add_private (object_class, sizeof (TrackerDBusDaemonPriv));
+	g_type_class_add_private (object_class, sizeof (TrackerDaemonPriv));
 }
 
 static void
-tracker_dbus_daemon_init (TrackerDBusDaemon *object)
+tracker_daemon_init (TrackerDaemon *object)
 {
 }
 
 static void
-dbus_daemon_finalize (GObject *object)
+daemon_finalize (GObject *object)
 {
-	TrackerDBusDaemonPriv *priv;
+	TrackerDaemonPriv *priv;
 	
 	priv = GET_PRIV (object);
 
@@ -163,31 +163,31 @@
 		g_object_unref (priv->config);
 	}
 
-	G_OBJECT_CLASS (tracker_dbus_daemon_parent_class)->finalize (object);
+	G_OBJECT_CLASS (tracker_daemon_parent_class)->finalize (object);
 }
 
 static void
-dbus_daemon_set_property (GObject      *object,
-			  guint	        param_id,
-			  const GValue *value,
-			  GParamSpec   *pspec)
+daemon_set_property (GObject      *object,
+		     guint	   param_id,
+		     const GValue *value,
+		     GParamSpec   *pspec)
 {
-	TrackerDBusDaemonPriv *priv;
+	TrackerDaemonPriv *priv;
 
 	priv = GET_PRIV (object);
 
 	switch (param_id) {
 	case PROP_DB_CONNECTION:
-		tracker_dbus_daemon_set_db_connection (TRACKER_DBUS_DAEMON (object),
-							 g_value_get_pointer (value));
+		tracker_daemon_set_db_connection (TRACKER_DAEMON (object),
+						  g_value_get_pointer (value));
 		break;
 	case PROP_CONFIG:
-		tracker_dbus_daemon_set_config (TRACKER_DBUS_DAEMON (object),
-						g_value_get_object (value));
+		tracker_daemon_set_config (TRACKER_DAEMON (object),
+					   g_value_get_object (value));
 		break;
 	case PROP_TRACKER:
-		tracker_dbus_daemon_set_tracker (TRACKER_DBUS_DAEMON (object),
-						 g_value_get_pointer (value));
+		tracker_daemon_set_tracker (TRACKER_DAEMON (object),
+					    g_value_get_pointer (value));
 		break;
 
 	default:
@@ -196,17 +196,17 @@
 	};
 }
 
-TrackerDBusDaemon *
-tracker_dbus_daemon_new (DBConnection  *db_con,
-			 TrackerConfig *config,
-			 Tracker       *tracker)
+TrackerDaemon *
+tracker_daemon_new (DBConnection  *db_con,
+		    TrackerConfig *config,
+		    Tracker       *tracker)
 {
-	TrackerDBusDaemon *object;
+	TrackerDaemon *object;
 
 	g_return_val_if_fail (db_con != NULL, NULL);
 	g_return_val_if_fail (TRACKER_IS_CONFIG (config), NULL);
 
-	object = g_object_new (TRACKER_TYPE_DBUS_DAEMON, 
+	object = g_object_new (TRACKER_TYPE_DAEMON, 
 			       "db-connection", db_con,
 			       "config", config,
 			       "tracker", tracker,
@@ -216,12 +216,12 @@
 }
 
 void
-tracker_dbus_daemon_set_db_connection (TrackerDBusDaemon *object,
-				       DBConnection      *db_con)
+tracker_daemon_set_db_connection (TrackerDaemon *object,
+				  DBConnection  *db_con)
 {
-	TrackerDBusDaemonPriv *priv;
+	TrackerDaemonPriv *priv;
 
-	g_return_if_fail (TRACKER_IS_DBUS_DAEMON (object));
+	g_return_if_fail (TRACKER_IS_DAEMON (object));
 	g_return_if_fail (db_con != NULL);
 
 	priv = GET_PRIV (object);
@@ -232,12 +232,12 @@
 }
 
 void
-tracker_dbus_daemon_set_config (TrackerDBusDaemon *object,
-				TrackerConfig     *config)
+tracker_daemon_set_config (TrackerDaemon *object,
+			   TrackerConfig *config)
 {
-	TrackerDBusDaemonPriv *priv;
+	TrackerDaemonPriv *priv;
 
-	g_return_if_fail (TRACKER_IS_DBUS_DAEMON (object));
+	g_return_if_fail (TRACKER_IS_DAEMON (object));
 	g_return_if_fail (TRACKER_IS_CONFIG (config));
 
 	priv = GET_PRIV (object);
@@ -261,12 +261,12 @@
 }
 
 void
-tracker_dbus_daemon_set_tracker (TrackerDBusDaemon *object,
-				 Tracker           *tracker)
+tracker_daemon_set_tracker (TrackerDaemon *object,
+			    Tracker       *tracker)
 {
-	TrackerDBusDaemonPriv *priv;
+	TrackerDaemonPriv *priv;
 
-	g_return_if_fail (TRACKER_IS_DBUS_DAEMON (object));
+	g_return_if_fail (TRACKER_IS_DAEMON (object));
 	g_return_if_fail (tracker != NULL);
 
 	priv = GET_PRIV (object);
@@ -280,9 +280,9 @@
  * Functions
  */
 gboolean
-tracker_dbus_daemon_get_version (TrackerDBusDaemon  *object,
-				 gint               *version,
-				 GError            **error)
+tracker_daemon_get_version (TrackerDaemon  *object,
+			    gint           *version,
+			    GError        **error)
 {
 	guint  request_id;
 	gint   major = 0;
@@ -309,11 +309,11 @@
 }
 
 gboolean
-tracker_dbus_daemon_get_status (TrackerDBusDaemon  *object,
-				gchar             **status,
-				GError            **error)
+tracker_daemon_get_status (TrackerDaemon  *object,
+			   gchar         **status,
+			   GError        **error)
 {
-	TrackerDBusDaemonPriv *priv;
+	TrackerDaemonPriv *priv;
 	guint                  request_id;
 
 	request_id = tracker_dbus_get_next_request_id ();
@@ -333,12 +333,12 @@
 }
 
 gboolean
-tracker_dbus_daemon_get_services (TrackerDBusDaemon  *object,
-				  gboolean            main_services_only,
-				  GHashTable        **values,
-				  GError            **error)
+tracker_daemon_get_services (TrackerDaemon  *object,
+			     gboolean        main_services_only,
+			     GHashTable    **values,
+			     GError        **error)
 {
-	TrackerDBusDaemonPriv *priv;
+	TrackerDaemonPriv *priv;
 	TrackerDBResultSet    *result_set;
 	guint                  request_id;
 	DBConnection          *db_con;
@@ -369,11 +369,11 @@
 }
 
 gboolean
-tracker_dbus_daemon_get_stats (TrackerDBusDaemon  *object,
-			       GPtrArray         **values,
-			       GError            **error)
+tracker_daemon_get_stats (TrackerDaemon  *object,
+			  GPtrArray     **values,
+			  GError        **error)
 {
-	TrackerDBusDaemonPriv *priv;
+	TrackerDaemonPriv *priv;
 	TrackerDBResultSet    *result_set;
 	guint                  request_id;
 	DBConnection          *db_con;
@@ -402,12 +402,12 @@
 }
 
 gboolean
-tracker_dbus_daemon_set_bool_option (TrackerDBusDaemon  *object,
-				     const gchar        *option,
-				     gboolean            value,
-				     GError            **error)
+tracker_daemon_set_bool_option (TrackerDaemon  *object,
+				const gchar    *option,
+				gboolean        value,
+				GError        **error)
 {
-	TrackerDBusDaemonPriv *priv;
+	TrackerDaemonPriv *priv;
 	guint                  request_id;
 	gboolean               signal_state_change = FALSE;
 
@@ -491,12 +491,12 @@
 }
 
 gboolean
-tracker_dbus_daemon_set_int_option (TrackerDBusDaemon  *object,
-				    const gchar        *option,
-				    gint                value,
-				    GError            **error)
+tracker_daemon_set_int_option (TrackerDaemon  *object,
+			       const gchar    *option,
+			       gint            value,
+			       GError        **error)
 {
-	TrackerDBusDaemonPriv *priv;
+	TrackerDaemonPriv *priv;
 	guint                  request_id;
 
 	/* FIXME: Shouldn't we just make the TrackerConfig module a
@@ -535,11 +535,11 @@
 }
 
 gboolean
-tracker_dbus_daemon_shutdown (TrackerDBusDaemon  *object,
-			      gboolean            reindex,
-			      GError            **error)
+tracker_daemon_shutdown (TrackerDaemon  *object,
+			 gboolean        reindex,
+			 GError        **error)
 {
-	TrackerDBusDaemonPriv *priv;
+	TrackerDaemonPriv *priv;
 	guint                  request_id;
 
 	request_id = tracker_dbus_get_next_request_id ();
@@ -563,10 +563,10 @@
 }
 
 gboolean
-tracker_dbus_daemon_prompt_index_signals (TrackerDBusDaemon  *object,
-					  GError            **error)
+tracker_daemon_prompt_index_signals (TrackerDaemon  *object,
+				     GError        **error)
 {
-	TrackerDBusDaemonPriv *priv;
+	TrackerDaemonPriv *priv;
 	guint                  request_id;
 
 	request_id = tracker_dbus_get_next_request_id ();

Copied: branches/indexer-split/src/trackerd/tracker-daemon.h (from r1535, /branches/indexer-split/src/trackerd/tracker-dbus-daemon.h)
==============================================================================
--- /branches/indexer-split/src/trackerd/tracker-dbus-daemon.h	(original)
+++ branches/indexer-split/src/trackerd/tracker-daemon.h	Thu May 29 17:51:24 2008
@@ -29,70 +29,67 @@
 #include "tracker-db-sqlite.h"
 #include "tracker-main.h"
 
-#define TRACKER_DBUS_DAEMON_SERVICE         "org.freedesktop.Tracker"
-#define TRACKER_DBUS_DAEMON_PATH            "/org/freedesktop/Tracker"
-#define TRACKER_DBUS_DAEMON_INTERFACE       "org.freedesktop.Tracker"
+#define TRACKER_DAEMON_SERVICE         "org.freedesktop.Tracker"
+#define TRACKER_DAEMON_PATH            "/org/freedesktop/Tracker"
+#define TRACKER_DAEMON_INTERFACE       "org.freedesktop.Tracker"
 
 G_BEGIN_DECLS
 
-#define TRACKER_TYPE_DBUS_DAEMON            (tracker_dbus_daemon_get_type ())
-#define TRACKER_DBUS_DAEMON(object)         (G_TYPE_CHECK_INSTANCE_CAST ((object), TRACKER_TYPE_DBUS_DAEMON, TrackerDBusDaemon))
-#define TRACKER_DBUS_DAEMON_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_DBUS_DAEMON, TrackerDBusDaemonClass))
-#define TRACKER_IS_DBUS_DAEMON(object)      (G_TYPE_CHECK_INSTANCE_TYPE ((object), TRACKER_TYPE_DBUS_DAEMON))
-#define TRACKER_IS_DBUS_DAEMON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_DBUS_DAEMON))
-#define TRACKER_DBUS_DAEMON_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_DBUS_DAEMON, TrackerDBusDaemonClass))
+#define TRACKER_TYPE_DAEMON            (tracker_daemon_get_type ())
+#define TRACKER_DAEMON(object)         (G_TYPE_CHECK_INSTANCE_CAST ((object), TRACKER_TYPE_DAEMON, TrackerDaemon))
+#define TRACKER_DAEMON_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_DBUS_DAEMON, TrackerDaemonClass))
+#define TRACKER_IS_DAEMON(object)      (G_TYPE_CHECK_INSTANCE_TYPE ((object), TRACKER_TYPE_DAEMON))
+#define TRACKER_IS_DAEMON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_DAEMON))
+#define TRACKER_DAEMON_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_DAEMON, TrackerDaemonClass))
 
-typedef struct TrackerDBusDaemon      TrackerDBusDaemon;
-typedef struct TrackerDBusDaemonClass TrackerDBusDaemonClass;
+typedef struct TrackerDaemon      TrackerDaemon;
+typedef struct TrackerDaemonClass TrackerDaemonClass;
 
-struct TrackerDBusDaemon {
+struct TrackerDaemon {
 	GObject parent;
 };
 
-struct TrackerDBusDaemonClass {
+struct TrackerDaemonClass {
 	GObjectClass parent;
 };
 
-GType              tracker_dbus_daemon_get_type             (void);
-
-TrackerDBusDaemon *tracker_dbus_daemon_new                  (DBConnection       *db_con,
-							     TrackerConfig      *config,
-							     Tracker            *tracker);
-
-void               tracker_dbus_daemon_set_db_connection    (TrackerDBusDaemon  *object,
-							     DBConnection       *db_con);
-void               tracker_dbus_daemon_set_config           (TrackerDBusDaemon  *object,
-							     TrackerConfig      *config);
-void               tracker_dbus_daemon_set_tracker          (TrackerDBusDaemon  *object,
-							     Tracker            *tracker);
-
-gboolean           tracker_dbus_daemon_get_version          (TrackerDBusDaemon  *object,
-							     gint               *version,
-							     GError            **error);
-gboolean           tracker_dbus_daemon_get_status           (TrackerDBusDaemon  *object,
-							     gchar             **status,
-							     GError            **error);
-gboolean           tracker_dbus_daemon_get_services         (TrackerDBusDaemon  *object,
-							     gboolean            main_services_only,
-							     GHashTable        **values,
-							     GError            **error);
-gboolean           tracker_dbus_daemon_get_stats            (TrackerDBusDaemon  *object,
-							     GPtrArray         **values,
-							     GError            **error);
-gboolean           tracker_dbus_daemon_set_bool_option      (TrackerDBusDaemon  *object,
-							     const gchar        *option,
-							     gboolean            value,
-							     GError            **error);
-gboolean           tracker_dbus_daemon_set_int_option       (TrackerDBusDaemon  *object,
-							     const gchar        *option,
-							     gint                value,
-							     GError            **error);
-gboolean           tracker_dbus_daemon_shutdown             (TrackerDBusDaemon  *object,
-							     gboolean            reindex,
-							     GError            **error);
-gboolean           tracker_dbus_daemon_prompt_index_signals (TrackerDBusDaemon  *object,
-							     GError            **error);
+GType          tracker_daemon_get_type             (void);
+TrackerDaemon *tracker_daemon_new                  (DBConnection   *db_con,
+						    TrackerConfig  *config,
+						    Tracker        *tracker);
+void           tracker_daemon_set_db_connection    (TrackerDaemon  *object,
+						    DBConnection   *db_con);
+void           tracker_daemon_set_config           (TrackerDaemon  *object,
+						    TrackerConfig  *config);
+void           tracker_daemon_set_tracker          (TrackerDaemon  *object,
+						    Tracker        *tracker);
+gboolean       tracker_daemon_get_version          (TrackerDaemon  *object,
+						    gint           *version,
+						    GError        **error);
+gboolean       tracker_daemon_get_status           (TrackerDaemon  *object,
+						    gchar         **status,
+						    GError        **error);
+gboolean       tracker_daemon_get_services         (TrackerDaemon  *object,
+						    gboolean        main_services_only,
+						    GHashTable    **values,
+						    GError        **error);
+gboolean       tracker_daemon_get_stats            (TrackerDaemon  *object,
+						    GPtrArray     **values,
+						    GError        **error);
+gboolean       tracker_daemon_set_bool_option      (TrackerDaemon  *object,
+						    const gchar    *option,
+						    gboolean        value,
+						    GError        **error);
+gboolean       tracker_daemon_set_int_option       (TrackerDaemon  *object,
+						    const gchar    *option,
+						    gint            value,
+						    GError        **error);
+gboolean       tracker_daemon_shutdown             (TrackerDaemon  *object,
+						    gboolean        reindex,
+						    GError        **error);
+gboolean       tracker_daemon_prompt_index_signals (TrackerDaemon  *object,
+						    GError        **error);
 
 G_END_DECLS
 
-#endif /* __TRACKERD_DBUS_DAEMON_H__ */
+#endif /* __TRACKERD_DAEMON_H__ */

Modified: branches/indexer-split/src/trackerd/tracker-db-sqlite.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-db-sqlite.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-db-sqlite.c	Thu May 29 17:51:24 2008
@@ -46,7 +46,7 @@
 #include "tracker-utils.h"
 #include "tracker-watch.h"
 #include "tracker-query-tree.h"
-#include "tracker-xesam.h"
+#include "tracker-xesam-manager.h"
 #include "tracker-xesam-ontology.h"
 
 #define MAX_INDEX_TEXT_LENGTH 1048576
@@ -3429,7 +3429,7 @@
 	if (result_set)
 		g_object_unref (result_set);
 
-	tracker_xesam_wakeup (id);
+	tracker_xesam_manager_wakeup (id);
 
 	g_free (eid);
 

Modified: branches/indexer-split/src/trackerd/tracker-dbus.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-dbus.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-dbus.c	Thu May 29 17:51:24 2008
@@ -27,18 +27,18 @@
 
 #include "tracker-db-sqlite.h"
 #include "tracker-dbus.h"
-#include "tracker-dbus-daemon.h"
-#include "tracker-dbus-daemon-glue.h"
-#include "tracker-dbus-files.h"
-#include "tracker-dbus-files-glue.h"
-#include "tracker-dbus-keywords.h"
-#include "tracker-dbus-keywords-glue.h"
-#include "tracker-dbus-metadata.h"
-#include "tracker-dbus-metadata-glue.h"
-#include "tracker-dbus-search.h"
-#include "tracker-dbus-search-glue.h"
-#include "tracker-dbus-xesam.h"
-#include "tracker-dbus-xesam-glue.h"
+#include "tracker-daemon.h"
+#include "tracker-daemon-glue.h"
+#include "tracker-files.h"
+#include "tracker-files-glue.h"
+#include "tracker-keywords.h"
+#include "tracker-keywords-glue.h"
+#include "tracker-metadata.h"
+#include "tracker-metadata-glue.h"
+#include "tracker-search.h"
+#include "tracker-search-glue.h"
+#include "tracker-xesam.h"
+#include "tracker-xesam-glue.h"
 #include "tracker-indexer-client.h"
 #include "tracker-utils.h"
 #include "tracker-watch.h"
@@ -142,13 +142,13 @@
                                            DBUS_INTERFACE_DBUS);
 
         /* Register the service name for org.freedesktop.Tracker */
-        if (!dbus_register_service (proxy, TRACKER_DBUS_DAEMON_SERVICE)) {
+        if (!dbus_register_service (proxy, TRACKER_DAEMON_SERVICE)) {
                 return FALSE;
         }
 
 	/* Register the service name for org.freedesktop.xesam if XESAM is enabled */
         if (tracker_config_get_enable_xesam (config)) {
-		if (!dbus_register_service (proxy, TRACKER_DBUS_XESAM_SERVICE)) {
+		if (!dbus_register_service (proxy, TRACKER_XESAM_SERVICE)) {
 			return FALSE;
 		}
         }
@@ -212,9 +212,9 @@
         /* Add org.freedesktop.Tracker */
         if (!(object = dbus_register_object (connection, 
                                              proxy,
-                                             TRACKER_TYPE_DBUS_DAEMON,
-                                             &dbus_glib_tracker_dbus_daemon_object_info,
-                                             TRACKER_DBUS_DAEMON_PATH))) {
+                                             TRACKER_TYPE_DAEMON,
+                                             &dbus_glib_tracker_daemon_object_info,
+                                             TRACKER_DAEMON_PATH))) {
                 return FALSE;
         }
 
@@ -228,9 +228,9 @@
         /* Add org.freedesktop.Tracker.Files */
         if (!(object = dbus_register_object (connection, 
                                              proxy,
-                                             TRACKER_TYPE_DBUS_FILES,
-                                             &dbus_glib_tracker_dbus_files_object_info,
-                                             TRACKER_DBUS_FILES_PATH))) {
+                                             TRACKER_TYPE_FILES,
+                                             &dbus_glib_tracker_files_object_info,
+                                             TRACKER_FILES_PATH))) {
                 return FALSE;
         }
 
@@ -240,9 +240,9 @@
         /* Add org.freedesktop.Tracker.Keywords */
         if (!(object = dbus_register_object (connection, 
                                              proxy,
-                                             TRACKER_TYPE_DBUS_KEYWORDS,
-                                             &dbus_glib_tracker_dbus_keywords_object_info,
-                                             TRACKER_DBUS_KEYWORDS_PATH))) {
+                                             TRACKER_TYPE_KEYWORDS,
+                                             &dbus_glib_tracker_keywords_object_info,
+                                             TRACKER_KEYWORDS_PATH))) {
                 return FALSE;
         }
 
@@ -252,9 +252,9 @@
         /* Add org.freedesktop.Tracker.Metadata */
         if (!(object = dbus_register_object (connection, 
                                              proxy,
-                                             TRACKER_TYPE_DBUS_METADATA,
-                                             &dbus_glib_tracker_dbus_metadata_object_info,
-                                             TRACKER_DBUS_METADATA_PATH))) {
+                                             TRACKER_TYPE_METADATA,
+                                             &dbus_glib_tracker_metadata_object_info,
+                                             TRACKER_METADATA_PATH))) {
                 return FALSE;
         }
 
@@ -264,9 +264,9 @@
         /* Add org.freedesktop.Tracker.Search */
         if (!(object = dbus_register_object (connection, 
                                              proxy,
-                                             TRACKER_TYPE_DBUS_SEARCH,
-                                             &dbus_glib_tracker_dbus_search_object_info,
-                                             TRACKER_DBUS_SEARCH_PATH))) {
+                                             TRACKER_TYPE_SEARCH,
+                                             &dbus_glib_tracker_search_object_info,
+                                             TRACKER_SEARCH_PATH))) {
                 return FALSE;
         }
 
@@ -282,9 +282,9 @@
 		/* Add org.freedesktop.xesam.Search */
 		if (!(object = dbus_register_object (connection, 
 						     proxy,
-						     TRACKER_TYPE_DBUS_XESAM,
-						     &dbus_glib_tracker_dbus_xesam_object_info,
-						     TRACKER_DBUS_XESAM_PATH))) {
+						     TRACKER_TYPE_XESAM,
+						     &dbus_glib_tracker_xesam_object_info,
+						     TRACKER_XESAM_PATH))) {
 			return FALSE;
 		}
 		
@@ -296,7 +296,7 @@
 					 G_TYPE_STRING, G_TYPE_INVALID);
 		
 		dbus_g_proxy_connect_signal (proxy, "NameOwnerChanged", 
-					     G_CALLBACK (tracker_dbus_xesam_name_owner_changed), 
+					     G_CALLBACK (tracker_xesam_name_owner_changed), 
 					     g_object_ref (object),
 					     dbus_name_owner_changed);
 		

Modified: branches/indexer-split/src/trackerd/tracker-email-evolution.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-email-evolution.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-email-evolution.c	Thu May 29 17:51:24 2008
@@ -43,7 +43,7 @@
 #include "tracker-db-email.h"
 #include "tracker-cache.h"
 #include "tracker-dbus.h"
-#include "tracker-dbus-daemon.h"
+#include "tracker-daemon.h"
 #include "tracker-watch.h"
 #include "tracker-status.h"
 #include "tracker-utils.h"
@@ -1288,11 +1288,11 @@
                 return;
         }
 
-        object = tracker_dbus_get_object (TRACKER_TYPE_DBUS_DAEMON);
+        object = tracker_dbus_get_object (TRACKER_TYPE_DAEMON);
 
 	if (open_summary_file (summary_file_path, &summary)) {
 		SummaryFileHeader *header;
-		gint32            mail_count, junk_count, delete_count;
+		gint32             mail_count, junk_count, delete_count;
 		gchar             *dir;
 
 		header = NULL;

Modified: branches/indexer-split/src/trackerd/tracker-email-modest.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-email-modest.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-email-modest.c	Thu May 29 17:51:24 2008
@@ -40,7 +40,7 @@
 #include "tracker-email-utils.h"
 #include "tracker-db-email.h"
 #include "tracker-dbus.h"
-#include "tracker-dbus-daemon.h"
+#include "tracker-daemon.h"
 #include "tracker-cache.h"
 #include "tracker-status.h"
 #include "tracker-watch.h"
@@ -713,7 +713,7 @@
 	if (!tracker->is_running)
 		return; 
 
-        object = tracker_dbus_get_object (TRACKER_TYPE_DBUS_DAEMON);
+        object = tracker_dbus_get_object (TRACKER_TYPE_DAEMON);
 
 	if (open_summary_file (summary_file_path, &summary)) {
 		SummaryFileHeader *header;

Modified: branches/indexer-split/src/trackerd/tracker-email-utils.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-email-utils.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-email-utils.c	Thu May 29 17:51:24 2008
@@ -38,7 +38,7 @@
 #include "tracker-cache.h"
 #include "tracker-db-email.h"
 #include "tracker-dbus.h"
-#include "tracker-dbus-daemon.h"
+#include "tracker-daemon.h"
 #include "tracker-email-utils.h"
 #include "tracker-watch.h"
 
@@ -132,7 +132,7 @@
 	tracker->mbox_count++;
 
         /* Signal progress */
-        object = tracker_dbus_get_object (TRACKER_TYPE_DBUS_DAEMON);
+        object = tracker_dbus_get_object (TRACKER_TYPE_DAEMON);
         g_signal_emit_by_name (object,
                                "index-progress", 
                                "Emails",                
@@ -196,7 +196,7 @@
 			}
 			
                         /* Signal progress */
-                        object = tracker_dbus_get_object (TRACKER_TYPE_DBUS_DAEMON);
+                        object = tracker_dbus_get_object (TRACKER_TYPE_DAEMON);
                         g_signal_emit_by_name (object, 
                                                "index-progress", 
                                                "Emails",                
@@ -213,7 +213,7 @@
 	tracker->mbox_processed++;
         
         /* Signal progress */
-        object = tracker_dbus_get_object (TRACKER_TYPE_DBUS_DAEMON);
+        object = tracker_dbus_get_object (TRACKER_TYPE_DAEMON);
         g_signal_emit_by_name (object,
                                "index-progress", 
                                "Emails",                

Copied: branches/indexer-split/src/trackerd/tracker-files.c (from r1535, /branches/indexer-split/src/trackerd/tracker-dbus-files.c)
==============================================================================
--- /branches/indexer-split/src/trackerd/tracker-dbus-files.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-files.c	Thu May 29 17:51:24 2008
@@ -33,38 +33,38 @@
 #include <libtracker-db/tracker-db-dbus.h>
 
 #include "tracker-dbus.h"
-#include "tracker-dbus-files.h"
+#include "tracker-files.h"
 #include "tracker-db.h"
 #include "tracker-marshal.h"
 
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TRACKER_TYPE_DBUS_FILES, TrackerDBusFilesPriv))
+#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TRACKER_TYPE_FILES, TrackerFilesPriv))
 
 typedef struct {
 	DBConnection *db_con;
-} TrackerDBusFilesPriv;
+} TrackerFilesPriv;
 
 enum {
 	PROP_0,
 	PROP_DB_CONNECTION
 };
 
-static void dbus_files_finalize     (GObject      *object);
-static void dbus_files_set_property (GObject      *object,
-                                     guint         param_id,
-                                     const GValue *value,
-                                     GParamSpec   *pspec);
+static void files_finalize     (GObject      *object);
+static void files_set_property (GObject      *object,
+				guint         param_id,
+				const GValue *value,
+				GParamSpec   *pspec);
 
-G_DEFINE_TYPE(TrackerDBusFiles, tracker_dbus_files, G_TYPE_OBJECT)
+G_DEFINE_TYPE(TrackerFiles, tracker_files, G_TYPE_OBJECT)
 
 static void
-tracker_dbus_files_class_init (TrackerDBusFilesClass *klass)
+tracker_files_class_init (TrackerFilesClass *klass)
 {
 	GObjectClass *object_class;
 
 	object_class = G_OBJECT_CLASS (klass);
 
-	object_class->finalize = dbus_files_finalize;
-	object_class->set_property = dbus_files_set_property;
+	object_class->finalize = files_finalize;
+	object_class->set_property = files_set_property;
 
 	g_object_class_install_property (object_class,
 					 PROP_DB_CONNECTION,
@@ -73,38 +73,38 @@
 							       "Database connection to use in transactions",
 							       G_PARAM_WRITABLE));
 
-	g_type_class_add_private (object_class, sizeof (TrackerDBusFilesPriv));
+	g_type_class_add_private (object_class, sizeof (TrackerFilesPriv));
 }
 
 static void
-tracker_dbus_files_init (TrackerDBusFiles *object)
+tracker_files_init (TrackerFiles *object)
 {
 }
 
 static void
-dbus_files_finalize (GObject *object)
+files_finalize (GObject *object)
 {
-	TrackerDBusFilesPriv *priv;
+	TrackerFilesPriv *priv;
 	
 	priv = GET_PRIV (object);
 
-	G_OBJECT_CLASS (tracker_dbus_files_parent_class)->finalize (object);
+	G_OBJECT_CLASS (tracker_files_parent_class)->finalize (object);
 }
 
 static void
-dbus_files_set_property (GObject      *object,
-                         guint	       param_id,
-                         const GValue *value,
-                         GParamSpec   *pspec)
+files_set_property (GObject      *object,
+		    guint         param_id,
+		    const GValue *value,
+		    GParamSpec   *pspec)
 {
-	TrackerDBusFilesPriv *priv;
+	TrackerFilesPriv *priv;
 
 	priv = GET_PRIV (object);
 
 	switch (param_id) {
 	case PROP_DB_CONNECTION:
-		tracker_dbus_files_set_db_connection (TRACKER_DBUS_FILES (object),
-                                                      g_value_get_pointer (value));
+		tracker_files_set_db_connection (TRACKER_FILES (object),
+						 g_value_get_pointer (value));
 		break;
 
 	default:
@@ -113,12 +113,12 @@
 	};
 }
 
-TrackerDBusFiles *
-tracker_dbus_files_new (DBConnection *db_con)
+TrackerFiles *
+tracker_files_new (DBConnection *db_con)
 {
-	TrackerDBusFiles *object;
+	TrackerFiles *object;
 
-	object = g_object_new (TRACKER_TYPE_DBUS_FILES, 
+	object = g_object_new (TRACKER_TYPE_FILES, 
 			       "db-connection", db_con,
 			       NULL);
 	
@@ -126,12 +126,12 @@
 }
 
 void
-tracker_dbus_files_set_db_connection (TrackerDBusFiles *object,
-                                      DBConnection     *db_con)
+tracker_files_set_db_connection (TrackerFiles *object,
+				 DBConnection *db_con)
 {
-	TrackerDBusFilesPriv *priv;
+	TrackerFilesPriv *priv;
 
-	g_return_if_fail (TRACKER_IS_DBUS_FILES (object));
+	g_return_if_fail (TRACKER_IS_FILES (object));
 	g_return_if_fail (db_con != NULL);
 
 	priv = GET_PRIV (object);
@@ -145,13 +145,13 @@
  * Functions
  */
 gboolean
-tracker_dbus_files_exist (TrackerDBusFiles  *object,
-                          const gchar       *uri,
-                          gboolean           auto_create,
-                          gboolean          *value,
-                          GError           **error)
+tracker_files_exist (TrackerFiles  *object,
+		     const gchar       *uri,
+		     gboolean           auto_create,
+		     gboolean          *value,
+		     GError           **error)
 {
-	TrackerDBusFilesPriv *priv;
+	TrackerFilesPriv *priv;
 	guint                 request_id;
 	DBConnection         *db_con;
 	guint32               file_id;
@@ -202,23 +202,23 @@
 }
 
 gboolean
-tracker_dbus_files_create (TrackerDBusFiles  *object,
-                           const gchar       *uri,
-                           gboolean           is_directory,
-                           const gchar       *mime,
-                           gint               size,
-                           gint               mtime,
-                           GError           **error)
-{
-	TrackerDBusFilesPriv *priv;
-	guint                 request_id;
-	DBConnection         *db_con;
-	TrackerDBFileInfo    *info;
-	gchar                *name;
-	gchar                *path;
-	gchar                *service;
-	guint32               file_id;
-	gboolean              created;
+tracker_files_create (TrackerFiles  *object,
+		      const gchar   *uri,
+		      gboolean       is_directory,
+		      const gchar   *mime,
+		      gint           size,
+		      gint           mtime,
+		      GError       **error)
+{
+	TrackerFilesPriv  *priv;
+	guint              request_id;
+	DBConnection      *db_con;
+	TrackerDBFileInfo *info;
+	gchar             *name;
+	gchar             *path;
+	gchar             *service;
+	guint32            file_id;
+	gboolean           created;
 
 	request_id = tracker_dbus_get_next_request_id ();
 
@@ -327,19 +327,19 @@
 }
 
 gboolean
-tracker_dbus_files_delete (TrackerDBusFiles  *object,
-                           const gchar       *uri,
-                           GError           **error)
-{
-	TrackerDBusFilesPriv *priv;
-	TrackerDBResultSet   *result_set;
-	guint                 request_id;
-	DBConnection         *db_con;
-	guint32               file_id;
-	gchar                *name;
-	gchar                *path;
-	gboolean              is_directory;
-	TrackerDBAction       action;
+tracker_files_delete (TrackerFiles  *object,
+		      const gchar   *uri,
+		      GError       **error)
+{
+	TrackerFilesPriv   *priv;
+	TrackerDBResultSet *result_set;
+	guint               request_id;
+	DBConnection       *db_con;
+	guint32             file_id;
+	gchar              *name;
+	gchar              *path;
+	gboolean            is_directory;
+	TrackerDBAction     action;
 
 	request_id = tracker_dbus_get_next_request_id ();
 
@@ -405,18 +405,18 @@
 }
 
 gboolean
-tracker_dbus_files_get_service_type (TrackerDBusFiles  *object,
-                                     const gchar       *uri,
-                                     gchar            **value,  
-                                     GError           **error)
-{
-	TrackerDBusFilesPriv   *priv;
-	TrackerDBResultSet     *result_set;
-	guint                   request_id;
-	DBConnection           *db_con;
-	guint32                 file_id;
-	gchar                  *file_id_str;
-	const gchar            *mime = NULL;
+tracker_files_get_service_type (TrackerFiles  *object,
+				const gchar   *uri,
+				gchar        **value,  
+				GError       **error)
+{
+	TrackerFilesPriv   *priv;
+	TrackerDBResultSet *result_set;
+	guint               request_id;
+	DBConnection       *db_con;
+	guint32             file_id;
+	gchar              *file_id_str;
+	const gchar        *mime = NULL;
 
 	request_id = tracker_dbus_get_next_request_id ();
 
@@ -487,20 +487,20 @@
 }
 
 gboolean
-tracker_dbus_files_get_text_contents (TrackerDBusFiles  *object,
-                                      const gchar       *uri,
-                                      gint               offset,
-                                      gint               max_length,
-                                      gchar            **value,  
-                                      GError           **error)
-{
-	TrackerDBusFilesPriv *priv;
-	TrackerDBResultSet   *result_set;
-	guint                 request_id;
-	DBConnection         *db_con;
-	gchar                *service_id;
-	gchar                *offset_str;
-	gchar                *max_length_str;
+tracker_files_get_text_contents (TrackerFiles  *object,
+				 const gchar   *uri,
+				 gint           offset,
+				 gint           max_length,
+				 gchar        **value,  
+				 GError       **error)
+{
+	TrackerFilesPriv   *priv;
+	TrackerDBResultSet *result_set;
+	guint               request_id;
+	DBConnection       *db_con;
+	gchar              *service_id;
+	gchar              *offset_str;
+	gchar              *max_length_str;
 
 	request_id = tracker_dbus_get_next_request_id ();
 
@@ -568,20 +568,20 @@
 }
 
 gboolean
-tracker_dbus_files_search_text_contents (TrackerDBusFiles  *object,
-                                         const gchar       *uri,
-                                         const gchar       *text,
-                                         gint               max_length,
-                                         gchar            **value,  
-                                         GError           **error)
-{
-	TrackerDBusFilesPriv *priv;
-	TrackerDBResultSet   *result_set = NULL;
-	guint                 request_id;
-	DBConnection         *db_con;
-	gchar                *name;
-	gchar                *path;
-	gchar                *max_length_str;
+tracker_files_search_text_contents (TrackerFiles  *object,
+				    const gchar   *uri,
+				    const gchar   *text,
+				    gint           max_length,
+				    gchar        **value,  
+				    GError       **error)
+{
+	TrackerFilesPriv   *priv;
+	TrackerDBResultSet *result_set = NULL;
+	guint               request_id;
+	DBConnection       *db_con;
+	gchar              *name;
+	gchar              *path;
+	gchar              *max_length_str;
 
 	request_id = tracker_dbus_get_next_request_id ();
 
@@ -642,18 +642,18 @@
 }
 
 gboolean
-tracker_dbus_files_get_by_service_type (TrackerDBusFiles   *object,
-                                        gint                live_query_id,
-                                        const gchar        *service,
-                                        gint                offset,
-                                        gint                max_hits,
-                                        gchar            ***values,  
-                                        GError            **error)
-{
-	TrackerDBusFilesPriv *priv;
-	TrackerDBResultSet   *result_set;
-	guint                 request_id;
-	DBConnection         *db_con;
+tracker_files_get_by_service_type (TrackerFiles   *object,
+				   gint            live_query_id,
+				   const gchar    *service,
+				   gint            offset,
+				   gint            max_hits,
+				   gchar        ***values,  
+				   GError        **error)
+{
+	TrackerFilesPriv   *priv;
+	TrackerDBResultSet *result_set;
+	guint               request_id;
+	DBConnection       *db_con;
 
 	request_id = tracker_dbus_get_next_request_id ();
 
@@ -699,18 +699,18 @@
 }
 
 gboolean
-tracker_dbus_files_get_by_mime_type (TrackerDBusFiles   *object,
-                                     gint                live_query_id,
-                                     gchar             **mime_types,
-                                     gint                offset,
-                                     gint                max_hits,
-                                     gchar            ***values,  
-                                     GError            **error)
-{
-	TrackerDBusFilesPriv *priv;
-	TrackerDBResultSet   *result_set;
-	guint                 request_id;
-	DBConnection         *db_con;
+tracker_files_get_by_mime_type (TrackerFiles   *object,
+				gint            live_query_id,
+				gchar         **mime_types,
+				gint            offset,
+				gint            max_hits,
+				gchar        ***values,  
+				GError        **error)
+{
+	TrackerFilesPriv   *priv;
+	TrackerDBResultSet *result_set;
+	guint               request_id;
+	DBConnection       *db_con;
 
 	request_id = tracker_dbus_get_next_request_id ();
 
@@ -751,18 +751,18 @@
 }
 
 gboolean
-tracker_dbus_files_get_by_mime_type_vfs (TrackerDBusFiles   *object,
-					 gint                live_query_id,
-					 gchar             **mime_types,
-					 gint                offset,
-					 gint                max_hits,
-					 gchar            ***values,  
-					 GError            **error)
-{
-	TrackerDBusFilesPriv *priv;
-	TrackerDBResultSet   *result_set;
-	guint                 request_id;
-	DBConnection         *db_con;
+tracker_files_get_by_mime_type_vfs (TrackerFiles   *object,
+				    gint            live_query_id,
+				    gchar         **mime_types,
+				    gint            offset,
+				    gint            max_hits,
+				    gchar        ***values,  
+				    GError        **error)
+{
+	TrackerFilesPriv   *priv;
+	TrackerDBResultSet *result_set;
+	guint               request_id;
+	DBConnection       *db_con;
 
 	request_id = tracker_dbus_get_next_request_id ();
 
@@ -806,17 +806,17 @@
 }
 
 gboolean
-tracker_dbus_files_get_mtime (TrackerDBusFiles  *object,
-                              const gchar       *uri,
-                              gint              *value,
-                              GError           **error)
-{
-	TrackerDBusFilesPriv   *priv;
-	TrackerDBResultSet     *result_set;
-	guint                   request_id;
-	DBConnection           *db_con;
-	gchar                  *path;
-	gchar                  *name;
+tracker_files_get_mtime (TrackerFiles  *object,
+			 const gchar   *uri,
+			 gint          *value,
+			 GError       **error)
+{
+	TrackerFilesPriv   *priv;
+	TrackerDBResultSet *result_set;
+	guint               request_id;
+	DBConnection       *db_con;
+	gchar              *path;
+	gchar              *name;
 
 	request_id = tracker_dbus_get_next_request_id ();
 
@@ -865,24 +865,24 @@
 }
 
 gboolean
-tracker_dbus_files_get_metadata_for_files_in_folder (TrackerDBusFiles  *object,
-                                                     gint               live_query_id,
-                                                     const gchar       *uri,
-                                                     gchar            **fields,
-                                                     GPtrArray        **values,
-                                                     GError           **error)
-{
-	TrackerDBusFilesPriv *priv;
-	TrackerDBResultSet   *result_set;
-	guint                 request_id;
-	DBConnection         *db_con;
-	TrackerField         *defs[255];
-	guint                 i;
-	gchar                *uri_filtered;
-	guint32               file_id;
-	GString              *sql;
-	gboolean 	      needs_join[255];
-	gchar                *query;
+tracker_files_get_metadata_for_files_in_folder (TrackerFiles  *object,
+						gint           live_query_id,
+						const gchar   *uri,
+						gchar        **fields,
+						GPtrArray    **values,
+						GError       **error)
+{
+	TrackerFilesPriv   *priv;
+	TrackerDBResultSet *result_set;
+	guint               request_id;
+	DBConnection       *db_con;
+	TrackerField       *defs[255];
+	guint               i;
+	gchar              *uri_filtered;
+	guint32             file_id;
+	GString            *sql;
+	gboolean            needs_join[255];
+	gchar              *query;
 
 	request_id = tracker_dbus_get_next_request_id ();
 

Copied: branches/indexer-split/src/trackerd/tracker-files.h (from r1535, /branches/indexer-split/src/trackerd/tracker-dbus-files.h)
==============================================================================
--- /branches/indexer-split/src/trackerd/tracker-dbus-files.h	(original)
+++ branches/indexer-split/src/trackerd/tracker-files.h	Thu May 29 17:51:24 2008
@@ -19,107 +19,106 @@
  * Boston, MA  02110-1301, USA.
  */
 
-#ifndef __TRACKERD_DBUS_FILES_H__
-#define __TRACKERD_DBUS_FILES_H__
+#ifndef __TRACKERD_FILES_H__
+#define __TRACKERD_FILES_H__
 
 #include <glib-object.h>
 
 #include "tracker-db-sqlite.h"
 
-#define TRACKER_DBUS_FILES_SERVICE         "org.freedesktop.Tracker"
-#define TRACKER_DBUS_FILES_PATH            "/org/freedesktop/Tracker/Files"
-#define TRACKER_DBUS_FILES_INTERFACE       "org.freedesktop.Tracker.Files"
+#define TRACKER_FILES_SERVICE         "org.freedesktop.Tracker"
+#define TRACKER_FILES_PATH            "/org/freedesktop/Tracker/Files"
+#define TRACKER_FILES_INTERFACE       "org.freedesktop.Tracker.Files"
 
 G_BEGIN_DECLS
 
-#define TRACKER_TYPE_DBUS_FILES            (tracker_dbus_files_get_type ())
-#define TRACKER_DBUS_FILES(object)         (G_TYPE_CHECK_INSTANCE_CAST ((object), TRACKER_TYPE_DBUS_FILES, TrackerDBusFiles))
-#define TRACKER_DBUS_FILES_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_DBUS_FILES, TrackerDBusFilesClass))
-#define TRACKER_IS_DBUS_FILES(object)      (G_TYPE_CHECK_INSTANCE_TYPE ((object), TRACKER_TYPE_DBUS_FILES))
-#define TRACKER_IS_DBUS_FILES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_DBUS_FILES))
-#define TRACKER_DBUS_FILES_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_DBUS_FILES, TrackerDBusFilesClass))
+#define TRACKER_TYPE_FILES            (tracker_files_get_type ())
+#define TRACKER_FILES(object)         (G_TYPE_CHECK_INSTANCE_CAST ((object), TRACKER_TYPE_FILES, TrackerFiles))
+#define TRACKER_FILES_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_FILES, TrackerFilesClass))
+#define TRACKER_IS_FILES(object)      (G_TYPE_CHECK_INSTANCE_TYPE ((object), TRACKER_TYPE_FILES))
+#define TRACKER_IS_FILES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_FILES))
+#define TRACKER_FILES_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_FILES, TrackerFilesClass))
 
-typedef struct TrackerDBusFiles      TrackerDBusFiles;
-typedef struct TrackerDBusFilesClass TrackerDBusFilesClass;
+typedef struct TrackerFiles      TrackerFiles;
+typedef struct TrackerFilesClass TrackerFilesClass;
 
-struct TrackerDBusFiles {
+struct TrackerFiles {
 	GObject parent;
 };
 
-struct TrackerDBusFilesClass {
+struct TrackerFilesClass {
 	GObjectClass parent;
 };
 
-GType    tracker_dbus_files_get_type                         (void);
+GType    tracker_files_get_type                         (void);
 
-TrackerDBusFiles *
-         tracker_dbus_files_new                              (DBConnection      *db_con);
-void     tracker_dbus_files_set_db_connection                (TrackerDBusFiles  *object,
-							      DBConnection      *db_con);
-
-gboolean tracker_dbus_files_exist                            (TrackerDBusFiles   *object,
-							      const gchar        *uri,
-							      gboolean            auto_create,
-							      gboolean           *value,
-							      GError            **error);
-gboolean tracker_dbus_files_create                           (TrackerDBusFiles   *object,
-							      const gchar        *uri,
-							      gboolean            is_directory,
-							      const gchar        *mime,
-							      gint                size,
-							      gint                mtime,
-							      GError            **error);
-gboolean tracker_dbus_files_delete                           (TrackerDBusFiles   *object,
-							      const gchar        *uri,
-							      GError            **error);
-gboolean tracker_dbus_files_get_service_type                 (TrackerDBusFiles   *object,
-							      const gchar        *uri,
-							      gchar             **value,
-							      GError            **error);
-gboolean tracker_dbus_files_get_text_contents                (TrackerDBusFiles   *object,
-							      const gchar        *uri,
-							      gint                offset,
-							      gint                max_length,
-							      gchar             **value,
-							      GError            **error);
-gboolean tracker_dbus_files_search_text_contents             (TrackerDBusFiles   *object,
-							      const gchar        *uri,
-							      const gchar        *text,
-							      gint                max_length,
-							      gchar             **value,
-							      GError            **error);
-gboolean tracker_dbus_files_get_by_service_type              (TrackerDBusFiles   *object,
-							      gint                live_query_id,
-							      const gchar        *service,
-							      gint                offset,
-							      gint                max_hits,
-							      gchar            ***values,
-							      GError            **error);
-gboolean tracker_dbus_files_get_by_mime_type                 (TrackerDBusFiles   *object,
-							      gint                live_query_id,
-							      gchar             **mime_types,
-							      gint                offset,
-							      gint                max_hits,
-							      gchar            ***values,
-							      GError            **error);
-gboolean tracker_dbus_files_get_by_mime_type_vfs             (TrackerDBusFiles   *object,
-							      gint                live_query_id,
-							      gchar             **mime_types,
-							      gint                offset,
-							      gint                max_hits,
-							      gchar            ***values,
-							      GError            **error);
-gboolean tracker_dbus_files_get_mtime                        (TrackerDBusFiles   *object,
-							      const gchar        *uri,
-							      gint               *value,
-							      GError            **error);
-gboolean tracker_dbus_files_get_metadata_for_files_in_folder (TrackerDBusFiles   *object,
-							      gint                live_query_id,
-							      const gchar        *uri,
-							      gchar             **fields,
-							      GPtrArray         **values,
-							      GError            **error);
+TrackerFiles *
+         tracker_files_new                              (DBConnection   *db_con);
+void     tracker_files_set_db_connection                (TrackerFiles   *object,
+							 DBConnection   *db_con);
+gboolean tracker_files_exist                            (TrackerFiles   *object,
+							 const gchar    *uri,
+							 gboolean        auto_create,
+							 gboolean       *value,
+							 GError        **error);
+gboolean tracker_files_create                           (TrackerFiles   *object,
+							 const gchar    *uri,
+							 gboolean        is_directory,
+							 const gchar    *mime,
+							 gint            size,
+							 gint            mtime,
+							 GError        **error);
+gboolean tracker_files_delete                           (TrackerFiles   *object,
+							 const gchar    *uri,
+							 GError        **error);
+gboolean tracker_files_get_service_type                 (TrackerFiles   *object,
+							 const gchar    *uri,
+							 gchar         **value,
+							 GError        **error);
+gboolean tracker_files_get_text_contents                (TrackerFiles   *object,
+							 const gchar    *uri,
+							 gint            offset,
+							 gint            max_length,
+							 gchar         **value,
+							 GError        **error);
+gboolean tracker_files_search_text_contents             (TrackerFiles   *object,
+							 const gchar    *uri,
+							 const gchar    *text,
+							 gint            max_length,
+							 gchar         **value,
+							 GError        **error);
+gboolean tracker_files_get_by_service_type              (TrackerFiles   *object,
+							 gint            live_query_id,
+							 const gchar    *service,
+							 gint            offset,
+							 gint            max_hits,
+							 gchar        ***values,
+							 GError        **error);
+gboolean tracker_files_get_by_mime_type                 (TrackerFiles   *object,
+							 gint            live_query_id,
+							 gchar         **mime_types,
+							 gint            offset,
+							 gint            max_hits,
+							 gchar        ***values,
+							 GError        **error);
+gboolean tracker_files_get_by_mime_type_vfs             (TrackerFiles   *object,
+							 gint            live_query_id,
+							 gchar         **mime_types,
+							 gint            offset,
+							 gint            max_hits,
+							 gchar        ***values,
+							 GError        **error);
+gboolean tracker_files_get_mtime                        (TrackerFiles   *object,
+							 const gchar    *uri,
+							 gint           *value,
+							 GError        **error);
+gboolean tracker_files_get_metadata_for_files_in_folder (TrackerFiles   *object,
+							 gint            live_query_id,
+							 const gchar    *uri,
+							 gchar         **fields,
+							 GPtrArray     **values,
+							 GError        **error);
 
 G_END_DECLS
 
-#endif /* __TRACKERD_DBUS_FILES_H__ */
+#endif /* __TRACKERD_FILES_H__ */

Modified: branches/indexer-split/src/trackerd/tracker-indexer.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-indexer.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-indexer.c	Thu May 29 17:51:24 2008
@@ -52,7 +52,7 @@
 #include "tracker-indexer.h"
 #include "tracker-cache.h"
 #include "tracker-dbus.h"
-#include "tracker-dbus-daemon.h"
+#include "tracker-daemon.h"
 #include "tracker-process-files.h"
 #include "tracker-query-tree.h"
 #include "tracker-main.h"
@@ -420,7 +420,7 @@
 	tracker->merge_processed = 0;
 	
         /* Signal progress */
-        object = tracker_dbus_get_object (TRACKER_TYPE_DBUS_DAEMON);
+        object = tracker_dbus_get_object (TRACKER_TYPE_DAEMON);
         g_signal_emit_by_name (object, 
                                "index-progress", 
                                "Merging",
@@ -480,7 +480,7 @@
 	tracker->merge_processed = 1;
 
         /* Signal progress */
-        object = tracker_dbus_get_object (TRACKER_TYPE_DBUS_DAEMON);
+        object = tracker_dbus_get_object (TRACKER_TYPE_DAEMON);
         g_signal_emit_by_name (object, 
 			       "index-progress", 
                                "Merging",                     
@@ -614,7 +614,7 @@
         }
 
         data_dir = tracker_get_data_dir ();
-        object = tracker_dbus_get_object (TRACKER_TYPE_DBUS_DAEMON);
+        object = tracker_dbus_get_object (TRACKER_TYPE_DAEMON);
 
 	if (type == INDEX_TYPE_FILES) {
 		g_return_if_fail (tracker->file_index);
@@ -835,7 +835,7 @@
 				tracker->merge_processed++;
 
                                 /* Signal progress */
-                                object = tracker_dbus_get_object (TRACKER_TYPE_DBUS_DAEMON);
+                                object = tracker_dbus_get_object (TRACKER_TYPE_DAEMON);
                                 g_signal_emit_by_name (object, 
                                                        "index-progress", 
                                                        "Merging",

Copied: branches/indexer-split/src/trackerd/tracker-keywords.c (from r1535, /branches/indexer-split/src/trackerd/tracker-dbus-keywords.c)
==============================================================================
--- /branches/indexer-split/src/trackerd/tracker-dbus-keywords.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-keywords.c	Thu May 29 17:51:24 2008
@@ -28,16 +28,16 @@
 #include <libtracker-db/tracker-db-dbus.h>
 
 #include "tracker-dbus.h"
-#include "tracker-dbus-keywords.h"
+#include "tracker-keywords.h"
 #include "tracker-db.h"
 #include "tracker-marshal.h"
 
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TRACKER_TYPE_DBUS_KEYWORDS, TrackerDBusKeywordsPriv))
+#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TRACKER_TYPE_KEYWORDS, TrackerKeywordsPriv))
 
 typedef struct {
 	DBusGProxy   *fd_proxy;
 	DBConnection *db_con;
-} TrackerDBusKeywordsPriv;
+} TrackerKeywordsPriv;
 
 enum {
 	PROP_0,
@@ -50,25 +50,25 @@
         LAST_SIGNAL
 };
 
-static void dbus_keywords_finalize     (GObject      *object);
-static void dbus_keywords_set_property (GObject      *object,
-					guint         param_id,
-					const GValue *value,
-					GParamSpec   *pspec);
+static void keywords_finalize     (GObject      *object);
+static void keywords_set_property (GObject      *object,
+				   guint         param_id,
+				   const GValue *value,
+				   GParamSpec   *pspec);
 
 static guint signals[LAST_SIGNAL] = {0};
 
-G_DEFINE_TYPE(TrackerDBusKeywords, tracker_dbus_keywords, G_TYPE_OBJECT)
+G_DEFINE_TYPE(TrackerKeywords, tracker_keywords, G_TYPE_OBJECT)
 
 static void
-tracker_dbus_keywords_class_init (TrackerDBusKeywordsClass *klass)
+tracker_keywords_class_init (TrackerKeywordsClass *klass)
 {
 	GObjectClass *object_class;
 
 	object_class = G_OBJECT_CLASS (klass);
 
-	object_class->finalize = dbus_keywords_finalize;
-	object_class->set_property = dbus_keywords_set_property;
+	object_class->finalize = keywords_finalize;
+	object_class->set_property = keywords_set_property;
 
 	g_object_class_install_property (object_class,
 					 PROP_DB_CONNECTION,
@@ -96,18 +96,18 @@
                               G_TYPE_NONE,
                               3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
 
-	g_type_class_add_private (object_class, sizeof (TrackerDBusKeywordsPriv));
+	g_type_class_add_private (object_class, sizeof (TrackerKeywordsPriv));
 }
 
 static void
-tracker_dbus_keywords_init (TrackerDBusKeywords *object)
+tracker_keywords_init (TrackerKeywords *object)
 {
 }
 
 static void
-dbus_keywords_finalize (GObject *object)
+keywords_finalize (GObject *object)
 {
-	TrackerDBusKeywordsPriv *priv;
+	TrackerKeywordsPriv *priv;
 	
 	priv = GET_PRIV (object);
 
@@ -115,23 +115,23 @@
 		g_object_unref (priv->fd_proxy);
 	}
 
-	G_OBJECT_CLASS (tracker_dbus_keywords_parent_class)->finalize (object);
+	G_OBJECT_CLASS (tracker_keywords_parent_class)->finalize (object);
 }
 
 static void
-dbus_keywords_set_property (GObject      *object,
-			    guint	  param_id,
-			    const GValue *value,
-			    GParamSpec	 *pspec)
+keywords_set_property (GObject      *object,
+		       guint	  param_id,
+		       const GValue *value,
+		       GParamSpec	 *pspec)
 {
-	TrackerDBusKeywordsPriv *priv;
+	TrackerKeywordsPriv *priv;
 
 	priv = GET_PRIV (object);
 
 	switch (param_id) {
 	case PROP_DB_CONNECTION:
-		tracker_dbus_keywords_set_db_connection (TRACKER_DBUS_KEYWORDS (object),
-							 g_value_get_pointer (value));
+		tracker_keywords_set_db_connection (TRACKER_KEYWORDS (object),
+						    g_value_get_pointer (value));
 		break;
 
 	default:
@@ -140,12 +140,12 @@
 	};
 }
 
-TrackerDBusKeywords *
-tracker_dbus_keywords_new (DBConnection *db_con)
+TrackerKeywords *
+tracker_keywords_new (DBConnection *db_con)
 {
-	TrackerDBusKeywords *object;
+	TrackerKeywords *object;
 
-	object = g_object_new (TRACKER_TYPE_DBUS_KEYWORDS, 
+	object = g_object_new (TRACKER_TYPE_KEYWORDS, 
 			       "db-connection", db_con,
 			       NULL);
 	
@@ -153,12 +153,12 @@
 }
 
 void
-tracker_dbus_keywords_set_db_connection (TrackerDBusKeywords *object,
-					 DBConnection        *db_con)
+tracker_keywords_set_db_connection (TrackerKeywords *object,
+				    DBConnection    *db_con)
 {
-	TrackerDBusKeywordsPriv *priv;
+	TrackerKeywordsPriv *priv;
 
-	g_return_if_fail (TRACKER_IS_DBUS_KEYWORDS (object));
+	g_return_if_fail (TRACKER_IS_KEYWORDS (object));
 	g_return_if_fail (db_con != NULL);
 
 	priv = GET_PRIV (object);
@@ -172,15 +172,15 @@
  * Functions
  */
 gboolean
-tracker_dbus_keywords_get_list (TrackerDBusKeywords   *object,
-				const gchar           *service,
-				GPtrArray            **values,
-				GError               **error)
-{
-	TrackerDBusKeywordsPriv *priv;
-	TrackerDBResultSet      *result_set;
-	guint                    request_id;
-	DBConnection    	*db_con;
+tracker_keywords_get_list (TrackerKeywords  *object,
+			   const gchar      *service,
+			   GPtrArray       **values,
+			   GError          **error)
+{
+	TrackerKeywordsPriv *priv;
+	TrackerDBResultSet  *result_set;
+	guint                request_id;
+	DBConnection        *db_con;
 
 	request_id = tracker_dbus_get_next_request_id ();
 
@@ -220,17 +220,17 @@
 }
 
 gboolean
-tracker_dbus_keywords_get (TrackerDBusKeywords   *object,
-			   const gchar           *service,
-			   const gchar           *uri,
-			   gchar               ***values,
-			   GError               **error)
-{
-	TrackerDBusKeywordsPriv *priv;
-	TrackerDBResultSet      *result_set;
-	DBConnection            *db_con;
-	guint                    request_id;
-	gchar                   *id;
+tracker_keywords_get (TrackerKeywords   *object,
+		      const gchar       *service,
+		      const gchar       *uri,
+		      gchar           ***values,
+		      GError           **error)
+{
+	TrackerKeywordsPriv *priv;
+	TrackerDBResultSet  *result_set;
+	DBConnection        *db_con;
+	guint                request_id;
+	gchar               *id;
 
 	request_id = tracker_dbus_get_next_request_id ();
 
@@ -292,17 +292,17 @@
 }
 
 gboolean
-tracker_dbus_keywords_add (TrackerDBusKeywords  *object,
-			   const gchar          *service,
-			   const gchar          *uri,
-			   gchar               **values,
-			   GError              **error)
-{
-	TrackerDBusKeywordsPriv  *priv;
-	DBConnection             *db_con;
-	guint                     request_id;
-	gchar                    *id;
-	gchar                   **p;
+tracker_keywords_add (TrackerKeywords  *object,
+		      const gchar      *service,
+		      const gchar      *uri,
+		      gchar           **values,
+		      GError          **error)
+{
+	TrackerKeywordsPriv  *priv;
+	DBConnection         *db_con;
+	guint                 request_id;
+	gchar                *id;
+	gchar               **p;
 
 	request_id = tracker_dbus_get_next_request_id ();
 
@@ -363,17 +363,17 @@
 }
 
 gboolean
-tracker_dbus_keywords_remove (TrackerDBusKeywords  *object,
-			      const gchar          *service,
-			      const gchar          *uri,
-			      gchar               **values,
-			      GError              **error)
-{
-	TrackerDBusKeywordsPriv  *priv;
-	DBConnection             *db_con;
-	guint                     request_id;
-	gchar                    *id;
-	gchar                   **p;
+tracker_keywords_remove (TrackerKeywords  *object,
+			 const gchar      *service,
+			 const gchar      *uri,
+			 gchar           **values,
+			 GError          **error)
+{
+	TrackerKeywordsPriv  *priv;
+	DBConnection         *db_con;
+	guint                 request_id;
+	gchar                *id;
+	gchar               **p;
 
 	request_id = tracker_dbus_get_next_request_id ();
 
@@ -438,15 +438,15 @@
 }
 
 gboolean
-tracker_dbus_keywords_remove_all (TrackerDBusKeywords  *object,
-				  const gchar          *service,
-				  const gchar          *uri,
-				  GError              **error)
-{
-	TrackerDBusKeywordsPriv  *priv;
-	DBConnection             *db_con;
-	guint                     request_id;
-	gchar                    *id;
+tracker_keywords_remove_all (TrackerKeywords  *object,
+			     const gchar      *service,
+			     const gchar      *uri,
+			     GError          **error)
+{
+	TrackerKeywordsPriv *priv;
+	DBConnection        *db_con;
+	guint                request_id;
+	gchar               *id;
 
 	request_id = tracker_dbus_get_next_request_id ();
 
@@ -501,25 +501,25 @@
 }
 
 gboolean
-tracker_dbus_keywords_search (TrackerDBusKeywords  *object,
-			      gint                  live_query_id,
-			      const gchar          *service,
-			      const gchar         **keywords,
-			      gint                  offset,
-			      gint                  max_hits,
-			      gchar              ***values,
-			      GError              **error)
-{
-	TrackerDBusKeywordsPriv  *priv;
-	TrackerDBResultSet       *result_set;
-	DBConnection             *db_con;
-	guint                     request_id;
-	const gchar             **p;
-	GString                  *search;
-	GString                  *select;
-	GString                  *where;
-	gchar                    *related_metadata;
-	gchar                    *query;
+tracker_keywords_search (TrackerKeywords  *object,
+			 gint              live_query_id,
+			 const gchar      *service,
+			 const gchar     **keywords,
+			 gint              offset,
+			 gint              max_hits,
+			 gchar          ***values,
+			 GError          **error)
+{
+	TrackerKeywordsPriv  *priv;
+	TrackerDBResultSet   *result_set;
+	DBConnection         *db_con;
+	guint                 request_id;
+	const gchar         **p;
+	GString              *search;
+	GString              *select;
+	GString              *where;
+	gchar                *related_metadata;
+	gchar                *query;
 
 	request_id = tracker_dbus_get_next_request_id ();
 

Copied: branches/indexer-split/src/trackerd/tracker-keywords.h (from r1535, /branches/indexer-split/src/trackerd/tracker-dbus-keywords.h)
==============================================================================
--- /branches/indexer-split/src/trackerd/tracker-dbus-keywords.h	(original)
+++ branches/indexer-split/src/trackerd/tracker-keywords.h	Thu May 29 17:51:24 2008
@@ -19,75 +19,73 @@
  * Boston, MA  02110-1301, USA.
  */
 
-#ifndef __TRACKERD_DBUS_KEYWORDS_H__
-#define __TRACKERD_DBUS_KEYWORDS_H__
+#ifndef __TRACKERD_KEYWORDS_H__
+#define __TRACKERD_KEYWORDS_H__
 
 #include <glib-object.h>
 
 #include "tracker-db-sqlite.h"
 
-#define TRACKER_DBUS_KEYWORDS_SERVICE         "org.freedesktop.Tracker"
-#define TRACKER_DBUS_KEYWORDS_PATH            "/org/freedesktop/Tracker/Keywords"
-#define TRACKER_DBUS_KEYWORDS_INTERFACE       "org.freedesktop.Tracker.Keywords"
+#define TRACKER_KEYWORDS_SERVICE         "org.freedesktop.Tracker"
+#define TRACKER_KEYWORDS_PATH            "/org/freedesktop/Tracker/Keywords"
+#define TRACKER_KEYWORDS_INTERFACE       "org.freedesktop.Tracker.Keywords"
 
 G_BEGIN_DECLS
 
-#define TRACKER_TYPE_DBUS_KEYWORDS            (tracker_dbus_keywords_get_type ())
-#define TRACKER_DBUS_KEYWORDS(object)         (G_TYPE_CHECK_INSTANCE_CAST ((object), TRACKER_TYPE_DBUS_KEYWORDS, TrackerDBusKeywords))
-#define TRACKER_DBUS_KEYWORDS_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_DBUS_KEYWORDS, TrackerDBusKeywordsClass))
-#define TRACKER_IS_DBUS_KEYWORDS(object)      (G_TYPE_CHECK_INSTANCE_TYPE ((object), TRACKER_TYPE_DBUS_KEYWORDS))
-#define TRACKER_IS_DBUS_KEYWORDS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_DBUS_KEYWORDS))
-#define TRACKER_DBUS_KEYWORDS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_DBUS_KEYWORDS, TrackerDBusKeywordsClass))
+#define TRACKER_TYPE_KEYWORDS            (tracker_keywords_get_type ())
+#define TRACKER_KEYWORDS(object)         (G_TYPE_CHECK_INSTANCE_CAST ((object), TRACKER_TYPE_KEYWORDS, TrackerKeywords))
+#define TRACKER_KEYWORDS_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_KEYWORDS, TrackerKeywordsClass))
+#define TRACKER_IS_KEYWORDS(object)      (G_TYPE_CHECK_INSTANCE_TYPE ((object), TRACKER_TYPE_KEYWORDS))
+#define TRACKER_IS_KEYWORDS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_KEYWORDS))
+#define TRACKER_KEYWORDS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_KEYWORDS, TrackerKeywordsClass))
 
-typedef struct TrackerDBusKeywords      TrackerDBusKeywords;
-typedef struct TrackerDBusKeywordsClass TrackerDBusKeywordsClass;
+typedef struct TrackerKeywords      TrackerKeywords;
+typedef struct TrackerKeywordsClass TrackerKeywordsClass;
 
-struct TrackerDBusKeywords {
+struct TrackerKeywords {
 	GObject parent;
 };
 
-struct TrackerDBusKeywordsClass {
+struct TrackerKeywordsClass {
 	GObjectClass parent;
 };
 
-GType    tracker_dbus_keywords_get_type   (void);
-
-TrackerDBusKeywords *
-         tracker_dbus_keywords_new               (DBConnection          *db_con);
-void     tracker_dbus_keywords_set_db_connection (TrackerDBusKeywords   *object,
-						  DBConnection          *db_con);
-gboolean tracker_dbus_keywords_get_list          (TrackerDBusKeywords   *object,
-						  const gchar           *service,
-						  GPtrArray            **values,
-						  GError               **error);
-gboolean tracker_dbus_keywords_get               (TrackerDBusKeywords   *object,
-						  const gchar           *service,
-						  const gchar           *uri,
-						  gchar               ***values,
-						  GError               **error);
-gboolean tracker_dbus_keywords_add               (TrackerDBusKeywords   *object,
-						  const gchar           *service,
-						  const gchar           *uri,
-						  gchar                **values,
-						  GError               **error);
-gboolean tracker_dbus_keywords_remove            (TrackerDBusKeywords   *object,
-						  const gchar           *service,
-						  const gchar           *uri,
-						  gchar                **values,
-						  GError               **error);
-gboolean tracker_dbus_keywords_remove_all        (TrackerDBusKeywords   *object,
-						  const gchar           *service,
-						  const gchar           *uri,
-						  GError               **error);
-gboolean tracker_dbus_keywords_search            (TrackerDBusKeywords   *object,
-						  gint                   live_query_id,
-						  const gchar           *service,
-						  const gchar          **keywords,
-						  gint                   offset,
-						  gint                   max_hits,
-						  gchar               ***result,
-						  GError               **error);
+GType            tracker_keywords_get_type          (void);
+TrackerKeywords *tracker_keywords_new               (DBConnection      *db_con);
+void             tracker_keywords_set_db_connection (TrackerKeywords   *object,
+						     DBConnection      *db_con);
+gboolean         tracker_keywords_get_list          (TrackerKeywords   *object,
+						     const gchar       *service,
+						     GPtrArray        **values,
+						     GError           **error);
+gboolean         tracker_keywords_get               (TrackerKeywords   *object,
+						     const gchar       *service,
+						     const gchar       *uri,
+						     gchar           ***values,
+						     GError           **error);
+gboolean         tracker_keywords_add               (TrackerKeywords   *object,
+						     const gchar       *service,
+						     const gchar       *uri,
+						     gchar            **values,
+						     GError           **error);
+gboolean         tracker_keywords_remove            (TrackerKeywords   *object,
+						     const gchar       *service,
+						     const gchar       *uri,
+						     gchar            **values,
+						     GError           **error);
+gboolean         tracker_keywords_remove_all        (TrackerKeywords   *object,
+						     const gchar       *service,
+						     const gchar       *uri,
+						     GError           **error);
+gboolean         tracker_keywords_search            (TrackerKeywords   *object,
+						     gint               live_query_id,
+						     const gchar       *service,
+						     const gchar      **keywords,
+						     gint               offset,
+						     gint               max_hits,
+						     gchar           ***result,
+						     GError           **error);
 
 G_END_DECLS
 
-#endif /* __TRACKERD_DBUS_KEYWORDS_H__ */
+#endif /* __TRACKERD_KEYWORDS_H__ */

Modified: branches/indexer-split/src/trackerd/tracker-main.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-main.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-main.c	Thu May 29 17:51:24 2008
@@ -52,7 +52,7 @@
 #include "tracker-process-files.h"
 #include "tracker-status.h"
 #include "tracker-watch.h"
-#include "tracker-xesam.h"
+#include "tracker-xesam-manager.h"
 
 #ifdef OS_WIN32
 #include <windows.h>
@@ -942,7 +942,7 @@
 	tracker_nfs_lock_init (tracker_config_get_nfs_locking (tracker->config));
 	tracker_db_init ();
 	tracker_db_manager_init (data_dir, user_data_dir, sys_tmp_dir);
-	tracker_xesam_init ();
+	tracker_xesam_manager_init ();
 	tracker_cache_init ();
 	tracker_ontology_init ();
 	tracker_email_init (tracker->config);
@@ -1049,7 +1049,7 @@
 	tracker_dbus_shutdown ();
 	tracker_ontology_shutdown ();
 	tracker_cache_shutdown ();
-	tracker_xesam_shutdown ();
+	tracker_xesam_manager_shutdown ();
 	tracker_db_shutdown ();
 	tracker_db_manager_shutdown ();
 	tracker_nfs_lock_shutdown ();

Copied: branches/indexer-split/src/trackerd/tracker-metadata.c (from r1535, /branches/indexer-split/src/trackerd/tracker-dbus-metadata.c)
==============================================================================
--- /branches/indexer-split/src/trackerd/tracker-dbus-metadata.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-metadata.c	Thu May 29 17:51:24 2008
@@ -31,26 +31,26 @@
 #include <libtracker-db/tracker-db-dbus.h>
 
 #include "tracker-dbus.h"
-#include "tracker-dbus-metadata.h"
+#include "tracker-metadata.h"
 #include "tracker-db.h"
 #include "tracker-marshal.h"
 
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TRACKER_TYPE_DBUS_METADATA, TrackerDBusMetadataPriv))
+#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TRACKER_TYPE_METADATA, TrackerMetadataPriv))
 
 typedef struct {
 	DBConnection *db_con;
-} TrackerDBusMetadataPriv;
+} TrackerMetadataPriv;
 
 enum {
 	PROP_0,
 	PROP_DB_CONNECTION
 };
 
-static void dbus_metadata_finalize     (GObject      *object);
-static void dbus_metadata_set_property (GObject      *object,
-					guint         param_id,
-					const GValue *value,
-					GParamSpec   *pspec);
+static void metadata_finalize     (GObject      *object);
+static void metadata_set_property (GObject      *object,
+				   guint         param_id,
+				   const GValue *value,
+				   GParamSpec   *pspec);
 
 static const gchar *types[] = {
 	"index", 
@@ -60,17 +60,17 @@
 	NULL
 };
 
-G_DEFINE_TYPE(TrackerDBusMetadata, tracker_dbus_metadata, G_TYPE_OBJECT)
+G_DEFINE_TYPE(TrackerMetadata, tracker_metadata, G_TYPE_OBJECT)
 
 static void
-tracker_dbus_metadata_class_init (TrackerDBusMetadataClass *klass)
+tracker_metadata_class_init (TrackerMetadataClass *klass)
 {
 	GObjectClass *object_class;
 
 	object_class = G_OBJECT_CLASS (klass);
 
-	object_class->finalize = dbus_metadata_finalize;
-	object_class->set_property = dbus_metadata_set_property;
+	object_class->finalize = metadata_finalize;
+	object_class->set_property = metadata_set_property;
 
 	g_object_class_install_property (object_class,
 					 PROP_DB_CONNECTION,
@@ -79,38 +79,38 @@
 							       "Database connection to use in transactions",
 							       G_PARAM_WRITABLE));
 
-	g_type_class_add_private (object_class, sizeof (TrackerDBusMetadataPriv));
+	g_type_class_add_private (object_class, sizeof (TrackerMetadataPriv));
 }
 
 static void
-tracker_dbus_metadata_init (TrackerDBusMetadata *object)
+tracker_metadata_init (TrackerMetadata *object)
 {
 }
 
 static void
-dbus_metadata_finalize (GObject *object)
+metadata_finalize (GObject *object)
 {
-	TrackerDBusMetadataPriv *priv;
+	TrackerMetadataPriv *priv;
 	
 	priv = GET_PRIV (object);
 
-	G_OBJECT_CLASS (tracker_dbus_metadata_parent_class)->finalize (object);
+	G_OBJECT_CLASS (tracker_metadata_parent_class)->finalize (object);
 }
 
 static void
-dbus_metadata_set_property (GObject      *object,
-			    guint	  param_id,
-			    const GValue *value,
-			    GParamSpec	 *pspec)
+metadata_set_property (GObject      *object,
+		       guint	     param_id,
+		       const GValue *value,
+		       GParamSpec   *pspec)
 {
-	TrackerDBusMetadataPriv *priv;
+	TrackerMetadataPriv *priv;
 
 	priv = GET_PRIV (object);
 
 	switch (param_id) {
 	case PROP_DB_CONNECTION:
-		tracker_dbus_metadata_set_db_connection (TRACKER_DBUS_METADATA (object),
-							 g_value_get_pointer (value));
+		tracker_metadata_set_db_connection (TRACKER_METADATA (object),
+						    g_value_get_pointer (value));
 		break;
 
 	default:
@@ -119,12 +119,12 @@
 	};
 }
 
-TrackerDBusMetadata *
-tracker_dbus_metadata_new (DBConnection *db_con)
+TrackerMetadata *
+tracker_metadata_new (DBConnection *db_con)
 {
-	TrackerDBusMetadata *object;
+	TrackerMetadata *object;
 
-	object = g_object_new (TRACKER_TYPE_DBUS_METADATA, 
+	object = g_object_new (TRACKER_TYPE_METADATA, 
 			       "db-connection", db_con,
 			       NULL);
 	
@@ -132,12 +132,12 @@
 }
 
 void
-tracker_dbus_metadata_set_db_connection (TrackerDBusMetadata *object,
-					 DBConnection        *db_con)
+tracker_metadata_set_db_connection (TrackerMetadata *object,
+				    DBConnection    *db_con)
 {
-	TrackerDBusMetadataPriv *priv;
+	TrackerMetadataPriv *priv;
 
-	g_return_if_fail (TRACKER_IS_DBUS_METADATA (object));
+	g_return_if_fail (TRACKER_IS_METADATA (object));
 	g_return_if_fail (db_con != NULL);
 
 	priv = GET_PRIV (object);
@@ -151,23 +151,23 @@
  * Functions
  */
 gboolean
-tracker_dbus_metadata_get (TrackerDBusMetadata   *object,
-			   const gchar           *service,
-			   const gchar           *id,
-			   gchar                **keys,
-			   gchar               ***values,
-			   GError               **error)
-{
-	TrackerDBusMetadataPriv *priv;
-	TrackerDBResultSet      *result_set;
-	guint                    request_id;
-	DBConnection    	*db_con;
-	gchar                   *service_result;
-	gchar                   *service_id;
-	guint                    i;
-	GString                 *sql;
-	GString                 *sql_join;
-	gchar                   *query;
+tracker_metadata_get (TrackerMetadata   *object,
+		      const gchar       *service,
+		      const gchar       *id,
+		      gchar            **keys,
+		      gchar           ***values,
+		      GError           **error)
+{
+	TrackerMetadataPriv *priv;
+	TrackerDBResultSet  *result_set;
+	guint                request_id;
+	DBConnection        *db_con;
+	gchar               *service_result;
+	gchar               *service_id;
+	guint                i;
+	GString             *sql;
+	GString             *sql_join;
+	gchar               *query;
 
 	request_id = tracker_dbus_get_next_request_id ();
 
@@ -296,18 +296,18 @@
 }
 
 gboolean
-tracker_dbus_metadata_set (TrackerDBusMetadata   *object,
-			   const gchar           *service,
-			   const gchar           *id,
-			   gchar                **keys,
-			   gchar                **values,
-			   GError               **error)
-{
-	TrackerDBusMetadataPriv *priv;
-	guint                    request_id;
-	DBConnection    	*db_con;
-	gchar                   *service_id;
-	guint                    i;
+tracker_metadata_set (TrackerMetadata  *object,
+		      const gchar      *service,
+		      const gchar      *id,
+		      gchar           **keys,
+		      gchar           **values,
+		      GError          **error)
+{
+	TrackerMetadataPriv *priv;
+	guint                request_id;
+	DBConnection        *db_con;
+	gchar               *service_id;
+	guint                i;
 
 	request_id = tracker_dbus_get_next_request_id ();
 
@@ -383,15 +383,15 @@
 }
 
 gboolean
-tracker_dbus_metadata_register_type (TrackerDBusMetadata  *object,
-				     const gchar          *metadata,
-				     const gchar          *type,
-				     GError              **error)
-{
-	TrackerDBusMetadataPriv *priv;
-	guint                    request_id;
-	DBConnection    	*db_con;
-	const gchar             *type_id;
+tracker_metadata_register_type (TrackerMetadata  *object,
+				const gchar      *metadata,
+				const gchar      *type,
+				GError          **error)
+{
+	TrackerMetadataPriv *priv;
+	guint                request_id;
+	DBConnection        *db_con;
+	const gchar         *type_id;
 
 	request_id = tracker_dbus_get_next_request_id ();
 
@@ -449,18 +449,18 @@
 }
 
 gboolean
-tracker_dbus_metadata_get_type_details (TrackerDBusMetadata   *object,
-					const gchar           *metadata,
-					gchar                **type,
-					gboolean              *is_embedded,
-					gboolean              *is_writable,
-					GError               **error)
-{
-	TrackerDBusMetadataPriv *priv;
-	TrackerDBResultSet      *result_set;
-	guint                    request_id;
-	DBConnection            *db_con;
-	gint                     i;
+tracker_metadata_get_type_details (TrackerMetadata  *object,
+				   const gchar      *metadata,
+				   gchar           **type,
+				   gboolean         *is_embedded,
+				   gboolean         *is_writable,
+				   GError          **error)
+{
+	TrackerMetadataPriv *priv;
+	TrackerDBResultSet  *result_set;
+	guint                request_id;
+	DBConnection        *db_con;
+	gint                 i;
 
 	request_id = tracker_dbus_get_next_request_id ();
 
@@ -503,15 +503,15 @@
 }
 
 gboolean
-tracker_dbus_metadata_get_registered_types (TrackerDBusMetadata   *object,
-					    const gchar           *class,
-					    gchar               ***values,
-					    GError               **error)
-{
-	TrackerDBusMetadataPriv   *priv;
-	TrackerDBResultSet        *result_set;
-	guint                      request_id;
-	DBConnection    	  *db_con;
+tracker_metadata_get_registered_types (TrackerMetadata   *object,
+				       const gchar       *class,
+				       gchar           ***values,
+				       GError           **error)
+{
+	TrackerMetadataPriv *priv;
+	TrackerDBResultSet  *result_set;
+	guint                request_id;
+	DBConnection        *db_con;
 
 	request_id = tracker_dbus_get_next_request_id ();
 
@@ -539,16 +539,16 @@
 }
 
 gboolean
-tracker_dbus_metadata_get_writable_types (TrackerDBusMetadata   *object,
-					  const gchar           *class,
-					  gchar               ***values,
-					  GError               **error)
-{
-	TrackerDBusMetadataPriv *priv;
-	TrackerDBResultSet      *result_set;
-	guint                    request_id;
-	DBConnection    	*db_con;
-	gchar                   *class_formatted;
+tracker_metadata_get_writable_types (TrackerMetadata   *object,
+				     const gchar       *class,
+				     gchar           ***values,
+				     GError           **error)
+{
+	TrackerMetadataPriv *priv;
+	TrackerDBResultSet  *result_set;
+	guint                request_id;
+	DBConnection        *db_con;
+	gchar               *class_formatted;
 
 	request_id = tracker_dbus_get_next_request_id ();
 
@@ -581,14 +581,14 @@
 }
 
 gboolean
-tracker_dbus_metadata_get_registered_classes (TrackerDBusMetadata   *object,
-					      gchar               ***values,
-					      GError               **error)
-{
-	TrackerDBusMetadataPriv *priv;
-	TrackerDBResultSet      *result_set;
-	guint                    request_id;
-	DBConnection            *db_con;
+tracker_metadata_get_registered_classes (TrackerMetadata   *object,
+					 gchar           ***values,
+					 GError           **error)
+{
+	TrackerMetadataPriv *priv;
+	TrackerDBResultSet  *result_set;
+	guint                request_id;
+	DBConnection        *db_con;
 
 	request_id = tracker_dbus_get_next_request_id ();
 

Copied: branches/indexer-split/src/trackerd/tracker-metadata.h (from r1535, /branches/indexer-split/src/trackerd/tracker-dbus-metadata.h)
==============================================================================
--- /branches/indexer-split/src/trackerd/tracker-dbus-metadata.h	(original)
+++ branches/indexer-split/src/trackerd/tracker-metadata.h	Thu May 29 17:51:24 2008
@@ -19,78 +19,76 @@
  * Boston, MA  02110-1301, USA.
  */
 
-#ifndef __TRACKERD_DBUS_METADATA_H__
-#define __TRACKERD_DBUS_METADATA_H__
+#ifndef __TRACKERD_METADATA_H__
+#define __TRACKERD_METADATA_H__
 
 #include <glib-object.h>
 
 #include "tracker-db-sqlite.h"
 #include "tracker-indexer.h"
 
-#define TRACKER_DBUS_METADATA_SERVICE         "org.freedesktop.Tracker"
-#define TRACKER_DBUS_METADATA_PATH            "/org/freedesktop/Tracker/Metadata"
-#define TRACKER_DBUS_METADATA_INTERFACE       "org.freedesktop.Tracker.Metadata"
+#define TRACKER_METADATA_SERVICE         "org.freedesktop.Tracker"
+#define TRACKER_METADATA_PATH            "/org/freedesktop/Tracker/Metadata"
+#define TRACKER_METADATA_INTERFACE       "org.freedesktop.Tracker.Metadata"
 
 G_BEGIN_DECLS
 
-#define TRACKER_TYPE_DBUS_METADATA            (tracker_dbus_metadata_get_type ())
-#define TRACKER_DBUS_METADATA(object)         (G_TYPE_CHECK_INSTANCE_CAST ((object), TRACKER_TYPE_DBUS_METADATA, TrackerDBusMetadata))
-#define TRACKER_DBUS_METADATA_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_DBUS_METADATA, TrackerDBusMetadataClass))
-#define TRACKER_IS_DBUS_METADATA(object)      (G_TYPE_CHECK_INSTANCE_TYPE ((object), TRACKER_TYPE_DBUS_METADATA))
-#define TRACKER_IS_DBUS_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_DBUS_METADATA))
-#define TRACKER_DBUS_METADATA_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_DBUS_METADATA, TrackerDBusMetadataClass))
+#define TRACKER_TYPE_METADATA            (tracker_metadata_get_type ())
+#define TRACKER_METADATA(object)         (G_TYPE_CHECK_INSTANCE_CAST ((object), TRACKER_TYPE_METADATA, TrackerMetadata))
+#define TRACKER_METADATA_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_METADATA, TrackerMetadataClass))
+#define TRACKER_IS_METADATA(object)      (G_TYPE_CHECK_INSTANCE_TYPE ((object), TRACKER_TYPE_METADATA))
+#define TRACKER_IS_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_METADATA))
+#define TRACKER_METADATA_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_METADATA, TrackerMetadataClass))
 
-typedef struct TrackerDBusMetadata      TrackerDBusMetadata;
-typedef struct TrackerDBusMetadataClass TrackerDBusMetadataClass;
+typedef struct TrackerMetadata      TrackerMetadata;
+typedef struct TrackerMetadataClass TrackerMetadataClass;
 
-struct TrackerDBusMetadata {
+struct TrackerMetadata {
 	GObject parent;
 };
 
-struct TrackerDBusMetadataClass {
+struct TrackerMetadataClass {
 	GObjectClass parent;
 };
 
-GType    tracker_dbus_metadata_get_type               (void);
-TrackerDBusMetadata *
-         tracker_dbus_metadata_new                    (DBConnection        *db_con);
-void     tracker_dbus_metadata_set_db_connection      (TrackerDBusMetadata   *object,
-						       DBConnection          *db_con);
-gboolean tracker_dbus_metadata_get                    (TrackerDBusMetadata   *object,
-						       const gchar           *service,
-						       const gchar           *id,
-						       gchar                **keys,
-						       gchar               ***values,
-						       GError               **error);
-gboolean tracker_dbus_metadata_set                    (TrackerDBusMetadata   *object,
-						       const gchar           *service,
-						       const gchar           *id,
-						       gchar                **keys,
-						       gchar                **values,
-						       GError               **error);
-gboolean tracker_dbus_metadata_register_type          (TrackerDBusMetadata   *object,
-						       const gchar           *metadata,
-						       const gchar           *type,
-						       GError               **error);
-gboolean tracker_dbus_metadata_get_type_details       (TrackerDBusMetadata   *object,
-						       const gchar           *metadata,
-						       gchar                **type,
-						       gboolean              *is_embedded,
-						       gboolean              *is_writable,
-						       GError               **error);
-gboolean tracker_dbus_metadata_get_registered_types   (TrackerDBusMetadata   *object,
-						       const gchar           *metadata,
-						       gchar               ***values,
-						       GError               **error);
-gboolean tracker_dbus_metadata_get_writable_types     (TrackerDBusMetadata   *object,
-						       const gchar           *class,
-						       gchar               ***values,
-						       GError               **error);
-gboolean tracker_dbus_metadata_get_registered_classes (TrackerDBusMetadata   *object,
-						       gchar               ***values,
-						       GError               **error);
-
+GType            tracker_metadata_get_type               (void);
+TrackerMetadata *tracker_metadata_new                    (DBConnection      *db_con);
+void             tracker_metadata_set_db_connection      (TrackerMetadata   *object,
+							  DBConnection      *db_con);
+gboolean         tracker_metadata_get                    (TrackerMetadata   *object,
+							  const gchar       *service,
+							  const gchar       *id,
+							  gchar            **keys,
+							  gchar           ***values,
+							  GError           **error);
+gboolean         tracker_metadata_set                    (TrackerMetadata   *object,
+							  const gchar       *service,
+							  const gchar       *id,
+							  gchar            **keys,
+							  gchar            **values,
+							  GError           **error);
+gboolean         tracker_metadata_register_type          (TrackerMetadata   *object,
+							  const gchar       *metadata,
+							  const gchar       *type,
+							  GError           **error);
+gboolean         tracker_metadata_get_type_details       (TrackerMetadata   *object,
+							  const gchar       *metadata,
+							  gchar            **type,
+							  gboolean          *is_embedded,
+							  gboolean          *is_writable,
+							  GError           **error);
+gboolean         tracker_metadata_get_registered_types   (TrackerMetadata   *object,
+							  const gchar       *metadata,
+							  gchar           ***values,
+							  GError           **error);
+gboolean         tracker_metadata_get_writable_types     (TrackerMetadata   *object,
+							  const gchar       *class,
+							  gchar           ***values,
+							  GError           **error);
+gboolean         tracker_metadata_get_registered_classes (TrackerMetadata   *object,
+							  gchar           ***values,
+							  GError           **error);
 
 G_END_DECLS
 
-#endif /* __TRACKERD_DBUS_METADATA_H__ */
+#endif /* __TRACKERD_METADATA_H__ */

Modified: branches/indexer-split/src/trackerd/tracker-process-files.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-process-files.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-process-files.c	Thu May 29 17:51:24 2008
@@ -43,7 +43,7 @@
 
 #include "tracker-db.h"
 #include "tracker-dbus.h"
-#include "tracker-dbus-daemon.h"
+#include "tracker-daemon.h"
 #include "tracker-cache.h"
 #include "tracker-email.h"
 #include "tracker-indexer.h"
@@ -811,7 +811,7 @@
 
         g_message ("Starting file indexing...");
         
-        object = tracker_dbus_get_object (TRACKER_TYPE_DBUS_DAEMON);
+        object = tracker_dbus_get_object (TRACKER_TYPE_DAEMON);
 
         tracker_db_end_index_transaction (db_con);
 
@@ -1078,7 +1078,7 @@
         tracker_index_stage_set (TRACKER_INDEX_STAGE_EMAILS);
         
         /* Signal progress */
-        daemon = tracker_dbus_get_object (TRACKER_TYPE_DBUS_DAEMON);
+        daemon = tracker_dbus_get_object (TRACKER_TYPE_DAEMON);
         g_signal_emit_by_name (daemon, "index-progress", 
                                "Emails",
                                "",
@@ -1120,7 +1120,7 @@
         GObject           *object;
         TrackerIndexStage  stage;
 
-        object = tracker_dbus_get_object (TRACKER_TYPE_DBUS_DAEMON);
+        object = tracker_dbus_get_object (TRACKER_TYPE_DAEMON);
 
         /* Check dir_queue in case there are
          * directories waiting to be indexed.
@@ -1543,7 +1543,7 @@
 
         /* Get pointers we need */
         db_con = tracker_db_connect_all ();
-        object = tracker_dbus_get_object (TRACKER_TYPE_DBUS_DAEMON);
+        object = tracker_dbus_get_object (TRACKER_TYPE_DAEMON);
 
 	dir_queue = g_async_queue_new ();
 	file_metadata_queue = g_async_queue_new ();
@@ -1614,7 +1614,7 @@
 
 	tracker_index_stage_set (TRACKER_INDEX_STAGE_CONFIG);
 
-        object = tracker_dbus_get_object (TRACKER_TYPE_DBUS_DAEMON);
+        object = tracker_dbus_get_object (TRACKER_TYPE_DAEMON);
 
 	pushed_events = FALSE;
 	first_run = TRUE;
@@ -1753,7 +1753,7 @@
 				}
 
                                 /* Signal progress */
-                                object = tracker_dbus_get_object (TRACKER_TYPE_DBUS_DAEMON);
+                                object = tracker_dbus_get_object (TRACKER_TYPE_DAEMON);
                                 g_signal_emit_by_name (object, 
                                                        "index-progress", 
                                                        "Files",

Copied: branches/indexer-split/src/trackerd/tracker-search.c (from r1535, /branches/indexer-split/src/trackerd/tracker-dbus-search.c)
==============================================================================
--- /branches/indexer-split/src/trackerd/tracker-dbus-search.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-search.c	Thu May 29 17:51:24 2008
@@ -34,7 +34,7 @@
 #include <libtracker-db/tracker-db-dbus.h>
 
 #include "tracker-dbus.h"
-#include "tracker-dbus-search.h"
+#include "tracker-search.h"
 #include "tracker-rdf-query.h"
 #include "tracker-query-tree.h"
 #include "tracker-indexer.h"
@@ -42,7 +42,7 @@
 
 #define DEFAULT_SEARCH_MAX_HITS 1024
 
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TRACKER_TYPE_DBUS_SEARCH, TrackerDBusSearchPriv))
+#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TRACKER_TYPE_SEARCH, TrackerSearchPriv))
 
 typedef struct {
 	DBusGProxy      *fd_proxy;
@@ -51,7 +51,7 @@
 	TrackerLanguage *language;
         Indexer         *file_index;
         Indexer         *email_index;
-} TrackerDBusSearchPriv;
+} TrackerSearchPriv;
 
 enum {
 	PROP_0,
@@ -62,23 +62,23 @@
 	PROP_EMAIL_INDEX
 };
 
-static void dbus_search_finalize     (GObject      *object);
-static void dbus_search_set_property (GObject      *object,
-                                      guint         param_id,
-                                      const GValue *value,
-                                      GParamSpec   *pspec);
+static void search_finalize     (GObject      *object);
+static void search_set_property (GObject      *object,
+				 guint         param_id,
+				 const GValue *value,
+				 GParamSpec   *pspec);
 
-G_DEFINE_TYPE(TrackerDBusSearch, tracker_dbus_search, G_TYPE_OBJECT)
+G_DEFINE_TYPE(TrackerSearch, tracker_search, G_TYPE_OBJECT)
 
 static void
-tracker_dbus_search_class_init (TrackerDBusSearchClass *klass)
+tracker_search_class_init (TrackerSearchClass *klass)
 {
 	GObjectClass *object_class;
 
 	object_class = G_OBJECT_CLASS (klass);
 
-	object_class->finalize = dbus_search_finalize;
-	object_class->set_property = dbus_search_set_property;
+	object_class->finalize = search_finalize;
+	object_class->set_property = search_set_property;
 
 	g_object_class_install_property (object_class,
 					 PROP_DB_CONNECTION,
@@ -113,18 +113,18 @@
 							       "Email index",
 							       G_PARAM_WRITABLE));
 
-	g_type_class_add_private (object_class, sizeof (TrackerDBusSearchPriv));
+	g_type_class_add_private (object_class, sizeof (TrackerSearchPriv));
 }
 
 static void
-tracker_dbus_search_init (TrackerDBusSearch *object)
+tracker_search_init (TrackerSearch *object)
 {
 }
 
 static void
-dbus_search_finalize (GObject *object)
+search_finalize (GObject *object)
 {
-	TrackerDBusSearchPriv *priv;
+	TrackerSearchPriv *priv;
 	
 	priv = GET_PRIV (object);
 
@@ -132,39 +132,39 @@
 		g_object_unref (priv->fd_proxy);
 	}
 
-	G_OBJECT_CLASS (tracker_dbus_search_parent_class)->finalize (object);
+	G_OBJECT_CLASS (tracker_search_parent_class)->finalize (object);
 }
 
 static void
-dbus_search_set_property (GObject      *object,
-                          guint 	param_id,
-                          const GValue *value,
-                          GParamSpec   *pspec)
+search_set_property (GObject      *object,
+		     guint 	param_id,
+		     const GValue *value,
+		     GParamSpec   *pspec)
 {
-	TrackerDBusSearchPriv *priv;
+	TrackerSearchPriv *priv;
 
 	priv = GET_PRIV (object);
 
 	switch (param_id) {
 	case PROP_DB_CONNECTION:
-		tracker_dbus_search_set_db_connection (TRACKER_DBUS_SEARCH (object),
-                                                       g_value_get_pointer (value));
+		tracker_search_set_db_connection (TRACKER_SEARCH (object),
+						  g_value_get_pointer (value));
 		break;
 	case PROP_CONFIG:
-		tracker_dbus_search_set_config (TRACKER_DBUS_SEARCH (object),
-						g_value_get_object (value));
+		tracker_search_set_config (TRACKER_SEARCH (object),
+					   g_value_get_object (value));
 		break;
 	case PROP_LANGUAGE:
-		tracker_dbus_search_set_language (TRACKER_DBUS_SEARCH (object),
-						  g_value_get_object (value));
+		tracker_search_set_language (TRACKER_SEARCH (object),
+					     g_value_get_object (value));
 		break;
 	case PROP_FILE_INDEX:
-		tracker_dbus_search_set_file_index (TRACKER_DBUS_SEARCH (object),
-                                                    g_value_get_pointer (value));
+		tracker_search_set_file_index (TRACKER_SEARCH (object),
+					       g_value_get_pointer (value));
 		break;
 	case PROP_EMAIL_INDEX:
-		tracker_dbus_search_set_email_index (TRACKER_DBUS_SEARCH (object),
-						     g_value_get_pointer (value));
+		tracker_search_set_email_index (TRACKER_SEARCH (object),
+						g_value_get_pointer (value));
 		break;
 	default:
 		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
@@ -172,12 +172,12 @@
 	};
 }
 
-TrackerDBusSearch *
-tracker_dbus_search_new (DBConnection *db_con)
+TrackerSearch *
+tracker_search_new (DBConnection *db_con)
 {
-	TrackerDBusSearch *object;
+	TrackerSearch *object;
 
-	object = g_object_new (TRACKER_TYPE_DBUS_SEARCH, 
+	object = g_object_new (TRACKER_TYPE_SEARCH, 
 			       "db-connection", db_con,
 			       NULL);
 	
@@ -185,12 +185,12 @@
 }
 
 void
-tracker_dbus_search_set_db_connection (TrackerDBusSearch *object,
-                                       DBConnection      *db_con)
+tracker_search_set_db_connection (TrackerSearch *object,
+				  DBConnection  *db_con)
 {
-	TrackerDBusSearchPriv *priv;
+	TrackerSearchPriv *priv;
 
-	g_return_if_fail (TRACKER_IS_DBUS_SEARCH (object));
+	g_return_if_fail (TRACKER_IS_SEARCH (object));
 	g_return_if_fail (db_con != NULL);
 
 	priv = GET_PRIV (object);
@@ -201,12 +201,12 @@
 }
 
 void
-tracker_dbus_search_set_config (TrackerDBusSearch *object,
-				TrackerConfig     *config)
+tracker_search_set_config (TrackerSearch *object,
+			   TrackerConfig *config)
 {
-	TrackerDBusSearchPriv *priv;
+	TrackerSearchPriv *priv;
 
-	g_return_if_fail (TRACKER_IS_DBUS_SEARCH (object));
+	g_return_if_fail (TRACKER_IS_SEARCH (object));
 	g_return_if_fail (TRACKER_IS_CONFIG (config));
 
 	priv = GET_PRIV (object);
@@ -225,12 +225,12 @@
 }
 
 void
-tracker_dbus_search_set_language (TrackerDBusSearch *object,
-				  TrackerLanguage   *language)
+tracker_search_set_language (TrackerSearch   *object,
+			     TrackerLanguage *language)
 {
-	TrackerDBusSearchPriv *priv;
+	TrackerSearchPriv *priv;
 
-	g_return_if_fail (TRACKER_IS_DBUS_SEARCH (object));
+	g_return_if_fail (TRACKER_IS_SEARCH (object));
 	g_return_if_fail (language != NULL);
 
 	priv = GET_PRIV (object);
@@ -249,12 +249,12 @@
 }
 
 void
-tracker_dbus_search_set_file_index (TrackerDBusSearch *object,
-                                    Indexer           *file_index)
+tracker_search_set_file_index (TrackerSearch *object,
+			       Indexer        *file_index)
 {
-	TrackerDBusSearchPriv *priv;
+	TrackerSearchPriv *priv;
 
-	g_return_if_fail (TRACKER_IS_DBUS_SEARCH (object));
+	g_return_if_fail (TRACKER_IS_SEARCH (object));
 	g_return_if_fail (file_index != NULL);
 
 	priv = GET_PRIV (object);
@@ -265,12 +265,12 @@
 }
 
 void
-tracker_dbus_search_set_email_index (TrackerDBusSearch *object,
-				     Indexer           *email_index)
+tracker_search_set_email_index (TrackerSearch *object,
+				Indexer       *email_index)
 {
-	TrackerDBusSearchPriv *priv;
+	TrackerSearchPriv *priv;
 
-	g_return_if_fail (TRACKER_IS_DBUS_SEARCH (object));
+	g_return_if_fail (TRACKER_IS_SEARCH (object));
 	g_return_if_fail (email_index != NULL);
 
 	priv = GET_PRIV (object);
@@ -284,7 +284,7 @@
  * Functions
  */
 static gint
-dbus_search_sanity_check_max_hits (gint max_hits)
+search_sanity_check_max_hits (gint max_hits)
 {
         if (max_hits < 1) {
                 return DEFAULT_SEARCH_MAX_HITS;
@@ -294,8 +294,8 @@
 }
 
 static const gchar *
-dbus_search_utf8_p_from_offset_skipping_decomp (const gchar *str,
-						gint         offset)
+search_utf8_p_from_offset_skipping_decomp (const gchar *str,
+					   gint         offset)
 {
 	const gchar *p, *q;
 	gchar       *casefold, *normal;
@@ -318,8 +318,8 @@
 }
 
 static const char *
-dbus_search_utf8_strcasestr_array (const gchar  *haystack, 
-				   gchar       **needles)
+search_utf8_strcasestr_array (const gchar  *haystack, 
+			      gchar       **needles)
 {
 	gsize         needle_len;
 	gsize         haystack_len;
@@ -361,7 +361,7 @@
 
 		while (*p) {
 			if ((strncmp (p, needle, needle_len) == 0)) {
-				ret = dbus_search_utf8_p_from_offset_skipping_decomp (haystack, i);
+				ret = search_utf8_p_from_offset_skipping_decomp (haystack, i);
 				goto done;
 			}
 
@@ -377,7 +377,7 @@
 }
 
 static gint
-dbus_search_get_word_break (const char *a)
+search_get_word_break (const char *a)
 {
 	gchar **words;
 	gint    value;
@@ -396,7 +396,7 @@
 
 
 static gboolean
-dbus_search_is_word_break (const char a)
+search_is_word_break (const char a)
 {
 	const gchar *breaks = "\t\n\v\f\r !\"#$%&'()*/<=>?[\\]^`{|}~+,.:;@\"[]";
 	gint         i;
@@ -411,8 +411,8 @@
 }
 
 static char *
-dbus_search_highlight_terms (const gchar  *text, 
-			     gchar       **terms)
+search_highlight_terms (const gchar  *text, 
+			gchar       **terms)
 {
 	GStrv         p;
 	GString      *s;
@@ -437,12 +437,12 @@
 		s = g_string_new ("");
 		text_p = text_copy;
 
-		while ((str = dbus_search_utf8_strcasestr_array (text_p, single_term))) {
+		while ((str = search_utf8_strcasestr_array (text_p, single_term))) {
 			gchar *pre_snip;
 			gchar *term;
 
 			pre_snip = g_strndup (text_p, (str - text_p));
-			term_len = dbus_search_get_word_break (str);
+			term_len = search_get_word_break (str);
 			term = g_strndup (str, term_len);
 
 			text_p = str + term_len;
@@ -466,9 +466,9 @@
 }
 
 gchar *
-dbus_search_get_snippet (const gchar  *text, 
-			 gchar       **terms, 
-			 gint          length)
+search_get_snippet (const gchar  *text, 
+		    gchar       **terms, 
+		    gint          length)
 {
 	const gchar *ptr = NULL;
 	const gchar *end_ptr;
@@ -481,7 +481,7 @@
 	}
 
 	text_len = strlen (text);
-	ptr = dbus_search_utf8_strcasestr_array (text, terms);
+	ptr = search_utf8_strcasestr_array (text, terms);
 
 	if (ptr) {
 		gchar *snippet;
@@ -504,7 +504,7 @@
 		if (*ptr != '\n' && ptr > text) {
 			i = 0;
 
-			while (!dbus_search_is_word_break (*ptr) && i < (length / 2)) {
+			while (!search_is_word_break (*ptr) && i < (length / 2)) {
 				ptr = g_utf8_next_char (ptr);
 				i++;
 			}
@@ -537,7 +537,7 @@
 		/* Try to end snippet on a word break */
 		if (*end_ptr != '\n' && end_ptr < text_len + text) {
 			i=0;
-			while (!dbus_search_is_word_break (*end_ptr) && i < (length / 2)) {
+			while (!search_is_word_break (*end_ptr) && i < (length / 2)) {
 				end_ptr = g_utf8_prev_char (end_ptr);
 				i++;
 			}
@@ -552,7 +552,7 @@
 		snippet_escaped = g_markup_escape_text (snippet, i);
 		g_free (snippet);
 
-		snippet_highlighted = dbus_search_highlight_terms (snippet_escaped, terms);
+		snippet_highlighted = search_highlight_terms (snippet_escaped, terms);
 		g_free (snippet_escaped);
 
 		return snippet_highlighted;
@@ -580,7 +580,7 @@
 
 		snippet = g_strndup (text, ptr - text);
 		snippet_escaped = g_markup_escape_text (snippet, ptr - text);
-		snippet_highlighted = dbus_search_highlight_terms (snippet_escaped, terms);
+		snippet_highlighted = search_highlight_terms (snippet_escaped, terms);
 
 		g_free (snippet);
 		g_free (snippet_escaped);
@@ -592,19 +592,19 @@
 }
 
 gboolean
-tracker_dbus_search_get_hit_count (TrackerDBusSearch  *object,
-                                   const gchar        *service,
-                                   const gchar        *search_text,
-                                   gint               *value,
-                                   GError            **error)
-{
-	TrackerDBusSearchPriv  *priv;
-	TrackerQueryTree       *tree;
-	GArray                 *array;
-	guint                   request_id;
-	DBConnection           *db_con;
-	gint                    services[12];
-        gint                    count = 0;
+tracker_search_get_hit_count (TrackerSearch  *object,
+			      const gchar    *service,
+			      const gchar    *search_text,
+			      gint           *value,
+			      GError        **error)
+{
+	TrackerSearchPriv *priv;
+	TrackerQueryTree  *tree;
+	GArray            *array;
+	guint              request_id;
+	DBConnection      *db_con;
+	gint               services[12];
+        gint               count = 0;
 
 	request_id = tracker_dbus_get_next_request_id ();
 
@@ -678,19 +678,19 @@
 }
 
 gboolean
-tracker_dbus_search_get_hit_count_all (TrackerDBusSearch  *object,
-                                       const gchar        *search_text,
-                                       GPtrArray         **values,
-                                       GError            **error)
-{
-	TrackerDBusSearchPriv *priv;
-	TrackerDBResultSet    *result_set = NULL;
-        TrackerQueryTree      *tree;
-        GArray                *hit_counts;
-	GArray                *mail_hit_counts;
-	guint                  request_id;
-	DBConnection          *db_con;
-	guint                  i;
+tracker_search_get_hit_count_all (TrackerSearch  *object,
+				  const gchar    *search_text,
+				  GPtrArray     **values,
+				  GError        **error)
+{
+	TrackerSearchPriv  *priv;
+	TrackerDBResultSet *result_set = NULL;
+        TrackerQueryTree   *tree;
+        GArray             *hit_counts;
+	GArray             *mail_hit_counts;
+	guint               request_id;
+	DBConnection       *db_con;
+	guint               i;
 
 	request_id = tracker_dbus_get_next_request_id ();
 
@@ -764,20 +764,20 @@
 }
 
 gboolean
-tracker_dbus_search_text (TrackerDBusSearch   *object,
-                          gint                 live_query_id,
-                          const gchar         *service,
-                          const gchar         *search_text,
-                          gint                 offset,
-                          gint                 max_hits,
-                          gchar             ***values,
-                          GError             **error)
-{
-	TrackerDBusSearchPriv  *priv;
-	TrackerDBResultSet     *result_set;
-	guint                   request_id;
-	DBConnection           *db_con;
-        gchar                 **strv = NULL;
+tracker_search_text (TrackerSearch   *object,
+		     gint             live_query_id,
+		     const gchar     *service,
+		     const gchar     *search_text,
+		     gint             offset,
+		     gint             max_hits,
+		     gchar         ***values,
+		     GError         **error)
+{
+	TrackerSearchPriv   *priv;
+	TrackerDBResultSet  *result_set;
+	guint               request_id;
+	DBConnection        *db_con;
+        gchar              **strv = NULL;
 
 	request_id = tracker_dbus_get_next_request_id ();
 
@@ -821,7 +821,7 @@
 					     service, 
 					     search_text, 
 					     offset, 
-					     dbus_search_sanity_check_max_hits (max_hits), 
+					     search_sanity_check_max_hits (max_hits), 
 					     FALSE, 
 					     FALSE);
 
@@ -869,19 +869,19 @@
 }
 
 gboolean
-tracker_dbus_search_text_detailed (TrackerDBusSearch  *object,
-                                   gint                live_query_id,
-                                   const gchar        *service,
-                                   const gchar        *search_text,
-                                   gint                offset,
-                                   gint                max_hits,
-                                   GPtrArray         **values,
-                                   GError            **error)
-{
-	TrackerDBusSearchPriv *priv;
-	TrackerDBResultSet    *result_set;
-	guint                  request_id;
-	DBConnection          *db_con;
+tracker_search_text_detailed (TrackerSearch  *object,
+			      gint            live_query_id,
+			      const gchar    *service,
+			      const gchar    *search_text,
+			      gint            offset,
+			      gint            max_hits,
+			      GPtrArray     **values,
+			      GError        **error)
+{
+	TrackerSearchPriv  *priv;
+	TrackerDBResultSet *result_set;
+	guint               request_id;
+	DBConnection       *db_con;
 
 	request_id = tracker_dbus_get_next_request_id ();
 
@@ -925,7 +925,7 @@
 					     service, 
 					     search_text, 
 					     offset, 
-					     dbus_search_sanity_check_max_hits (max_hits), 
+					     search_sanity_check_max_hits (max_hits), 
 					     FALSE, 
 					     TRUE);
 
@@ -941,19 +941,19 @@
 }
 
 gboolean
-tracker_dbus_search_get_snippet (TrackerDBusSearch  *object,
-                                 const gchar        *service,
-                                 const gchar        *id,
-                                 const gchar        *search_text,
-                                 gchar             **values,
-                                 GError            **error)
-{
-	TrackerDBusSearchPriv *priv;
-	TrackerDBResultSet    *result_set;
-	guint                  request_id;
-	DBConnection          *db_con;
-        gchar                 *snippet = NULL;
-        gchar                 *service_id;
+tracker_search_get_snippet (TrackerSearch  *object,
+			    const gchar    *service,
+			    const gchar    *id,
+			    const gchar    *search_text,
+			    gchar         **values,
+			    GError        **error)
+{
+	TrackerSearchPriv  *priv;
+	TrackerDBResultSet *result_set;
+	guint               request_id;
+	DBConnection       *db_con;
+        gchar              *snippet = NULL;
+        gchar              *service_id;
 
 	request_id = tracker_dbus_get_next_request_id ();
 
@@ -1017,7 +1017,7 @@
 						       tracker_config_get_min_word_length (priv->config));
 
 		if (strv && strv[0]) {
-			snippet = dbus_search_get_snippet (text, strv, 120);
+			snippet = search_get_snippet (text, strv, 120);
 		}
 
 		g_strfreev (strv);
@@ -1038,19 +1038,19 @@
 }
 
 gboolean
-tracker_dbus_search_files_by_text (TrackerDBusSearch  *object,
-                                   gint                live_query_id,
-                                   const gchar        *search_text,
-                                   gint                offset,
-                                   gint                max_hits,
-                                   gboolean            group_results,
-                                   GHashTable        **values,
-                                   GError            **error)
-{
-	TrackerDBusSearchPriv *priv;
-	TrackerDBResultSet    *result_set;
-	guint                  request_id;
-	DBConnection          *db_con;
+tracker_search_files_by_text (TrackerSearch  *object,
+			      gint            live_query_id,
+			      const gchar    *search_text,
+			      gint            offset,
+			      gint            max_hits,
+			      gboolean        group_results,
+			      GHashTable    **values,
+			      GError        **error)
+{
+	TrackerSearchPriv  *priv;
+	TrackerDBResultSet *result_set;
+	guint               request_id;
+	DBConnection       *db_con;
 
 	request_id = tracker_dbus_get_next_request_id ();
 
@@ -1074,7 +1074,7 @@
 	result_set = tracker_db_search_files_by_text (db_con, 
 						      search_text, 
 						      offset, 
-						      dbus_search_sanity_check_max_hits (max_hits),
+						      search_sanity_check_max_hits (max_hits),
 						      group_results);
 
 	*values = tracker_dbus_query_result_to_hash_table (result_set);
@@ -1089,19 +1089,19 @@
 }
 
 gboolean
-tracker_dbus_search_metadata (TrackerDBusSearch   *object,
-                              const gchar         *service,
-                              const gchar         *field,
-                              const gchar         *search_text,
-                              gint                 offset,
-                              gint                 max_hits,
-                              gchar             ***values,
-                              GError             **error)
-{
-	TrackerDBusSearchPriv *priv;
-	TrackerDBResultSet    *result_set;
-	guint                  request_id;
-	DBConnection          *db_con; 
+tracker_search_metadata (TrackerSearch   *object,
+			 const gchar     *service,
+			 const gchar     *field,
+			 const gchar     *search_text,
+			 gint             offset,
+			 gint             max_hits,
+			 gchar         ***values,
+			 GError         **error)
+{
+	TrackerSearchPriv  *priv;
+	TrackerDBResultSet *result_set;
+	guint               request_id;
+	DBConnection       *db_con; 
 
         /* FIXME: This function is completely redundant */
 
@@ -1139,7 +1139,7 @@
 	/* 					 field,  */
 	/* 					 text,  */
 	/* 					 offset,  */
-	/* 					 dbus_search_sanity_check_max_hits (max_hits)); */
+	/* 					 search_sanity_check_max_hits (max_hits)); */
 
         result_set = NULL;
 
@@ -1155,17 +1155,17 @@
 }
 
 gboolean
-tracker_dbus_search_matching_fields (TrackerDBusSearch   *object,
-                                     const gchar         *service,
-                                     const gchar         *id,
-                                     const gchar         *search_text,
-                                     GHashTable         **values,
-                                     GError             **error)
-{
-	TrackerDBusSearchPriv *priv;
-	TrackerDBResultSet    *result_set;
-	guint                  request_id;
-	DBConnection          *db_con;
+tracker_search_matching_fields (TrackerSearch  *object,
+				const gchar    *service,
+				const gchar    *id,
+				const gchar    *search_text,
+				GHashTable    **values,
+				GError        **error)
+{
+	TrackerSearchPriv  *priv;
+	TrackerDBResultSet *result_set;
+	guint               request_id;
+	DBConnection       *db_con;
 
 	request_id = tracker_dbus_get_next_request_id ();
 
@@ -1219,23 +1219,23 @@
 }
 
 gboolean
-tracker_dbus_search_query (TrackerDBusSearch  *object,
-                           gint                live_query_id,
-                           const gchar        *service,
-                           gchar             **fields,
-                           const gchar        *search_text,
-                           const gchar        *keyword,
-                           const gchar        *query_condition,
-                           gboolean            sort_by_service,
-                           gint                offset,
-                           gint                max_hits,
-                           GPtrArray         **values,
-                           GError            **error)
-{
-	TrackerDBusSearchPriv *priv;
-	TrackerDBResultSet    *result_set;
-	guint                  request_id;
-	DBConnection          *db_con;
+tracker_search_query (TrackerSearch  *object,
+		      gint            live_query_id,
+		      const gchar    *service,
+		      gchar         **fields,
+		      const gchar    *search_text,
+		      const gchar    *keyword,
+		      const gchar    *query_condition,
+		      gboolean        sort_by_service,
+		      gint            offset,
+		      gint            max_hits,
+		      GPtrArray     **values,
+		      GError        **error)
+{
+	TrackerSearchPriv  *priv;
+	TrackerDBResultSet *result_set;
+	guint               request_id;
+	DBConnection       *db_con;
 
 	request_id = tracker_dbus_get_next_request_id ();
 
@@ -1294,7 +1294,7 @@
                                                              keyword, 
                                                              sort_by_service, 
                                                              offset, 
-                                                             dbus_search_sanity_check_max_hits (max_hits), 
+                                                             search_sanity_check_max_hits (max_hits), 
                                                              query_error);
                
 		if (query_error) {
@@ -1344,14 +1344,14 @@
 }
 
 gboolean
-tracker_dbus_search_suggest (TrackerDBusSearch  *object,
-                             const gchar        *search_text,
-                             gint                max_dist,
-                             gchar             **value,
-                             GError            **error)
+tracker_search_suggest (TrackerSearch  *object,
+			const gchar    *search_text,
+			gint            max_dist,
+			gchar         **value,
+			GError        **error)
 {
-        TrackerDBusSearchPriv *priv;
-	guint                  request_id;
+        TrackerSearchPriv *priv;
+	guint              request_id;
 
 	request_id = tracker_dbus_get_next_request_id ();
 

Copied: branches/indexer-split/src/trackerd/tracker-search.h (from r1535, /branches/indexer-split/src/trackerd/tracker-dbus-search.h)
==============================================================================
--- /branches/indexer-split/src/trackerd/tracker-dbus-search.h	(original)
+++ branches/indexer-split/src/trackerd/tracker-search.h	Thu May 29 17:51:24 2008
@@ -19,8 +19,8 @@
  * Boston, MA  02110-1301, USA.
  */
 
-#ifndef __TRACKERD_DBUS_SEARCH_H__
-#define __TRACKERD_DBUS_SEARCH_H__
+#ifndef __TRACKERD_SEARCH_H__
+#define __TRACKERD_SEARCH_H__
 
 #include <glib-object.h>
 
@@ -29,115 +29,113 @@
 #include "tracker-db-sqlite.h"
 #include "tracker-indexer.h"
 
-#define TRACKER_DBUS_SEARCH_SERVICE         "org.freedesktop.Tracker"
-#define TRACKER_DBUS_SEARCH_PATH            "/org/freedesktop/Tracker/Search"
-#define TRACKER_DBUS_SEARCH_INTERFACE       "org.freedesktop.Tracker.Search"
+#define TRACKER_SEARCH_SERVICE         "org.freedesktop.Tracker"
+#define TRACKER_SEARCH_PATH            "/org/freedesktop/Tracker/Search"
+#define TRACKER_SEARCH_INTERFACE       "org.freedesktop.Tracker.Search"
 
 G_BEGIN_DECLS
 
-#define TRACKER_TYPE_DBUS_SEARCH            (tracker_dbus_search_get_type ())
-#define TRACKER_DBUS_SEARCH(object)         (G_TYPE_CHECK_INSTANCE_CAST ((object), TRACKER_TYPE_DBUS_SEARCH, TrackerDBusSearch))
-#define TRACKER_DBUS_SEARCH_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_DBUS_SEARCH, TrackerDBusSearchClass))
-#define TRACKER_IS_DBUS_SEARCH(object)      (G_TYPE_CHECK_INSTANCE_TYPE ((object), TRACKER_TYPE_DBUS_SEARCH))
-#define TRACKER_IS_DBUS_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_DBUS_SEARCH))
-#define TRACKER_DBUS_SEARCH_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_DBUS_SEARCH, TrackerDBusSearchClass))
+#define TRACKER_TYPE_SEARCH            (tracker_search_get_type ())
+#define TRACKER_SEARCH(object)         (G_TYPE_CHECK_INSTANCE_CAST ((object), TRACKER_TYPE_SEARCH, TrackerSearch))
+#define TRACKER_SEARCH_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_SEARCH, TrackerSearchClass))
+#define TRACKER_IS_SEARCH(object)      (G_TYPE_CHECK_INSTANCE_TYPE ((object), TRACKER_TYPE_SEARCH))
+#define TRACKER_IS_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_SEARCH))
+#define TRACKER_SEARCH_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_SEARCH, TrackerSearchClass))
 
-typedef struct TrackerDBusSearch      TrackerDBusSearch;
-typedef struct TrackerDBusSearchClass TrackerDBusSearchClass;
+typedef struct TrackerSearch      TrackerSearch;
+typedef struct TrackerSearchClass TrackerSearchClass;
 
-struct TrackerDBusSearch {
+struct TrackerSearch {
 	GObject parent;
 };
 
-struct TrackerDBusSearchClass {
+struct TrackerSearchClass {
 	GObjectClass parent;
 };
 
-GType    tracker_dbus_search_get_type          (void);
-
-TrackerDBusSearch *
-         tracker_dbus_search_new               (DBConnection        *db_con);
-void     tracker_dbus_search_set_db_connection (TrackerDBusSearch   *object,
-						DBConnection        *db_con);
-void     tracker_dbus_search_set_config        (TrackerDBusSearch   *object,
-						TrackerConfig       *config);
-void     tracker_dbus_search_set_language      (TrackerDBusSearch   *object,
-						TrackerLanguage     *language);
-void     tracker_dbus_search_set_file_index    (TrackerDBusSearch   *object,
-						Indexer             *file_index);
-void     tracker_dbus_search_set_email_index   (TrackerDBusSearch   *object,
-						Indexer             *email_index);
-gboolean tracker_dbus_search_get_hit_count     (TrackerDBusSearch   *object,
-						const gchar         *service,
-						const gchar         *search_text,
-						gint                *result,
-						GError             **error);
-gboolean tracker_dbus_search_get_hit_count_all (TrackerDBusSearch   *object,
-						const gchar         *search_text,
-						GPtrArray          **values,
-						GError             **error);
-gboolean tracker_dbus_search_text              (TrackerDBusSearch   *object,
-						gint                 live_query_id,
-						const gchar         *service,
-						const gchar         *search_text,
-						gint                 offset,
-						gint                 max_hits,
-						gchar             ***values,
-						GError             **error);
-gboolean tracker_dbus_search_text_detailed     (TrackerDBusSearch   *object,
-						gint                 live_query_id,
-						const gchar         *service,
-						const gchar         *search_text,
-						gint                 offset,
-						gint                 max_hits,
-						GPtrArray          **values,
-						GError             **error);
-gboolean tracker_dbus_search_get_snippet       (TrackerDBusSearch   *object,
-						const gchar         *service,
-						const gchar         *id,
-						const gchar         *search_text,
-						gchar              **result,
-						GError             **error);
-gboolean tracker_dbus_search_files_by_text     (TrackerDBusSearch   *object,
-						gint                 live_query_id,
-						const gchar         *search_text,
-						gint                 offset,
-						gint                 max_hits,
-						gboolean             group_results,
-						GHashTable         **values,
-						GError             **error);
-gboolean tracker_dbus_search_metadata          (TrackerDBusSearch   *object,
-						const gchar         *service,
-						const gchar         *field,
-						const gchar         *search_text,
-						gint                 offset,
-						gint                 max_hits,
-						gchar             ***values,
-						GError             **error);
-gboolean tracker_dbus_search_matching_fields   (TrackerDBusSearch   *object,
-						const gchar         *service,
-						const gchar         *id,
-						const gchar         *search_text,
-						GHashTable         **values,
-						GError             **error);
-gboolean tracker_dbus_search_query             (TrackerDBusSearch   *object,
-						gint                 live_query_id,
-						const gchar         *service,
-						gchar              **fields,
-						const gchar         *search_text,
-						const gchar         *keyword,
-						const gchar         *query_condition,
-						gboolean             sort_by_service,
-						gint                 offset,
-						gint                 max_hits,
-						GPtrArray          **values,
-						GError             **error);
-gboolean tracker_dbus_search_suggest           (TrackerDBusSearch   *object,
-						const gchar         *search_text,
-						gint                 max_dist,
-						gchar              **value,
-						GError             **error);
+GType          tracker_search_get_type          (void);
+TrackerSearch *tracker_search_new               (DBConnection      *db_con);
+void           tracker_search_set_db_connection (TrackerSearch     *object,
+						 DBConnection      *db_con);
+void           tracker_search_set_config        (TrackerSearch     *object,
+						 TrackerConfig     *config);
+void           tracker_search_set_language      (TrackerSearch     *object,
+						 TrackerLanguage   *language);
+void           tracker_search_set_file_index    (TrackerSearch     *object,
+						 Indexer           *file_index);
+void           tracker_search_set_email_index   (TrackerSearch     *object,
+						 Indexer           *email_index);
+gboolean       tracker_search_get_hit_count     (TrackerSearch     *object,
+						 const gchar       *service,
+						 const gchar       *search_text,
+						 gint              *result,
+						 GError           **error);
+gboolean       tracker_search_get_hit_count_all (TrackerSearch     *object,
+						 const gchar       *search_text,
+						 GPtrArray        **values,
+						 GError           **error);
+gboolean       tracker_search_text              (TrackerSearch     *object,
+						 gint               live_query_id,
+						 const gchar       *service,
+						 const gchar       *search_text,
+						 gint               offset,
+						 gint               max_hits,
+						 gchar           ***values,
+						 GError           **error);
+gboolean       tracker_search_text_detailed     (TrackerSearch     *object,
+						 gint               live_query_id,
+						 const gchar       *service,
+						 const gchar       *search_text,
+						 gint               offset,
+						 gint               max_hits,
+						 GPtrArray        **values,
+						 GError           **error);
+gboolean       tracker_search_get_snippet       (TrackerSearch     *object,
+						 const gchar       *service,
+						 const gchar       *id,
+						 const gchar       *search_text,
+						 gchar            **result,
+						 GError           **error);
+gboolean       tracker_search_files_by_text     (TrackerSearch     *object,
+						 gint               live_query_id,
+						 const gchar       *search_text,
+						 gint               offset,
+						 gint               max_hits,
+						 gboolean           group_results,
+						 GHashTable       **values,
+						 GError           **error);
+gboolean       tracker_search_metadata          (TrackerSearch     *object,
+						 const gchar       *service,
+						 const gchar       *field,
+						 const gchar       *search_text,
+						 gint               offset,
+						 gint               max_hits,
+						 gchar           ***values,
+						 GError           **error);
+gboolean       tracker_search_matching_fields   (TrackerSearch     *object,
+						 const gchar       *service,
+						 const gchar       *id,
+						 const gchar       *search_text,
+						 GHashTable       **values,
+						 GError           **error);
+gboolean       tracker_search_query             (TrackerSearch     *object,
+						 gint               live_query_id,
+						 const gchar       *service,
+						 gchar            **fields,
+						 const gchar       *search_text,
+						 const gchar       *keyword,
+						 const gchar       *query_condition,
+						 gboolean           sort_by_service,
+						 gint               offset,
+						 gint               max_hits,
+						 GPtrArray        **values,
+						 GError           **error);
+gboolean       tracker_search_suggest           (TrackerSearch     *object,
+						 const gchar       *search_text,
+						 gint               max_dist,
+						 gchar            **value,
+						 GError           **error);
 
 G_END_DECLS
 
-#endif /* __TRACKERD_DBUS_SEARCH_H__ */
+#endif /* __TRACKERD_SEARCH_H__ */

Modified: branches/indexer-split/src/trackerd/tracker-status.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-status.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-status.c	Thu May 29 17:51:24 2008
@@ -23,7 +23,7 @@
 
 #include "tracker-status.h"
 #include "tracker-dbus.h"
-#include "tracker-dbus-daemon.h"
+#include "tracker-daemon.h"
 
 static TrackerStatus status = TRACKER_STATUS_INITIALIZING;
 
@@ -132,7 +132,7 @@
                 return;
         }
 
-        object = tracker_dbus_get_object (TRACKER_TYPE_DBUS_DAEMON);
+        object = tracker_dbus_get_object (TRACKER_TYPE_DAEMON);
 
         g_signal_emit_by_name (object, 
                                "index-state-change", 

Modified: branches/indexer-split/src/trackerd/tracker-utils.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-utils.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-utils.c	Thu May 29 17:51:24 2008
@@ -29,7 +29,7 @@
 #include "tracker-utils.h"
 #include "tracker-main.h"
 #include "tracker-process-files.h"
-#include "tracker-xesam.h"
+#include "tracker-xesam-manager.h"
 
 extern Tracker *tracker;
 
@@ -131,7 +131,7 @@
 void
 tracker_add_io_grace (const gchar *uri)
 {
-	if (tracker_xesam_is_uri_in_xesam_dir (uri)) {
+	if (tracker_xesam_manager_is_uri_in_xesam_dir (uri)) {
 		return;
 	}
 

Modified: branches/indexer-split/src/trackerd/tracker-xesam-live-search.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-xesam-live-search.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-xesam-live-search.c	Thu May 29 17:51:24 2008
@@ -24,18 +24,19 @@
 #include <dbus/dbus-glib-bindings.h>
 
 #include "tracker-xesam-live-search.h"
-#include "tracker-dbus-xesam.h"
-#include "tracker-dbus.h"
 #include "tracker-xesam.h"
+#include "tracker-xesam-manager.h"
 #include "tracker-xesam-query.h"
+#include "tracker-dbus.h"
 
 struct _TrackerXesamLiveSearchPriv {
-	gchar *search_id;
 	TrackerXesamSession *session;
-	gboolean active;
-	gboolean closed;
-	gchar *query;
-	gchar *from_sql, *where_sql;
+	gchar               *search_id;
+	gboolean             active;
+	gboolean             closed;
+	gchar               *query;
+	gchar               *from_sql;
+	gchar               *where_sql;
 };
 
 enum {
@@ -65,23 +66,41 @@
 
 void
 tracker_xesam_live_search_set_session (TrackerXesamLiveSearch *self, 
-				       gpointer session)
+				       gpointer                session)
 {
 	TrackerXesamLiveSearchPriv *priv = self->priv;
 
-	if (priv->session)
+	g_return_if_fail (TRACKER_IS_XESAM_LIVE_SEARCH (self));
+	g_return_if_fail (session != NULL);
+
+	if (priv->session) {
 		g_object_unref (priv->session);
+	}
 
-	priv->session = g_object_ref (session);
+	if (session) {
+		priv->session = g_object_ref (session);
+	} else {
+		priv->session = NULL;
+	}
 }
 
 void
-tracker_xesam_live_search_set_xml_query (TrackerXesamLiveSearch *self, const gchar *query)
+tracker_xesam_live_search_set_xml_query (TrackerXesamLiveSearch *self, 
+					 const gchar            *query)
 {
-	TrackerXesamLiveSearchPriv *priv = self->priv;
+	TrackerXesamLiveSearchPriv *priv;
+
+	g_return_if_fail (TRACKER_IS_XESAM_LIVE_SEARCH (self));
+
+	priv = self->priv;
 
 	g_free (priv->query);
-	priv->query = g_strdup (query);
+
+	if (query) {
+		priv->query = g_strdup (query);
+	} else {
+		priv->query = NULL;
+	}
 }
 
 static void
@@ -93,7 +112,7 @@
 	switch (param_id) {
 	case PROP_XMLQUERY:
 		tracker_xesam_live_search_set_xml_query (TRACKER_XESAM_LIVE_SEARCH (object),
-						     g_value_get_pointer (value));
+							 g_value_get_pointer (value));
 		break;
 	default:
 		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
@@ -106,7 +125,10 @@
 tracker_xesam_live_search_class_init (TrackerXesamLiveSearchClass *klass) 
 {
 	GObjectClass *object_class;
+
 	object_class = G_OBJECT_CLASS (klass);
+
+	object_class->finalize = tracker_xesam_live_search_finalize;
 	object_class->set_property = xesam_search_set_property;
 
 	g_object_class_install_property (object_class,
@@ -116,8 +138,7 @@
 							       "XML Query",
 							       G_PARAM_WRITABLE));
 
-	object_class->finalize = tracker_xesam_live_search_finalize;
-	g_type_class_add_private( klass, sizeof(struct _TrackerXesamLiveSearchPriv) );
+	g_type_class_add_private (klass, sizeof (struct _TrackerXesamLiveSearchPriv));
 
 }
 
@@ -126,7 +147,7 @@
 {
 	TrackerXesamLiveSearchPriv *priv;
 
-	priv = self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,TRACKER_TYPE_XESAM_LIVE_SEARCH,struct _TrackerXesamLiveSearchPriv);
+	priv = self->priv = GET_PRIV (self);
 
 	priv->session = NULL;
 	priv->search_id = NULL;
@@ -151,9 +172,15 @@
 tracker_xesam_live_search_emit_hits_added (TrackerXesamLiveSearch *self, 
 					   guint                   count) 
 {
-	TrackerDBusXesam *proxy = TRACKER_DBUS_XESAM (tracker_dbus_get_object (TRACKER_TYPE_DBUS_XESAM));
-
-	g_signal_emit_by_name (proxy, "hits-added", tracker_xesam_live_search_get_id (self), count);
+	GObject *xesam;
+	
+	g_return_if_fail (TRACKER_IS_XESAM_LIVE_SEARCH (self));
+
+	xesam = tracker_dbus_get_object (TRACKER_TYPE_XESAM);
+
+	g_signal_emit_by_name (xesam, "hits-added", 
+			       tracker_xesam_live_search_get_id (self), 
+			       count);
 }
 
 /**
@@ -171,9 +198,16 @@
 tracker_xesam_live_search_emit_hits_removed (TrackerXesamLiveSearch *self, 
 					     GArray                 *hit_ids) 
 {
-	TrackerDBusXesam *proxy = TRACKER_DBUS_XESAM (tracker_dbus_get_object (TRACKER_TYPE_DBUS_XESAM));
+	GObject *xesam;
+
+	g_return_if_fail (TRACKER_IS_XESAM_LIVE_SEARCH (self));
+	g_return_if_fail (hit_ids != NULL);
 
-	g_signal_emit_by_name (proxy, "hits-removed", tracker_xesam_live_search_get_id (self), hit_ids); 
+	xesam = tracker_dbus_get_object (TRACKER_TYPE_XESAM);
+
+	g_signal_emit_by_name (xesam, "hits-removed", 
+			       tracker_xesam_live_search_get_id (self), 
+			       hit_ids); 
 }
 
 /**
@@ -191,9 +225,16 @@
 tracker_xesam_live_search_emit_hits_modified (TrackerXesamLiveSearch *self, 
 					      GArray                 *hit_ids) 
 {
-	TrackerDBusXesam *proxy = TRACKER_DBUS_XESAM (tracker_dbus_get_object (TRACKER_TYPE_DBUS_XESAM));
+	GObject *xesam;
+
+	g_return_if_fail (TRACKER_IS_XESAM_LIVE_SEARCH (self));
+	g_return_if_fail (hit_ids != NULL);
 
-	g_signal_emit_by_name (proxy, "hits-modified", tracker_xesam_live_search_get_id (self), hit_ids); 
+	xesam = tracker_dbus_get_object (TRACKER_TYPE_XESAM);
+
+	g_signal_emit_by_name (xesam, "hits-modified", 
+			       tracker_xesam_live_search_get_id (self), 
+			       hit_ids); 
 }
 
 /**
@@ -210,11 +251,15 @@
 void 
 tracker_xesam_live_search_emit_done (TrackerXesamLiveSearch *self) 
 {
-	TrackerDBusXesam *proxy = TRACKER_DBUS_XESAM (tracker_dbus_get_object (TRACKER_TYPE_DBUS_XESAM));
+	GObject *xesam;
 
-	g_signal_emit_by_name (proxy, "search-done", tracker_xesam_live_search_get_id (self)); 
-}
+	g_return_if_fail (TRACKER_IS_XESAM_LIVE_SEARCH (self));
 
+	xesam = tracker_dbus_get_object (TRACKER_TYPE_XESAM);
+
+	g_signal_emit_by_name (xesam, "search-done", 
+			       tracker_xesam_live_search_get_id (self)); 
+}
 
 /**
  * tracker_xesam_live_search_match_with_events:
@@ -226,27 +271,39 @@
  * Find all items that match with the current events for @self.
  **/
 void
-tracker_xesam_live_search_match_with_events (TrackerXesamLiveSearch *self, GArray **added, GArray **removed, GArray **modified)
+tracker_xesam_live_search_match_with_events (TrackerXesamLiveSearch  *self, 
+					     GArray                 **added, 
+					     GArray                 **removed, 
+					     GArray                 **modified)
 {
-	TrackerDBusXesam *proxy = TRACKER_DBUS_XESAM (tracker_dbus_get_object (TRACKER_TYPE_DBUS_XESAM));
-	DBConnection *db_con = NULL;
+	GObject            *xesam;
+	DBConnection       *db_con = NULL;
 	TrackerDBResultSet *result_set;
-	gboolean ls_valid = TRUE;
-	GArray *m_added = NULL, *m_removed = NULL, *m_modified = NULL;
+	gboolean            ls_valid = TRUE;
+	GArray             *m_added = NULL;
+	GArray             *m_removed = NULL;
+	GArray             *m_modified = NULL;
+
+	g_return_if_fail (TRACKER_IS_XESAM_LIVE_SEARCH (self));
+	g_return_if_fail (added != NULL);
+	g_return_if_fail (removed != NULL);
+	g_return_if_fail (modified != NULL);
 
-	g_object_get (proxy, "db-connection", &db_con, NULL);
+	xesam = tracker_dbus_get_object (TRACKER_TYPE_XESAM);
+
+	g_object_get (xesam, "db-connection", &db_con, NULL);
 
 	/* Deleted items */
 
 	result_set = tracker_db_get_live_search_deleted_ids (db_con, 
-		tracker_xesam_live_search_get_id (self));
+							     tracker_xesam_live_search_get_id (self));
 
 	if (!result_set)
 		goto part_two;
 
 	while (ls_valid) {
 		GValue ls_value = { 0, };
-		gint ls_i_value;
+		gint   ls_i_value;
 
 		_tracker_db_result_set_get_value (result_set, 0, &ls_value);
 		ls_i_value = g_value_get_int (&ls_value);
@@ -303,11 +360,13 @@
 						break;
 					}
 			}
+
 			if (!noadd)
 				g_array_append_val (m_modified, ls_i_value);
 		} else {
 			if (m_added == NULL)
 				m_added = g_array_new (FALSE, TRUE, sizeof (guint32));
+
 			g_array_append_val (m_added, ls_i_value);
 		}
 
@@ -336,19 +395,26 @@
 tracker_xesam_live_search_close (TrackerXesamLiveSearch  *self, 
 				 GError                 **error)
 {
-	TrackerXesamLiveSearchPriv *priv = self->priv;
+	TrackerXesamLiveSearchPriv *priv;
 
-	if (priv->closed)
-		g_set_error (error, TRACKER_XESAM_ERROR_DOMAIN, 
-				TRACKER_XESAM_ERROR_SEARCH_CLOSED,
-				"Search was already closed");
-	else {
+	g_return_if_fail (TRACKER_IS_XESAM_LIVE_SEARCH (self));
+
+	priv = self->priv;
+
+	if (priv->closed) {
+		g_set_error (error, 
+			     TRACKER_XESAM_ERROR_DOMAIN, 
+			     TRACKER_XESAM_ERROR_SEARCH_CLOSED,
+			     "Search was already closed");
+	} else {
 		DBConnection *db_con = NULL;
-		TrackerDBusXesam *proxy = TRACKER_DBUS_XESAM (tracker_dbus_get_object (TRACKER_TYPE_DBUS_XESAM));
+		GObject      *xesam;
+		
+		xesam = tracker_dbus_get_object (TRACKER_TYPE_XESAM);
 
-		g_object_get (proxy, "db-connection", &db_con, NULL);
+		g_object_get (xesam, "db-connection", &db_con, NULL);
 		tracker_db_stop_live_search (db_con, 
-			tracker_xesam_live_search_get_id (self));
+					     tracker_xesam_live_search_get_id (self));
 	}
 
 	priv->closed = TRUE;
@@ -371,31 +437,36 @@
 					 guint                   *count, 
 					 GError                 **error)
 {
-	TrackerXesamLiveSearchPriv *priv = self->priv;
+	TrackerXesamLiveSearchPriv *priv;
 
-	if (!priv->active)
-		g_set_error (error, TRACKER_XESAM_ERROR_DOMAIN, 
-				TRACKER_XESAM_ERROR_SEARCH_NOT_ACTIVE,
-				"Search is not active");
-	else {
+	g_return_if_fail (TRACKER_IS_XESAM_LIVE_SEARCH (self));
+	g_return_if_fail (count != NULL);
+
+	priv = self->priv;
+
+	if (!priv->active) {
+		g_set_error (error,
+			     TRACKER_XESAM_ERROR_DOMAIN, 
+			     TRACKER_XESAM_ERROR_SEARCH_NOT_ACTIVE,
+			     "Search is not active");
+	} else {
 		TrackerDBResultSet *result_set;
-		TrackerDBusXesam *proxy = TRACKER_DBUS_XESAM (tracker_dbus_get_object (TRACKER_TYPE_DBUS_XESAM));
-		GValue value = {0, };
-		DBConnection *db_con = NULL;
+		GValue              value = {0, };
+		DBConnection       *db_con = NULL;
+		GObject            *xesam;
 
-		g_object_get (proxy, "db-connection", &db_con, NULL);
+		xesam = tracker_dbus_get_object (TRACKER_TYPE_XESAM);
+		g_object_get (xesam, "db-connection", &db_con, NULL);
 
 		result_set = tracker_db_get_live_search_hit_count (db_con, 
-			tracker_xesam_live_search_get_id (self));
+								   tracker_xesam_live_search_get_id (self));
 		_tracker_db_result_set_get_value (result_set, 0, &value);
 		*count = g_value_get_int (&value);
 		g_value_unset (&value);
 		g_object_unref (result_set);
 	}
-
 }
 
-
 /**
  * Retrieving Hits
  * The return value of GetHits and GetHitData is a sorted array of hits. A hit 
@@ -420,25 +491,32 @@
  **/
 static void
 get_hit_data (TrackerXesamLiveSearch  *self, 
-	      TrackerDBResultSet *result_set,
-	      GPtrArray **hit_data)
+	      TrackerDBResultSet      *result_set,
+	      GPtrArray              **hit_data)
 {
-	gboolean valid = TRUE;
-	gint hitfields_columns = 0, column;
-	GPtrArray *result = g_ptr_array_new ();
+	GPtrArray *result;
+	gboolean   valid = TRUE;
+	gint       hitfields_columns = 0;
+	gint       column;
 
+	result = g_ptr_array_new ();
 
 	while (valid) {
-		GPtrArray *row = g_ptr_array_new ();
+		GPtrArray *row;
+
+		row = g_ptr_array_new ();
 
 		for (column = 0; column < hitfields_columns; column++) {
-			GValue *value = g_new0 (GValue, 1);
-			GValue value_in = {0, };
+			GValue *value;
+			GValue  value_in = {0, };
 
-			// Question for ottela: how will we do list-values like
-			// xesam:userKeywords? That's a column with comma's? or
-			// how is this done? An extra result_set to loop? An
-			// extra query? A union?
+			value = g_new0 (GValue, 1);
+
+			/* Question for ottela: how will we do list-values like
+			 * xesam:userKeywords? That's a column with comma's? or
+			 * how is this done? An extra result_set to loop? An
+			 * extra query? A union?
+			 */
 
 			_tracker_db_result_set_get_value (result_set, column, &value_in);
 
@@ -478,7 +556,12 @@
 				    GPtrArray              **hits,
 				    GError                 **error)
 {
-	TrackerXesamLiveSearchPriv *priv = self->priv;
+	TrackerXesamLiveSearchPriv *priv;
+
+	g_return_if_fail (TRACKER_IS_XESAM_LIVE_SEARCH (self));
+	g_return_if_fail (hits != NULL);
+
+	priv = self->priv;
 
 	if (!priv->active)
 		g_set_error (error, TRACKER_XESAM_ERROR_DOMAIN, 
@@ -486,17 +569,18 @@
 				"Search is not active");
 	else {
 		TrackerDBResultSet *result_set = NULL;
-		DBConnection *db_con = NULL;
-		TrackerDBusXesam *proxy = TRACKER_DBUS_XESAM (tracker_dbus_get_object (TRACKER_TYPE_DBUS_XESAM));
-
-		g_object_get (proxy, "db-connection", &db_con, NULL);
+		DBConnection       *db_con = NULL;
+		GObject            *xesam;
+		
+		xesam = tracker_dbus_get_object (TRACKER_TYPE_XESAM);
+		g_object_get (xesam, "db-connection", &db_con, NULL);
 
 		g_debug ("live_search_get_hits");
 
-		// For ottela: fetch results for get_hits
+		/* For ottela: fetch results for get_hits */
 
 		result_set = tracker_db_get_live_search_get_hit_data (db_con,
-			tracker_xesam_live_search_get_id (self));
+								      tracker_xesam_live_search_get_id (self));
 
 		if (result_set) {
 			get_hit_data (self, result_set, hits);
@@ -505,29 +589,37 @@
 	}
 }
 
-void tracker_xesam_live_search_get_range_hits (TrackerXesamLiveSearch  *self,
-					       guint                    a,
-					       guint                    b,
-					       GPtrArray              **hits,
-					       GError                 **error)
+void
+tracker_xesam_live_search_get_range_hits (TrackerXesamLiveSearch  *self,
+					  guint                    a,
+					  guint                    b,
+					  GPtrArray              **hits,
+					  GError                 **error)
 {
-	TrackerXesamLiveSearchPriv *priv = self->priv;
+	TrackerXesamLiveSearchPriv *priv;
 
-	if (!priv->active)
-		g_set_error (error, TRACKER_XESAM_ERROR_DOMAIN, 
-				TRACKER_XESAM_ERROR_SEARCH_NOT_ACTIVE,
-				"Search is not active");
-	else {
-		TrackerDBResultSet *result_set = NULL;
-		DBConnection *db_con = NULL;
-		TrackerDBusXesam *proxy = TRACKER_DBUS_XESAM (tracker_dbus_get_object (TRACKER_TYPE_DBUS_XESAM));
+	g_return_if_fail (TRACKER_IS_XESAM_LIVE_SEARCH (self));
+	g_return_if_fail (hits != NULL);
 
-		g_object_get (proxy, "db-connection", &db_con, NULL);
+	priv = self->priv;
 
-		// For ottela: fetch results for get_hits
+	if (!priv->active) {
+		g_set_error (error, 
+			     TRACKER_XESAM_ERROR_DOMAIN, 
+			     TRACKER_XESAM_ERROR_SEARCH_NOT_ACTIVE,
+			     "Search is not active");
+	} else {
+		TrackerDBResultSet *result_set = NULL;
+		DBConnection       *db_con = NULL;
+		GObject            *xesam;
+		
+		xesam = tracker_dbus_get_object (TRACKER_TYPE_XESAM);
+		g_object_get (xesam, "db-connection", &db_con, NULL);
+
+		/* For ottela: fetch results for get_hits */
 
 		result_set = tracker_db_get_live_search_get_hit_data (db_con,
-			tracker_xesam_live_search_get_id (self));
+								      tracker_xesam_live_search_get_id (self));
 
 		if (result_set) {
 			get_hit_data (self, result_set, hits);
@@ -536,7 +628,6 @@
 	}
 }
 
-
 /**
  * tracker_xesam_live_search_get_hit_data:
  * @self: a #TrackerXesamLiveSearch
@@ -571,23 +662,31 @@
 					GPtrArray              **hit_data, 
 					GError                 **error)
 {
-	TrackerXesamLiveSearchPriv *priv = self->priv;
+	TrackerXesamLiveSearchPriv *priv;
 
-	if (!priv->active)
-		g_set_error (error, TRACKER_XESAM_ERROR_DOMAIN, 
-				TRACKER_XESAM_ERROR_SEARCH_NOT_ACTIVE,
-				"Search is not active yet");
-	else {
+	g_return_if_fail (TRACKER_IS_XESAM_LIVE_SEARCH (self));
+	g_return_if_fail (hit_ids != NULL);
+	g_return_if_fail (hit_data != NULL);
+
+	priv = self->priv;
+
+	if (!priv->active) {
+		g_set_error (error, 
+			     TRACKER_XESAM_ERROR_DOMAIN, 
+			     TRACKER_XESAM_ERROR_SEARCH_NOT_ACTIVE,
+			     "Search is not active yet");
+	} else {
 		TrackerDBResultSet *result_set = NULL;
-		DBConnection *db_con = NULL;
-		TrackerDBusXesam *proxy = TRACKER_DBUS_XESAM (tracker_dbus_get_object (TRACKER_TYPE_DBUS_XESAM));
+		DBConnection       *db_con = NULL;
+		GObject            *xesam;
+		
+		xesam = tracker_dbus_get_object (TRACKER_TYPE_XESAM);
+		g_object_get (xesam, "db-connection", &db_con, NULL);
 
-		g_object_get (proxy, "db-connection", &db_con, NULL);
-
-		// For ottela: fetch results for get_hits
+		/* For ottela: fetch results for get_hits */
 
 		result_set = tracker_db_get_live_search_get_hit_data (db_con,
-			tracker_xesam_live_search_get_id (self));
+								      tracker_xesam_live_search_get_id (self));
 
 		if (result_set) {
 			get_hit_data (self, result_set, hit_data);
@@ -596,7 +695,6 @@
 	}
 }
 
-
 void
 tracker_xesam_live_search_get_range_hit_data (TrackerXesamLiveSearch  *self,
 					      guint                    a,
@@ -605,23 +703,31 @@
 					      GPtrArray              **hit_data,
 					      GError                 **error)
 {
-	TrackerXesamLiveSearchPriv *priv = self->priv;
+	TrackerXesamLiveSearchPriv *priv;
 
-	if (!priv->active)
-		g_set_error (error, TRACKER_XESAM_ERROR_DOMAIN, 
-				TRACKER_XESAM_ERROR_SEARCH_NOT_ACTIVE,
-				"Search is not active yet");
-	else {
+	g_return_if_fail (TRACKER_IS_XESAM_LIVE_SEARCH (self));
+	g_return_if_fail (fields != NULL);
+	g_return_if_fail (hit_data != NULL);
+
+	priv = self->priv;
+
+	if (!priv->active) { 
+		g_set_error (error,
+			     TRACKER_XESAM_ERROR_DOMAIN, 
+			     TRACKER_XESAM_ERROR_SEARCH_NOT_ACTIVE,
+			     "Search is not active yet");
+	} else {
 		TrackerDBResultSet *result_set = NULL;
-		DBConnection *db_con = NULL;
-		TrackerDBusXesam *proxy = TRACKER_DBUS_XESAM (tracker_dbus_get_object (TRACKER_TYPE_DBUS_XESAM));
+		DBConnection       *db_con = NULL;
+		GObject            *xesam;
 
-		g_object_get (proxy, "db-connection", &db_con, NULL);
+		xesam = tracker_dbus_get_object (TRACKER_TYPE_XESAM);
+		g_object_get (xesam, "db-connection", &db_con, NULL);
 
-		// For ottela: fetch results for get_hits
+		/* For ottela: fetch results for get_hits */
 
 		result_set = tracker_db_get_live_search_get_hit_data (db_con,
-			tracker_xesam_live_search_get_id (self));
+								      tracker_xesam_live_search_get_id (self));
 
 		if (result_set) {
 			get_hit_data (self, result_set, hit_data);
@@ -641,7 +747,11 @@
 gboolean 
 tracker_xesam_live_search_is_active (TrackerXesamLiveSearch *self)
 {
-	TrackerXesamLiveSearchPriv *priv = self->priv;
+	TrackerXesamLiveSearchPriv *priv;
+
+	g_return_val_if_fail (TRACKER_IS_XESAM_LIVE_SEARCH (self), FALSE);
+
+	priv = self->priv;
 
 	return priv->active;
 }
@@ -658,24 +768,31 @@
 tracker_xesam_live_search_activate (TrackerXesamLiveSearch  *self, 
 				    GError                 **error)
 {
-	TrackerXesamLiveSearchPriv *priv = self->priv;
+	TrackerXesamLiveSearchPriv *priv;
 
-	if (priv->closed)
-		g_set_error (error, TRACKER_XESAM_ERROR_DOMAIN, 
-				TRACKER_XESAM_ERROR_SEARCH_CLOSED,
-				"Search is closed");
-	else {
+	g_return_if_fail (TRACKER_IS_XESAM_LIVE_SEARCH (self));
+
+	priv = self->priv;
+
+	if (priv->closed) {
+		g_set_error (error, 
+			     TRACKER_XESAM_ERROR_DOMAIN, 
+			     TRACKER_XESAM_ERROR_SEARCH_CLOSED,
+			     "Search is closed");
+	} else {
 		DBConnection *db_con = NULL;
-		TrackerDBusXesam *proxy = TRACKER_DBUS_XESAM (tracker_dbus_get_object (TRACKER_TYPE_DBUS_XESAM));
+		GObject      *xesam;
 
-		g_object_get (proxy, "db-connection", &db_con, NULL);
+		xesam = tracker_dbus_get_object (TRACKER_TYPE_XESAM);
+		g_object_get (xesam, "db-connection", &db_con, NULL);
 
-		g_debug ("The from query for activate: %s",tracker_xesam_live_search_get_from_query (self)); 
+		g_debug ("The from query for activate: %s",
+			 tracker_xesam_live_search_get_from_query (self)); 
 
 		tracker_db_start_live_search (db_con, 
-			tracker_xesam_live_search_get_from_query (self),
-			tracker_xesam_live_search_get_where_query (self),
-			tracker_xesam_live_search_get_id (self));
+					      tracker_xesam_live_search_get_from_query (self),
+					      tracker_xesam_live_search_get_where_query (self),
+					      tracker_xesam_live_search_get_id (self));
 	}
 
 	priv->active = TRUE;
@@ -691,11 +808,16 @@
  *
  * @returns: a read-only string with the query
  **/
-const gchar* 
+const gchar * 
 tracker_xesam_live_search_get_xml_query (TrackerXesamLiveSearch *self)
 {
-	TrackerXesamLiveSearchPriv *priv = self->priv;
-	return (const gchar *) priv->query;
+	TrackerXesamLiveSearchPriv *priv;
+
+	g_return_val_if_fail (TRACKER_IS_XESAM_LIVE_SEARCH (self), NULL);
+
+	priv = self->priv;
+
+	return priv->query;
 }
 
 /**
@@ -709,11 +831,19 @@
 tracker_xesam_live_search_set_id (TrackerXesamLiveSearch *self, 
 				  const gchar            *search_id)
 {
-	TrackerXesamLiveSearchPriv *priv = self->priv;
+	TrackerXesamLiveSearchPriv *priv;
+
+	g_return_if_fail (TRACKER_IS_XESAM_LIVE_SEARCH (self));
 
-	if (priv->search_id)
-		g_free (priv->search_id);
-	priv->search_id = g_strdup (search_id);
+	priv = self->priv;
+
+	g_free (priv->search_id);
+
+	if (search_id) {
+		priv->search_id = g_strdup (search_id);
+	} else {
+		priv->search_id = NULL;
+	}
 }
 
 /**
@@ -727,9 +857,13 @@
 const gchar* 
 tracker_xesam_live_search_get_id (TrackerXesamLiveSearch *self)
 {
-	TrackerXesamLiveSearchPriv *priv = self->priv;
+	TrackerXesamLiveSearchPriv *priv;
+
+	g_return_val_if_fail (TRACKER_IS_XESAM_LIVE_SEARCH (self), NULL);
 
-	return (const gchar*) priv->search_id;
+	priv = self->priv;
+
+	return priv->search_id;
 }
 
 
@@ -745,13 +879,18 @@
 tracker_xesam_live_search_parse_query (TrackerXesamLiveSearch  *self,
 				       GError                 **error)
 {
-	TrackerXesamLiveSearchPriv *priv = self->priv;
-	TrackerDBusXesam           *proxy = TRACKER_DBUS_XESAM (tracker_dbus_get_object (TRACKER_TYPE_DBUS_XESAM));
+	TrackerXesamLiveSearchPriv *priv;
+	GObject                    *xesam;
 	DBConnection               *db_con = NULL;
 	GError                     *parse_error = NULL;
 	gchar                      *orig_from, *orig_where;
 
-	g_object_get (proxy, "db-connection", &db_con, NULL);
+	g_return_val_if_fail (TRACKER_IS_XESAM_LIVE_SEARCH (self), FALSE);
+
+	priv = self->priv;
+
+	xesam = tracker_dbus_get_object (TRACKER_TYPE_XESAM);
+	g_object_get (xesam, "db-connection", &db_con, NULL);
 
 	orig_from = priv->from_sql;
 	orig_where = priv->where_sql;
@@ -767,7 +906,8 @@
 	if (parse_error) {
 		gchar *str = g_strdup_printf ("Parse error: %s", 
 			parse_error->message);
-		g_set_error (error, TRACKER_XESAM_ERROR_DOMAIN, 
+		g_set_error (error, 
+			     TRACKER_XESAM_ERROR_DOMAIN, 
 			     TRACKER_XESAM_ERROR_PARSING_FAILED,
 			     str);
 		g_free (str);
@@ -785,7 +925,8 @@
 		g_free (orig_where);
 	}
 
-	g_message ("Parsed to '%s' and '%s'", priv->from_sql, priv->where_sql);
+	g_message ("Parsed to '%s' and '%s'", 
+		   priv->from_sql, priv->where_sql);
 
 	return TRUE;
 }
@@ -801,8 +942,13 @@
 const gchar* 
 tracker_xesam_live_search_get_from_query (TrackerXesamLiveSearch *self)
 {
-	TrackerXesamLiveSearchPriv *priv = self->priv;
-	return (const gchar *) priv->from_sql;
+	TrackerXesamLiveSearchPriv *priv;
+
+	g_return_val_if_fail (TRACKER_IS_XESAM_LIVE_SEARCH (self), NULL);
+
+	priv = self->priv;
+
+	return priv->from_sql;
 }
 
 /**
@@ -816,8 +962,13 @@
 const gchar* 
 tracker_xesam_live_search_get_where_query (TrackerXesamLiveSearch *self)
 {
-	TrackerXesamLiveSearchPriv *priv = self->priv;
-	return (const gchar *) priv->where_sql;
+	TrackerXesamLiveSearchPriv *priv;
+
+	g_return_val_if_fail (TRACKER_IS_XESAM_LIVE_SEARCH (self), NULL);
+
+	priv = self->priv;
+
+	return priv->where_sql;
 }
 
 /**
@@ -831,7 +982,8 @@
 tracker_xesam_live_search_new (const gchar *query_xml) 
 {
 	return g_object_new (TRACKER_TYPE_XESAM_LIVE_SEARCH, 
-		"xml-query", query_xml, NULL);
+			     "xml-query", query_xml, 
+			     NULL);
 }
 
 

Copied: branches/indexer-split/src/trackerd/tracker-xesam-manager.c (from r1535, /branches/indexer-split/src/trackerd/tracker-xesam.c)
==============================================================================
--- /branches/indexer-split/src/trackerd/tracker-xesam.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-xesam-manager.c	Thu May 29 17:51:24 2008
@@ -19,12 +19,15 @@
  * Boston, MA  02110-1301, USA. 
  */ 
 
+#include "config.h"
+
 #include <sys/types.h>
 #include <unistd.h>
 
 #include <libtracker-common/tracker-config.h>
 
-#include "tracker-xesam.h"
+#include "tracker-xesam-manager.h"
+#include "tracker-dbus.h"
 #include "tracker-main.h"
 
 static GHashTable *xesam_sessions; 
@@ -32,7 +35,7 @@
 static gboolean    live_search_handler_running = FALSE;
 
 GQuark
-tracker_xesam_error_quark (void)
+tracker_xesam_manager_error_quark (void)
 {
 	static GQuark quark = 0;
 
@@ -44,7 +47,7 @@
 }
 
 void 
-tracker_xesam_init (void)
+tracker_xesam_manager_init (void)
 {
 	if (xesam_sessions) {
 		return;
@@ -59,7 +62,7 @@
 }
 
 void
-tracker_xesam_shutdown (void)
+tracker_xesam_manager_shutdown (void)
 {
 	if (!xesam_sessions) {
 		return;
@@ -73,14 +76,14 @@
 }
 
 TrackerXesamSession *
-tracker_xesam_create_session (TrackerDBusXesam  *dbus_proxy, 
-			      gchar            **session_id, 
-			      GError           **error)
+tracker_xesam_manager_create_session (TrackerXesam  *xesam, 
+				      gchar        **session_id, 
+				      GError       **error)
 {
 	TrackerXesamSession *session;
 
 	session = tracker_xesam_session_new ();
-	tracker_xesam_session_set_id (session, tracker_xesam_generate_unique_key ());
+	tracker_xesam_session_set_id (session, tracker_xesam_manager_generate_unique_key ());
 
 	g_hash_table_insert (xesam_sessions, 
 			     g_strdup (tracker_xesam_session_get_id (session)),
@@ -93,34 +96,38 @@
 }
 
 void 
-tracker_xesam_close_session (const gchar *session_id, GError **error)
+tracker_xesam_manager_close_session (const gchar  *session_id, 
+				     GError      **error)
 {
 	gpointer inst = g_hash_table_lookup (xesam_sessions, session_id);
 	if (!inst)
-		g_set_error (error, TRACKER_XESAM_ERROR_DOMAIN, 
-				TRACKER_XESAM_ERROR_SESSION_ID_NOT_REGISTERED,
-				"Session ID is not registered");
+		g_set_error (error, 
+			     TRACKER_XESAM_ERROR_DOMAIN, 
+			     TRACKER_XESAM_ERROR_SESSION_ID_NOT_REGISTERED,
+			     "Session ID is not registered");
 	else
 		g_hash_table_remove (xesam_sessions, session_id);
 }
 
 TrackerXesamSession *
-tracker_xesam_get_session (const gchar *session_id, GError **error)
+tracker_xesam_manager_get_session (const gchar  *session_id, 
+				   GError      **error)
 {
 	TrackerXesamSession *session = g_hash_table_lookup (xesam_sessions, session_id);
 	if (session)
 		g_object_ref (session);
 	else
-		g_set_error (error, TRACKER_XESAM_ERROR_DOMAIN, 
-				TRACKER_XESAM_ERROR_SESSION_ID_NOT_REGISTERED,
-				"Session ID is not registered");
+		g_set_error (error,
+			     TRACKER_XESAM_ERROR_DOMAIN, 
+			     TRACKER_XESAM_ERROR_SESSION_ID_NOT_REGISTERED,
+			     "Session ID is not registered");
 	return session;
 }
 
 TrackerXesamSession *
-tracker_xesam_get_session_for_search (const gchar             *search_id, 
-				      TrackerXesamLiveSearch **search_in, 
-				      GError                 **error)
+tracker_xesam_manager_get_session_for_search (const gchar             *search_id, 
+					      TrackerXesamLiveSearch **search_in, 
+					      GError                 **error)
 {
 	TrackerXesamSession *session = NULL;
 	GList               *sessions;
@@ -149,14 +156,16 @@
 	g_list_free (sessions);
 
 	if (!session) 
-		g_set_error (error, TRACKER_XESAM_ERROR_DOMAIN, 
-				TRACKER_XESAM_ERROR_SEARCH_ID_NOT_REGISTERED,
-				"Search ID is not registered");
+		g_set_error (error, 
+			     TRACKER_XESAM_ERROR_DOMAIN, 
+			     TRACKER_XESAM_ERROR_SEARCH_ID_NOT_REGISTERED,
+			     "Search ID is not registered");
 	return session;
 }
 
 TrackerXesamLiveSearch *
-tracker_xesam_get_live_search (const gchar *search_id, GError **error)
+tracker_xesam_manager_get_live_search (const gchar  *search_id, 
+				       GError      **error)
 {
 	TrackerXesamLiveSearch *search = NULL;
 	GList                  *sessions;
@@ -179,9 +188,10 @@
 	g_list_free (sessions);
 
 	if (!search) 
-		g_set_error (error, TRACKER_XESAM_ERROR_DOMAIN, 
-				TRACKER_XESAM_ERROR_SEARCH_ID_NOT_REGISTERED,
-				"Search ID is not registered");
+		g_set_error (error, 
+			     TRACKER_XESAM_ERROR_DOMAIN, 
+			     TRACKER_XESAM_ERROR_SEARCH_ID_NOT_REGISTERED,
+			     "Search ID is not registered");
 
 	return search;
 }
@@ -189,18 +199,18 @@
 static gboolean 
 live_search_handler (gpointer data)
 {
-	TrackerDBusXesam   *proxy;
-	DBConnection       *db_con = NULL;
-	GList              *sessions;
-	gboolean            reason_to_live = FALSE;
+	TrackerXesam *xesam;
+	DBConnection *db_con = NULL;
+	GList        *sessions;
+	gboolean      reason_to_live = FALSE;
 
-	proxy = TRACKER_DBUS_XESAM (tracker_dbus_get_object (TRACKER_TYPE_DBUS_XESAM));
+	xesam = TRACKER_XESAM (tracker_dbus_get_object (TRACKER_TYPE_XESAM));
 
-	if (!proxy) {
+	if (!xesam) {
 		return FALSE;
 	}
 
-	g_object_get (proxy, "db-connection", &db_con, NULL);
+	g_object_get (xesam, "db-connection", &db_con, NULL);
 
 	if (!db_con) { 
 		return FALSE;
@@ -278,7 +288,7 @@
 }
 
 void 
-tracker_xesam_wakeup (guint32 last_id)
+tracker_xesam_manager_wakeup (guint32 last_id)
 {
 	/* This happens each time a new event is created */
 
@@ -302,7 +312,7 @@
 }
 
 gchar *
-tracker_xesam_generate_unique_key (void)
+tracker_xesam_manager_generate_unique_key (void)
 {
 	static guint  serial = 0;
 	gchar        *key;
@@ -333,7 +343,7 @@
 }
 
 gboolean
-tracker_xesam_is_uri_in_xesam_dir (const gchar *uri) 
+tracker_xesam_manager_is_uri_in_xesam_dir (const gchar *uri) 
 {
 	g_return_val_if_fail (uri != NULL, FALSE);
 

Copied: branches/indexer-split/src/trackerd/tracker-xesam-manager.h (from r1535, /branches/indexer-split/src/trackerd/tracker-xesam.h)
==============================================================================
--- /branches/indexer-split/src/trackerd/tracker-xesam.h	(original)
+++ branches/indexer-split/src/trackerd/tracker-xesam-manager.h	Thu May 29 17:51:24 2008
@@ -19,46 +19,52 @@
  * Boston, MA  02110-1301, USA. 
  */  
 
-#ifndef __TRACKERD_XESAM_H__
-#define __TRACKERD_XESAM_H__
+#ifndef __TRACKERD_XESAM_MANAGER_H__
+#define __TRACKERD_XESAM_MANAGER_H__
+
+#include <glib.h>
 
-#include "tracker-utils.h"
-#include "tracker-dbus.h"
 #include "tracker-xesam-session.h"
 #include "tracker-xesam-live-search.h"
 
 G_BEGIN_DECLS
 
-#define TRACKER_XESAM_ERROR_DOMAIN        tracker_xesam_error_quark()
+#define TRACKER_XESAM_ERROR_DOMAIN tracker_xesam_manager_error_quark()
 
 typedef enum {
 	TRACKER_XESAM_ERROR_SEARCH_ID_NOT_REGISTERED = 1,
-	TRACKER_XESAM_ERROR_SESSION_ID_NOT_REGISTERED = 2,
-	TRACKER_XESAM_ERROR_SEARCH_CLOSED = 3,
-	TRACKER_XESAM_ERROR_SEARCH_NOT_ACTIVE = 4,
-	TRACKER_XESAM_ERROR_PROPERTY_NOT_SUPPORTED = 5,
-	TRACKER_XESAM_ERROR_PARSING_FAILED = 6,
+	TRACKER_XESAM_ERROR_SESSION_ID_NOT_REGISTERED,
+	TRACKER_XESAM_ERROR_SEARCH_CLOSED,
+	TRACKER_XESAM_ERROR_SEARCH_NOT_ACTIVE,
+	TRACKER_XESAM_ERROR_PROPERTY_NOT_SUPPORTED,
+	TRACKER_XESAM_ERROR_PARSING_FAILED,
 } TrackerXesamError;
 
-GQuark                  tracker_xesam_error_quark            (void);
-void                    tracker_xesam_init                   (void);
-void                    tracker_xesam_shutdown               (void);
-TrackerXesamSession*    tracker_xesam_create_session         (TrackerDBusXesam        *dbus_proxy,
-							      gchar                  **session_id,
-							      GError                 **error);
-void                    tracker_xesam_close_session          (const gchar             *session_id,
-							      GError                 **error);
-TrackerXesamSession*    tracker_xesam_get_session            (const gchar             *session_id,
-							      GError                 **error);
-TrackerXesamSession*    tracker_xesam_get_session_for_search (const gchar             *search_id,
-							      TrackerXesamLiveSearch **search_in,
-							      GError                 **error);
-TrackerXesamLiveSearch* tracker_xesam_get_live_search        (const gchar             *search_id,
-							      GError                 **error);
-void                    tracker_xesam_wakeup                 (guint32                  last_id);
-gchar *                 tracker_xesam_generate_unique_key    (void);
-gboolean                tracker_xesam_is_uri_in_xesam_dir    (const gchar             *uri);
+GQuark   tracker_xesam_manager_error_quark            (void);
+
+void     tracker_xesam_manager_init                   (void);
+void     tracker_xesam_manager_shutdown               (void);
+
+TrackerXesamSession*    
+         tracker_xesam_manager_create_session         (TrackerXesam            *xesam,
+						       gchar                  **session_id,
+						       GError                 **error);
+void     tracker_xesam_manager_close_session          (const gchar             *session_id,
+						       GError                 **error);
+TrackerXesamSession*    
+         tracker_xesam_manager_get_session            (const gchar             *session_id,
+						       GError                 **error);
+TrackerXesamSession*
+         tracker_xesam_manager_get_session_for_search (const gchar             *search_id,
+						       TrackerXesamLiveSearch **search_in,
+						       GError                 **error);
+TrackerXesamLiveSearch* 
+         tracker_xesam_manager_get_live_search        (const gchar             *search_id,
+						       GError                 **error);
+void     tracker_xesam_manager_wakeup                 (guint32                  last_id);
+gchar *  tracker_xesam_manager_generate_unique_key    (void);
+gboolean tracker_xesam_manager_is_uri_in_xesam_dir    (const gchar             *uri);
 
 G_END_DECLS
 
-#endif /* __TRACKERD_XESAM_H__ */
+#endif /* __TRACKERD_XESAM_MANAGER_H__ */

Modified: branches/indexer-split/src/trackerd/tracker-xesam-session.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-xesam-session.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-xesam-session.c	Thu May 29 17:51:24 2008
@@ -21,19 +21,18 @@
 
 #include <string.h>
 
-#include "tracker-xesam.h"
+#include "tracker-xesam-manager.h"
+
+#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TRACKER_TYPE_XESAM_SESSION, struct _TrackerXesamSessionPriv))
 
 struct _TrackerXesamSessionPriv {
 	GHashTable *searches;
-	gchar *session_id;
 	GHashTable *props;
+	gchar      *session_id;
 };
 
 G_DEFINE_TYPE (TrackerXesamSession, tracker_xesam_session, G_TYPE_OBJECT)
 
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TRACKER_TYPE_XESAM_SESSION, struct _TrackerXesamSessionPriv))
-
-
 static void
 tracker_xesam_session_g_value_free (GValue *value)
 {
@@ -386,7 +385,8 @@
 	search = tracker_xesam_live_search_new (query_xml);
 
 	tracker_xesam_live_search_set_session (search, self);
-	tracker_xesam_live_search_set_id (search, tracker_xesam_generate_unique_key ());
+	tracker_xesam_live_search_set_id (search, 
+					  tracker_xesam_manager_generate_unique_key ());
 
 	if (tracker_xesam_live_search_parse_query (search, error)) {
 

Modified: branches/indexer-split/src/trackerd/tracker-xesam-session.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-xesam-session.h	(original)
+++ branches/indexer-split/src/trackerd/tracker-xesam-session.h	Thu May 29 17:51:24 2008
@@ -22,12 +22,11 @@
 #ifndef __TRACKERD_XESAM_SESSION_H__
 #define __TRACKERD_XESAM_SESSION_H__
 
-#include <glib.h>
 #include <glib-object.h>
 
-#include "tracker-xesam.h"
+#include "tracker-xesam-manager.h"
 #include "tracker-xesam-live-search.h"
-#include "tracker-dbus-xesam.h"
+#include "tracker-xesam.h"
 
 G_BEGIN_DECLS
 

Copied: branches/indexer-split/src/trackerd/tracker-xesam.c (from r1535, /branches/indexer-split/src/trackerd/tracker-dbus-xesam.c)
==============================================================================
--- /branches/indexer-split/src/trackerd/tracker-dbus-xesam.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-xesam.c	Thu May 29 17:51:24 2008
@@ -30,14 +30,16 @@
 #include <libtracker-common/tracker-utils.h>
 
 #include "tracker-dbus.h"
-#include "tracker-dbus-xesam.h"
-#include "tracker-status.h"
 #include "tracker-xesam.h"
+#include "tracker-status.h"
+#include "tracker-xesam-manager.h"
 #include "tracker-rdf-query.h"
 #include "tracker-query-tree.h"
 #include "tracker-indexer.h"
 #include "tracker-marshal.h"
 
+#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TRACKER_TYPE_XESAM, TrackerXesamPriv))
+
 enum {
 	XESAM_HITS_ADDED,
 	XESAM_HITS_REMOVED,
@@ -54,27 +56,24 @@
 
 typedef struct {
 	DBConnection *db_con;
-} TrackerDBusXesamPriv;
+} TrackerXesamPriv;
 
 static GHashTable *sessions = NULL;
 static guint       signals[XESAM_LAST_SIGNAL] = {0};
 
-G_DEFINE_TYPE(TrackerDBusXesam, tracker_dbus_xesam, G_TYPE_OBJECT)
-
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TRACKER_TYPE_DBUS_XESAM, TrackerDBusXesamPriv))
+G_DEFINE_TYPE(TrackerXesam, tracker_xesam, G_TYPE_OBJECT)
 
 static void
 xesam_search_finalize (GObject *object)
 {
-	G_OBJECT_CLASS (tracker_dbus_xesam_parent_class)->finalize (object);
+	G_OBJECT_CLASS (tracker_xesam_parent_class)->finalize (object);
 }
 
-
 void
-tracker_dbus_xesam_set_db_connection (TrackerDBusXesam *object,
-				     DBConnection      *db_con)
+tracker_xesam_set_db_connection (TrackerXesam *object,
+				 DBConnection *db_con)
 {
-	TrackerDBusXesamPriv *priv;
+	TrackerXesamPriv *priv;
 
 	priv = GET_PRIV (object);
 
@@ -84,32 +83,35 @@
 }
 
 static void
-xesam_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec)
+xesam_get_property (GObject    *object, 
+		    guint       prop_id, 
+		    GValue     *value, 
+		    GParamSpec *pspec)
 {
-	TrackerDBusXesamPriv *priv;
+	TrackerXesamPriv *priv;
 
-	priv = GET_PRIV (object);;
+	priv = GET_PRIV (object);
 
 	switch (prop_id) {
-		case PROP_DB_CONNECTION:
-			g_value_set_pointer (value, priv->db_con);
-			break;
-		default:
-			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-			break;
+	case PROP_DB_CONNECTION:
+		g_value_set_pointer (value, priv->db_con);
+		break;
+	default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+		break;
 	};
 }
 
 static void
 xesam_set_property (GObject      *object,
-		    guint param_id,
+		    guint         param_id,
 		    const GValue *value,
 		    GParamSpec   *pspec)
 {
 	switch (param_id) {
 	case PROP_DB_CONNECTION:
-		tracker_dbus_xesam_set_db_connection (TRACKER_DBUS_XESAM (object),
-						      g_value_get_pointer (value));
+		tracker_xesam_set_db_connection (TRACKER_XESAM (object),
+						 g_value_get_pointer (value));
 		break;
 	default:
 		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
@@ -117,10 +119,8 @@
 	};
 }
 
-
-
 static void
-tracker_dbus_xesam_class_init (TrackerDBusXesamClass *klass)
+tracker_xesam_class_init (TrackerXesamClass *klass)
 {
 	GObjectClass *object_class;
 
@@ -197,29 +197,30 @@
 			1, 
 			G_TYPE_STRV);
 
-	g_type_class_add_private (object_class, sizeof (TrackerDBusXesamPriv));
+	g_type_class_add_private (object_class, sizeof (TrackerXesamPriv));
 }
 
 static void
-tracker_dbus_xesam_init (TrackerDBusXesam *object)
+tracker_xesam_init (TrackerXesam *object)
 {
-	TrackerDBusXesamPriv *priv = GET_PRIV (object);
-	priv->db_con = NULL;
 }
 
-TrackerDBusXesam *
-tracker_dbus_xesam_new (DBConnection *db_con)
+TrackerXesam *
+tracker_xesam_new (DBConnection *db_con)
 {
-	return g_object_new (TRACKER_TYPE_DBUS_XESAM, 
-			       "db-connection", db_con,
-			       NULL);
+	return g_object_new (TRACKER_TYPE_XESAM, 
+			     "db-connection", db_con,
+			     NULL);
 }
 
 static void
-tracker_dbus_xesam_close_session_interal (const gchar  *session_id,
-					  GError      **error)
+tracker_xesam_close_session_interal (const gchar  *session_id,
+				     GError      **error)
 {
-	TrackerXesamSession *session = tracker_xesam_get_session (session_id, error);
+	TrackerXesamSession *session;
+
+	session = tracker_xesam_manager_get_session (session_id, error);
+
 	if (session) {
 		GList *searches = tracker_xesam_session_get_searches (session);
 		while (searches) {
@@ -229,7 +230,7 @@
 		}
 		g_list_free (searches);
 
-		tracker_xesam_close_session (session_id, error);
+		tracker_xesam_manager_close_session (session_id, error);
 		g_object_unref (session);
 	}
 }
@@ -242,23 +243,33 @@
 }
 
 void 
-tracker_dbus_xesam_name_owner_changed (DBusGProxy          *proxy,
-					 const char        *name,
-					 const char        *prev_owner,
-					 const char        *new_owner,
-					 TrackerDBusXesam  *self)
+tracker_xesam_name_owner_changed (DBusGProxy   *proxy,
+				  const char   *name,
+				  const char   *prev_owner,
+				  const char   *new_owner,
+				  TrackerXesam *self)
 {
 	if (sessions) {
-		GList *my_sessions = g_hash_table_lookup (sessions, prev_owner);
+		GList *my_sessions;
+
+		my_sessions = g_hash_table_lookup (sessions, prev_owner);
+
 		if (my_sessions) {
-			GList *copy = my_sessions;
+			GList *copy;
+
+			copy = my_sessions;
+
 			while (copy) {
-				gchar *session_id = copy->data;
-				tracker_dbus_xesam_close_session_interal (session_id, NULL);
+				gchar *session_id;
+
+				session_id = copy->data;
+				tracker_xesam_close_session_interal (session_id, NULL);
 				copy = g_list_next (copy);
 			}
+
 			my_sessions_cleanup (my_sessions);
 		}
+
 		g_hash_table_remove (sessions, prev_owner);
 	}
 }
@@ -267,43 +278,48 @@
  * Functions
  */
 void 
-tracker_dbus_xesam_new_session (TrackerDBusXesam    *object,
-				  DBusGMethodInvocation *context)
+tracker_xesam_new_session (TrackerXesam          *object,
+			   DBusGMethodInvocation *context)
 {
-	gchar *session_id = NULL;
-	guint request_id = tracker_dbus_get_next_request_id ();
-	GError *error = NULL;
-	GList *my_sessions;
-	gchar *key = dbus_g_method_get_sender (context);
-	gboolean insert = FALSE;
+	GList    *my_sessions;
+	GError   *error = NULL;
+	gchar    *session_id = NULL;
+	guint     request_id;
+	gchar    *key;
+	gboolean  insert = FALSE;
+
+	request_id = tracker_dbus_get_next_request_id ();
+	key = dbus_g_method_get_sender (context);
 
 	if (!sessions)
-		sessions = g_hash_table_new_full (g_str_hash, g_str_equal, 
-				(GDestroyNotify) g_free, NULL);
+		sessions = g_hash_table_new_full (g_str_hash, 
+						  g_str_equal, 
+						  (GDestroyNotify) g_free, 
+						  NULL);
 
 	my_sessions = g_hash_table_lookup (sessions, key);
 
 	if (!my_sessions)
 		insert = TRUE;
 
-	tracker_xesam_create_session (object, &session_id, &error);
+	tracker_xesam_manager_create_session (object, &session_id, &error);
 
 	if (error) {
 		dbus_g_method_return_error (context, error);
 		g_error_free (error);
 	} else {
-			my_sessions = g_list_prepend (my_sessions, 
-				g_strdup (session_id));
-
-			if (insert)
-				g_hash_table_insert (sessions, 
-					g_strdup (key), 
-					my_sessions);
-			else
-				g_hash_table_replace (sessions, 
-					g_strdup (key), 
-					my_sessions);
-
+		my_sessions = g_list_prepend (my_sessions, 
+					      g_strdup (session_id));
+		
+		if (insert)
+			g_hash_table_insert (sessions, 
+					     g_strdup (key), 
+					     my_sessions);
+		else
+			g_hash_table_replace (sessions, 
+					      g_strdup (key), 
+					      my_sessions);
+		
 		dbus_g_method_return (context, session_id);
 
 		g_message ("Created new xesam session: %s", session_id);
@@ -316,35 +332,43 @@
 }
 
 void 
-tracker_dbus_xesam_close_session (TrackerDBusXesam    *object,
-				    const gchar           *session_id,
-				    DBusGMethodInvocation *context)
+tracker_xesam_close_session (TrackerXesam          *object,
+			     const gchar           *session_id,
+			     DBusGMethodInvocation *context)
 {
-	guint request_id = tracker_dbus_get_next_request_id ();
 	GError *error = NULL;
-	gchar *key = dbus_g_method_get_sender (context);
+	gchar  *key;
+	guint   request_id;
 
-	tracker_dbus_xesam_close_session_interal (session_id, &error);
+	request_id = tracker_dbus_get_next_request_id ();
+	key = dbus_g_method_get_sender (context);
+	tracker_xesam_close_session_interal (session_id, &error);
 
 	if (error) {
 		dbus_g_method_return_error (context, error);
 		g_error_free (error);
 	} else {
 		if (sessions) {
-			GList *my_sessions = g_hash_table_lookup (sessions, key);
+			GList *my_sessions;
+
+			my_sessions = g_hash_table_lookup (sessions, key);
+
 			if (my_sessions) {
+				GList *found;
 
-				GList *found = g_list_find_custom (my_sessions, session_id, 
-					(GCompareFunc) strcmp);
+				found = g_list_find_custom (my_sessions, 
+							    session_id, 
+							    (GCompareFunc) strcmp);
 
 				if (found) {
 					g_free (found->data);
 					my_sessions = g_list_delete_link (my_sessions, found);
 					g_hash_table_replace (sessions, 
-						g_strdup (key), 
-						my_sessions);
+							      g_strdup (key), 
+							      my_sessions);
 				}
 			}
+
 			g_hash_table_remove (sessions, key);
 		}
 
@@ -356,24 +380,29 @@
 }
 
 void 
-tracker_dbus_xesam_set_property (TrackerDBusXesam    *object,
-				   const gchar           *session_id,
-				   const gchar           *prop,
-				   GValue                *val, 
-				   DBusGMethodInvocation *context)
-{
-	guint request_id = tracker_dbus_get_next_request_id ();
-	GError *error = NULL;
-	TrackerXesamSession *session = tracker_xesam_get_session (session_id, &error);
+tracker_xesam_set_property (TrackerXesam          *object,
+			    const gchar           *session_id,
+			    const gchar           *prop,
+			    GValue                *val, 
+			    DBusGMethodInvocation *context)
+{
+	TrackerXesamSession *session;
+	GError              *error = NULL;
+	guint                request_id;
+
+	request_id = tracker_dbus_get_next_request_id ();
+	session = tracker_xesam_manager_get_session (session_id, &error);
 
 	if (session) {
 		GValue *new_val = NULL;
 
-		if (error)
-			g_error_free (error);
-		error = NULL;
+		g_clear_error (&error);
 
-		tracker_xesam_session_set_property (session, prop, val, &new_val, &error);
+		tracker_xesam_session_set_property (session, 
+						    prop, 
+						    val, 
+						    &new_val, 
+						    &error);
 
 		if (error) {
 			dbus_g_method_return_error (context, error);
@@ -396,23 +425,27 @@
 }
 
 void
-tracker_dbus_xesam_get_property (TrackerDBusXesam    *object,
-				   const gchar           *session_id,
-				   const gchar           *prop,
-				   DBusGMethodInvocation *context)
-{
-	guint request_id = tracker_dbus_get_next_request_id ();
-	GError *error = NULL;
-	TrackerXesamSession *session = tracker_xesam_get_session (session_id, &error);
+tracker_xesam_get_property (TrackerXesam          *object,
+			    const gchar           *session_id,
+			    const gchar           *prop,
+			    DBusGMethodInvocation *context)
+{
+	TrackerXesamSession *session;
+	GError              *error = NULL;
+	guint                request_id;
+
+	request_id = tracker_dbus_get_next_request_id ();
+	session = tracker_xesam_manager_get_session (session_id, &error);
 
 	if (session) {
 		GValue *value = NULL;
 
-		if (error)
-			g_error_free (error);
-		error = NULL;
+		g_clear_error (&error);
 
-		tracker_xesam_session_get_property (session, prop, &value, &error);
+		tracker_xesam_session_get_property (session, 
+						    prop, 
+						    &value, 
+						    &error);
 
 		if (error) {
 			dbus_g_method_return_error (context, error);
@@ -434,30 +467,31 @@
 		g_object_unref (session);
 
 	tracker_dbus_request_success (request_id);
-
-	return;
 }
 
-
 void
-tracker_dbus_xesam_new_search (TrackerDBusXesam    *object,
-				 const gchar           *session_id,
-				 const gchar           *query_xml,
-				 DBusGMethodInvocation *context)
-{
-	guint request_id = tracker_dbus_get_next_request_id ();
-	GError *error = NULL;
-	TrackerXesamSession *session = tracker_xesam_get_session (session_id, &error);
+tracker_xesam_new_search (TrackerXesam          *object,
+			  const gchar           *session_id,
+			  const gchar           *query_xml,
+			  DBusGMethodInvocation *context)
+{
+	TrackerXesamSession *session;
+	GError              *error = NULL;
+	guint                request_id;
+
+	request_id = tracker_dbus_get_next_request_id ();
+	session = tracker_xesam_manager_get_session (session_id, &error);
 
 	if (session) {
 		TrackerXesamLiveSearch *search;
-		gchar *search_id = NULL;
+		gchar                  *search_id = NULL;
 
-		if (error)
-			g_error_free (error);
-		error = NULL;
+		g_clear_error (&error);
 
-		search = tracker_xesam_session_create_search (session, query_xml, &search_id, &error);
+		search = tracker_xesam_session_create_search (session, 
+							      query_xml, 
+							      &search_id,
+							      &error);
 
 		if (error) {
 			dbus_g_method_return_error (context, error);
@@ -468,7 +502,8 @@
 		if (search)
 			g_object_unref (search);
 
-		g_debug("Created new xesam search: %s  for session: %s", search_id, session_id);
+		g_debug ("Created new xesam search: %s  for session: %s",
+			 search_id, session_id);
 
 		g_free (search_id);
 
@@ -484,28 +519,28 @@
 }
 
 void
-tracker_dbus_xesam_start_search (TrackerDBusXesam    *object,
-				   const gchar           *search_id,
-				   DBusGMethodInvocation *context)
-{
-	guint request_id = tracker_dbus_get_next_request_id ();
-	GError *error = NULL;
-	TrackerXesamLiveSearch *search = tracker_xesam_get_live_search (search_id, &error);
+tracker_xesam_start_search (TrackerXesam          *object,
+			    const gchar           *search_id,
+			    DBusGMethodInvocation *context)
+{
+	TrackerXesamLiveSearch *search;
+	GError                 *error = NULL;
+	guint                   request_id;
 
-	if (search) {
+	request_id = tracker_dbus_get_next_request_id ();
+	search = tracker_xesam_manager_get_live_search (search_id, &error);
 
-		if (error)
-			g_error_free (error);
-		error = NULL;
+	if (search) {
+		g_clear_error (&error);
 
 		tracker_xesam_live_search_activate (search, &error);
 
 		if (error) {
 			dbus_g_method_return_error (context, error);
 			g_error_free (error);
-		} else
+		} else {
 			dbus_g_method_return (context);
-
+		}
 	} else if (error) {
 		dbus_g_method_return_error (context, error);
 		g_error_free (error);
@@ -518,29 +553,30 @@
 }
 
 void
-tracker_dbus_xesam_get_hit_count (TrackerDBusXesam  *object,
-				    const gchar         *search_id,
-				    DBusGMethodInvocation *context)
-{
-	guint request_id = tracker_dbus_get_next_request_id ();
-	GError *error = NULL;
-	TrackerXesamLiveSearch *search = tracker_xesam_get_live_search (search_id, &error);
+tracker_xesam_get_hit_count (TrackerXesam          *object,
+			     const gchar           *search_id,
+			     DBusGMethodInvocation *context)
+{
+	TrackerXesamLiveSearch *search;
+	GError                 *error = NULL;
+	guint                   request_id;
+
+	request_id = tracker_dbus_get_next_request_id ();
+	search = tracker_xesam_manager_get_live_search (search_id, &error);
 
 	if (search) {
 		guint count = -1;
 
-		if (error)
-			g_error_free (error);
-		error = NULL;
+		g_clear_error (&error);
 
 		tracker_xesam_live_search_get_hit_count (search, &count, &error);
 
 		if (error) {
 			dbus_g_method_return_error (context, error);
 			g_error_free (error);
-		} else
+		} else {
 			dbus_g_method_return (context, count);
-
+		}
 	} else if (error) {
 		dbus_g_method_return_error (context, error);
 		g_error_free (error);
@@ -574,33 +610,37 @@
 }
 
 void
-tracker_dbus_xesam_get_hits (TrackerDBusXesam    *object,
-			       const gchar           *search_id,
-			       guint                  count,
-			       DBusGMethodInvocation *context)
-{
-	guint request_id = tracker_dbus_get_next_request_id ();
-	GError *error = NULL;
-	TrackerXesamLiveSearch *search = tracker_xesam_get_live_search (search_id, &error);
+tracker_xesam_get_hits (TrackerXesam          *object,
+			const gchar           *search_id,
+			guint                  count,
+			DBusGMethodInvocation *context)
+{
+	TrackerXesamLiveSearch *search;
+	GError                 *error = NULL;
+	guint                   request_id;
+
+	request_id = tracker_dbus_get_next_request_id ();
+	search = tracker_xesam_manager_get_live_search (search_id, &error);
 
 	if (search) {
 		GPtrArray *hits = NULL;
 
-		if (error)
-			g_error_free (error);
-		error = NULL;
+		g_clear_error (&error);
 
-		tracker_xesam_live_search_get_hits (search, count, &hits, &error);
+		tracker_xesam_live_search_get_hits (search, 
+						    count, 
+						    &hits, 
+						    &error);
 
 		if (error) {
 			dbus_g_method_return_error (context, error);
 			g_error_free (error);
-		} else
+		} else {
 			dbus_g_method_return (context, hits);
+		}
 
 		if (hits)
 			freeup_hits_data (hits);
-
 	} else if (error) {
 		dbus_g_method_return_error (context, error);
 		g_error_free (error);
@@ -612,37 +652,40 @@
 	tracker_dbus_request_success (request_id);
 }
 
-
-
 void
-tracker_dbus_xesam_get_range_hits (TrackerDBusXesam    *object,
-				   const gchar           *search_id,
-				   guint                  a,
-				   guint                  b,
-				   DBusGMethodInvocation *context)
-{
-	guint request_id = tracker_dbus_get_next_request_id ();
-	GError *error = NULL;
-	TrackerXesamLiveSearch *search = tracker_xesam_get_live_search (search_id, &error);
+tracker_xesam_get_range_hits (TrackerXesam          *object,
+			      const gchar           *search_id,
+			      guint                  a,
+			      guint                  b,
+			      DBusGMethodInvocation *context)
+{
+	TrackerXesamLiveSearch *search;
+	GError                 *error = NULL;
+	guint                   request_id;
+
+	request_id = tracker_dbus_get_next_request_id ();
+	search = tracker_xesam_manager_get_live_search (search_id, &error);
 
 	if (search) {
 		GPtrArray *hits = NULL;
 
-		if (error)
-			g_error_free (error);
-		error = NULL;
+		g_clear_error (&error);
 
-		tracker_xesam_live_search_get_range_hits (search, a, b, &hits, &error);
+		tracker_xesam_live_search_get_range_hits (search, 
+							  a, 
+							  b, 
+							  &hits, 
+							  &error);
 
 		if (error) {
 			dbus_g_method_return_error (context, error);
 			g_error_free (error);
-		} else 
+		} else  {
 			dbus_g_method_return (context, hits);
+		}
 
 		if (hits)
 			freeup_hits_data (hits);
-
 	} else if (error) {
 		dbus_g_method_return_error (context, error);
 		g_error_free (error);
@@ -656,34 +699,39 @@
 
 
 void 
-tracker_dbus_xesam_get_hit_data (TrackerDBusXesam    *object,
-				   const gchar           *search_id,
-				   GArray                *hit_ids, /* not sure */
-				   GStrv                  fields, 
-				   DBusGMethodInvocation *context)
-{
-	guint request_id = tracker_dbus_get_next_request_id ();
-	GError *error = NULL;
-	TrackerXesamLiveSearch *search = tracker_xesam_get_live_search (search_id, &error);
+tracker_xesam_get_hit_data (TrackerXesam          *object,
+			    const gchar           *search_id,
+			    GArray                *hit_ids, 
+			    GStrv                  fields, 
+			    DBusGMethodInvocation *context)
+{
+	TrackerXesamLiveSearch *search;
+	GError                 *error = NULL;
+	guint                   request_id;
+
+	request_id = tracker_dbus_get_next_request_id ();
+	search = tracker_xesam_manager_get_live_search (search_id, &error);
 
 	if (search) {
 		GPtrArray *hit_data = NULL;
 
-		if (error)
-			g_error_free (error);
-		error = NULL;
+		g_clear_error (&error);
 
-		tracker_xesam_live_search_get_hit_data (search, hit_ids, fields, &hit_data, &error);
+		tracker_xesam_live_search_get_hit_data (search, 
+							hit_ids, 
+							fields, 
+							&hit_data,
+							&error);
 
 		if (error) {
 			dbus_g_method_return_error (context, error);
 			g_error_free (error);
-		} else 
+		} else {
 			dbus_g_method_return (context, hit_data);
+		}
 
 		if (hit_data)
 			freeup_hits_data (hit_data);
-
 	} else if (error) {
 		dbus_g_method_return_error (context, error);
 		g_error_free (error);
@@ -695,38 +743,42 @@
 	tracker_dbus_request_success (request_id);
 }
 
-
-
 void 
-tracker_dbus_xesam_get_range_hit_data (TrackerDBusXesam    *object,
-				       const gchar           *search_id,
-				       guint                  a,
-				       guint                  b,
-				       GStrv                  fields, 
-				       DBusGMethodInvocation *context)
+tracker_xesam_get_range_hit_data (TrackerXesam          *object,
+				  const gchar           *search_id,
+				  guint                  a,
+				  guint                  b,
+				  GStrv                  fields, 
+				  DBusGMethodInvocation *context)
 {
-	guint request_id = tracker_dbus_get_next_request_id ();
-	GError *error = NULL;
-	TrackerXesamLiveSearch *search = tracker_xesam_get_live_search (search_id, &error);
+	TrackerXesamLiveSearch *search;
+	GError                 *error = NULL;
+	guint                   request_id;
+
+	request_id = tracker_dbus_get_next_request_id ();
+	search = tracker_xesam_manager_get_live_search (search_id, &error);
 
 	if (search) {
 		GPtrArray *hit_data = NULL;
 
-		if (error)
-			g_error_free (error);
-		error = NULL;
+		g_clear_error (&error);
 
-		tracker_xesam_live_search_get_range_hit_data (search, a, b, fields, &hit_data, &error);
+		tracker_xesam_live_search_get_range_hit_data (search, 
+							      a, 
+							      b, 
+							      fields, 
+							      &hit_data, 
+							      &error);
 
 		if (error) {
 			dbus_g_method_return_error (context, error);
 			g_error_free (error);
-		} else
+		} else {
 			dbus_g_method_return (context, hit_data);
+		}
 
 		if (hit_data)
 			freeup_hits_data (hit_data);
-
 	} else if (error) {
 		dbus_g_method_return_error (context, error);
 		g_error_free (error);
@@ -739,28 +791,28 @@
 }
 
 void 
-tracker_dbus_xesam_close_search (TrackerDBusXesam    *object,
-				   const gchar           *search_id,
-				   DBusGMethodInvocation *context)
-{
-	guint request_id = tracker_dbus_get_next_request_id ();
-	GError *error = NULL;
-	TrackerXesamLiveSearch *search = tracker_xesam_get_live_search (search_id, &error);
+tracker_xesam_close_search (TrackerXesam          *object,
+			    const gchar           *search_id,
+			    DBusGMethodInvocation *context)
+{
+	TrackerXesamLiveSearch *search;
+	GError                 *error = NULL;
+	guint                   request_id;
 
-	if (search) {
+	request_id = tracker_dbus_get_next_request_id ();
+	search = tracker_xesam_manager_get_live_search (search_id, &error);
 
-		if (error)
-			g_error_free (error);
-		error = NULL;
+	if (search) {
+		g_clear_error (&error);
 
 		tracker_xesam_live_search_close (search, &error);
 
 		if (error) {
 			dbus_g_method_return_error (context, error);
 			g_error_free (error);
-		} else
+		} else {
 			dbus_g_method_return (context);
-
+		}
 	} else if (error) {
 		dbus_g_method_return_error (context, error);
 		g_error_free (error);
@@ -773,13 +825,15 @@
 }
 
 void 
-tracker_dbus_xesam_get_state (TrackerDBusXesam    *object,
-				DBusGMethodInvocation *context)
+tracker_xesam_get_state (TrackerXesam          *object,
+			 DBusGMethodInvocation *context)
 {
-	guint request_id = tracker_dbus_get_next_request_id ();
-	GStrv state_info;
-	gchar **state = g_malloc (sizeof (gchar *) * 1);
+	GStrv   state_info;
+	gchar **state;
+	guint   request_id;
 
+	request_id = tracker_dbus_get_next_request_id ();
+	state = g_malloc (sizeof (gchar*) * 1);
 	state[0] = g_strdup (tracker_status_get_as_string ());
 
 	dbus_g_method_return (context, state_info);
@@ -790,8 +844,8 @@
 }
 
 /**
- * tracker_dbus_xesam_emit_state_changed:
- * @self: A #TrackerDBusXesam
+ * tracker_xesam_emit_state_changed:
+ * @self: A #TrackerXesam
  * @state_info: (in): an array of strings that contain the state
  *
  * Emits the @state-changed signal on the DBus proxy for Xesam.
@@ -806,8 +860,8 @@
  * interface.
  **/
 void 
-tracker_dbus_xesam_emit_state_changed (TrackerDBusXesam *self, 
-				       GStrv               state_info) 
+tracker_xesam_emit_state_changed (TrackerXesam *self, 
+				  GStrv         state_info) 
 {
 	g_signal_emit (self, signals[XESAM_STATE_CHANGED], 0, state_info);
 }

Copied: branches/indexer-split/src/trackerd/tracker-xesam.h (from r1535, /branches/indexer-split/src/trackerd/tracker-dbus-xesam.h)
==============================================================================
--- /branches/indexer-split/src/trackerd/tracker-dbus-xesam.h	(original)
+++ branches/indexer-split/src/trackerd/tracker-xesam.h	Thu May 29 17:51:24 2008
@@ -19,8 +19,8 @@
  * Boston, MA  02110-1301, USA.
  */
 
-#ifndef __TRACKERD_DBUS_XESAM_H__
-#define __TRACKERD_DBUS_XESAM_H__
+#ifndef __TRACKERD_XESAM_H__
+#define __TRACKERD_XESAM_H__
 
 #include <glib-object.h>
 
@@ -29,93 +29,91 @@
 #include "tracker-db-sqlite.h"
 #include "tracker-indexer.h"
 
-#define TRACKER_DBUS_XESAM_SERVICE           "org.freedesktop.xesam.searcher"
-#define TRACKER_DBUS_XESAM_PATH              "/org/freedesktop/xesam/searcher/main"
-#define TRACKER_DBUS_XESAM_INTERFACE         "org.freedesktop.xesam.Search"
+#define TRACKER_XESAM_SERVICE         "org.freedesktop.xesam.searcher"
+#define TRACKER_XESAM_PATH            "/org/freedesktop/xesam/searcher/main"
+#define TRACKER_XESAM_INTERFACE       "org.freedesktop.xesam.Search"
 
 G_BEGIN_DECLS
 
-#define TRACKER_TYPE_DBUS_XESAM              (tracker_dbus_xesam_get_type ())
-#define TRACKER_DBUS_XESAM(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), TRACKER_TYPE_DBUS_XESAM, TrackerDBusXesam))
-#define TRACKER_DBUS_XESAM_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_DBUS_XESAM, TrackerDBusXesamClass))
-#define TRACKER_IS_XESAM_SEARCH(object)      (G_TYPE_CHECK_INSTANCE_TYPE ((object), TRACKER_TYPE_DBUS_XESAM))
-#define TRACKER_IS_XESAM_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_DBUS_XESAM))
-#define TRACKER_DBUS_XESAM_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_DBUS_XESAM, TrackerDBusXesamClass))
+#define TRACKER_TYPE_XESAM            (tracker_xesam_get_type ())
+#define TRACKER_XESAM(object)         (G_TYPE_CHECK_INSTANCE_CAST ((object), TRACKER_TYPE_XESAM, TrackerXesam))
+#define TRACKER_XESAM_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_XESAM, TrackerXesamClass))
+#define TRACKER_IS_XESAM(object)      (G_TYPE_CHECK_INSTANCE_TYPE ((object), TRACKER_TYPE_XESAM))
+#define TRACKER_IS_XESAM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_XESAM))
+#define TRACKER_XESAM_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_XESAM, TrackerXesamClass))
 
+typedef struct TrackerXesam      TrackerXesam;
+typedef struct TrackerXesamClass TrackerXesamClass;
 
-typedef struct TrackerDBusXesam      TrackerDBusXesam;
-typedef struct TrackerDBusXesamClass TrackerDBusXesamClass;
-
-struct TrackerDBusXesam {
+struct TrackerXesam {
 	GObject parent;
 };
 
-struct TrackerDBusXesamClass {
+struct TrackerXesamClass {
 	GObjectClass parent;
 };
 
-GType tracker_dbus_xesam_get_type           (void);
-TrackerDBusXesam *
-      tracker_dbus_xesam_new                (DBConnection          *db_con); 
-void  tracker_dbus_xesam_new_session        (TrackerDBusXesam      *object,
-					     DBusGMethodInvocation *context);
-void  tracker_dbus_xesam_set_property       (TrackerDBusXesam      *object,
-					     const gchar           *session_id,
-					     const gchar           *prop,
-					     GValue                *val,
-					     DBusGMethodInvocation *context);
-void  tracker_dbus_xesam_get_property       (TrackerDBusXesam      *object,
-					     const gchar           *session_id,
-					     const gchar           *prop,
-					     DBusGMethodInvocation *context);
-void  tracker_dbus_xesam_close_session      (TrackerDBusXesam      *object,
-					     const gchar           *session_id,
-					     DBusGMethodInvocation *context);
-void  tracker_dbus_xesam_new_search         (TrackerDBusXesam      *object,
-					     const gchar           *session_id,
-					     const gchar           *query_xml,
-					     DBusGMethodInvocation *context);
-void  tracker_dbus_xesam_start_search       (TrackerDBusXesam      *object,
-					     const gchar           *search_id,
-					     DBusGMethodInvocation *context);
-void  tracker_dbus_xesam_get_hit_count      (TrackerDBusXesam      *object,
-					     const gchar           *search_id,
-					     DBusGMethodInvocation *context);
-void  tracker_dbus_xesam_get_hits           (TrackerDBusXesam      *object,
-					     const gchar           *search_id,
-					     guint                  count,
-					     DBusGMethodInvocation *context);
-void  tracker_dbus_xesam_get_range_hits     (TrackerDBusXesam      *object,
-					     const gchar           *search_id,
-					     guint                  a,
-					     guint                  b,
-					     DBusGMethodInvocation *context);
-void  tracker_dbus_xesam_get_hit_data       (TrackerDBusXesam      *object,
-					     const gchar           *search_id,
-					     GArray                *hit_ids,
-					     GStrv                  fields,
-					     DBusGMethodInvocation *context);
-void  tracker_dbus_xesam_get_range_hit_data (TrackerDBusXesam      *object,
-					     const gchar           *search_id,
-					     guint                  a,
-					     guint                  b,
-					     GStrv                  fields,
-					     DBusGMethodInvocation *context);
-void  tracker_dbus_xesam_close_search       (TrackerDBusXesam      *object,
-					     const gchar           *search_id,
-					     DBusGMethodInvocation *context);
-void  tracker_dbus_xesam_get_state          (TrackerDBusXesam      *object,
-					     DBusGMethodInvocation *context);
-void  tracker_dbus_xesam_emit_state_changed (TrackerDBusXesam      *self,
-					     GStrv                  state_info);
-void  tracker_dbus_xesam_name_owner_changed (DBusGProxy            *proxy,
-					     const char            *name,
-					     const char            *prev_owner,
-					     const char            *new_owner,
-					     TrackerDBusXesam      *self);
-void  tracker_dbus_xesam_set_db_connection  (TrackerDBusXesam      *object,
-					     DBConnection          *db_con);
+GType         tracker_xesam_get_type           (void);
+TrackerXesam *tracker_xesam_new                (DBConnection          *db_con);
+void          tracker_xesam_new_session        (TrackerXesam          *object,
+						DBusGMethodInvocation *context);
+void          tracker_xesam_set_property       (TrackerXesam          *object,
+						const gchar           *session_id,
+						const gchar           *prop,
+						GValue                *val,
+						DBusGMethodInvocation *context);
+void          tracker_xesam_get_property       (TrackerXesam          *object,
+						const gchar           *session_id,
+						const gchar           *prop,
+						DBusGMethodInvocation *context);
+void          tracker_xesam_close_session      (TrackerXesam          *object,
+						const gchar           *session_id,
+						DBusGMethodInvocation *context);
+void          tracker_xesam_new_search         (TrackerXesam          *object,
+						const gchar           *session_id,
+						const gchar           *query_xml,
+						DBusGMethodInvocation *context);
+void          tracker_xesam_start_search       (TrackerXesam          *object,
+						const gchar           *search_id,
+						DBusGMethodInvocation *context);
+void          tracker_xesam_get_hit_count      (TrackerXesam          *object,
+						const gchar           *search_id,
+						DBusGMethodInvocation *context);
+void          tracker_xesam_get_hits           (TrackerXesam          *object,
+						const gchar           *search_id,
+						guint                  count,
+						DBusGMethodInvocation *context);
+void          tracker_xesam_get_range_hits     (TrackerXesam          *object,
+						const gchar           *search_id,
+						guint                  a,
+						guint                  b,
+						DBusGMethodInvocation *context);
+void          tracker_xesam_get_hit_data       (TrackerXesam          *object,
+						const gchar           *search_id,
+						GArray                *hit_ids,
+						GStrv                  fields,
+						DBusGMethodInvocation *context);
+void          tracker_xesam_get_range_hit_data (TrackerXesam          *object,
+						const gchar           *search_id,
+						guint                  a,
+						guint                  b,
+						GStrv                  fields,
+						DBusGMethodInvocation *context);
+void          tracker_xesam_close_search       (TrackerXesam          *object,
+						const gchar           *search_id,
+						DBusGMethodInvocation *context);
+void          tracker_xesam_get_state          (TrackerXesam          *object,
+						DBusGMethodInvocation *context);
+void          tracker_xesam_emit_state_changed (TrackerXesam          *self,
+						GStrv                  state_info);
+void          tracker_xesam_name_owner_changed (DBusGProxy            *proxy,
+						const char            *name,
+						const char            *prev_owner,
+						const char            *new_owner,
+						TrackerXesam          *self);
+void          tracker_xesam_set_db_connection  (TrackerXesam          *object,
+						DBConnection          *db_con);
 
 G_END_DECLS
 
-#endif /* __TRACKERD_DBUS_XESAM_H__ */
+#endif /* __TRACKERD_XESAM_H__ */



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