aboutsummaryrefslogtreecommitdiffstats
path: root/src/ClientNew.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/ClientNew.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/ClientNew.cxx')
-rw-r--r--src/ClientNew.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ClientNew.cxx b/src/ClientNew.cxx
index 1579b9a53..489af8c31 100644
--- a/src/ClientNew.cxx
+++ b/src/ClientNew.cxx
@@ -19,6 +19,7 @@
#include "config.h"
#include "ClientInternal.hxx"
+#include "Partition.hxx"
#include "fd_util.h"
extern "C" {
#include "fifo_buffer.h"
@@ -45,10 +46,10 @@ extern "C" {
static const char GREETING[] = "OK MPD " PROTOCOL_VERSION "\n";
-Client::Client(struct playlist &_playlist,
- struct player_control *_player_control,
+Client::Client(Partition &_partition,
int fd, int _uid, int _num)
- :playlist(_playlist), player_control(_player_control),
+ :partition(_partition),
+ playlist(partition.playlist), player_control(&partition.pc),
input(fifo_buffer_new(4096)),
permission(getDefaultPermissions()),
uid(_uid),
@@ -94,13 +95,12 @@ Client::~Client()
}
void
-client_new(struct playlist &playlist, struct player_control *player_control,
+client_new(Partition &partition,
int fd, const struct sockaddr *sa, size_t sa_length, int uid)
{
static unsigned int next_client_num;
char *remote;
- assert(player_control != NULL);
assert(fd >= 0);
#ifdef HAVE_LIBWRAP
@@ -134,7 +134,7 @@ client_new(struct playlist &playlist, struct player_control *player_control,
return;
}
- Client *client = new Client(playlist, player_control, fd, uid,
+ Client *client = new Client(partition, fd, uid,
next_client_num++);
(void)send(fd, GREETING, sizeof(GREETING) - 1, 0);