diff options
author | Max Kellermann <max@duempel.org> | 2008-11-18 22:57:14 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-11-18 22:57:14 +0100 |
commit | 94365df29c42615d139f32d1a465d6654a2af800 (patch) | |
tree | 17626ca559bd67f9471f1ab5becc597a208d7901 /src/libmpdclient.h | |
parent | d322c0bc8f15b899c18d1a87823546847396303f (diff) | |
download | mpd-94365df29c42615d139f32d1a465d6654a2af800.tar.gz mpd-94365df29c42615d139f32d1a465d6654a2af800.tar.xz mpd-94365df29c42615d139f32d1a465d6654a2af800.zip |
libmpdclient: convert MPD_ACK_ constants to enum
Diffstat (limited to 'src/libmpdclient.h')
-rw-r--r-- | src/libmpdclient.h | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/src/libmpdclient.h b/src/libmpdclient.h index 792894476..2170287fb 100644 --- a/src/libmpdclient.h +++ b/src/libmpdclient.h @@ -55,22 +55,25 @@ #define MPD_ERROR_ACK 18 /* ACK returned! */ #define MPD_ERROR_BUFFEROVERRUN 19 /* Buffer was overrun! */ -#define MPD_ACK_ERROR_UNK -1 #define MPD_ERROR_AT_UNK -1 -#define MPD_ACK_ERROR_NOT_LIST 1 -#define MPD_ACK_ERROR_ARG 2 -#define MPD_ACK_ERROR_PASSWORD 3 -#define MPD_ACK_ERROR_PERMISSION 4 -#define MPD_ACK_ERROR_UNKNOWN_CMD 5 +enum mpd_ack { + MPD_ACK_ERROR_UNK = -1, -#define MPD_ACK_ERROR_NO_EXIST 50 -#define MPD_ACK_ERROR_PLAYLIST_MAX 51 -#define MPD_ACK_ERROR_SYSTEM 52 -#define MPD_ACK_ERROR_PLAYLIST_LOAD 53 -#define MPD_ACK_ERROR_UPDATE_ALREADY 54 -#define MPD_ACK_ERROR_PLAYER_SYNC 55 -#define MPD_ACK_ERROR_EXIST 56 + MPD_ACK_ERROR_NOT_LIST = 1, + MPD_ACK_ERROR_ARG = 2, + MPD_ACK_ERROR_PASSWORD = 3, + MPD_ACK_ERROR_PERMISSION = 4, + MPD_ACK_ERROR_UNKNOWN_CMD = 5, + + MPD_ACK_ERROR_NO_EXIST = 50, + MPD_ACK_ERROR_PLAYLIST_MAX = 51, + MPD_ACK_ERROR_SYSTEM = 52, + MPD_ACK_ERROR_PLAYLIST_LOAD = 53, + MPD_ACK_ERROR_UPDATE_ALREADY = 54, + MPD_ACK_ERROR_PLAYER_SYNC = 55, + MPD_ACK_ERROR_EXIST = 56, +}; #ifdef __cplusplus extern "C" { @@ -110,7 +113,7 @@ typedef struct _mpd_Connection { int version[3]; /* IMPORTANT, you want to get the error messages from here */ char errorStr[512]; - int errorCode; + enum mpd_ack errorCode; int errorAt; /* this will be set to MPD_ERROR_* if there is an error, 0 if not */ int error; |