本文整理汇总了C++中ContentFetcher::getDaap方法的典型用法代码示例。如果您正苦于以下问题:C++ ContentFetcher::getDaap方法的具体用法?C++ ContentFetcher::getDaap怎么用?C++ ContentFetcher::getDaap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ContentFetcher
的用法示例。
在下文中一共展示了ContentFetcher::getDaap方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: raw
void
Reader::updateFinished( int /*id*/, bool error )
{
DEBUG_BLOCK
ContentFetcher* http = (ContentFetcher*) sender();
disconnect( http, SIGNAL( requestFinished( int, bool ) ), this, SLOT( updateFinished( int, bool ) ) );
if( error )
{
http->deleteLater();
warning() << "what is going on here? " << http->error();
return;
}
QDataStream raw( http->results() );
Map updateResults = parse( raw, 0, true );
if( updateResults["mupd"].toList().isEmpty() )
return; //error
if( updateResults["mupd"].toList()[0].toMap()["musr"].toList().isEmpty() )
return; //error
m_loginString = m_loginString + "&revision-number=" +
QString::number( updateResults["mupd"].toList()[0].toMap()["musr"].toList()[0].toInt() );
connect( http, SIGNAL( requestFinished( int, bool ) ), this, SLOT( databaseIdFinished( int, bool ) ) );
http->getDaap( "/databases?" + m_loginString );
}
示例2: ContentFetcher
void
Reader::logoutRequest()
{
ContentFetcher* http = new ContentFetcher( m_host, m_port, m_password, this, "readerLogoutHttp" );
connect( http, SIGNAL( httpError( const QString& ) ), this, SLOT( fetchingError( const QString& ) ) );
connect( http, SIGNAL( requestFinished( int, bool ) ), this, SLOT( logoutRequest( int, bool ) ) );
http->getDaap( "/logout?" + m_loginString );
}
示例3: ContentFetcher
void
Reader::loginRequest()
{
DEBUG_BLOCK
ContentFetcher* http = new ContentFetcher( m_host, m_port, m_password, this, "readerHttp");
connect( http, SIGNAL(httpError(QString)), this, SLOT(fetchingError(QString)) );
connect( http, SIGNAL(requestFinished(int,bool)), this, SLOT(contentCodesReceived(int,bool)) );
http->getDaap( "/content-codes" );
}
示例4: sender
void
Reader::databaseIdFinished( int /*id*/, bool error )
{
ContentFetcher* http = (ContentFetcher*) sender();
disconnect( http, SIGNAL( requestFinished( int, bool ) ), this, SLOT( databaseIdFinished( int, bool ) ) );
if( error )
{
http->deleteLater();
return;
}
Map dbIdResults = parse( http->results(), 0, true );
m_databaseId = QString::number( dbIdResults["avdb"].asList()[0].asMap()["mlcl"].asList()[0].asMap()["mlit"].asList()[0].asMap()["miid"].asList()[0].asInt() );
connect( http, SIGNAL( requestFinished( int, bool ) ), this, SLOT( songListFinished( int, bool ) ) );
http->getDaap( QString("/databases/%1/items?type=music&meta=dmap.itemid,dmap.itemname,daap.songformat,daap.songartist,daap.songalbum,daap.songtime,daap.songtracknumber,daap.songcomment,daap.songyear,daap.songgenre&%2")
.arg( m_databaseId, m_loginString ) );
}