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

mpd_malloc struct mpd_song* mpd_run_get_queue_song_id ( struct mpd_connection connection,
unsigned  id 
) [read]

Shortcut for mpd_send_get_queue_song_id() and mpd_recv_song().

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

Definition at line 88 of file queue.c.

References mpd_recv_song(), mpd_response_finish(), mpd_run_get_queue_song_id(), mpd_send_get_queue_song_id(), and mpd_song_free().

Referenced by mpd_run_get_queue_song_id().

      struct mpd_song *song;

      if (!mpd_run_check(connection) ||
          !mpd_send_get_queue_song_id(connection, id))
            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