From e0d6d5ef6badbf3cfa5318a2c6a6a650666ebac0 Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Fri, 8 Jun 2012 15:32:08 +0200 Subject: [PATCH] Move spotify account to libtomahawk --- src/CMakeLists.txt | 5 ----- src/libtomahawk/CMakeLists.txt | 6 ++++++ src/{ => libtomahawk}/accounts/spotify/SpotifyAccount.cpp | 0 src/{ => libtomahawk}/accounts/spotify/SpotifyAccount.h | 7 ++++--- .../accounts/spotify/SpotifyAccountConfig.cpp | 0 .../accounts/spotify/SpotifyAccountConfig.h | 0 .../accounts/spotify/SpotifyAccountConfig.ui | 0 .../accounts/spotify/SpotifyPlaylistUpdater.cpp | 0 .../accounts/spotify/SpotifyPlaylistUpdater.h | 5 +++-- 9 files changed, 13 insertions(+), 10 deletions(-) rename src/{ => libtomahawk}/accounts/spotify/SpotifyAccount.cpp (100%) rename src/{ => libtomahawk}/accounts/spotify/SpotifyAccount.h (96%) rename src/{ => libtomahawk}/accounts/spotify/SpotifyAccountConfig.cpp (100%) rename src/{ => libtomahawk}/accounts/spotify/SpotifyAccountConfig.h (100%) rename src/{ => libtomahawk}/accounts/spotify/SpotifyAccountConfig.ui (100%) rename src/{ => libtomahawk}/accounts/spotify/SpotifyPlaylistUpdater.cpp (100%) rename src/{ => libtomahawk}/accounts/spotify/SpotifyPlaylistUpdater.h (95%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 61479c7c7..fba02bab7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -72,10 +72,6 @@ SET( tomahawkSourcesGui ${tomahawkSourcesGui} accounts/lastfm/LastFmConfig.cpp accounts/lastfm/LastFmInfoPlugin.cpp - accounts/spotify/SpotifyAccount.cpp - accounts/spotify/SpotifyAccountConfig.cpp - accounts/spotify/SpotifyPlaylistUpdater.cpp - TomahawkTrayIcon.cpp AudioControls.cpp SettingsDialog.cpp @@ -97,7 +93,6 @@ SET( tomahawkUI ${tomahawkUI} ProxyDialog.ui accounts/lastfm/LastFmConfig.ui - accounts/spotify/SpotifyAccountConfig.ui AudioControls.ui LoadXSPFDialog.ui diff --git a/src/libtomahawk/CMakeLists.txt b/src/libtomahawk/CMakeLists.txt index 501d84cc6..cdf5ebd32 100644 --- a/src/libtomahawk/CMakeLists.txt +++ b/src/libtomahawk/CMakeLists.txt @@ -184,6 +184,11 @@ set( libSources accounts/DelegateConfigWrapper.cpp accounts/AccountFactoryWrapper.cpp accounts/AccountFactoryWrapperDelegate.cpp + + accounts/spotify/SpotifyAccount.cpp + accounts/spotify/SpotifyAccountConfig.cpp + accounts/spotify/SpotifyPlaylistUpdater.cpp + sip/SipPlugin.cpp sip/SipHandler.cpp sip/SipInfo.cpp @@ -306,6 +311,7 @@ set( libUI ${libUI} context/ContextWidget.ui infobar/InfoBar.ui accounts/AccountFactoryWrapper.ui + accounts/spotify/SpotifyAccountConfig.ui ) include_directories( . ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/.. .. diff --git a/src/accounts/spotify/SpotifyAccount.cpp b/src/libtomahawk/accounts/spotify/SpotifyAccount.cpp similarity index 100% rename from src/accounts/spotify/SpotifyAccount.cpp rename to src/libtomahawk/accounts/spotify/SpotifyAccount.cpp diff --git a/src/accounts/spotify/SpotifyAccount.h b/src/libtomahawk/accounts/spotify/SpotifyAccount.h similarity index 96% rename from src/accounts/spotify/SpotifyAccount.h rename to src/libtomahawk/accounts/spotify/SpotifyAccount.h index 69448b27b..f31d97309 100644 --- a/src/accounts/spotify/SpotifyAccount.h +++ b/src/libtomahawk/accounts/spotify/SpotifyAccount.h @@ -26,6 +26,7 @@ #include "Playlist.h" #include "utils/TomahawkUtils.h" #include "utils/SmartPointerList.h" +#include "DllMacro.h" class QAction; class SpotifyPlaylistUpdater; @@ -51,7 +52,7 @@ struct SpotifyPlaylistInfo { }; -class SpotifyAccountFactory : public AccountFactory +class DLLEXPORT SpotifyAccountFactory : public AccountFactory { Q_OBJECT public: @@ -69,7 +70,7 @@ public: }; -class SpotifyAccount : public CustomAtticaAccount +class DLLEXPORT SpotifyAccount : public CustomAtticaAccount { Q_OBJECT public: @@ -159,6 +160,6 @@ private: } } -Q_DECLARE_METATYPE( Tomahawk::Accounts::SpotifyPlaylistInfo* ); +Q_DECLARE_METATYPE( Tomahawk::Accounts::SpotifyPlaylistInfo* ) #endif // SpotifyAccount_H diff --git a/src/accounts/spotify/SpotifyAccountConfig.cpp b/src/libtomahawk/accounts/spotify/SpotifyAccountConfig.cpp similarity index 100% rename from src/accounts/spotify/SpotifyAccountConfig.cpp rename to src/libtomahawk/accounts/spotify/SpotifyAccountConfig.cpp diff --git a/src/accounts/spotify/SpotifyAccountConfig.h b/src/libtomahawk/accounts/spotify/SpotifyAccountConfig.h similarity index 100% rename from src/accounts/spotify/SpotifyAccountConfig.h rename to src/libtomahawk/accounts/spotify/SpotifyAccountConfig.h diff --git a/src/accounts/spotify/SpotifyAccountConfig.ui b/src/libtomahawk/accounts/spotify/SpotifyAccountConfig.ui similarity index 100% rename from src/accounts/spotify/SpotifyAccountConfig.ui rename to src/libtomahawk/accounts/spotify/SpotifyAccountConfig.ui diff --git a/src/accounts/spotify/SpotifyPlaylistUpdater.cpp b/src/libtomahawk/accounts/spotify/SpotifyPlaylistUpdater.cpp similarity index 100% rename from src/accounts/spotify/SpotifyPlaylistUpdater.cpp rename to src/libtomahawk/accounts/spotify/SpotifyPlaylistUpdater.cpp diff --git a/src/accounts/spotify/SpotifyPlaylistUpdater.h b/src/libtomahawk/accounts/spotify/SpotifyPlaylistUpdater.h similarity index 95% rename from src/accounts/spotify/SpotifyPlaylistUpdater.h rename to src/libtomahawk/accounts/spotify/SpotifyPlaylistUpdater.h index d07fc172a..896e507d3 100644 --- a/src/accounts/spotify/SpotifyPlaylistUpdater.h +++ b/src/libtomahawk/accounts/spotify/SpotifyPlaylistUpdater.h @@ -21,6 +21,7 @@ #include "playlist/PlaylistUpdaterInterface.h" #include "utils/Closure.h" +#include "DllMacro.h" #include #include @@ -31,7 +32,7 @@ namespace Accounts { } } -class SpotifyPlaylistUpdater : public Tomahawk::PlaylistUpdaterInterface +class DLLEXPORT SpotifyPlaylistUpdater : public Tomahawk::PlaylistUpdaterInterface { Q_OBJECT @@ -106,7 +107,7 @@ private: }; -class SpotifyUpdaterFactory : public Tomahawk::PlaylistUpdaterFactory +class DLLEXPORT SpotifyUpdaterFactory : public Tomahawk::PlaylistUpdaterFactory { public: SpotifyUpdaterFactory() {}