[tracker/wip/miner-priority-queues: 6/19] 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/19] libtracker-miner: Add tracker_priority_queue_get_length
- Date: Wed, 6 Jul 2011 16:22:53 +0000 (UTC)
commit d2a750e8e21fa6a2c4a8efe710a2ebfb6b255bbc
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 6456d9f..613427b 100644
--- a/src/libtracker-miner/tracker-priority-queue.c
+++ b/src/libtracker-miner/tracker-priority-queue.c
@@ -241,6 +241,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);
+}
+
void
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 2c24e1c..da42c62 100644
--- a/src/libtracker-miner/tracker-priority-queue.h
+++ b/src/libtracker-miner/tracker-priority-queue.h
@@ -38,6 +38,8 @@ void tracker_priority_queue_unref (TrackerPriorityQueue *queue)
gboolean tracker_priority_queue_is_empty (TrackerPriorityQueue *queue);
+guint tracker_priority_queue_get_length (TrackerPriorityQueue *queue);
+
void tracker_priority_queue_add (TrackerPriorityQueue *queue,
gpointer data,
gint priority);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]