+/** @brief Map from state bits to state change events */
+static const struct {
+ unsigned long bit;
+ const char *event;
+} state_events[] = {
+ { DISORDER_PLAYING_ENABLED, "enabled-changed" },
+ { DISORDER_RANDOM_ENABLED, "random-changed" },
+ { DISORDER_TRACK_PAUSED, "pause-changed" },
+ { DISORDER_PLAYING, "playing-changed" },
+};
+#define NSTATE_EVENTS (sizeof state_events / sizeof *state_events)
+