[tracker/dbus-fd-experiment-gio: 18/41] Steroids server: add BatchSparqlUpdate



commit 740412210c4be5d02b67e53315eef8493e04cdab
Author: Adrien Bustany <abustany gnome org>
Date:   Thu Jun 3 13:24:51 2010 -0400

    Steroids server: add BatchSparqlUpdate

 src/tracker-store/tracker-steroids.c |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/src/tracker-store/tracker-steroids.c b/src/tracker-store/tracker-steroids.c
index 2122f78..2587a40 100644
--- a/src/tracker-store/tracker-steroids.c
+++ b/src/tracker-store/tracker-steroids.c
@@ -525,6 +525,7 @@ static void
 tracker_steroids_update (TrackerSteroids *steroids,
                          DBusConnection  *connection,
                          DBusMessage     *message,
+                         gboolean         batch,
                          gboolean         update_blank)
 {
 	DBusError               dbus_error;
@@ -587,7 +588,9 @@ tracker_steroids_update (TrackerSteroids *steroids,
 		                                   update_blank_callback, sender,
 		                                   info, destroy_client_info);
 	} else {
-		tracker_store_sparql_update (query, TRACKER_STORE_PRIORITY_HIGH, FALSE,
+		tracker_store_sparql_update (query,
+		                             batch ? TRACKER_STORE_PRIORITY_LOW : TRACKER_STORE_PRIORITY_HIGH,
+		                             FALSE,
 		                             update_callback, sender,
 		                             info, destroy_client_info);
 	}
@@ -616,12 +619,17 @@ tracker_steroids_connection_filter (DBusConnection *connection,
 	}
 
 	if (!g_strcmp0 ("Update", dbus_message_get_member (message))) {
-		tracker_steroids_update (steroids, connection, message, FALSE);
+		tracker_steroids_update (steroids, connection, message, FALSE, FALSE);
 		return DBUS_HANDLER_RESULT_HANDLED;
 	}
 
 	if (!g_strcmp0 ("UpdateBlank", dbus_message_get_member (message))) {
-		tracker_steroids_update (steroids, connection, message, TRUE);
+		tracker_steroids_update (steroids, connection, message, FALSE, TRUE);
+		return DBUS_HANDLER_RESULT_HANDLED;
+	}
+
+	if (!g_strcmp0 ("BatchUpdate", dbus_message_get_member (message))) {
+		tracker_steroids_update (steroids, connection, message, TRUE, FALSE);
 		return DBUS_HANDLER_RESULT_HANDLED;
 	}
 



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