Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
ac15581c
Commit
ac15581c
authored
Feb 28, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
command/error: remove unused function print_playlist_result()
parent
9e2e8821
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
57 deletions
+1
-57
CommandError.cxx
src/command/CommandError.cxx
+1
-53
CommandError.hxx
src/command/CommandError.hxx
+0
-4
No files found.
src/command/CommandError.cxx
View file @
ac15581c
...
...
@@ -19,6 +19,7 @@
#include "config.h"
#include "CommandError.hxx"
#include "PlaylistError.hxx"
#include "db/DatabaseError.hxx"
#include "LocateUri.hxx"
#include "client/Response.hxx"
...
...
@@ -84,59 +85,6 @@ ToAck(DatabaseErrorCode code)
}
#endif
CommandResult
print_playlist_result
(
Response
&
r
,
PlaylistResult
result
)
{
switch
(
result
)
{
case
PlaylistResult
:
:
SUCCESS
:
return
CommandResult
::
OK
;
case
PlaylistResult
:
:
DENIED
:
r
.
Error
(
ACK_ERROR_PERMISSION
,
"Access denied"
);
return
CommandResult
::
ERROR
;
case
PlaylistResult
:
:
NO_SUCH_SONG
:
r
.
Error
(
ACK_ERROR_NO_EXIST
,
"No such song"
);
return
CommandResult
::
ERROR
;
case
PlaylistResult
:
:
NO_SUCH_LIST
:
r
.
Error
(
ACK_ERROR_NO_EXIST
,
"No such playlist"
);
return
CommandResult
::
ERROR
;
case
PlaylistResult
:
:
LIST_EXISTS
:
r
.
Error
(
ACK_ERROR_EXIST
,
"Playlist already exists"
);
return
CommandResult
::
ERROR
;
case
PlaylistResult
:
:
BAD_NAME
:
r
.
Error
(
ACK_ERROR_ARG
,
"playlist name is invalid: "
"playlist names may not contain slashes,"
" newlines or carriage returns"
);
return
CommandResult
::
ERROR
;
case
PlaylistResult
:
:
BAD_RANGE
:
r
.
Error
(
ACK_ERROR_ARG
,
"Bad song index"
);
return
CommandResult
::
ERROR
;
case
PlaylistResult
:
:
NOT_PLAYING
:
r
.
Error
(
ACK_ERROR_PLAYER_SYNC
,
"Not playing"
);
return
CommandResult
::
ERROR
;
case
PlaylistResult
:
:
TOO_LARGE
:
r
.
Error
(
ACK_ERROR_PLAYLIST_MAX
,
"playlist is at the max size"
);
return
CommandResult
::
ERROR
;
case
PlaylistResult
:
:
DISABLED
:
r
.
Error
(
ACK_ERROR_UNKNOWN
,
"stored playlist support is disabled"
);
return
CommandResult
::
ERROR
;
}
assert
(
0
);
return
CommandResult
::
ERROR
;
}
gcc_pure
static
enum
ack
ToAck
(
const
Error
&
error
)
...
...
src/command/CommandError.hxx
View file @
ac15581c
...
...
@@ -21,16 +21,12 @@
#define MPD_COMMAND_ERROR_HXX
#include "CommandResult.hxx"
#include "PlaylistError.hxx"
#include <exception>
class
Response
;
class
Error
;
CommandResult
print_playlist_result
(
Response
&
r
,
PlaylistResult
result
);
/**
* Send the #Error to the client.
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment