From: Jonathan Neuschäfer Date: Fri, 4 Nov 2011 00:01:37 +0000 (+0100) Subject: mpdclient: define MPD_IDLE_ALL X-Git-Tag: release-0.20~56 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0cf7ca98010e4a3de33f05b412b5a9e7a6b04d20;p=ncmpc.git mpdclient: define MPD_IDLE_ALL --- diff --git a/src/main.c b/src/main.c index 0f1ecf8..389b8c6 100644 --- a/src/main.c +++ b/src/main.c @@ -360,9 +360,7 @@ timer_reconnect(G_GNUC_UNUSED gpointer data) 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 637aef7..34d26df 100644 --- a/src/mpdclient.c +++ b/src/mpdclient.c @@ -136,9 +136,7 @@ mpdclient_disconnect(struct 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 798e979..7cdf7f5 100644 --- a/src/mpdclient.h +++ b/src/mpdclient.h @@ -41,6 +41,26 @@ struct mpdclient { 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