diff options
author | Max Kellermann <max@duempel.org> | 2014-02-09 08:05:02 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-02-09 08:07:48 +0100 |
commit | 570b12ec1392dc6561b21c7bb8b653eb7a922a01 (patch) | |
tree | 670fa261da1ee278273b095d29feb36688ada785 /src/Idle.hxx | |
parent | ac286ef734cb3d8cc59acb71096da29c6d83d690 (diff) | |
download | mpd-570b12ec1392dc6561b21c7bb8b653eb7a922a01.tar.gz mpd-570b12ec1392dc6561b21c7bb8b653eb7a922a01.tar.xz mpd-570b12ec1392dc6561b21c7bb8b653eb7a922a01.zip |
Idle: error out when unrecognized idle event was specified
Implements the error checks missing in commit 0bad8406
Diffstat (limited to 'src/Idle.hxx')
-rw-r--r-- | src/Idle.hxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Idle.hxx b/src/Idle.hxx index 7fc79d10a..48f7a6aa0 100644 --- a/src/Idle.hxx +++ b/src/Idle.hxx @@ -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 |