aboutsummaryrefslogtreecommitdiffstats
path: root/src/UpdateQueue.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-17 21:13:40 +0200
committerMax Kellermann <max@duempel.org>2013-10-17 21:13:40 +0200
commit7ef40de98bb3cbf2fd1fe693871a30064d7ef41b (patch)
treedf7b0904b1629f64a746053c4d38868d7dfe92b9 /src/UpdateQueue.hxx
parent196ec25682e303e90f3e0b2c93691203c19ec339 (diff)
downloadmpd-7ef40de98bb3cbf2fd1fe693871a30064d7ef41b.tar.gz
mpd-7ef40de98bb3cbf2fd1fe693871a30064d7ef41b.tar.xz
mpd-7ef40de98bb3cbf2fd1fe693871a30064d7ef41b.zip
UpdateQueue: use std::string and std::queue
Diffstat (limited to 'src/UpdateQueue.hxx')
-rw-r--r--src/UpdateQueue.hxx19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/UpdateQueue.hxx b/src/UpdateQueue.hxx
index 7de06964f..80c15f600 100644
--- a/src/UpdateQueue.hxx
+++ b/src/UpdateQueue.hxx
@@ -22,10 +22,25 @@
#include "check.h"
+#include <string>
+
+struct UpdateQueueItem {
+ std::string path_utf8;
+ bool discard;
+
+ UpdateQueueItem() = default;
+ UpdateQueueItem(const char *_path, bool _discard)
+ :path_utf8(_path), discard(_discard) {}
+
+ bool IsDefined() const {
+ return !path_utf8.empty();
+ }
+};
+
unsigned
update_queue_push(const char *path, bool discard, unsigned base);
-char *
-update_queue_shift(bool *discard_r);
+UpdateQueueItem
+update_queue_shift();
#endif