command/Other: move some functions to ClientCommands.cxx
handle_tagtypes() is also being moved to ClientCommands.cxx, because that command will be extended to access client-specific settings.
This commit is contained in:
@@ -39,7 +39,6 @@
|
||||
#include "util/StringAPI.hxx"
|
||||
#include "fs/AllocatedPath.hxx"
|
||||
#include "Stats.hxx"
|
||||
#include "Permission.hxx"
|
||||
#include "PlaylistFile.hxx"
|
||||
#include "db/PlaylistVector.hxx"
|
||||
#include "client/Client.hxx"
|
||||
@@ -86,14 +85,6 @@ handle_decoders(gcc_unused Client &client, gcc_unused Request args,
|
||||
return CommandResult::OK;
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_tagtypes(gcc_unused Client &client, gcc_unused Request request,
|
||||
Response &r)
|
||||
{
|
||||
tag_print_types(r);
|
||||
return CommandResult::OK;
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_kill(gcc_unused Client &client, gcc_unused Request request,
|
||||
gcc_unused Response &r)
|
||||
@@ -101,13 +92,6 @@ handle_kill(gcc_unused Client &client, gcc_unused Request request,
|
||||
return CommandResult::KILL;
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_close(gcc_unused Client &client, gcc_unused Request args,
|
||||
gcc_unused Response &r)
|
||||
{
|
||||
return CommandResult::FINISH;
|
||||
}
|
||||
|
||||
static void
|
||||
print_tag(TagType type, const char *value, void *ctx)
|
||||
{
|
||||
@@ -384,27 +368,6 @@ handle_stats(Client &client, gcc_unused Request args, Response &r)
|
||||
return CommandResult::OK;
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_ping(gcc_unused Client &client, gcc_unused Request args,
|
||||
gcc_unused Response &r)
|
||||
{
|
||||
return CommandResult::OK;
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_password(Client &client, Request args, Response &r)
|
||||
{
|
||||
unsigned permission = 0;
|
||||
if (getPermissionFromPassword(args.front(), &permission) < 0) {
|
||||
r.Error(ACK_ERROR_PASSWORD, "incorrect password");
|
||||
return CommandResult::ERROR;
|
||||
}
|
||||
|
||||
client.SetPermission(permission);
|
||||
|
||||
return CommandResult::OK;
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_config(Client &client, gcc_unused Request args, Response &r)
|
||||
{
|
||||
|
Reference in New Issue
Block a user