[tracker/wip/miner-priority-queues: 6/7] libtracker-miner: Add tracker_priority_queue_get_length
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/miner-priority-queues: 6/7] libtracker-miner: Add tracker_priority_queue_get_length
- Date: Thu, 30 Jun 2011 16:14:28 +0000 (UTC)
commit c7883124db3d5d63673b1906ab73e48d210315c6
Author: Carlos Garnacho <carlos lanedo com>
Date: Thu Jun 30 18:07:55 2011 +0200
libtracker-miner: Add tracker_priority_queue_get_length
src/libtracker-miner/tracker-priority-queue.c | 8 ++++++++
src/libtracker-miner/tracker-priority-queue.h | 2 ++
2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-priority-queue.c b/src/libtracker-miner/tracker-priority-queue.c
index 831457d..8e3c01c 100644
--- a/src/libtracker-miner/tracker-priority-queue.c
+++ b/src/libtracker-miner/tracker-priority-queue.c
@@ -252,6 +252,14 @@ tracker_priority_queue_is_empty (TrackerPriorityQueue *queue)
return g_queue_is_empty (&queue->queue);
}
+guint
+tracker_priority_queue_get_length (TrackerPriorityQueue *queue)
+{
+ g_return_val_if_fail (queue != NULL, 0);
+
+ return g_queue_get_length (&queue->queue);
+}
+
gboolean
tracker_priority_queue_add (TrackerPriorityQueue *queue,
gpointer data,
diff --git a/src/libtracker-miner/tracker-priority-queue.h b/src/libtracker-miner/tracker-priority-queue.h
index 63ec24c..137ea3d 100644
--- a/src/libtracker-miner/tracker-priority-queue.h
+++ b/src/libtracker-miner/tracker-priority-queue.h
@@ -39,6 +39,8 @@ void tracker_priority_queue_unref (TrackerPriorityQueue *queue)
gboolean tracker_priority_queue_limit_reached (TrackerPriorityQueue *queue);
gboolean tracker_priority_queue_is_empty (TrackerPriorityQueue *queue);
+guint tracker_priority_queue_get_length (TrackerPriorityQueue *queue);
+
gboolean tracker_priority_queue_add (TrackerPriorityQueue *queue,
gpointer data,
gint priority);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]