[tracker/miner-fs-refactor: 40/101] libtracker-miner: Add "attributes_only" parameter to TrackerFileNotifer::file-updated



commit 2a98496205349743fa283a81c678b7e473bc8122
Author: Carlos Garnacho <carlos lanedo com>
Date:   Thu Sep 29 15:48:00 2011 +0200

    libtracker-miner: Add "attributes_only" parameter to TrackerFileNotifer::file-updated
    
    This is so we use the same signal on both file and file attributes updates

 src/libtracker-miner/tracker-file-notifier.c |    8 +++++---
 src/libtracker-miner/tracker-file-notifier.h |    3 ++-
 2 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-file-notifier.c b/src/libtracker-miner/tracker-file-notifier.c
index ebfb715..3f54891 100644
--- a/src/libtracker-miner/tracker-file-notifier.c
+++ b/src/libtracker-miner/tracker-file-notifier.c
@@ -26,6 +26,7 @@
 #include "tracker-file-system.h"
 #include "tracker-crawler.h"
 #include "tracker-monitor.h"
+#include "tracker-marshal.h"
 
 static GQuark quark_property_crawled = 0;
 static GQuark quark_property_queried = 0;
@@ -201,8 +202,9 @@ file_notifier_traverse_tree_foreach (TrackerFile *file,
 	} else if (store_mtime && disk_mtime &&
 		   strcmp (store_mtime, disk_mtime) != 0) {
 		/* Mtime changed, update */
-		g_signal_emit (notifier, signals[FILE_UPDATED], 0, f);
+		g_signal_emit (notifier, signals[FILE_UPDATED], 0, f, FALSE);
 	} else if (!store_mtime && !disk_mtime) {
+		/* what are we doing with such file? shouldn't happen */
 		g_assert_not_reached ();
 	}
 
@@ -589,9 +591,9 @@ tracker_file_notifier_class_init (TrackerFileNotifierClass *klass)
 		              G_STRUCT_OFFSET (TrackerFileNotifierClass,
 					       file_updated),
 			      NULL, NULL,
-		              g_cclosure_marshal_VOID__OBJECT,
+		              tracker_marshal_VOID__OBJECT_BOOLEAN,
 		              G_TYPE_NONE,
-		              1, G_TYPE_FILE);
+		              2, G_TYPE_FILE, G_TYPE_BOOLEAN);
 	signals[FILE_DELETED] =
 		g_signal_new ("file-deleted",
 		              G_TYPE_FROM_CLASS (klass),
diff --git a/src/libtracker-miner/tracker-file-notifier.h b/src/libtracker-miner/tracker-file-notifier.h
index 22e47e2..674c81a 100644
--- a/src/libtracker-miner/tracker-file-notifier.h
+++ b/src/libtracker-miner/tracker-file-notifier.h
@@ -52,7 +52,8 @@ struct _TrackerFileNotifierClass {
 	void (* file_created) (TrackerFileNotifier *notifier,
 			       GFile               *file);
 	void (* file_updated) (TrackerFileNotifier *notifier,
-			       GFile               *file);
+	                       GFile               *file,
+	                       gboolean             attributes_only);
 	void (* file_deleted) (TrackerFileNotifier *notifier,
 			       GFile               *file);
 	void (* file_moved)   (TrackerFileNotifier *notifier,



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