1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-25 02:09:48 +01:00

* Plugin-ify RoviPlugin.

This commit is contained in:
Christian Muehlhaeuser 2012-05-19 09:44:51 +02:00
parent 93cc1fcca8
commit 73e824c859
2 changed files with 14 additions and 5 deletions

View File

@ -19,11 +19,12 @@
#include "RoviPlugin.h"
#include "utils/Logger.h"
#include <QDateTime>
#include <QNetworkReply>
#include <QtPlugin>
#include <parser.h>
#include "utils/Logger.h"
using namespace Tomahawk::InfoSystem;
@ -41,9 +42,9 @@ RoviPlugin::RoviPlugin()
m_secret = "XUnYutaAW6";
}
RoviPlugin::~RoviPlugin()
{
}
@ -69,6 +70,7 @@ RoviPlugin::getInfo( Tomahawk::InfoSystem::InfoRequestData requestData )
emit getCachedInfo( criteria, 0, requestData );
}
void
RoviPlugin::notInCacheSlot( Tomahawk::InfoSystem::InfoStringHash criteria, Tomahawk::InfoSystem::InfoRequestData requestData )
{
@ -96,6 +98,7 @@ RoviPlugin::notInCacheSlot( Tomahawk::InfoSystem::InfoStringHash criteria, Tomah
}
}
void
RoviPlugin::albumLookupError( QNetworkReply::NetworkError error )
{
@ -111,6 +114,7 @@ RoviPlugin::albumLookupError( QNetworkReply::NetworkError error )
}
void
RoviPlugin::albumLookupFinished()
{
@ -187,5 +191,7 @@ RoviPlugin::generateSig() const
{
QByteArray raw = m_apiKey + m_secret + QString::number( QDateTime::currentMSecsSinceEpoch() / 1000 ).toLatin1();
return TomahawkUtils::md5( raw ).toLatin1();
}
Q_EXPORT_PLUGIN2( Tomahawk::InfoSystem::InfoPlugin, Tomahawk::InfoSystem::RoviPlugin )

View File

@ -21,6 +21,7 @@
#define ROVIPLUGIN_H
#include "infosystem/InfoSystem.h"
#include "infoplugins/InfoPluginDllMacro.h"
#include <QNetworkReply>
@ -32,9 +33,11 @@ namespace Tomahawk
namespace InfoSystem
{
class RoviPlugin : public InfoPlugin
class INFOPLUGINDLLEXPORT RoviPlugin : public InfoPlugin
{
Q_OBJECT
Q_INTERFACES( Tomahawk::InfoSystem::InfoPlugin )
public:
RoviPlugin();
virtual ~RoviPlugin();