mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-19 15:29:42 +01:00
Move all classes in libtomahawk/resolvers to Tomahawk namespace
This commit is contained in:
parent
91af16fc18
commit
e1dbeb4cd6
@ -33,11 +33,10 @@
|
||||
//class SpotifyPlaylistUpdater;
|
||||
class QTimer;
|
||||
|
||||
class ScriptResolver;
|
||||
|
||||
namespace Tomahawk {
|
||||
|
||||
class SpotifyParser;
|
||||
class ScriptResolver;
|
||||
|
||||
namespace InfoSystem
|
||||
{
|
||||
|
@ -48,11 +48,11 @@ class DLLEXPORT ExternalResolver : public Resolver
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
friend class ::ScriptCommandQueue;
|
||||
friend class ::ScriptCommand_AllArtists;
|
||||
friend class ::ScriptCommand_AllAlbums;
|
||||
friend class ::ScriptCommand_AllTracks;
|
||||
friend class ::ScriptCommand_LookupUrl;
|
||||
friend class ScriptCommandQueue;
|
||||
friend class ScriptCommand_AllArtists;
|
||||
friend class ScriptCommand_AllAlbums;
|
||||
friend class ScriptCommand_AllTracks;
|
||||
friend class ScriptCommand_LookupUrl;
|
||||
|
||||
public:
|
||||
enum ErrorState {
|
||||
|
@ -24,6 +24,8 @@
|
||||
#include "../utils/Logger.h"
|
||||
#include "../utils/Json.h"
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
JSInfoPlugin::JSInfoPlugin( int id, JSResolver *resolver )
|
||||
: d_ptr( new JSInfoPluginPrivate( this, id, resolver ) )
|
||||
{
|
||||
|
@ -24,6 +24,9 @@
|
||||
#include "DllMacro.h"
|
||||
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
class JSResolver;
|
||||
class JSInfoPluginPrivate;
|
||||
|
||||
@ -67,4 +70,6 @@ private:
|
||||
QScopedPointer<JSInfoPluginPrivate> d_ptr;
|
||||
};
|
||||
|
||||
}; // ns: Tomahawk
|
||||
|
||||
#endif // TOMAHAWK_JSINFOPLUGIN_H
|
||||
|
@ -21,9 +21,12 @@
|
||||
|
||||
#include "JSInfoPlugin.h"
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
class JSInfoPluginPrivate
|
||||
{
|
||||
friend class ::JSInfoPlugin;
|
||||
friend class JSInfoPlugin;
|
||||
public:
|
||||
JSInfoPluginPrivate( JSInfoPlugin* q, int id, JSResolver* resolver )
|
||||
: q_ptr ( q )
|
||||
@ -42,5 +45,6 @@ private:
|
||||
QMap< int, Tomahawk::InfoSystem::InfoStringHash > criteriaCache;
|
||||
};
|
||||
|
||||
} // ns: Tomahawk
|
||||
|
||||
#endif // TOMAHAWK_JSINFOPLUGIN_P_H
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include "../utils/Logger.h"
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
JSInfoSystemHelper::JSInfoSystemHelper( JSResolver* parent )
|
||||
: QObject( parent )
|
||||
|
@ -21,6 +21,9 @@
|
||||
|
||||
#include <QObject>
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
class JSResolver;
|
||||
class JSInfoSystemHelperPrivate;
|
||||
|
||||
@ -47,4 +50,6 @@ private:
|
||||
QScopedPointer<JSInfoSystemHelperPrivate> d_ptr;
|
||||
};
|
||||
|
||||
} // ns: Tomahawk
|
||||
|
||||
#endif // TOMAHAWK_JSINFOSYSTEMHELPER_H
|
||||
|
@ -22,9 +22,12 @@
|
||||
#include "JSResolver.h"
|
||||
#include "JSInfoSystemHelper.h"
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
class JSInfoSystemHelperPrivate
|
||||
{
|
||||
friend class ::JSInfoSystemHelper;
|
||||
friend class JSInfoSystemHelper;
|
||||
public:
|
||||
JSInfoSystemHelperPrivate( JSInfoSystemHelper* q, JSResolver* resolver )
|
||||
: q_ptr ( q )
|
||||
@ -41,5 +44,6 @@ private:
|
||||
|
||||
};
|
||||
|
||||
} // ns: Tomahawk
|
||||
|
||||
#endif // TOMAHAWK_JSINFOSYSTEMHELPER_P_H
|
||||
|
@ -54,6 +54,8 @@
|
||||
#include <QTime>
|
||||
#include <QWebFrame>
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
JSResolver::JSResolver( const QString& accountId, const QString& scriptPath, const QStringList& additionalScriptPaths )
|
||||
: Tomahawk::ExternalResolverGui( scriptPath )
|
||||
, d_ptr( new JSResolverPrivate( this, accountId, scriptPath, additionalScriptPaths ) )
|
||||
|
@ -27,6 +27,9 @@
|
||||
#include "ExternalResolverGui.h"
|
||||
#include "Typedefs.h"
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
class JSInfoPlugin;
|
||||
class JSResolverHelper;
|
||||
class JSResolverPrivate;
|
||||
@ -36,7 +39,7 @@ class DLLEXPORT JSResolver : public Tomahawk::ExternalResolverGui
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
friend class ::JSResolverHelper;
|
||||
friend class JSResolverHelper;
|
||||
|
||||
public:
|
||||
explicit JSResolver( const QString& accountId, const QString& scriptPath, const QStringList& additionalScriptPaths = QStringList() );
|
||||
@ -130,4 +133,5 @@ private:
|
||||
QScopedPointer<JSResolverPrivate> d_ptr;
|
||||
};
|
||||
|
||||
} // ns: Tomahawk
|
||||
#endif // JSRESOLVER_H
|
||||
|
@ -34,9 +34,14 @@
|
||||
#include <functional>
|
||||
|
||||
|
||||
class JSResolver;
|
||||
|
||||
Q_DECLARE_METATYPE( std::function< void( QSharedPointer< QIODevice >& ) > )
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
class JSResolver;
|
||||
|
||||
class DLLEXPORT JSResolverHelper : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -161,4 +166,7 @@ private:
|
||||
QString m_pendingUrl;
|
||||
Tomahawk::album_ptr m_pendingAlbum;
|
||||
};
|
||||
|
||||
} // ns: Tomahawk
|
||||
|
||||
#endif // JSRESOLVERHELPER_H
|
||||
|
@ -28,9 +28,12 @@
|
||||
#include "JSInfoSystemHelper.h"
|
||||
#include "database/fuzzyindex/FuzzyIndex.h"
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
class JSResolverPrivate
|
||||
{
|
||||
friend class ::JSResolverHelper;
|
||||
friend class JSResolverHelper;
|
||||
public:
|
||||
JSResolverPrivate( JSResolver* q, const QString& pAccountId, const QString& scriptPath, const QStringList& additionalScriptPaths )
|
||||
: q_ptr ( q )
|
||||
@ -68,5 +71,6 @@ private:
|
||||
QStringList requiredScriptPaths;
|
||||
};
|
||||
|
||||
} // ns: Tomahawk
|
||||
|
||||
#endif // JSRESOLVER_P_H
|
||||
|
@ -21,6 +21,9 @@
|
||||
|
||||
#include <QObject>
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
class ScriptCommand : public QObject
|
||||
{
|
||||
public:
|
||||
@ -36,4 +39,6 @@ protected:
|
||||
virtual void reportFailure() = 0;
|
||||
};
|
||||
|
||||
} // ns: Tomahawk
|
||||
|
||||
#endif // SCRIPTCOMMAND_H
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include <QMetaType>
|
||||
#include <QMutex>
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
ScriptCommandQueue::ScriptCommandQueue( QObject* parent )
|
||||
: QObject( parent )
|
||||
, m_timer( new QTimer( this ) )
|
||||
|
@ -27,6 +27,9 @@
|
||||
#include <QMetaType>
|
||||
#include <QMutex>
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
class ScriptCommandQueue : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -47,6 +50,8 @@ private:
|
||||
QMutex m_mutex;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE( QSharedPointer< ScriptCommand > )
|
||||
} // ns: Tomahawk
|
||||
|
||||
Q_DECLARE_METATYPE( QSharedPointer< Tomahawk::ScriptCommand > )
|
||||
|
||||
#endif // SCRIPTCOMMANDQUEUE_H
|
||||
|
@ -26,6 +26,8 @@
|
||||
#include "PlaylistEntry.h"
|
||||
#include "ScriptCollection.h"
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
ScriptCommand_AllAlbums::ScriptCommand_AllAlbums( const Tomahawk::collection_ptr& collection,
|
||||
const Tomahawk::artist_ptr& artist,
|
||||
QObject* parent )
|
||||
|
@ -24,6 +24,9 @@
|
||||
#include "collection/Collection.h"
|
||||
#include "resolvers/ScriptCommand.h"
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
class ScriptCommand_AllAlbums : public ScriptCommand, public Tomahawk::AlbumsRequest
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -54,4 +57,6 @@ private:
|
||||
QString m_filter;
|
||||
};
|
||||
|
||||
} // ns: Tomahawk
|
||||
|
||||
#endif // SCRIPTCOMMAND_ALLALBUMS_H
|
||||
|
@ -24,6 +24,8 @@
|
||||
|
||||
#include "utils/Logger.h"
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
ScriptCommand_AllArtists::ScriptCommand_AllArtists( const Tomahawk::collection_ptr& collection,
|
||||
QObject* parent )
|
||||
: ScriptCommand( parent )
|
||||
|
@ -24,6 +24,9 @@
|
||||
#include "collection/Collection.h"
|
||||
#include "resolvers/ScriptCommand.h"
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
class ScriptCommand_AllArtists : public ScriptCommand, public Tomahawk::ArtistsRequest
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -52,4 +55,6 @@ private:
|
||||
QString m_filter;
|
||||
};
|
||||
|
||||
} // ns: Tomahawk
|
||||
|
||||
#endif // SCRIPTCOMMAND_ALLARTISTS_H
|
||||
|
@ -24,6 +24,8 @@
|
||||
|
||||
#include "utils/Logger.h"
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
ScriptCommand_AllTracks::ScriptCommand_AllTracks( const Tomahawk::collection_ptr& collection,
|
||||
const Tomahawk::album_ptr& album,
|
||||
QObject* parent )
|
||||
|
@ -24,6 +24,9 @@
|
||||
#include "collection/Collection.h"
|
||||
#include "resolvers/ScriptCommand.h"
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
class ScriptCommand_AllTracks : public ScriptCommand, public Tomahawk::TracksRequest
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -51,4 +54,6 @@ private:
|
||||
Tomahawk::album_ptr m_album;
|
||||
};
|
||||
|
||||
} // ns: Tomahawk
|
||||
|
||||
#endif // SCRIPTCOMMAND_ALLTRACKS_H
|
||||
|
@ -20,6 +20,8 @@
|
||||
|
||||
#include "PlaylistEntry.h"
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
ScriptCommand_LookupUrl::ScriptCommand_LookupUrl( Tomahawk::ExternalResolver* resolver, const QString& url, QObject* parent )
|
||||
: ScriptCommand( parent )
|
||||
, d_ptr( new ScriptCommand_LookupUrlPrivate( this, resolver, url ) )
|
||||
|
@ -26,15 +26,12 @@
|
||||
|
||||
#include <QVariant>
|
||||
|
||||
class ScriptCommand_LookupUrlPrivate;
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
class ScriptCommand_LookupUrlPrivate;
|
||||
class ExternalResolver;
|
||||
|
||||
}
|
||||
|
||||
class DLLEXPORT ScriptCommand_LookupUrl : public ScriptCommand
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -62,4 +59,6 @@ private:
|
||||
ScriptCommand_LookupUrlPrivate* d_ptr;
|
||||
};
|
||||
|
||||
} // ns: Tomahawk
|
||||
|
||||
#endif // SCRIPTCOMMAND_LOOKUPURL_H
|
||||
|
@ -23,6 +23,9 @@
|
||||
|
||||
#include "ExternalResolver.h"
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
class ScriptCommand_LookupUrlPrivate
|
||||
{
|
||||
public:
|
||||
@ -40,4 +43,6 @@ private:
|
||||
Tomahawk::ExternalResolver* resolver;
|
||||
};
|
||||
|
||||
} // ns: Tomahawk
|
||||
|
||||
#endif // SCRIPTCOMMAND_LOOKUPURL_P_H
|
||||
|
@ -33,6 +33,8 @@
|
||||
#include <QDir>
|
||||
#include <QMessageBox>
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
ScriptEngine::ScriptEngine( JSResolver* parent )
|
||||
: QWebPage( (QObject*) parent )
|
||||
, m_parent( parent )
|
||||
|
@ -27,9 +27,13 @@
|
||||
#include <QSslError>
|
||||
#include <QWebPage>
|
||||
|
||||
class JSResolver;
|
||||
class QNetworkReply;
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
class JSResolver;
|
||||
|
||||
class DLLEXPORT ScriptEngine : public QWebPage
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -55,4 +59,6 @@ private:
|
||||
QString m_header;
|
||||
};
|
||||
|
||||
} // ns: Tomahawk
|
||||
|
||||
#endif // SCRIPTENGINE_H
|
||||
|
@ -44,6 +44,8 @@
|
||||
#include <shlwapi.h>
|
||||
#endif
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
ScriptResolver::ScriptResolver( const QString& exe )
|
||||
: Tomahawk::ExternalResolverGui( exe )
|
||||
, m_num_restarts( 0 )
|
||||
|
@ -32,6 +32,9 @@
|
||||
|
||||
class QWidget;
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
class DLLEXPORT ScriptResolver : public Tomahawk::ExternalResolverGui
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -107,4 +110,6 @@ private:
|
||||
ExternalResolver::ErrorState m_error;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // SCRIPTRESOLVER_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user