[tracker/wal: 6/24] tracker-store: Store sender for turtle import tasks as well



commit 156ed534ee6ebaf5ef709e375fd37b1a0bc26fba
Author: Jürg Billeter <j bitron ch>
Date:   Wed Jun 30 17:00:40 2010 +0200

    tracker-store: Store sender for turtle import tasks as well

 src/tracker-store/tracker-resources.c |    6 +++++-
 src/tracker-store/tracker-store.c     |    2 ++
 src/tracker-store/tracker-store.h     |    1 +
 3 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/tracker-store/tracker-resources.c b/src/tracker-store/tracker-resources.c
index ef733ec..0edcd9f 100644
--- a/src/tracker-store/tracker-resources.c
+++ b/src/tracker-store/tracker-resources.c
@@ -183,6 +183,7 @@ tracker_resources_load (TrackerResources         *object,
 	TrackerDBusMethodInfo   *info;
 	guint                    request_id;
 	GFile  *file;
+	gchar *sender;
 
 	request_id = tracker_dbus_get_next_request_id ();
 
@@ -201,9 +202,12 @@ tracker_resources_load (TrackerResources         *object,
 	info->request_id = request_id;
 	info->context = context;
 
+	sender = dbus_g_method_get_sender (context);
+
 	tracker_store_queue_turtle_import (file, turtle_import_callback,
-	                                   info, destroy_method_info);
+	                                   sender, info, destroy_method_info);
 
+	g_free (sender);
 	g_object_unref (file);
 }
 
diff --git a/src/tracker-store/tracker-store.c b/src/tracker-store/tracker-store.c
index 44db9c1..da60d63 100644
--- a/src/tracker-store/tracker-store.c
+++ b/src/tracker-store/tracker-store.c
@@ -585,6 +585,7 @@ tracker_store_sparql_update_blank (const gchar *sparql,
 void
 tracker_store_queue_turtle_import (GFile                      *file,
                                    TrackerStoreTurtleCallback  callback,
+                                   const gchar                *client_id,
                                    gpointer                    user_data,
                                    GDestroyNotify              destroy)
 {
@@ -602,6 +603,7 @@ tracker_store_queue_turtle_import (GFile                      *file,
 	task->user_data = user_data;
 	task->callback.update_callback = callback;
 	task->destroy = destroy;
+	task->client_id = g_strdup (client_id);
 
 	g_queue_push_tail (private->update_queues[TRACKER_STORE_PRIORITY_TURTLE], task);
 
diff --git a/src/tracker-store/tracker-store.h b/src/tracker-store/tracker-store.h
index 8071ff5..50c9fc1 100644
--- a/src/tracker-store/tracker-store.h
+++ b/src/tracker-store/tracker-store.h
@@ -75,6 +75,7 @@ void         tracker_store_sparql_update_blank    (const gchar   *sparql,
                                                    GDestroyNotify destroy);
 void         tracker_store_queue_turtle_import    (GFile         *file,
                                                    TrackerStoreTurtleCallback callback,
+                                                   const gchar   *client_id,
                                                    gpointer       user_data,
                                                    GDestroyNotify destroy);
 



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