rsked/mpdclient.cc
/// Add a local file, directory, or URL to the end of the queue.
/// The string should be relative to the music directory, and
/// should not have a trailing slash.
///
/// * May throw.
///
Add a local file, directory, or URL to the end of the queue.
The string should be relative to the music directory, and
should not have a trailing slash.

May throw.
Add a local file directory or URL to the end of the queue . The string should be relative to the music directory and should not have a trailing slash . May throw .
void Mpd_client::enqueue( const std::string &uri )
{
    connect();
    assert_connected();
    int id = mpd_run_add( m_conn, uri.c_str() );
    if (-1 == id) {
        enum mpd_server_error serr;
        diag_error("Mpd_client::enqueue: ",serr);
        LOG_ERROR(Lgr) << "Failed to enqueue resource '" << uri << "'";
        m_last_err = Mpd_err::NoExist;
        throw Mpd_queue_exception();
    }
}
void Mpd_client :: enqueue ( const std :: string & uri ) { connect ( ) ; assert_connected ( ) ; int id = mpd_run_add ( m_conn , uri . c_str ( ) ) ; if ( -1 == id ) { enum mpd_server_error serr ; diag_error ( " " , serr ) ; LOG_ERROR ( Lgr ) << " " << uri << " " ; m_last_err = Mpd_err :: NoExist ; throw Mpd_queue_exception ( ) ; } }
Add a local file, directory, or URL to the end of the queue.
Add a local file directory or URL to the end of the queue .