Logo Search packages:      
Sourcecode: libmpdclient version File versions  Download package

mpd_malloc struct mpd_song* mpd_run_get_queue_song_pos ( struct mpd_connection connection,
unsigned  pos 
) [read]

Shortcut for mpd_send_get_queue_song_pos() and mpd_recv_song().

connection the connection to MPD
pos the position of the requested song
the song at the specified position, or NULL on error

Definition at line 63 of file queue.c.

References mpd_recv_song(), mpd_response_finish(), mpd_run_get_queue_song_pos(), mpd_send_get_queue_song_pos(), and mpd_song_free().

Referenced by mpd_run_get_queue_song_pos().

      struct mpd_song *song;

      if (!mpd_run_check(connection) ||
          !mpd_send_get_queue_song_pos(connection, pos))
            return NULL;

      song = mpd_recv_song(connection);
      if (!mpd_response_finish(connection) && song != NULL) {
            return NULL;

      return song;


Generated by  Doxygen 1.6.0   Back to index