mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 22:26:32 +02:00
* Respond to pings from external resolver.
This commit is contained in:
@@ -255,7 +255,11 @@ ScriptResolver::handleMsg( const QByteArray& msg )
|
|||||||
setupConfWidget( m );
|
setupConfWidget( m );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else if ( msgtype == "status" )
|
||||||
|
{
|
||||||
|
sendStatus();
|
||||||
|
return;
|
||||||
|
}
|
||||||
else if ( msgtype == "results" )
|
else if ( msgtype == "results" )
|
||||||
{
|
{
|
||||||
const QString qid = m.value( "qid" ).toString();
|
const QString qid = m.value( "qid" ).toString();
|
||||||
@@ -333,6 +337,7 @@ ScriptResolver::cmdExited( int code, QProcess::ExitStatus status )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ScriptResolver::resolve( const Tomahawk::query_ptr& query )
|
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
|
void
|
||||||
ScriptResolver::doSetup( const QVariantMap& m )
|
ScriptResolver::doSetup( const QVariantMap& m )
|
||||||
{
|
{
|
||||||
|
@@ -77,6 +77,7 @@ private:
|
|||||||
void sendMsg( const QByteArray& msg );
|
void sendMsg( const QByteArray& msg );
|
||||||
void doSetup( const QVariantMap& m );
|
void doSetup( const QVariantMap& m );
|
||||||
void setupConfWidget( const QVariantMap& m );
|
void setupConfWidget( const QVariantMap& m );
|
||||||
|
void sendStatus();
|
||||||
|
|
||||||
void startProcess();
|
void startProcess();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user