[tracker/miner-fs-refactor: 33/101] libtracker-miner: Create signals for TrackerFileNotifier



commit d91c24c68b962cde9a89161209429544969bd298
Author: Carlos Garnacho <carlos lanedo com>
Date:   Wed Sep 28 17:39:44 2011 +0200

    libtracker-miner: Create signals for TrackerFileNotifier

 src/libtracker-miner/tracker-file-notifier.c |   41 ++++++++++++++++++++++++++
 1 files changed, 41 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-file-notifier.c b/src/libtracker-miner/tracker-file-notifier.c
index cf9ba82..e5f627b 100644
--- a/src/libtracker-miner/tracker-file-notifier.c
+++ b/src/libtracker-miner/tracker-file-notifier.c
@@ -31,6 +31,16 @@ enum {
 	PROP_INDEXING_TREE
 };
 
+enum {
+	FILE_CREATED,
+	FILE_UPDATED,
+	FILE_DELETED,
+	FILE_MOVED,
+	LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
 typedef struct {
 	TrackerIndexingTree *indexing_tree;
 	TrackerFileSystem *file_system;
@@ -353,6 +363,37 @@ tracker_file_notifier_class_init (TrackerFileNotifierClass *klass)
 	object_class->get_property = tracker_file_notifier_get_property;
 	object_class->constructed = tracker_file_notifier_constructed;
 
+	signals[FILE_CREATED] =
+		g_signal_new ("file-created",
+		              G_TYPE_FROM_CLASS (klass),
+		              G_SIGNAL_RUN_LAST,
+		              G_STRUCT_OFFSET (TrackerFileNotifierClass,
+					       file_created),
+			      NULL, NULL,
+		              g_cclosure_marshal_VOID__OBJECT,
+		              G_TYPE_NONE,
+		              1, G_TYPE_FILE);
+	signals[FILE_UPDATED] =
+		g_signal_new ("file-updated",
+		              G_TYPE_FROM_CLASS (klass),
+		              G_SIGNAL_RUN_LAST,
+		              G_STRUCT_OFFSET (TrackerFileNotifierClass,
+					       file_updated),
+			      NULL, NULL,
+		              g_cclosure_marshal_VOID__OBJECT,
+		              G_TYPE_NONE,
+		              1, G_TYPE_FILE);
+	signals[FILE_DELETED] =
+		g_signal_new ("file-deleted",
+		              G_TYPE_FROM_CLASS (klass),
+		              G_SIGNAL_RUN_LAST,
+		              G_STRUCT_OFFSET (TrackerFileNotifierClass,
+					       file_deleted),
+			      NULL, NULL,
+		              g_cclosure_marshal_VOID__OBJECT,
+		              G_TYPE_NONE,
+		              1, G_TYPE_FILE);
+
 	g_object_class_install_property (object_class,
 	                                 PROP_INDEXING_TREE,
 	                                 g_param_spec_object ("indexing-tree",



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