[tracker/architecture-sparql-up-in-daemon] Added comments to indicate further refactoring work
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: svn-commits-list gnome org
- Subject: [tracker/architecture-sparql-up-in-daemon] Added comments to indicate further refactoring work
- Date: Thu, 23 Apr 2009 06:28:07 -0400 (EDT)
commit 6619562af60e396ed6ab34d3f982bf1271a0b842
Author: Philip Van Hoof <philip codeminded be>
Date: Thu Apr 23 12:26:51 2009 +0200
Added comments to indicate further refactoring work
I added comments where further refactoring work is needed as soon as another
task is completed (removing all DB writes from tracker-indexer must be
finished before the TODO items can be solved)
---
src/libtracker-common/tracker-events.c | 3 +++
src/libtracker-common/tracker-events.h | 3 +++
src/tracker-indexer/tracker-indexer.c | 11 +++++++++++
src/tracker-indexer/tracker-indexer.h | 2 ++
src/trackerd/tracker-main.c | 2 --
src/trackerd/tracker-resource-class.c | 4 ++++
src/trackerd/tracker-resource-class.h | 6 ++++++
src/trackerd/tracker-resources.c | 4 ++++
8 files changed, 33 insertions(+), 2 deletions(-)
diff --git a/src/libtracker-common/tracker-events.c b/src/libtracker-common/tracker-events.c
index 1c2df13..9cd7d61 100644
--- a/src/libtracker-common/tracker-events.c
+++ b/src/libtracker-common/tracker-events.c
@@ -21,6 +21,9 @@
* Philip Van Hoof <philip codeminded be>
*/
+/* TODO: once all writes are vanished from tracker-indexer, we can move this
+ * file from src/libtracker-common/ to src/trackerd */
+
#include "config.h"
#include <libtracker-common/tracker-ontology.h>
diff --git a/src/libtracker-common/tracker-events.h b/src/libtracker-common/tracker-events.h
index 9c0197a..70d36cb 100644
--- a/src/libtracker-common/tracker-events.h
+++ b/src/libtracker-common/tracker-events.h
@@ -24,6 +24,9 @@
#ifndef __TRACKER_INDEXER_EVENTS_H__
#define __TRACKER_INDEXER_EVENTS_H__
+/* TODO: once all writes are vanished from tracker-indexer, we can move this
+ * file from src/libtracker-common/ to src/trackerd */
+
#include <libtracker-common/tracker-dbus.h>
G_BEGIN_DECLS
diff --git a/src/tracker-indexer/tracker-indexer.c b/src/tracker-indexer/tracker-indexer.c
index 1c4fe0d..9ddb09a 100644
--- a/src/tracker-indexer/tracker-indexer.c
+++ b/src/tracker-indexer/tracker-indexer.c
@@ -68,6 +68,9 @@
#include <libtracker-common/tracker-module-config.h>
#include <libtracker-common/tracker-utils.h>
#include <libtracker-common/tracker-thumbnailer.h>
+
+/* TODO: We can remove this include as soon as all writes are vanished from tracker-indexer */
+
#include <libtracker-common/tracker-events.h>
#include <libtracker-db/tracker-db-dbus.h>
@@ -226,6 +229,8 @@ static guint signals[LAST_SIGNAL] = { 0, };
G_DEFINE_TYPE (TrackerIndexer, tracker_indexer, G_TYPE_OBJECT)
+/* TODO: We can remove this as soon as all writes are vanished from tracker-indexer */
+
static void
on_statements_committed (gpointer user_data)
{
@@ -239,6 +244,8 @@ on_statements_committed (gpointer user_data)
tracker_events_reset ();
}
+/* TODO: We can remove this as soon as all writes are vanished from tracker-indexer */
+
static void
on_statement_inserted (const gchar *subject,
const gchar *predicate,
@@ -253,6 +260,8 @@ on_statement_inserted (const gchar *subject,
}
}
+/* TODO: We can remove this as soon as all writes are vanished from tracker-indexer */
+
static void
on_statement_deleted (const gchar *subject,
const gchar *predicate,
@@ -952,6 +961,8 @@ tracker_indexer_init (TrackerIndexer *indexer)
priv = indexer->private = TRACKER_INDEXER_GET_PRIVATE (indexer);
+ /* TODO: We can remove these three as soon as all writes are vanished from tracker-indexer */
+
tracker_data_set_insert_statement_callback (on_statement_inserted, indexer);
tracker_data_set_delete_statement_callback (on_statement_deleted, indexer);
tracker_data_set_commit_statement_callback (on_statements_committed, indexer);
diff --git a/src/tracker-indexer/tracker-indexer.h b/src/tracker-indexer/tracker-indexer.h
index be28561..3a49882 100644
--- a/src/tracker-indexer/tracker-indexer.h
+++ b/src/tracker-indexer/tracker-indexer.h
@@ -150,6 +150,8 @@ void tracker_indexer_shutdown (TrackerIndexer *ind
DBusGMethodInvocation *context,
GError **error);
+/* TODO: We can remove this as soon as all writes are vanished from tracker-indexer */
+
GStrv tracker_indexer_get_notifiable_classes (void);
G_END_DECLS
diff --git a/src/trackerd/tracker-main.c b/src/trackerd/tracker-main.c
index 94aa478..aacdc16 100644
--- a/src/trackerd/tracker-main.c
+++ b/src/trackerd/tracker-main.c
@@ -55,12 +55,10 @@
#include <libtracker-common/tracker-events.h>
#include <libtracker-db/tracker-db-manager.h>
-#include <libtracker-db/tracker-db-dbus.h>
#include <libtracker-data/tracker-data-manager.h>
#include <libtracker-data/tracker-turtle.h>
#include <libtracker-data/tracker-data-backup.h>
-#include <libtracker-data/tracker-data-query.h>
#include <tracker-push.h>
diff --git a/src/trackerd/tracker-resource-class.c b/src/trackerd/tracker-resource-class.c
index 82776e6..1f98e4c 100644
--- a/src/trackerd/tracker-resource-class.c
+++ b/src/trackerd/tracker-resource-class.c
@@ -170,6 +170,8 @@ tracker_resource_class_get_rdf_class (TrackerResourceClass *object)
return priv->rdf_class;
}
+/* TODO: Make this one a static as soon as all writes are vanished from tracker-indexer */
+
void
tracker_resource_class_add_event (TrackerResourceClass *object,
const gchar *uri,
@@ -230,6 +232,8 @@ free_array (GPtrArray *array)
g_ptr_array_free (array, TRUE);
}
+/* TODO: Make this one a static as soon as all writes are vanished from tracker-indexer */
+
void
tracker_resource_class_emit_events (TrackerResourceClass *object)
{
diff --git a/src/trackerd/tracker-resource-class.h b/src/trackerd/tracker-resource-class.h
index 0c8eb5f..fc7179d 100644
--- a/src/trackerd/tracker-resource-class.h
+++ b/src/trackerd/tracker-resource-class.h
@@ -55,9 +55,15 @@ GType tracker_resource_class_get_type (void);
TrackerResourceClass *tracker_resource_class_new (const gchar *rdf_class);
const gchar * tracker_resource_class_get_rdf_class (TrackerResourceClass *object);
+
+/* TODO: We can remove this as soon as all writes are vanished from tracker-indexer */
+
void tracker_resource_class_add_event (TrackerResourceClass *object,
const gchar *uri,
TrackerDBusEventsType type);
+
+/* TODO: We can remove this as soon as all writes are vanished from tracker-indexer */
+
void tracker_resource_class_emit_events (TrackerResourceClass *object);
G_END_DECLS
diff --git a/src/trackerd/tracker-resources.c b/src/trackerd/tracker-resources.c
index 7fa07b8..55a2ec8 100644
--- a/src/trackerd/tracker-resources.c
+++ b/src/trackerd/tracker-resources.c
@@ -89,6 +89,8 @@ tracker_resources_class_init (TrackerResourcesClass *klass)
}
+/* TODO: We can remove this one as soon as all writes are vanished from tracker-indexer */
+
static void
event_happened_cb (DBusGProxy *proxy,
GPtrArray *events,
@@ -138,6 +140,8 @@ tracker_resources_init (TrackerResources *object)
priv->indexer_proxy = g_object_ref (proxy);
+ /* TODO: We can remove this as soon as all writes are vanished from tracker-indexer */
+
dbus_g_proxy_connect_signal (proxy, "EventHappened",
G_CALLBACK (event_happened_cb),
object,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]