Code

po: update German translation
[ncmpc.git] / src / mpdclient.h
index 6c8758f6674d4becdb22a8915d50dd947254c606..a93db74baf135392acba5ff418bc3f18d2dffc6d 100644 (file)
@@ -57,12 +57,19 @@ mpdclient_is_connected(const struct mpdclient *c)
        return c->connection != NULL;
 }
 
+G_GNUC_PURE
+static inline bool
+mpdclient_is_playing(const struct mpdclient *c)
+{
+       return c->status != NULL &&
+               (mpd_status_get_state(c->status) == MPD_STATE_PLAY ||
+                mpd_status_get_state(c->status) == MPD_STATE_PAUSE);
+}
+
 static inline const struct mpd_song *
 mpdclient_get_current_song(const struct mpdclient *c)
 {
-       return c->song != NULL && c->status != NULL &&
-               (mpd_status_get_state(c->status) == MPD_STATE_PLAY ||
-                mpd_status_get_state(c->status) == MPD_STATE_PAUSE)
+       return c->song != NULL && mpdclient_is_playing(c)
                ? c->song
                : NULL;
 }
@@ -92,9 +99,6 @@ mpdclient_ui_error(const char *message);
 
 /*** MPD Commands  **********************************************************/
 
-bool
-mpdclient_cmd_play(struct mpdclient *c, gint index);
-
 bool
 mpdclient_cmd_crop(struct mpdclient *c);
 
@@ -123,7 +127,7 @@ bool
 mpdclient_cmd_delete_range(struct mpdclient *c, unsigned start, unsigned end);
 
 bool
-mpdclient_cmd_move(struct mpdclient *c, gint old_index, gint new_index);
+mpdclient_cmd_move(struct mpdclient *c, unsigned dest, unsigned src);
 
 /*** playlist functions  **************************************************/