command: make argc unsigned
This commit is contained in:
parent
fefb35c782
commit
2da0322329
@ -60,15 +60,15 @@ struct command {
|
||||
unsigned permission;
|
||||
int min;
|
||||
int max;
|
||||
CommandResult (*handler)(Client &client, int argc, char **argv);
|
||||
CommandResult (*handler)(Client &client, unsigned argc, char **argv);
|
||||
};
|
||||
|
||||
/* don't be fooled, this is the command handler for "commands" command */
|
||||
static CommandResult
|
||||
handle_commands(Client &client, int argc, char *argv[]);
|
||||
handle_commands(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
static CommandResult
|
||||
handle_not_commands(Client &client, int argc, char *argv[]);
|
||||
handle_not_commands(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
/**
|
||||
* The command registry.
|
||||
@ -215,7 +215,7 @@ command_available(gcc_unused const Partition &partition,
|
||||
/* don't be fooled, this is the command handler for "commands" command */
|
||||
static CommandResult
|
||||
handle_commands(Client &client,
|
||||
gcc_unused int argc, gcc_unused char *argv[])
|
||||
gcc_unused unsigned argc, gcc_unused char *argv[])
|
||||
{
|
||||
const unsigned permission = client.GetPermission();
|
||||
const struct command *cmd;
|
||||
@ -233,7 +233,7 @@ handle_commands(Client &client,
|
||||
|
||||
static CommandResult
|
||||
handle_not_commands(Client &client,
|
||||
gcc_unused int argc, gcc_unused char *argv[])
|
||||
gcc_unused unsigned argc, gcc_unused char *argv[])
|
||||
{
|
||||
const unsigned permission = client.GetPermission();
|
||||
const struct command *cmd;
|
||||
@ -285,10 +285,10 @@ command_lookup(const char *name)
|
||||
|
||||
static bool
|
||||
command_check_request(const struct command *cmd, Client &client,
|
||||
unsigned permission, int argc, char *argv[])
|
||||
unsigned permission, unsigned argc, char *argv[])
|
||||
{
|
||||
int min = cmd->min + 1;
|
||||
int max = cmd->max + 1;
|
||||
const unsigned min = cmd->min + 1;
|
||||
const unsigned max = cmd->max + 1;
|
||||
|
||||
if (cmd->permission != (permission & cmd->permission)) {
|
||||
command_error(client, ACK_ERROR_PERMISSION,
|
||||
@ -319,7 +319,7 @@ command_check_request(const struct command *cmd, Client &client,
|
||||
|
||||
static const struct command *
|
||||
command_checked_lookup(Client &client, unsigned permission,
|
||||
int argc, char *argv[])
|
||||
unsigned argc, char *argv[])
|
||||
{
|
||||
const struct command *cmd;
|
||||
|
||||
|
@ -48,7 +48,7 @@ handle_listfiles_db(Client &client, const char *uri)
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_lsinfo2(Client &client, int argc, char *argv[])
|
||||
handle_lsinfo2(Client &client, unsigned argc, char *argv[])
|
||||
{
|
||||
const char *const uri = argc == 2
|
||||
? argv[1]
|
||||
@ -65,7 +65,7 @@ handle_lsinfo2(Client &client, int argc, char *argv[])
|
||||
}
|
||||
|
||||
static CommandResult
|
||||
handle_match(Client &client, int argc, char *argv[], bool fold_case)
|
||||
handle_match(Client &client, unsigned argc, char *argv[], bool fold_case)
|
||||
{
|
||||
ConstBuffer<const char *> args(argv + 1, argc - 1);
|
||||
|
||||
@ -84,19 +84,19 @@ handle_match(Client &client, int argc, char *argv[], bool fold_case)
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_find(Client &client, int argc, char *argv[])
|
||||
handle_find(Client &client, unsigned argc, char *argv[])
|
||||
{
|
||||
return handle_match(client, argc, argv, false);
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_search(Client &client, int argc, char *argv[])
|
||||
handle_search(Client &client, unsigned argc, char *argv[])
|
||||
{
|
||||
return handle_match(client, argc, argv, true);
|
||||
}
|
||||
|
||||
static CommandResult
|
||||
handle_match_add(Client &client, int argc, char *argv[], bool fold_case)
|
||||
handle_match_add(Client &client, unsigned argc, char *argv[], bool fold_case)
|
||||
{
|
||||
ConstBuffer<const char *> args(argv + 1, argc - 1);
|
||||
|
||||
@ -114,19 +114,19 @@ handle_match_add(Client &client, int argc, char *argv[], bool fold_case)
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_findadd(Client &client, int argc, char *argv[])
|
||||
handle_findadd(Client &client, unsigned argc, char *argv[])
|
||||
{
|
||||
return handle_match_add(client, argc, argv, false);
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_searchadd(Client &client, int argc, char *argv[])
|
||||
handle_searchadd(Client &client, unsigned argc, char *argv[])
|
||||
{
|
||||
return handle_match_add(client, argc, argv, true);
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_searchaddpl(Client &client, int argc, char *argv[])
|
||||
handle_searchaddpl(Client &client, unsigned argc, char *argv[])
|
||||
{
|
||||
ConstBuffer<const char *> args(argv + 1, argc - 1);
|
||||
const char *playlist = args.shift();
|
||||
@ -149,7 +149,7 @@ handle_searchaddpl(Client &client, int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_count(Client &client, int argc, char *argv[])
|
||||
handle_count(Client &client, unsigned argc, char *argv[])
|
||||
{
|
||||
ConstBuffer<const char *> args(argv + 1, argc - 1);
|
||||
|
||||
@ -180,7 +180,7 @@ handle_count(Client &client, int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_listall(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_listall(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
const char *directory = "";
|
||||
|
||||
@ -195,7 +195,7 @@ handle_listall(Client &client, gcc_unused int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_list(Client &client, int argc, char *argv[])
|
||||
handle_list(Client &client, unsigned argc, char *argv[])
|
||||
{
|
||||
ConstBuffer<const char *> args(argv + 1, argc - 1);
|
||||
const char *tag_name = args.shift();
|
||||
@ -268,7 +268,7 @@ handle_list(Client &client, int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_listallinfo(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_listallinfo(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
const char *directory = "";
|
||||
|
||||
|
@ -28,33 +28,33 @@ CommandResult
|
||||
handle_listfiles_db(Client &client, const char *uri);
|
||||
|
||||
CommandResult
|
||||
handle_lsinfo2(Client &client, int argc, char *argv[]);
|
||||
handle_lsinfo2(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_find(Client &client, int argc, char *argv[]);
|
||||
handle_find(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_findadd(Client &client, int argc, char *argv[]);
|
||||
handle_findadd(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_search(Client &client, int argc, char *argv[]);
|
||||
handle_search(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_searchadd(Client &client, int argc, char *argv[]);
|
||||
handle_searchadd(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_searchaddpl(Client &client, int argc, char *argv[]);
|
||||
handle_searchaddpl(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_count(Client &client, int argc, char *argv[]);
|
||||
handle_count(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_listall(Client &client, int argc, char *argv[]);
|
||||
handle_listall(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_list(Client &client, int argc, char *argv[]);
|
||||
handle_list(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_listallinfo(Client &client, int argc, char *argv[]);
|
||||
handle_listallinfo(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
#endif
|
||||
|
@ -201,7 +201,7 @@ read_file_comments(Client &client, const Path path_fs)
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_read_comments(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_read_comments(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
assert(argc == 2);
|
||||
|
||||
|
@ -28,6 +28,6 @@ CommandResult
|
||||
handle_listfiles_local(Client &client, const char *path_utf8);
|
||||
|
||||
CommandResult
|
||||
handle_read_comments(Client &client, int argc, char *argv[]);
|
||||
handle_read_comments(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
#endif
|
||||
|
@ -31,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);
|
||||
|
||||
@ -61,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);
|
||||
|
||||
@ -76,7 +76,7 @@ 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);
|
||||
|
||||
@ -93,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);
|
||||
|
||||
@ -110,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);
|
||||
|
||||
|
@ -25,18 +25,18 @@
|
||||
class Client;
|
||||
|
||||
CommandResult
|
||||
handle_subscribe(Client &client, int argc, char *argv[]);
|
||||
handle_subscribe(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_unsubscribe(Client &client, int argc, char *argv[]);
|
||||
handle_unsubscribe(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_channels(Client &client, int argc, char *argv[]);
|
||||
handle_channels(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_read_messages(Client &client, int argc, char *argv[]);
|
||||
handle_read_messages(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_send_message(Client &client, int argc, char *argv[]);
|
||||
handle_send_message(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
#endif
|
||||
|
@ -39,7 +39,7 @@ neighbor_commands_available(const Instance &instance)
|
||||
|
||||
CommandResult
|
||||
handle_listneighbors(Client &client,
|
||||
gcc_unused int argc, gcc_unused char *argv[])
|
||||
gcc_unused unsigned argc, gcc_unused char *argv[])
|
||||
{
|
||||
const NeighborGlue *const neighbors =
|
||||
client.partition.instance.neighbors;
|
||||
|
@ -31,6 +31,6 @@ bool
|
||||
neighbor_commands_available(const Instance &instance);
|
||||
|
||||
CommandResult
|
||||
handle_listneighbors(Client &client, int argc, char *argv[]);
|
||||
handle_listneighbors(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
#endif
|
||||
|
@ -68,7 +68,7 @@ print_spl_list(Client &client, const PlaylistVector &list)
|
||||
|
||||
CommandResult
|
||||
handle_urlhandlers(Client &client,
|
||||
gcc_unused int argc, gcc_unused char *argv[])
|
||||
gcc_unused unsigned argc, gcc_unused char *argv[])
|
||||
{
|
||||
if (client.IsLocal())
|
||||
client_puts(client, "handler: file://\n");
|
||||
@ -78,7 +78,7 @@ handle_urlhandlers(Client &client,
|
||||
|
||||
CommandResult
|
||||
handle_decoders(Client &client,
|
||||
gcc_unused int argc, gcc_unused char *argv[])
|
||||
gcc_unused unsigned argc, gcc_unused char *argv[])
|
||||
{
|
||||
decoder_list_print(client);
|
||||
return CommandResult::OK;
|
||||
@ -86,7 +86,7 @@ handle_decoders(Client &client,
|
||||
|
||||
CommandResult
|
||||
handle_tagtypes(Client &client,
|
||||
gcc_unused int argc, gcc_unused char *argv[])
|
||||
gcc_unused unsigned argc, gcc_unused char *argv[])
|
||||
{
|
||||
tag_print_types(client);
|
||||
return CommandResult::OK;
|
||||
@ -94,14 +94,14 @@ handle_tagtypes(Client &client,
|
||||
|
||||
CommandResult
|
||||
handle_kill(gcc_unused Client &client,
|
||||
gcc_unused int argc, gcc_unused char *argv[])
|
||||
gcc_unused unsigned argc, gcc_unused char *argv[])
|
||||
{
|
||||
return CommandResult::KILL;
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_close(gcc_unused Client &client,
|
||||
gcc_unused int argc, gcc_unused char *argv[])
|
||||
gcc_unused unsigned argc, gcc_unused char *argv[])
|
||||
{
|
||||
return CommandResult::FINISH;
|
||||
}
|
||||
@ -115,7 +115,7 @@ print_tag(TagType type, const char *value, void *ctx)
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_listfiles(Client &client, int argc, char *argv[])
|
||||
handle_listfiles(Client &client, unsigned argc, char *argv[])
|
||||
{
|
||||
const char *const uri = argc == 2
|
||||
? argv[1]
|
||||
@ -156,7 +156,7 @@ static constexpr tag_handler print_tag_handler = {
|
||||
};
|
||||
|
||||
CommandResult
|
||||
handle_lsinfo(Client &client, int argc, char *argv[])
|
||||
handle_lsinfo(Client &client, unsigned argc, char *argv[])
|
||||
{
|
||||
const char *const uri = argc == 2
|
||||
? argv[1]
|
||||
@ -226,7 +226,7 @@ handle_lsinfo(Client &client, int argc, char *argv[])
|
||||
}
|
||||
|
||||
static CommandResult
|
||||
handle_update(Client &client, int argc, char *argv[], bool discard)
|
||||
handle_update(Client &client, unsigned argc, char *argv[], bool discard)
|
||||
{
|
||||
#ifdef ENABLE_DATABASE
|
||||
const char *path = "";
|
||||
@ -272,19 +272,19 @@ handle_update(Client &client, int argc, char *argv[], bool discard)
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_update(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_update(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
return handle_update(client, argc, argv, false);
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_rescan(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_rescan(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
return handle_update(client, argc, argv, true);
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_setvol(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_setvol(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
unsigned level;
|
||||
bool success;
|
||||
@ -308,7 +308,7 @@ handle_setvol(Client &client, gcc_unused int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_volume(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_volume(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
int relative;
|
||||
if (!check_int(client, &relative, argv[1]))
|
||||
@ -343,7 +343,7 @@ handle_volume(Client &client, gcc_unused int argc, char *argv[])
|
||||
|
||||
CommandResult
|
||||
handle_stats(Client &client,
|
||||
gcc_unused int argc, gcc_unused char *argv[])
|
||||
gcc_unused unsigned argc, gcc_unused char *argv[])
|
||||
{
|
||||
stats_print(client);
|
||||
return CommandResult::OK;
|
||||
@ -351,13 +351,13 @@ handle_stats(Client &client,
|
||||
|
||||
CommandResult
|
||||
handle_ping(gcc_unused Client &client,
|
||||
gcc_unused int argc, gcc_unused char *argv[])
|
||||
gcc_unused unsigned argc, gcc_unused char *argv[])
|
||||
{
|
||||
return CommandResult::OK;
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_password(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_password(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
unsigned permission = 0;
|
||||
|
||||
@ -373,7 +373,7 @@ handle_password(Client &client, gcc_unused int argc, char *argv[])
|
||||
|
||||
CommandResult
|
||||
handle_config(Client &client,
|
||||
gcc_unused int argc, gcc_unused char *argv[])
|
||||
gcc_unused unsigned argc, gcc_unused char *argv[])
|
||||
{
|
||||
if (!client.IsLocal()) {
|
||||
command_error(client, ACK_ERROR_PERMISSION,
|
||||
@ -394,12 +394,11 @@ handle_config(Client &client,
|
||||
|
||||
CommandResult
|
||||
handle_idle(Client &client,
|
||||
gcc_unused int argc, gcc_unused char *argv[])
|
||||
gcc_unused unsigned argc, gcc_unused char *argv[])
|
||||
{
|
||||
unsigned flags = 0;
|
||||
int i;
|
||||
|
||||
for (i = 1; i < argc; ++i) {
|
||||
for (unsigned i = 1; i < argc; ++i) {
|
||||
unsigned event = idle_parse_name(argv[i]);
|
||||
if (event == 0) {
|
||||
command_error(client, ACK_ERROR_ARG,
|
||||
|
@ -25,51 +25,51 @@
|
||||
class Client;
|
||||
|
||||
CommandResult
|
||||
handle_urlhandlers(Client &client, int argc, char *argv[]);
|
||||
handle_urlhandlers(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_decoders(Client &client, int argc, char *argv[]);
|
||||
handle_decoders(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_tagtypes(Client &client, int argc, char *argv[]);
|
||||
handle_tagtypes(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_kill(Client &client, int argc, char *argv[]);
|
||||
handle_kill(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_close(Client &client, int argc, char *argv[]);
|
||||
handle_close(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_listfiles(Client &client, int argc, char *argv[]);
|
||||
handle_listfiles(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_lsinfo(Client &client, int argc, char *argv[]);
|
||||
handle_lsinfo(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_update(Client &client, int argc, char *argv[]);
|
||||
handle_update(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_rescan(Client &client, int argc, char *argv[]);
|
||||
handle_rescan(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_setvol(Client &client, int argc, char *argv[]);
|
||||
handle_setvol(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_volume(Client &client, int argc, char *argv[]);
|
||||
handle_volume(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_stats(Client &client, int argc, char *argv[]);
|
||||
handle_stats(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_ping(Client &client, int argc, char *argv[]);
|
||||
handle_ping(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_password(Client &client, int argc, char *argv[]);
|
||||
handle_password(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_config(Client &client, int argc, char *argv[]);
|
||||
handle_config(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_idle(Client &client, int argc, char *argv[]);
|
||||
handle_idle(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
#endif
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "Partition.hxx"
|
||||
|
||||
CommandResult
|
||||
handle_enableoutput(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_enableoutput(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
unsigned device;
|
||||
if (!check_unsigned(client, &device, argv[1]))
|
||||
@ -43,7 +43,7 @@ handle_enableoutput(Client &client, gcc_unused int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_disableoutput(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_disableoutput(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
unsigned device;
|
||||
if (!check_unsigned(client, &device, argv[1]))
|
||||
@ -59,7 +59,7 @@ handle_disableoutput(Client &client, gcc_unused int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_toggleoutput(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_toggleoutput(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
unsigned device;
|
||||
if (!check_unsigned(client, &device, argv[1]))
|
||||
@ -76,7 +76,7 @@ handle_toggleoutput(Client &client, gcc_unused int argc, char *argv[])
|
||||
|
||||
CommandResult
|
||||
handle_devices(Client &client,
|
||||
gcc_unused int argc, gcc_unused char *argv[])
|
||||
gcc_unused unsigned argc, gcc_unused char *argv[])
|
||||
{
|
||||
printAudioDevices(client, client.partition.outputs);
|
||||
|
||||
|
@ -25,15 +25,15 @@
|
||||
class Client;
|
||||
|
||||
CommandResult
|
||||
handle_enableoutput(Client &client, int argc, char *argv[]);
|
||||
handle_enableoutput(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_disableoutput(Client &client, int argc, char *argv[]);
|
||||
handle_disableoutput(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_toggleoutput(Client &client, int argc, char *argv[]);
|
||||
handle_toggleoutput(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_devices(Client &client, int argc, char *argv[]);
|
||||
handle_devices(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
#endif
|
||||
|
@ -56,7 +56,7 @@
|
||||
#define COMMAND_STATUS_UPDATING_DB "updating_db"
|
||||
|
||||
CommandResult
|
||||
handle_play(Client &client, int argc, char *argv[])
|
||||
handle_play(Client &client, unsigned argc, char *argv[])
|
||||
{
|
||||
int song = -1;
|
||||
|
||||
@ -67,7 +67,7 @@ handle_play(Client &client, int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_playid(Client &client, int argc, char *argv[])
|
||||
handle_playid(Client &client, unsigned argc, char *argv[])
|
||||
{
|
||||
int id = -1;
|
||||
|
||||
@ -80,7 +80,7 @@ handle_playid(Client &client, int argc, char *argv[])
|
||||
|
||||
CommandResult
|
||||
handle_stop(Client &client,
|
||||
gcc_unused int argc, gcc_unused char *argv[])
|
||||
gcc_unused unsigned argc, gcc_unused char *argv[])
|
||||
{
|
||||
client.partition.Stop();
|
||||
return CommandResult::OK;
|
||||
@ -88,7 +88,7 @@ handle_stop(Client &client,
|
||||
|
||||
CommandResult
|
||||
handle_currentsong(Client &client,
|
||||
gcc_unused int argc, gcc_unused char *argv[])
|
||||
gcc_unused unsigned argc, gcc_unused char *argv[])
|
||||
{
|
||||
playlist_print_current(client, client.playlist);
|
||||
return CommandResult::OK;
|
||||
@ -96,7 +96,7 @@ handle_currentsong(Client &client,
|
||||
|
||||
CommandResult
|
||||
handle_pause(Client &client,
|
||||
int argc, char *argv[])
|
||||
unsigned argc, char *argv[])
|
||||
{
|
||||
if (argc == 2) {
|
||||
bool pause_flag;
|
||||
@ -112,7 +112,7 @@ handle_pause(Client &client,
|
||||
|
||||
CommandResult
|
||||
handle_status(Client &client,
|
||||
gcc_unused int argc, gcc_unused char *argv[])
|
||||
gcc_unused unsigned argc, gcc_unused char *argv[])
|
||||
{
|
||||
const char *state = nullptr;
|
||||
int song;
|
||||
@ -221,7 +221,7 @@ handle_status(Client &client,
|
||||
|
||||
CommandResult
|
||||
handle_next(Client &client,
|
||||
gcc_unused int argc, gcc_unused char *argv[])
|
||||
gcc_unused unsigned argc, gcc_unused char *argv[])
|
||||
{
|
||||
playlist &playlist = client.playlist;
|
||||
|
||||
@ -238,14 +238,14 @@ handle_next(Client &client,
|
||||
|
||||
CommandResult
|
||||
handle_previous(Client &client,
|
||||
gcc_unused int argc, gcc_unused char *argv[])
|
||||
gcc_unused unsigned argc, gcc_unused char *argv[])
|
||||
{
|
||||
client.partition.PlayPrevious();
|
||||
return CommandResult::OK;
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_repeat(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_repeat(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
bool status;
|
||||
if (!check_bool(client, &status, argv[1]))
|
||||
@ -256,7 +256,7 @@ handle_repeat(Client &client, gcc_unused int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_single(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_single(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
bool status;
|
||||
if (!check_bool(client, &status, argv[1]))
|
||||
@ -267,7 +267,7 @@ handle_single(Client &client, gcc_unused int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_consume(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_consume(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
bool status;
|
||||
if (!check_bool(client, &status, argv[1]))
|
||||
@ -278,7 +278,7 @@ handle_consume(Client &client, gcc_unused int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_random(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_random(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
bool status;
|
||||
if (!check_bool(client, &status, argv[1]))
|
||||
@ -291,14 +291,14 @@ handle_random(Client &client, gcc_unused int argc, char *argv[])
|
||||
|
||||
CommandResult
|
||||
handle_clearerror(gcc_unused Client &client,
|
||||
gcc_unused int argc, gcc_unused char *argv[])
|
||||
gcc_unused unsigned argc, gcc_unused char *argv[])
|
||||
{
|
||||
client.player_control.ClearError();
|
||||
return CommandResult::OK;
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_seek(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_seek(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
unsigned song, seek_time;
|
||||
|
||||
@ -313,7 +313,7 @@ handle_seek(Client &client, gcc_unused int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_seekid(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_seekid(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
unsigned id, seek_time;
|
||||
|
||||
@ -328,7 +328,7 @@ handle_seekid(Client &client, gcc_unused int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_seekcur(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_seekcur(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
const char *p = argv[1];
|
||||
bool relative = *p == '+' || *p == '-';
|
||||
@ -342,7 +342,7 @@ handle_seekcur(Client &client, gcc_unused int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_crossfade(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_crossfade(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
unsigned xfade_time;
|
||||
|
||||
@ -354,7 +354,7 @@ handle_crossfade(Client &client, gcc_unused int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_mixrampdb(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_mixrampdb(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
float db;
|
||||
|
||||
@ -366,7 +366,7 @@ handle_mixrampdb(Client &client, gcc_unused int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_mixrampdelay(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_mixrampdelay(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
float delay_secs;
|
||||
|
||||
@ -379,7 +379,7 @@ handle_mixrampdelay(Client &client, gcc_unused int argc, char *argv[])
|
||||
|
||||
CommandResult
|
||||
handle_replay_gain_mode(Client &client,
|
||||
gcc_unused int argc, char *argv[])
|
||||
gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
if (!replay_gain_set_mode_string(argv[1])) {
|
||||
command_error(client, ACK_ERROR_ARG,
|
||||
@ -393,7 +393,7 @@ handle_replay_gain_mode(Client &client,
|
||||
|
||||
CommandResult
|
||||
handle_replay_gain_status(Client &client,
|
||||
gcc_unused int argc, gcc_unused char *argv[])
|
||||
gcc_unused unsigned argc, gcc_unused char *argv[])
|
||||
{
|
||||
client_printf(client, "replay_gain_mode: %s\n",
|
||||
replay_gain_get_mode_string());
|
||||
|
@ -25,66 +25,66 @@
|
||||
class Client;
|
||||
|
||||
CommandResult
|
||||
handle_play(Client &client, int argc, char *argv[]);
|
||||
handle_play(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_playid(Client &client, int argc, char *argv[]);
|
||||
handle_playid(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_stop(Client &client, int argc, char *argv[]);
|
||||
handle_stop(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_currentsong(Client &client, int argc, char *argv[]);
|
||||
handle_currentsong(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_pause(Client &client, int argc, char *argv[]);
|
||||
handle_pause(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_status(Client &client, int argc, char *argv[]);
|
||||
handle_status(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_next(Client &client, int argc, char *argv[]);
|
||||
handle_next(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_previous(Client &client, int argc, char *avg[]);
|
||||
handle_previous(Client &client, unsigned argc, char *avg[]);
|
||||
|
||||
CommandResult
|
||||
handle_repeat(Client &client, int argc, char *argv[]);
|
||||
handle_repeat(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_single(Client &client, int argc, char *argv[]);
|
||||
handle_single(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_consume(Client &client, int argc, char *argv[]);
|
||||
handle_consume(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_random(Client &client, int argc, char *argv[]);
|
||||
handle_random(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_clearerror(Client &client, int argc, char *argv[]);
|
||||
handle_clearerror(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_seek(Client &client, int argc, char *argv[]);
|
||||
handle_seek(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_seekid(Client &client, int argc, char *argv[]);
|
||||
handle_seekid(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_seekcur(Client &client, int argc, char *argv[]);
|
||||
handle_seekcur(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_crossfade(Client &client, int argc, char *argv[]);
|
||||
handle_crossfade(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_mixrampdb(Client &client, int argc, char *argv[]);
|
||||
handle_mixrampdb(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_mixrampdelay(Client &client, int argc, char *argv[]);
|
||||
handle_mixrampdelay(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_replay_gain_mode(Client &client, int argc, char *argv[]);
|
||||
handle_replay_gain_mode(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_replay_gain_status(Client &client, int argc, char *argv[]);
|
||||
handle_replay_gain_status(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
#endif
|
||||
|
@ -49,14 +49,14 @@ print_spl_list(Client &client, const PlaylistVector &list)
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_save(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_save(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
PlaylistResult result = spl_save_playlist(argv[1], client.playlist);
|
||||
return print_playlist_result(client, result);
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_load(Client &client, int argc, char *argv[])
|
||||
handle_load(Client &client, unsigned argc, char *argv[])
|
||||
{
|
||||
unsigned start_index, end_index;
|
||||
|
||||
@ -78,7 +78,7 @@ handle_load(Client &client, int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_listplaylist(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_listplaylist(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
if (playlist_file_print(client, argv[1], false))
|
||||
return CommandResult::OK;
|
||||
@ -91,7 +91,7 @@ handle_listplaylist(Client &client, gcc_unused int argc, char *argv[])
|
||||
|
||||
CommandResult
|
||||
handle_listplaylistinfo(Client &client,
|
||||
gcc_unused int argc, char *argv[])
|
||||
gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
if (playlist_file_print(client, argv[1], true))
|
||||
return CommandResult::OK;
|
||||
@ -103,7 +103,7 @@ handle_listplaylistinfo(Client &client,
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_rm(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_rm(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
Error error;
|
||||
return spl_delete(argv[1], error)
|
||||
@ -112,7 +112,7 @@ handle_rm(Client &client, gcc_unused int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_rename(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_rename(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
Error error;
|
||||
return spl_rename(argv[1], argv[2], error)
|
||||
@ -122,7 +122,7 @@ handle_rename(Client &client, gcc_unused int argc, char *argv[])
|
||||
|
||||
CommandResult
|
||||
handle_playlistdelete(Client &client,
|
||||
gcc_unused int argc, char *argv[]) {
|
||||
gcc_unused unsigned argc, char *argv[]) {
|
||||
char *playlist = argv[1];
|
||||
unsigned from;
|
||||
|
||||
@ -136,7 +136,7 @@ handle_playlistdelete(Client &client,
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_playlistmove(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_playlistmove(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
char *playlist = argv[1];
|
||||
unsigned from, to;
|
||||
@ -153,7 +153,7 @@ handle_playlistmove(Client &client, gcc_unused int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_playlistclear(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_playlistclear(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
Error error;
|
||||
return spl_clear(argv[1], error)
|
||||
@ -162,7 +162,7 @@ handle_playlistclear(Client &client, gcc_unused int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_playlistadd(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_playlistadd(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
char *playlist = argv[1];
|
||||
char *uri = argv[2];
|
||||
@ -197,7 +197,7 @@ handle_playlistadd(Client &client, gcc_unused int argc, char *argv[])
|
||||
|
||||
CommandResult
|
||||
handle_listplaylists(Client &client,
|
||||
gcc_unused int argc, gcc_unused char *argv[])
|
||||
gcc_unused unsigned argc, gcc_unused char *argv[])
|
||||
{
|
||||
Error error;
|
||||
const auto list = ListPlaylistFiles(error);
|
||||
|
@ -25,36 +25,36 @@
|
||||
class Client;
|
||||
|
||||
CommandResult
|
||||
handle_save(Client &client, int argc, char *argv[]);
|
||||
handle_save(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_load(Client &client, int argc, char *argv[]);
|
||||
handle_load(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_listplaylist(Client &client, int argc, char *argv[]);
|
||||
handle_listplaylist(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_listplaylistinfo(Client &client, int argc, char *argv[]);
|
||||
handle_listplaylistinfo(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_rm(Client &client, int argc, char *argv[]);
|
||||
handle_rm(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_rename(Client &client, int argc, char *argv[]);
|
||||
handle_rename(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_playlistdelete(Client &client, int argc, char *argv[]);
|
||||
handle_playlistdelete(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_playlistmove(Client &client, int argc, char *argv[]);
|
||||
handle_playlistmove(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_playlistclear(Client &client, int argc, char *argv[]);
|
||||
handle_playlistclear(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_playlistadd(Client &client, int argc, char *argv[]);
|
||||
handle_playlistadd(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_listplaylists(Client &client, int argc, char *argv[]);
|
||||
handle_listplaylists(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
#endif
|
||||
|
@ -57,7 +57,7 @@ translate_uri(Client &client, const char *uri)
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_add(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_add(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
const char *const uri = translate_uri(client, argv[1]);
|
||||
if (uri == nullptr)
|
||||
@ -86,7 +86,7 @@ handle_add(Client &client, gcc_unused int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_addid(Client &client, int argc, char *argv[])
|
||||
handle_addid(Client &client, unsigned argc, char *argv[])
|
||||
{
|
||||
const char *const uri = translate_uri(client, argv[1]);
|
||||
if (uri == nullptr)
|
||||
@ -116,7 +116,7 @@ handle_addid(Client &client, int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_delete(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_delete(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
unsigned start, end;
|
||||
|
||||
@ -128,7 +128,7 @@ handle_delete(Client &client, gcc_unused int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_deleteid(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_deleteid(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
unsigned id;
|
||||
|
||||
@ -141,7 +141,7 @@ handle_deleteid(Client &client, gcc_unused int argc, char *argv[])
|
||||
|
||||
CommandResult
|
||||
handle_playlist(Client &client,
|
||||
gcc_unused int argc, gcc_unused char *argv[])
|
||||
gcc_unused unsigned argc, gcc_unused char *argv[])
|
||||
{
|
||||
playlist_print_uris(client, client.playlist);
|
||||
return CommandResult::OK;
|
||||
@ -149,7 +149,7 @@ handle_playlist(Client &client,
|
||||
|
||||
CommandResult
|
||||
handle_shuffle(gcc_unused Client &client,
|
||||
gcc_unused int argc, gcc_unused char *argv[])
|
||||
gcc_unused unsigned argc, gcc_unused char *argv[])
|
||||
{
|
||||
unsigned start = 0, end = client.playlist.queue.GetLength();
|
||||
if (argc == 2 && !check_range(client, &start, &end, argv[1]))
|
||||
@ -161,14 +161,14 @@ handle_shuffle(gcc_unused Client &client,
|
||||
|
||||
CommandResult
|
||||
handle_clear(gcc_unused Client &client,
|
||||
gcc_unused int argc, gcc_unused char *argv[])
|
||||
gcc_unused unsigned argc, gcc_unused char *argv[])
|
||||
{
|
||||
client.partition.ClearQueue();
|
||||
return CommandResult::OK;
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_plchanges(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_plchanges(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
uint32_t version;
|
||||
|
||||
@ -180,7 +180,7 @@ handle_plchanges(Client &client, gcc_unused int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_plchangesposid(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_plchangesposid(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
uint32_t version;
|
||||
|
||||
@ -192,7 +192,7 @@ handle_plchangesposid(Client &client, gcc_unused int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_playlistinfo(Client &client, int argc, char *argv[])
|
||||
handle_playlistinfo(Client &client, unsigned argc, char *argv[])
|
||||
{
|
||||
unsigned start = 0, end = std::numeric_limits<unsigned>::max();
|
||||
bool ret;
|
||||
@ -209,7 +209,7 @@ handle_playlistinfo(Client &client, int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_playlistid(Client &client, int argc, char *argv[])
|
||||
handle_playlistid(Client &client, unsigned argc, char *argv[])
|
||||
{
|
||||
if (argc >= 2) {
|
||||
unsigned id;
|
||||
@ -229,7 +229,7 @@ handle_playlistid(Client &client, int argc, char *argv[])
|
||||
}
|
||||
|
||||
static CommandResult
|
||||
handle_playlist_match(Client &client, int argc, char *argv[],
|
||||
handle_playlist_match(Client &client, unsigned argc, char *argv[],
|
||||
bool fold_case)
|
||||
{
|
||||
ConstBuffer<const char *> args(argv + 1, argc - 1);
|
||||
@ -245,19 +245,19 @@ handle_playlist_match(Client &client, int argc, char *argv[],
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_playlistfind(Client &client, int argc, char *argv[])
|
||||
handle_playlistfind(Client &client, unsigned argc, char *argv[])
|
||||
{
|
||||
return handle_playlist_match(client, argc, argv, false);
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_playlistsearch(Client &client, int argc, char *argv[])
|
||||
handle_playlistsearch(Client &client, unsigned argc, char *argv[])
|
||||
{
|
||||
return handle_playlist_match(client, argc, argv, true);
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_prio(Client &client, int argc, char *argv[])
|
||||
handle_prio(Client &client, unsigned argc, char *argv[])
|
||||
{
|
||||
unsigned priority;
|
||||
|
||||
@ -270,7 +270,7 @@ handle_prio(Client &client, int argc, char *argv[])
|
||||
return CommandResult::ERROR;
|
||||
}
|
||||
|
||||
for (int i = 2; i < argc; ++i) {
|
||||
for (unsigned i = 2; i < argc; ++i) {
|
||||
unsigned start_position, end_position;
|
||||
if (!check_range(client, &start_position, &end_position,
|
||||
argv[i]))
|
||||
@ -288,7 +288,7 @@ handle_prio(Client &client, int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_prioid(Client &client, int argc, char *argv[])
|
||||
handle_prioid(Client &client, unsigned argc, char *argv[])
|
||||
{
|
||||
unsigned priority;
|
||||
|
||||
@ -301,7 +301,7 @@ handle_prioid(Client &client, int argc, char *argv[])
|
||||
return CommandResult::ERROR;
|
||||
}
|
||||
|
||||
for (int i = 2; i < argc; ++i) {
|
||||
for (unsigned i = 2; i < argc; ++i) {
|
||||
unsigned song_id;
|
||||
if (!check_unsigned(client, &song_id, argv[i]))
|
||||
return CommandResult::ERROR;
|
||||
@ -316,7 +316,7 @@ handle_prioid(Client &client, int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_move(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_move(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
unsigned start, end;
|
||||
int to;
|
||||
@ -332,7 +332,7 @@ handle_move(Client &client, gcc_unused int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_moveid(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_moveid(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
unsigned id;
|
||||
int to;
|
||||
@ -346,7 +346,7 @@ handle_moveid(Client &client, gcc_unused int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_swap(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_swap(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
unsigned song1, song2;
|
||||
|
||||
@ -361,7 +361,7 @@ handle_swap(Client &client, gcc_unused int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_swapid(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_swapid(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
unsigned id1, id2;
|
||||
|
||||
|
@ -25,60 +25,60 @@
|
||||
class Client;
|
||||
|
||||
CommandResult
|
||||
handle_add(Client &client, int argc, char *argv[]);
|
||||
handle_add(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_addid(Client &client, int argc, char *argv[]);
|
||||
handle_addid(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_delete(Client &client, int argc, char *argv[]);
|
||||
handle_delete(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_deleteid(Client &client, int argc, char *argv[]);
|
||||
handle_deleteid(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_playlist(Client &client, int argc, char *argv[]);
|
||||
handle_playlist(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_shuffle(Client &client, int argc, char *argv[]);
|
||||
handle_shuffle(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_clear(Client &client, int argc, char *argv[]);
|
||||
handle_clear(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_plchanges(Client &client, int argc, char *argv[]);
|
||||
handle_plchanges(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_plchangesposid(Client &client, int argc, char *argv[]);
|
||||
handle_plchangesposid(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_playlistinfo(Client &client, int argc, char *argv[]);
|
||||
handle_playlistinfo(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_playlistid(Client &client, int argc, char *argv[]);
|
||||
handle_playlistid(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_playlistfind(Client &client, int argc, char *argv[]);
|
||||
handle_playlistfind(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_playlistsearch(Client &client, int argc, char *argv[]);
|
||||
handle_playlistsearch(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_prio(Client &client, int argc, char *argv[]);
|
||||
handle_prio(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_prioid(Client &client, int argc, char *argv[]);
|
||||
handle_prioid(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_move(Client &client, int argc, char *argv[]);
|
||||
handle_move(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_moveid(Client &client, int argc, char *argv[]);
|
||||
handle_moveid(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_swap(Client &client, int argc, char *argv[]);
|
||||
handle_swap(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_swapid(Client &client, int argc, char *argv[]);
|
||||
handle_swapid(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
#endif
|
||||
|
@ -51,7 +51,7 @@ sticker_song_find_print_cb(const LightSong &song, const char *value,
|
||||
}
|
||||
|
||||
static CommandResult
|
||||
handle_sticker_song(Client &client, int argc, char *argv[])
|
||||
handle_sticker_song(Client &client, unsigned argc, char *argv[])
|
||||
{
|
||||
Error error;
|
||||
const Database *db = client.GetDatabase(error);
|
||||
@ -150,7 +150,7 @@ handle_sticker_song(Client &client, int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_sticker(Client &client, int argc, char *argv[])
|
||||
handle_sticker(Client &client, unsigned argc, char *argv[])
|
||||
{
|
||||
assert(argc >= 4);
|
||||
|
||||
|
@ -25,6 +25,6 @@
|
||||
class Client;
|
||||
|
||||
CommandResult
|
||||
handle_sticker(Client &client, int argc, char *argv[]);
|
||||
handle_sticker(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
#endif
|
||||
|
@ -166,7 +166,7 @@ print_storage_uri(Client &client, const Storage &storage)
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_listmounts(Client &client, gcc_unused int argc, gcc_unused char *argv[])
|
||||
handle_listmounts(Client &client, gcc_unused unsigned argc, gcc_unused char *argv[])
|
||||
{
|
||||
Storage *_composite = client.partition.instance.storage;
|
||||
if (_composite == nullptr) {
|
||||
@ -188,7 +188,7 @@ handle_listmounts(Client &client, gcc_unused int argc, gcc_unused char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_mount(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_mount(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
Storage *_composite = client.partition.instance.storage;
|
||||
if (_composite == nullptr) {
|
||||
@ -250,7 +250,7 @@ handle_mount(Client &client, gcc_unused int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_unmount(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_unmount(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
Storage *_composite = client.partition.instance.storage;
|
||||
if (_composite == nullptr) {
|
||||
|
@ -32,12 +32,12 @@ CommandResult
|
||||
handle_listfiles_storage(Client &client, const char *uri);
|
||||
|
||||
CommandResult
|
||||
handle_listmounts(Client &client, int argc, char *argv[]);
|
||||
handle_listmounts(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_mount(Client &client, int argc, char *argv[]);
|
||||
handle_mount(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_unmount(Client &client, int argc, char *argv[]);
|
||||
handle_unmount(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
#endif
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "Partition.hxx"
|
||||
|
||||
CommandResult
|
||||
handle_addtagid(Client &client, gcc_unused int argc, char *argv[])
|
||||
handle_addtagid(Client &client, gcc_unused unsigned argc, char *argv[])
|
||||
{
|
||||
unsigned song_id;
|
||||
if (!check_unsigned(client, &song_id, argv[1]))
|
||||
@ -52,7 +52,7 @@ handle_addtagid(Client &client, gcc_unused int argc, char *argv[])
|
||||
}
|
||||
|
||||
CommandResult
|
||||
handle_cleartagid(Client &client, int argc, char *argv[])
|
||||
handle_cleartagid(Client &client, unsigned argc, char *argv[])
|
||||
{
|
||||
unsigned song_id;
|
||||
if (!check_unsigned(client, &song_id, argv[1]))
|
||||
|
@ -25,9 +25,9 @@
|
||||
class Client;
|
||||
|
||||
CommandResult
|
||||
handle_addtagid(Client &client, int argc, char *argv[]);
|
||||
handle_addtagid(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
CommandResult
|
||||
handle_cleartagid(Client &client, int argc, char *argv[]);
|
||||
handle_cleartagid(Client &client, unsigned argc, char *argv[]);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user