summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f10710d)
raw | patch | inline | side by side (parent: f10710d)
author | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | |
Fri, 4 Nov 2011 00:01:37 +0000 (01:01 +0100) | ||
committer | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | |
Fri, 4 Nov 2011 20:37:26 +0000 (21:37 +0100) |
src/main.c | patch | blob | history | |
src/mpdclient.c | patch | blob | history | |
src/mpdclient.h | patch | blob | history |
diff --git a/src/main.c b/src/main.c
index 0f1ecf888182025c6297157ec9529517a83b22f4..389b8c68e570f2c8eb52a22e0419a81cfa62f35d 100644 (file)
--- a/src/main.c
+++ b/src/main.c
doupdate();
/* update immediately */
- mpd->events = MPD_IDLE_DATABASE|MPD_IDLE_STORED_PLAYLIST|
- MPD_IDLE_QUEUE|MPD_IDLE_PLAYER|MPD_IDLE_MIXER|MPD_IDLE_OUTPUT|
- MPD_IDLE_OPTIONS|MPD_IDLE_UPDATE;
+ mpd->events = MPD_IDLE_ALL;
do_mpd_update();
diff --git a/src/mpdclient.c b/src/mpdclient.c
index 637aef76b8d0ffea6d8d4682c632eba3e67be154..34d26df69e30a81965f3df091af98aad267a48cc 100644 (file)
--- a/src/mpdclient.c
+++ b/src/mpdclient.c
c->song = NULL;
/* everything has changed after a disconnect */
- c->events |= MPD_IDLE_DATABASE|MPD_IDLE_STORED_PLAYLIST|
- MPD_IDLE_QUEUE|MPD_IDLE_PLAYER|MPD_IDLE_MIXER|MPD_IDLE_OUTPUT|
- MPD_IDLE_OPTIONS|MPD_IDLE_UPDATE;
+ c->events |= MPD_IDLE_ALL;
}
bool
diff --git a/src/mpdclient.h b/src/mpdclient.h
index 798e979c4d2bbcf73f006282b944627e71c97794..7cdf7f5da121021f1726fe5a703e3489a944bbcf 100644 (file)
--- a/src/mpdclient.h
+++ b/src/mpdclient.h
enum mpd_idle events;
};
+enum {
+ /**
+ * all idle events the version of libmpdclient, ncmpc is compiled
+ * against, supports
+ */
+ MPD_IDLE_ALL = MPD_IDLE_DATABASE
+ | MPD_IDLE_STORED_PLAYLIST
+ | MPD_IDLE_QUEUE
+ | MPD_IDLE_PLAYER
+ | MPD_IDLE_MIXER
+ | MPD_IDLE_OUTPUT
+ | MPD_IDLE_OPTIONS
+ | MPD_IDLE_UPDATE
+#if LIBMPDCLIENT_CHECK_VERSION(2,5,0)
+ | MPD_IDLE_STICKER
+ | MPD_IDLE_SUBSCRIPTION
+ | MPD_IDLE_MESSAGE
+#endif
+};
+
/** functions ***************************************************************/
bool