aboutsummaryrefslogtreecommitdiffstats
path: root/src/Partition.hxx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Partition.hxx32
1 files changed, 19 insertions, 13 deletions
diff --git a/src/Partition.hxx b/src/Partition.hxx
index 512ba3bca..57dc9a5f4 100644
--- a/src/Partition.hxx
+++ b/src/Partition.hxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2013 The Music Player Daemon Project
+ * Copyright (C) 2003-2014 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -21,9 +21,12 @@
#define MPD_PARTITION_HXX
#include "Playlist.hxx"
+#include "output/MultipleOutputs.hxx"
#include "PlayerControl.hxx"
struct Instance;
+class MultipleOutputs;
+class SongLoader;
/**
* A partition of the Music Player Daemon. It is a separate unit with
@@ -34,6 +37,8 @@ struct Partition {
struct playlist playlist;
+ MultipleOutputs outputs;
+
PlayerControl pc;
Partition(Instance &_instance,
@@ -41,21 +46,16 @@ struct Partition {
unsigned buffer_chunks,
unsigned buffered_before_play)
:instance(_instance), playlist(max_length),
- pc(buffer_chunks, buffered_before_play) {
- }
+ pc(outputs, buffer_chunks, buffered_before_play) {}
void ClearQueue() {
playlist.Clear(pc);
}
- PlaylistResult AppendFile(const char *path_utf8,
- unsigned *added_id=nullptr) {
- return playlist.AppendFile(pc, path_utf8, added_id);
- }
-
- PlaylistResult AppendURI(const char *uri_utf8,
+ PlaylistResult AppendURI(const SongLoader &loader,
+ const char *uri_utf8,
unsigned *added_id=nullptr) {
- return playlist.AppendURI(pc, uri_utf8, added_id);
+ return playlist.AppendURI(pc, loader, uri_utf8, added_id);
}
PlaylistResult DeletePosition(unsigned position) {
@@ -76,10 +76,14 @@ struct Partition {
return playlist.DeleteRange(pc, start, end);
}
- void DeleteSong(const Song &song) {
- playlist.DeleteSong(pc, song);
+#ifdef ENABLE_DATABASE
+
+ void DeleteSong(const char *uri) {
+ playlist.DeleteSong(pc, uri);
}
+#endif
+
void Shuffle(unsigned start, unsigned end) {
playlist.Shuffle(pc, start, end);
}
@@ -166,11 +170,13 @@ struct Partition {
playlist.SetConsume(new_value);
}
+#ifdef ENABLE_DATABASE
/**
* The database has been modified. Propagate the change to
* all subsystems.
*/
- void DatabaseModified();
+ void DatabaseModified(const Database &db);
+#endif
/**
* A tag in the play queue has been modified by the player