diff options
Diffstat (limited to '')
-rw-r--r-- | src/command/MessageCommands.cxx | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/src/command/MessageCommands.cxx b/src/command/MessageCommands.cxx index 7d9893e70..a86bdf30c 100644 --- a/src/command/MessageCommands.cxx +++ b/src/command/MessageCommands.cxx @@ -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 @@ -19,12 +19,11 @@ #include "config.h" #include "MessageCommands.hxx" -#include "Client.hxx" -#include "ClientList.hxx" +#include "client/Client.hxx" +#include "client/ClientList.hxx" #include "Instance.hxx" -#include "Main.hxx" +#include "Partition.hxx" #include "protocol/Result.hxx" -#include "protocol/ArgParser.hxx" #include <set> #include <string> @@ -32,7 +31,7 @@ #include <assert.h> CommandResult -handle_subscribe(Client &client, gcc_unused int argc, char *argv[]) +handle_subscribe(Client &client, gcc_unused unsigned argc, char *argv[]) { assert(argc == 2); @@ -62,7 +61,7 @@ handle_subscribe(Client &client, gcc_unused int argc, char *argv[]) } CommandResult -handle_unsubscribe(Client &client, gcc_unused int argc, char *argv[]) +handle_unsubscribe(Client &client, gcc_unused unsigned argc, char *argv[]) { assert(argc == 2); @@ -77,14 +76,14 @@ handle_unsubscribe(Client &client, gcc_unused int argc, char *argv[]) CommandResult handle_channels(Client &client, - gcc_unused int argc, gcc_unused char *argv[]) + gcc_unused unsigned argc, gcc_unused char *argv[]) { assert(argc == 1); std::set<std::string> channels; - for (const auto &c : *instance->client_list) - channels.insert(c->subscriptions.begin(), - c->subscriptions.end()); + for (const auto &c : *client.partition.instance.client_list) + channels.insert(c.subscriptions.begin(), + c.subscriptions.end()); for (const auto &channel : channels) client_printf(client, "channel: %s\n", channel.c_str()); @@ -94,7 +93,7 @@ handle_channels(Client &client, CommandResult handle_read_messages(Client &client, - gcc_unused int argc, gcc_unused char *argv[]) + gcc_unused unsigned argc, gcc_unused char *argv[]) { assert(argc == 1); @@ -111,7 +110,7 @@ handle_read_messages(Client &client, CommandResult handle_send_message(Client &client, - gcc_unused int argc, gcc_unused char *argv[]) + gcc_unused unsigned argc, gcc_unused char *argv[]) { assert(argc == 3); @@ -123,8 +122,8 @@ handle_send_message(Client &client, bool sent = false; const ClientMessage msg(argv[1], argv[2]); - for (const auto &c : *instance->client_list) - if (c->PushMessage(msg)) + for (auto &c : *client.partition.instance.client_list) + if (c.PushMessage(msg)) sent = true; if (sent) |