aboutsummaryrefslogtreecommitdiffstats
path: root/src/DatabaseQueue.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-07 10:59:56 +0100
committerMax Kellermann <max@duempel.org>2013-01-07 10:59:56 +0100
commitd360f17a59fe6ed52ffa74c48c63164cf203d1e0 (patch)
treedea0df6cb96909f083f89e4d89a48ee82aef9f13 /src/DatabaseQueue.cxx
parenta6ee6be9602f64599b40e01321bd771b17d94f39 (diff)
downloadmpd-d360f17a59fe6ed52ffa74c48c63164cf203d1e0.tar.gz
mpd-d360f17a59fe6ed52ffa74c48c63164cf203d1e0.tar.xz
mpd-d360f17a59fe6ed52ffa74c48c63164cf203d1e0.zip
Client: add Partition reference attribute
playlist and player_control are deprecated.
Diffstat (limited to 'src/DatabaseQueue.cxx')
-rw-r--r--src/DatabaseQueue.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/DatabaseQueue.cxx b/src/DatabaseQueue.cxx
index 21103fe37..d7bc97f56 100644
--- a/src/DatabaseQueue.cxx
+++ b/src/DatabaseQueue.cxx
@@ -22,16 +22,16 @@
#include "DatabaseSelection.hxx"
#include "DatabaseGlue.hxx"
#include "DatabasePlugin.hxx"
-#include "Playlist.hxx"
+#include "Partition.hxx"
#include <functional>
static bool
-AddToQueue(struct playlist &playlist, struct player_control *pc,
- song &song, GError **error_r)
+AddToQueue(Partition &partition, song &song, GError **error_r)
{
enum playlist_result result =
- playlist_append_song(&playlist, pc, &song, NULL);
+ playlist_append_song(&partition.playlist, &partition.pc,
+ &song, NULL);
if (result != PLAYLIST_RESULT_SUCCESS) {
g_set_error(error_r, playlist_quark(), result,
"Playlist error");
@@ -42,9 +42,9 @@ AddToQueue(struct playlist &playlist, struct player_control *pc,
}
bool
-findAddIn(struct playlist &playlist, struct player_control *pc,
- const char *uri,
- const SongFilter *filter, GError **error_r)
+AddFromDatabase(Partition &partition,
+ const char *uri,
+ const SongFilter *filter, GError **error_r)
{
const Database *db = GetDatabase(error_r);
if (db == nullptr)
@@ -53,6 +53,6 @@ findAddIn(struct playlist &playlist, struct player_control *pc,
const DatabaseSelection selection(uri, true, filter);
using namespace std::placeholders;
- const auto f = std::bind(AddToQueue, std::ref(playlist), pc, _1, _2);
+ const auto f = std::bind(AddToQueue, std::ref(partition), _1, _2);
return db->Visit(selection, f, error_r);
}