diff options
author | Marc Pavot <m.pavot@gmail.com> | 2008-11-22 13:26:21 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-11-22 13:26:21 +0100 |
commit | 0bad84066bc12a370b8f1e54c37f705fad21929b (patch) | |
tree | 4d3b34b9e984aafd4389f98fa858d996e52df104 /src/idle.c | |
parent | 976d5045c671700b1e16ed2b98e746a67fa91e8b (diff) | |
download | mpd-0bad84066bc12a370b8f1e54c37f705fad21929b.tar.gz mpd-0bad84066bc12a370b8f1e54c37f705fad21929b.tar.xz mpd-0bad84066bc12a370b8f1e54c37f705fad21929b.zip |
command: allow clients to subscribe to specific idle events
The client may provide the names of idle events as arguments to the
"idle" command to inform MPD that it is only interested in these
events.
Diffstat (limited to '')
-rw-r--r-- | src/idle.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/idle.c b/src/idle.c index c779d0a91..884086aae 100644 --- a/src/idle.c +++ b/src/idle.c @@ -30,6 +30,18 @@ static unsigned idle_flags; static pthread_mutex_t idle_mutex = PTHREAD_MUTEX_INITIALIZER; +static const char *const idle_names[] = { + "database", + "stored_playlist", + "playlist", + "player", + "mixer", + "output", + "options", + "elapsed", + NULL +}; + void idle_add(unsigned flags) { @@ -54,3 +66,9 @@ idle_get(void) return flags; } + +const char*const* +idle_get_names(void) +{ + return idle_names; +} |