aboutsummaryrefslogtreecommitdiffstats
path: root/src/Queue.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-07-28 13:25:12 +0200
committerMax Kellermann <max@duempel.org>2013-07-28 13:25:12 +0200
commitba161ec572b98d3bcf9f735ff122133319fe896a (patch)
treea211690e3a8b7fce1fb6db540228122bead1f2bc /src/Queue.hxx
parent43f613d9be9aa2953dcfc0aacfbdfb56d5d1a708 (diff)
downloadmpd-ba161ec572b98d3bcf9f735ff122133319fe896a.tar.gz
mpd-ba161ec572b98d3bcf9f735ff122133319fe896a.tar.xz
mpd-ba161ec572b98d3bcf9f735ff122133319fe896a.zip
song: convert header to C++
Diffstat (limited to '')
-rw-r--r--src/Queue.hxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/Queue.hxx b/src/Queue.hxx
index 6e7786bcd..d8eeb271e 100644
--- a/src/Queue.hxx
+++ b/src/Queue.hxx
@@ -29,6 +29,8 @@
#include <assert.h>
#include <stdint.h>
+struct Song;
+
/**
* A queue of songs. This is the backend of the playlist: it contains
* an ordered list of songs.
@@ -51,7 +53,7 @@ struct queue {
* information attached.
*/
struct Item {
- struct song *song;
+ Song *song;
/** the unique id of this item in the queue */
unsigned id;
@@ -198,7 +200,7 @@ struct queue {
/**
* Returns the song at the specified position.
*/
- struct song *Get(unsigned position) const {
+ Song *Get(unsigned position) const {
assert(position < length);
return items[position].song;
@@ -207,7 +209,7 @@ struct queue {
/**
* Returns the song at the specified order number.
*/
- struct song *GetOrder(unsigned _order) const {
+ Song *GetOrder(unsigned _order) const {
return Get(OrderToPosition(_order));
}
@@ -254,11 +256,12 @@ struct queue {
* that, the caller must check if the queue is already full.
*
* If a song is not in the database (determined by
- * song_in_database()), it is freed when removed from the queue.
+ * Song::IsInDatabase()), it is freed when removed from the
+ * queue.
*
* @param priority the priority of this new queue item
*/
- unsigned Append(struct song *song, uint8_t priority);
+ unsigned Append(Song *song, uint8_t priority);
/**
* Swaps two songs, addressed by their position.