[tracker/miner-fs-refactor: 50/120] libtracker-miner: Add tracker_file_notifier_is_active()



commit ed76ec2d1408addf14e48732b3e5aa64de5f97a1
Author: Carlos Garnacho <carlos lanedo com>
Date:   Fri Sep 30 12:02:51 2011 +0200

    libtracker-miner: Add tracker_file_notifier_is_active()
    
    Just a boolean getter telling whether the notifier is currently
    doing something

 src/libtracker-miner/tracker-file-notifier.c |   11 +++++++++++
 src/libtracker-miner/tracker-file-notifier.h |    2 ++
 2 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-file-notifier.c b/src/libtracker-miner/tracker-file-notifier.c
index c196c4b..d95eb91 100644
--- a/src/libtracker-miner/tracker-file-notifier.c
+++ b/src/libtracker-miner/tracker-file-notifier.c
@@ -1141,3 +1141,14 @@ tracker_file_notifier_stop (TrackerFileNotifier *notifier)
 		priv->stopped = TRUE;
 	}
 }
+
+gboolean
+tracker_file_notifier_is_active (TrackerFileNotifier *notifier)
+{
+	TrackerFileNotifierPrivate *priv;
+
+	g_return_val_if_fail (TRACKER_IS_FILE_NOTIFIER (notifier), FALSE);
+
+	priv = notifier->priv;
+	return priv->pending_index_roots != NULL;
+}
diff --git a/src/libtracker-miner/tracker-file-notifier.h b/src/libtracker-miner/tracker-file-notifier.h
index 5383255..237662c 100644
--- a/src/libtracker-miner/tracker-file-notifier.h
+++ b/src/libtracker-miner/tracker-file-notifier.h
@@ -79,6 +79,8 @@ TrackerFileNotifier* tracker_file_notifier_new  (TrackerIndexingTree *indexing_t
 
 gboolean      tracker_file_notifier_start (TrackerFileNotifier *notifier);
 void          tracker_file_notifier_stop  (TrackerFileNotifier *notifier);
+gboolean      tracker_file_notifier_is_active (TrackerFileNotifier *notifier);
+
 
 G_END_DECLS
 



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