1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-22 00:42:04 +02:00

* Respond to pings from external resolver.

This commit is contained in:
Christian Muehlhaeuser 2012-06-25 21:12:44 +02:00
parent 2fd970d24d
commit a9e0c3c460
2 changed files with 17 additions and 1 deletions
src/libtomahawk/resolvers

@ -255,7 +255,11 @@ ScriptResolver::handleMsg( const QByteArray& msg )
setupConfWidget( m );
return;
}
else if ( msgtype == "status" )
{
sendStatus();
return;
}
else if ( msgtype == "results" )
{
const QString qid = m.value( "qid" ).toString();
@ -333,6 +337,7 @@ ScriptResolver::cmdExited( int code, QProcess::ExitStatus status )
}
}
void
ScriptResolver::resolve( const Tomahawk::query_ptr& query )
{
@ -358,6 +363,16 @@ ScriptResolver::resolve( const Tomahawk::query_ptr& query )
}
void
ScriptResolver::sendStatus()
{
QVariantMap msg;
msg[ "_msgtype" ] = "status";
msg[ "_status" ] = 1;
sendMessage( msg );
}
void
ScriptResolver::doSetup( const QVariantMap& m )
{

@ -77,6 +77,7 @@ private:
void sendMsg( const QByteArray& msg );
void doSetup( const QVariantMap& m );
void setupConfWidget( const QVariantMap& m );
void sendStatus();
void startProcess();