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

int mpd_run_add_id ( struct mpd_connection connection,
const char *  file 

Executes the "addid" command and reads the response.

the new song id, -1 on error or if MPD did not send an id

Definition at line 196 of file queue.c.

References mpd_recv_song_id(), mpd_response_finish(), mpd_run_add_id(), and mpd_send_add_id().

Referenced by mpd_run_add_id().

      int id;

      if (!mpd_run_check(connection) ||
          !mpd_send_add_id(connection, file))
            return -1;

      id = mpd_recv_song_id(connection);

      if (!mpd_response_finish(connection))
            id = -1;

      return id;

Generated by  Doxygen 1.6.0   Back to index