File indexing completed on 2025-01-05 04:26:02

0001 /****************************************************************************************
0002  * Copyright (c) 2009 Alejandro Wainzinger <aikawarazuni@gmail.com>                     *
0003  *                                                                                      *
0004  * This program is free software; you can redistribute it and/or modify it under        *
0005  * the terms of the GNU General Public License as published by the Free Software        *
0006  * Foundation; either version 2 of the License, or (at your option) any later           *
0007  * version.                                                                             *
0008  *                                                                                      *
0009  * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
0010  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
0011  * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
0012  *                                                                                      *
0013  * You should have received a copy of the GNU General Public License along with         *
0014  * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
0015  ****************************************************************************************/
0016 
0017 #ifndef METAMEDIADEVICEPLAYLIST_H
0018 #define METAMEDIADEVICEPLAYLIST_H
0019 
0020 #include "core/playlists/Playlist.h"
0021 
0022 #include "core/support/Debug.h"
0023 
0024 namespace Playlists
0025 {
0026 
0027     class MediaDevicePlaylist;
0028 
0029     typedef AmarokSharedPointer<MediaDevicePlaylist> MediaDevicePlaylistPtr;
0030     typedef QList<MediaDevicePlaylistPtr> MediaDevicePlaylistList;
0031 
0032     class MediaDevicePlaylist : public Playlist
0033     {
0034         public:
0035             MediaDevicePlaylist( const QString &name, const Meta::TrackList &tracks );
0036             ~MediaDevicePlaylist() override;
0037 
0038             // Playlist Functions
0039             QString name() const override { return m_name; }
0040             QUrl uidUrl() const override { return QUrl(); }
0041 
0042             /**override showing just the filename */
0043             void setName( const QString &name ) override;
0044 
0045             int trackCount() const override;
0046             Meta::TrackList tracks() override;
0047             void addTrack( const Meta::TrackPtr &track, int position = -1 ) override;
0048 
0049             void removeTrack( int position ) override;
0050 
0051     private:
0052         Meta::TrackList m_tracks;
0053         QString m_name;
0054 
0055     };
0056 
0057 }
0058 
0059 Q_DECLARE_METATYPE( Playlists::MediaDevicePlaylistPtr )
0060 Q_DECLARE_METATYPE( Playlists::MediaDevicePlaylistList )
0061 
0062 #endif