[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, 13 Jul 2011 15:02:56 +0000 (UTC)
commit 7a7987e3e71b3b32bd39bbe9a74a5b5e60d2e7cd
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 0fc9404..01e637e 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]