Add PERMISSION_NONE define, for commands that require no permission
git-svn-id: https://svn.musicpd.org/mpd/trunk@4583 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
7c9d3c4186
commit
7f4f3010a5
@ -983,7 +983,7 @@ void initCommands(void)
|
||||
addCommand(COMMAND_PAUSE, PERMISSION_CONTROL, 0, 1, handlePause, NULL);
|
||||
addCommand(COMMAND_STATUS, PERMISSION_READ, 0, 0, commandStatus, NULL);
|
||||
addCommand(COMMAND_KILL, PERMISSION_ADMIN, -1, -1, handleKill, NULL);
|
||||
addCommand(COMMAND_CLOSE, 0, -1, -1, handleClose, NULL);
|
||||
addCommand(COMMAND_CLOSE, PERMISSION_NONE, -1, -1, handleClose, NULL);
|
||||
addCommand(COMMAND_ADD, PERMISSION_ADD, 1, 1, handleAdd, NULL);
|
||||
addCommand(COMMAND_ADDID, PERMISSION_ADD, 1, 1, handleAddId, NULL);
|
||||
addCommand(COMMAND_DELETE, PERMISSION_CONTROL, 1, 1, handleDelete, NULL);
|
||||
@ -1018,9 +1018,9 @@ void initCommands(void)
|
||||
addCommand(COMMAND_SEEK, PERMISSION_CONTROL, 2, 2, handleSeek, NULL);
|
||||
addCommand(COMMAND_SEEKID, PERMISSION_CONTROL, 2, 2, handleSeekId, NULL);
|
||||
addCommand(COMMAND_LISTALLINFO, PERMISSION_READ, 0, 1, handleListAllInfo, NULL);
|
||||
addCommand(COMMAND_PING, 0, 0, 0, handlePing, NULL);
|
||||
addCommand(COMMAND_PING, PERMISSION_NONE, 0, 0, handlePing, NULL);
|
||||
addCommand(COMMAND_SETVOL, PERMISSION_CONTROL, 1, 1, handleSetVol, NULL);
|
||||
addCommand(COMMAND_PASSWORD, 0, 1, 1, handlePassword, NULL);
|
||||
addCommand(COMMAND_PASSWORD, PERMISSION_NONE, 1, 1, handlePassword, NULL);
|
||||
addCommand(COMMAND_CROSSFADE, PERMISSION_CONTROL, 1, 1, handleCrossfade, NULL);
|
||||
addCommand(COMMAND_URL_HANDLERS, PERMISSION_READ, 0, 0, handleUrlHandlers, NULL);
|
||||
addCommand(COMMAND_PLCHANGES, PERMISSION_READ, 1, 1, handlePlaylistChanges, NULL);
|
||||
@ -1028,8 +1028,8 @@ void initCommands(void)
|
||||
addCommand(COMMAND_ENABLE_DEV, PERMISSION_ADMIN, 1, 1, handleEnableDevice, NULL);
|
||||
addCommand(COMMAND_DISABLE_DEV, PERMISSION_ADMIN, 1, 1, handleDisableDevice, NULL);
|
||||
addCommand(COMMAND_DEVICES, PERMISSION_READ, 0, 0, handleDevices, NULL);
|
||||
addCommand(COMMAND_COMMANDS, 0, 0, 0, handleCommands, NULL);
|
||||
addCommand(COMMAND_NOTCOMMANDS, 0, 0, 0, handleNotcommands, NULL);
|
||||
addCommand(COMMAND_COMMANDS, PERMISSION_NONE, 0, 0, handleCommands, NULL);
|
||||
addCommand(COMMAND_NOTCOMMANDS, PERMISSION_NONE, 0, 0, handleNotcommands, NULL);
|
||||
|
||||
sortList(commandList);
|
||||
}
|
||||
|
@ -21,10 +21,11 @@
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#define PERMISSION_READ 1
|
||||
#define PERMISSION_ADD 2
|
||||
#define PERMISSION_CONTROL 4
|
||||
#define PERMISSION_ADMIN 8
|
||||
#define PERMISSION_NONE 0
|
||||
#define PERMISSION_READ 1
|
||||
#define PERMISSION_ADD 2
|
||||
#define PERMISSION_CONTROL 4
|
||||
#define PERMISSION_ADMIN 8
|
||||
|
||||
void initPermissions();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user