1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 03:10:12 +02:00
This commit is contained in:
Dominik Schmidt
2011-11-21 04:05:24 +01:00
parent 2bba9ba000
commit 4f46ba3e61
2 changed files with 5 additions and 4 deletions

View File

@@ -115,7 +115,7 @@ Pipeline::addResolver( Resolver* r )
void
Pipeline::addExternalResolverFactory(boost::function< ExternalResolver*(QString) > resolverFactory)
Pipeline::addExternalResolverFactory(ResolverFactoryFunc resolverFactory)
{
m_resolverFactories << resolverFactory;
}
@@ -126,7 +126,7 @@ Pipeline::addScriptResolver( const QString& path, bool start )
{
ExternalResolver* res = 0;
Q_FOREACH(boost::function<Tomahawk::ExternalResolver*(QString)> factory, m_resolverFactories)
foreach( ResolverFactoryFunc factory, m_resolverFactories)
{
res = factory( path );

View File

@@ -36,6 +36,7 @@ namespace Tomahawk
{
class Resolver;
class ExternalResolver;
typedef boost::function<boostcrap> ResolverFactoryFunc;
class DLLEXPORT Pipeline : public QObject
{
@@ -52,7 +53,7 @@ public:
void reportResults( QID qid, const QList< result_ptr >& results );
void addExternalResolverFactory( boost::function<Tomahawk::ExternalResolver*(QString)> resolverFactory );
void addExternalResolverFactory( ResolverFactoryFunc resolverFactory );
Tomahawk::ExternalResolver* addScriptResolver( const QString& scriptPath, bool start = true );
void stopScriptResolver( const QString& scriptPath );
void removeScriptResolver( const QString& scriptPath );
@@ -104,7 +105,7 @@ private:
QList< Resolver* > m_resolvers;
QList< Tomahawk::ExternalResolver* > m_scriptResolvers;
QList< boost::function<Tomahawk::ExternalResolver*(QString)> > m_resolverFactories;
QList< ResolverFactoryFunc > m_resolverFactories;
QMap< QID, bool > m_qidsTimeout;
QMap< QID, unsigned int > m_qidsState;
QMap< QID, query_ptr > m_qids;