[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [amarok/spotify] src/core-impl/collections/spotifycollection: spotify: remove unreferenced files
From: Edward Hades <edward.hades () gmail ! com>
Date: 2012-10-28 11:45:01
Message-ID: 20121028114501.B5BAFA6078 () git ! kde ! org
[Download RAW message or body]
Git commit 81c8eccdeec73a8aecc1259aa7752ab460bee542 by Edward Hades.
Committed on 28/10/2012 at 12:44.
Pushed by hades into branch 'spotify'.
spotify: remove unreferenced files
M +0 -2 src/core-impl/collections/spotifycollection/CMakeLists.txt
D +0 -101 src/core-impl/collections/spotifycollection/SpotifyPlaylist.cpp
D +0 -60 src/core-impl/collections/spotifycollection/SpotifyPlaylist.h
D +0 -125 src/core-impl/collections/spotifycollection/SpotifyPlaylistProvider.cpp
D +0 -78 src/core-impl/collections/spotifycollection/SpotifyPlaylistProvider.h
http://commits.kde.org/amarok/81c8eccdeec73a8aecc1259aa7752ab460bee542
diff --git a/src/core-impl/collections/spotifycollection/CMakeLists.txt \
b/src/core-impl/collections/spotifycollection/CMakeLists.txt index 5d87fcd..35c1865 \
100644
--- a/src/core-impl/collections/spotifycollection/CMakeLists.txt
+++ b/src/core-impl/collections/spotifycollection/CMakeLists.txt
@@ -12,8 +12,6 @@ set( amarok_collection-spotifycollection_PART_SRCS
SpotifyMeta.cpp
SpotifyConfig.cpp
SpotifySettings.cpp
- #SpotifyPlaylist.cpp
- #SpotifyPlaylistProvider.cpp
support/TrackProxy.cpp
support/Query.cpp
support/Controller.cpp )
diff --git a/src/core-impl/collections/spotifycollection/SpotifyPlaylist.cpp \
b/src/core-impl/collections/spotifycollection/SpotifyPlaylist.cpp deleted file mode \
100644 index e41bbec..0000000
--- a/src/core-impl/collections/spotifycollection/SpotifyPlaylist.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2012 Ryan Feng <odayfans@gmail.com> \
*
- * \
*
- * This program is free software; you can redistribute it and/or modify it under \
*
- * the terms of the GNU General Public License as published by the Free Software \
*
- * Foundation; either version 2 of the License, or (at your option) any later \
*
- * version. \
*
- * \
*
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY \
*
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A \
*
- * PARTICULAR PURPOSE. See the GNU General Public License for more details. \
*
- * \
*
- * You should have received a copy of the GNU General Public License along with \
*
- * this program. If not, see <http://www.gnu.org/licenses/>. \
*
- ****************************************************************************************/
-
-#include "SpotifyPlaylist.h"
-
-using Playlists;
-
-SpotifyPlaylist::SpotifyPlaylist( Collections::SpotifyCollection* collection, \
SpotifyPlaylistProvider* provider)
-, m_name( i18n("New playlist") )
-, m_sync( true )
-, m_collection( collection )
-, m_provider( provider )
-{
-
-}
-
-SpotifyPlaylist::SpotifyPlaylist( const QString& name, const Meta::SpotifyTracklist& \
tracks,
- Collections::SpotifyCollection* collection, \
SpotifyPlaylistProvider* provider, const sync = true )
-, m_name( name )
-, m_sync( sync )
-, m_collection( collection )
-, m_provider( provider )
-{
- //TODO: Add tracks to playlist
-}
-
-SpotifyPlaylist::~SpotifyPlaylist()
-{
-}
-
-KUrl
-SpotifyPlaylist::uidUrl() const
-{
- //TODO: Return a generated unique id
-}
-
-QString
-SpotifyPlaylist::name() const
-{
- return m_name;
-}
-
-PlaylistProvider*
-SpotifyPlaylist::provider() const
-{
- return m_provider;
-}
-
-void
-SpotifyPlaylist::setName( const QString& name )
-{
- //TODO: Might need to notify the provider the name has been changed
- m_name = name;
-}
-
-int
-SpotifyPlaylist::trackCount() const
-{
- //TODO: Might return a reasonable number when loaded
- return -1;
-}
-
-Meta::TrackList
-SpotifyPlaylist::tracks()
-{
- //TODO: Return all tracks in the playlist
-}
-
-void
-SpotifyPlaylist::triggerTrackLoad()
-{
- // This should be called from external methods
- // then start a new thread to load all track information vid SpotifyCollection
- //TODO: Load track details
-}
-
-void
-SpotifyPlaylist::addTrack( Meta::TrackPtr track, int position )
-{
- //TODO: Add a new track to the playlist
-}
-
-void
-SpotifyPlaylist::removeTrack( int position )
-{
- //TODO: Remove a track at position `position`
-}
-
diff --git a/src/core-impl/collections/spotifycollection/SpotifyPlaylist.h \
b/src/core-impl/collections/spotifycollection/SpotifyPlaylist.h deleted file mode \
100644 index f66ffa1..0000000
--- a/src/core-impl/collections/spotifycollection/SpotifyPlaylist.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2012 Ryan Feng <odayfans@gmail.com> \
*
- * \
*
- * This program is free software; you can redistribute it and/or modify it under \
*
- * the terms of the GNU General Public License as published by the Free Software \
*
- * Foundation; either version 2 of the License, or (at your option) any later \
*
- * version. \
*
- * \
*
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY \
*
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A \
*
- * PARTICULAR PURPOSE. See the GNU General Public License for more details. \
*
- * \
*
- * You should have received a copy of the GNU General Public License along with \
*
- * this program. If not, see <http://www.gnu.org/licenses/>. \
*
- ****************************************************************************************/
-#ifndef SPOTIFYPLAYLIST_H
-#define SPOTIFYPLAYLIST_H
-
-#include "SpotifyCollection.h"
-
-#include "core/playlists/Playlist.h"
-
-class QObject;
-
-namespace Playlists
-{
-class SpotifyPlaylist: public Playlist, public QObject
-{
- Q_OBJECT
- public:
- SpotifyPlaylist( Collections::SpotifyCollection* collection );
- SpotifyPlaylist( const QString& name, const Meta::SpotifyTracklist& tracks,
- Collections::SpotifyCollection* collection, const bool sync \
= true );
- virtual ~SpotifyPlaylist();
-
- // Methods from Playlist
- virtual KUrl uidUrl() const;
- virtual QString name() const;
- virtual PlaylistProvider* provider();
-
- virtual void setName( const QString& name );
- virtual int trackCount() const;
- virtual Meta::TrackList tracks();
-
- // Load track infomation using a background thread
- virtual void triggerTrackLoad();
- virtual void addTrack( Meta::TrackPtr track, int position = -1 );
- virtual void removeTrack( int position );
-
- private:
- QString m_name;
- bool m_sync;
- Collections::SpotifyCollection* m_collection;
- SpotifyPlaylistProvider* m_provider;
-};
-}
-
-Q_DECLARE_METATYPE( Playlists::SpotifyPlaylist* )
-
-#endif
diff --git a/src/core-impl/collections/spotifycollection/SpotifyPlaylistProvider.cpp \
b/src/core-impl/collections/spotifycollection/SpotifyPlaylistProvider.cpp deleted \
file mode 100644 index d4958d1..0000000
--- a/src/core-impl/collections/spotifycollection/SpotifyPlaylistProvider.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2012 Ryan Feng <odayfans@gmail.com> \
*
- * \
*
- * This program is free software; you can redistribute it and/or modify it under \
*
- * the terms of the GNU General Public License as published by the Free Software \
*
- * Foundation; either version 2 of the License, or (at your option) any later \
*
- * version. \
*
- * \
*
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY \
*
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A \
*
- * PARTICULAR PURPOSE. See the GNU General Public License for more details. \
*
- * \
*
- * You should have received a copy of the GNU General Public License along with \
*
- * this program. If not, see <http://www.gnu.org/licenses/>. \
*
- ****************************************************************************************/
-
-#include "SpotifyPlaylistProvider.h"
-
-using Playlists;
-
-SpotifyPlaylistProvider::SpotifyPlaylistProvider( Collections::SpotifyCollection* \
collection, QObject* parent = 0 )
-: UserPlaylistProvider( parent )
-, m_collection( collection )
-, m_controller( collection->controller() )
-{
-
-}
-
-SpotifyPlaylistProvider::~SpotifyPlaylistProvider()
-{
-}
-
-QString
-SpotifyPlaylistProvider::prettyName() const
-{
- return i18n("Spotify playlists");
-}
-
-KIcon
-SpotifyPlaylistProvider::icon() const
-{
- return KIcon("SpotifyPlaylistProvider");
-}
-
-int
-SpotifyPlaylistProvider::playlistCount() const
-{
- return -1;
-}
-
-PlaylistList
-SpotifyPlaylistProvider::playlists()
-{
- //TODO: Get and return all playlists of Spotify via SpotifyCollection
-}
-
-PlaylistPtr
-SpotifyPlaylistProvider::addPlaylist( PlaylistPtr playlist )
-{
- //TODO: Add new playlist to Spotify via SpotifyCollection
-}
-
-PlaylistPtr
-SpotifyPlaylistProvider::save( const Meta::TrackList& tracks,
- const QString& name = QString() )
-{
- //TODO: Save all playlists to Spotify via SpotifyCollection
-}
-
-QActionList
-SpotifyPlaylistProvider::providerActions()
-{
-}
-
-QActionList
-SpotifyPlaylistProvider::playlistActions()
-{
-}
-
-QActionList
-SpotifyPlaylistProvider::trackActions()
-{
-}
-
-bool
-SpotifyPlaylistProvider::isWriteable()
-{
- return true;
-}
-
-void
-SpotifyPlaylistProvider::rename( PlaylistPtr playlist, const QString& newName )
-{
- //TODO: Rename a playlist via SpotifyCollection
-}
-
-bool
-SpotifyPlaylistProvider::deletePlaylists( PlaylistList playlistList )
-{
- //TODO: Delete a list of playlists via SpotifyCollection
-}
-
-void
-SpotifyPlaylistProvider::trackAdded( PlaylistPtr playlist, Meta::TrackPtr track, int \
position )
-{
- //TODO: Add a new track to a playlist to position `position` via \
SpotifyCollection
-}
-
-void
-SpotifyPlaylistProvider::trackRemoved( PlaylistPtr playlist, int position )
-{
- //TODO: Remove a track from a playlist at position `position` via \
SpotifyCollection
-}
-
-void
-SpotifyPlaylistProvider::setSync( SpotifyPlaylistPtr, bool sync )
-{
- //TODO: Set a playlist to auto sync mode if sync is true
-}
-
-bool
-SpotifyPlaylistProvider::sync( SpotifyPlaylistPtr playlistPtr )
-{
- //TODO: Return the sync status of playlist playlistPtr
-}
diff --git a/src/core-impl/collections/spotifycollection/SpotifyPlaylistProvider.h \
b/src/core-impl/collections/spotifycollection/SpotifyPlaylistProvider.h deleted file \
mode 100644 index d1ec30b..0000000
--- a/src/core-impl/collections/spotifycollection/SpotifyPlaylistProvider.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************************
- * Copyright (c) 2012 Ryan Feng <odayfans@gmail.com> \
*
- * \
*
- * This program is free software; you can redistribute it and/or modify it under \
*
- * the terms of the GNU General Public License as published by the Free Software \
*
- * Foundation; either version 2 of the License, or (at your option) any later \
*
- * version. \
*
- * \
*
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY \
*
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A \
*
- * PARTICULAR PURPOSE. See the GNU General Public License for more details. \
*
- * \
*
- * You should have received a copy of the GNU General Public License along with \
*
- * this program. If not, see <http://www.gnu.org/licenses/>. \
*
- ****************************************************************************************/
-#ifndef SPOTIFYPLAYLISTPROVIDER_H
-#define SPOTIFYPLAYLISTPROVIDER_H
-
-#include "SpotifyCollection.h"
-#include "SpotifyMeta.h"
-#include "support/Controller.h"
-
-#include "core-impl/playlists/UserPlaylistProvider.h"
-
-class QAction;
-
-namespace Playlists {
-
-/**
- * @author Ryan Feng <odayfans@gmail.com>
- */
-class AMAROK_EXPORT SpotifyPlaylistProvider : public UserPlaylistProvider, public \
PlaylistObserver
-{
- Q_OBJECT
-
- public:
- SpotifyPlaylistProvider( Collections::SpotifyCollection* collection, \
QObject* parent = 0 );
- virtual ~SpotifyPlaylistProvider();
-
- // PlaylistProvider methods
- virtual QString prettyName() const;
- virtual KIcon icon() const;
-
- virtual int playlistCount() const;
- virtual Playlists::PlaylistList playlists();
-
- virtual Playlists::PlaylistPtr addPlaylist( Playlists::PlaylistPtr playlist \
);
-
- // UserPlaylistProvider methods
- virtual Playlist::PlaylistPtr save( const Meta::TrackList &tracks,
- const QString& name = QString() );
- virtual QActionList providerActions();
- virtual QActionList playlistActions( Playlists::PlaylistPtr playlist );
- virtual QActionList trackActions( Playlists::PlaylistPtr playlist, int \
trackIndex );
-
- virtual bool isWritable();
- virtual void rename( Playlists::PlaylistPtr playlist, const QString& newName \
);
- virtual bool deletePlaylists( Playlists::PlaylistList playlistList );
-
- // Methods from PlaylistObserver
- virtual void trackAdded( Playlists::PlaylistPtr playlist, Meta::TrackPtr \
track, int position );
- virtual void trackRemoved( Playlists::PlaylistPtr playlist, int position );
-
- // SpotifyPlaylistProvider specific methods:
- // Set a playlist in sync mode or not
- virtual void setSync( Playlists::SpotifyPlaylistPtr, bool sync = true );
- virtual bool sync( const Playlists::SpotifyPlaylistPtr playlistPtr ) const;
-
- public slots:
-
- private:
- SpotifyCollection* m_collection;
- SpotifyController* m_controller;
-
-}; // class SpotifyPlaylistProvider
-}; // namespace Playlists
-
-#endif
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic