Idle: error out when unrecognized idle event was specified

Implements the error checks missing in commit 0bad8406
This commit is contained in:
Max Kellermann
2014-02-09 08:05:02 +01:00
parent ac286ef734
commit 570b12ec13
4 changed files with 33 additions and 8 deletions

View File

@@ -25,6 +25,8 @@
#ifndef MPD_IDLE_HXX
#define MPD_IDLE_HXX
#include "Compiler.h"
/** song database has been updated*/
static constexpr unsigned IDLE_DATABASE = 0x1;
@@ -81,4 +83,12 @@ idle_get(void);
const char*const*
idle_get_names(void);
/**
* Parse an idle name and return its mask. Returns 0 if the given
* name is unknown.
*/
gcc_nonnull_all gcc_pure
unsigned
idle_parse_name(const char *name);
#endif