[tracker/architecture-sparql-up-in-daemon: 2/2] Removed the SPARQL UPDATE functions from tracker-indexer



commit 163f58b4dd66589b2d52f615538dc2cbd714aa81
Author: Philip Van Hoof <philip codeminded be>
Date:   Thu Apr 23 11:21:35 2009 +0200

    Removed the SPARQL UPDATE functions from tracker-indexer
---
 data/dbus/tracker-indexer.xml         |   22 -------
 src/tracker-indexer/tracker-indexer.c |  100 ---------------------------------
 src/tracker-indexer/tracker-indexer.h |   17 +-----
 3 files changed, 1 insertions(+), 138 deletions(-)

diff --git a/data/dbus/tracker-indexer.xml b/data/dbus/tracker-indexer.xml
index 1594783..876d500 100644
--- a/data/dbus/tracker-indexer.xml
+++ b/data/dbus/tracker-indexer.xml
@@ -49,28 +49,6 @@
       <arg type="b" name="enabled" direction="in" />
     </method>
 
-    <!-- Insert single statement -->
-    <method name="InsertStatement">
-      <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/> 
-      <arg type="s" name="subject" direction="in" />
-      <arg type="s" name="predicate" direction="in" />
-      <arg type="s" name="object" direction="in" />
-    </method>
-
-    <!-- Delete single statement -->
-    <method name="DeleteStatement">
-      <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/> 
-      <arg type="s" name="subject" direction="in" />
-      <arg type="s" name="predicate" direction="in" />
-      <arg type="s" name="object" direction="in" />
-    </method>
-
-    <!-- SPARQL Update extensions, allows bulk insert and delete -->
-    <method name="SparqlUpdate">
-      <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/>
-      <arg type="s" name="query" direction="in" />
-    </method>
-
     <method name="Pause">
       <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/>
     </method>
diff --git a/src/tracker-indexer/tracker-indexer.c b/src/tracker-indexer/tracker-indexer.c
index 1e44beb..b1b5699 100644
--- a/src/tracker-indexer/tracker-indexer.c
+++ b/src/tracker-indexer/tracker-indexer.c
@@ -2447,106 +2447,6 @@ tracker_indexer_volume_update_state (TrackerIndexer         *indexer,
 
 }
 
-void
-tracker_indexer_insert_statement (TrackerIndexer	     *indexer,
-			          const gchar	     *subject,
-			          const gchar	     *predicate,
-			          const gchar	     *object,
-			          DBusGMethodInvocation  *context,
-			          GError		    **error)
-{
-	guint	request_id;
-
-	request_id = tracker_dbus_get_next_request_id ();
-
-	tracker_dbus_async_return_if_fail (TRACKER_IS_INDEXER (indexer), context);
-	tracker_dbus_async_return_if_fail (subject != NULL, context);
-	tracker_dbus_async_return_if_fail (predicate != NULL, context);
-	tracker_dbus_async_return_if_fail (object != NULL, context);
-
-	tracker_dbus_request_new (request_id,
-				  "DBus request to insert statement: "
-				  "'%s' '%s' '%s'",
-				  subject,
-				  predicate,
-				  object);
-
-	schedule_flush (indexer, TRUE);
-
-	tracker_data_insert_statement (subject, predicate, object);
-
-	dbus_g_method_return (context);
-	tracker_dbus_request_success (request_id);
-}
-
-void
-tracker_indexer_delete_statement (TrackerIndexer	     *indexer,
-			          const gchar	     *subject,
-			          const gchar	     *predicate,
-			          const gchar	     *object,
-			          DBusGMethodInvocation  *context,
-			          GError		    **error)
-{
-	guint	request_id;
-
-	request_id = tracker_dbus_get_next_request_id ();
-
-	tracker_dbus_async_return_if_fail (TRACKER_IS_INDEXER (indexer), context);
-	tracker_dbus_async_return_if_fail (subject != NULL, context);
-	tracker_dbus_async_return_if_fail (predicate != NULL, context);
-	tracker_dbus_async_return_if_fail (object != NULL, context);
-
-	tracker_dbus_request_new (request_id,
-				  "DBus request to delete statement: "
-				  "'%s' '%s' '%s'",
-				  subject,
-				  predicate,
-				  object);
-
-	schedule_flush (indexer, TRUE);
-
-	tracker_data_delete_statement (subject, predicate, object);
-
-	dbus_g_method_return (context);
-	tracker_dbus_request_success (request_id);
-}
-
-void
-tracker_indexer_sparql_update (TrackerIndexer	         *indexer,
-			       const gchar	         *update,
-			       DBusGMethodInvocation	 *context,
-			       GError			**error)
-{
-	GError 		     *actual_error = NULL;
-	guint		      request_id;
-
-	request_id = tracker_dbus_get_next_request_id ();
-
-	tracker_dbus_async_return_if_fail (update != NULL, context);
-
-	tracker_dbus_request_new (request_id,
-				  "DBus request for SPARQL Update, "
-				  "update:'%s'",
-				  update);
-
-	schedule_flush (indexer, TRUE);
-
-	tracker_data_update_sparql (update, &actual_error);
-
-	if (actual_error) {
-		tracker_dbus_request_failed (request_id,
-					     &actual_error,
-					     NULL);
-		dbus_g_method_return_error (context, actual_error);
-		g_error_free (actual_error);
-		return;
-	}
-
-	dbus_g_method_return (context);
-
-	tracker_dbus_request_success (request_id);
-}
-
 static void
 restore_backup_cb (const gchar *subject,
 		   const gchar *predicate,
diff --git a/src/tracker-indexer/tracker-indexer.h b/src/tracker-indexer/tracker-indexer.h
index fd13613..be28561 100644
--- a/src/tracker-indexer/tracker-indexer.h
+++ b/src/tracker-indexer/tracker-indexer.h
@@ -141,22 +141,7 @@ void            tracker_indexer_volume_update_state (TrackerIndexer         *ind
 						     gboolean                enabled,
 						     DBusGMethodInvocation  *context,
 						     GError                **error);
-void            tracker_indexer_insert_statement    (TrackerIndexer         *indexer,
-						     const gchar            *subject,
-						     const gchar            *predicate,
-						     const gchar            *object,
-						     DBusGMethodInvocation  *context,
-						     GError                **error);
-void            tracker_indexer_delete_statement    (TrackerIndexer         *indexer,
-						     const gchar            *subject,
-						     const gchar            *predicate,
-						     const gchar            *object,
-						     DBusGMethodInvocation  *context,
-						     GError                **error);
-void		tracker_indexer_sparql_update	    (TrackerIndexer         *indexer,
-						     const gchar	    *update,
-						     DBusGMethodInvocation  *context,
-						     GError		   **error);
+
 void            tracker_indexer_restore_backup      (TrackerIndexer         *indexer,
 						     const gchar            *backup_file,
 						     DBusGMethodInvocation  *context,



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