File indexing completed on 2024-05-19 04:49:16

0001 /****************************************************************************************
0002  * Copyright (c) 2012 Ryan McCoskrie <ryan.mccoskrie@gmail.com>                         *
0003  * Copyright (c) 2010 Maximilian Kossick <maximilian.kossick@googlemail.com>            *
0004  * Copyright (c) 2010 Casey Link <unnamedrambler@gmail.com>                             *
0005  *                                                                                      *
0006  * This program is free software; you can redistribute it and/or modify it under        *
0007  * the terms of the GNU General Public License as published by the Free Software        *
0008  * Foundation; either version 2 of the License, or (at your option) any later           *
0009  * version.                                                                             *
0010  *                                                                                      *
0011  * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
0012  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
0013  * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
0014  *                                                                                      *
0015  * You should have received a copy of the GNU General Public License along with         *
0016  * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
0017  ****************************************************************************************/
0018 
0019 #ifndef COLLECTIONLOCATIONDELEGATEIMPL_H
0020 #define COLLECTIONLOCATIONDELEGATEIMPL_H
0021 
0022 #include "amarok_export.h"
0023 #include "core/collections/CollectionLocationDelegate.h"
0024 
0025 #include <QStringList>
0026 
0027 namespace Collections {
0028 
0029 class AMAROK_EXPORT CollectionLocationDelegateImpl : public CollectionLocationDelegate
0030 {
0031 public:
0032     CollectionLocationDelegateImpl() {}
0033     ~ CollectionLocationDelegateImpl() override {}
0034 
0035     bool reallyDelete( CollectionLocation *loc, const Meta::TrackList &tracks ) const override;
0036     bool reallyMove(CollectionLocation* loc, const Meta::TrackList& tracks) const override;
0037     bool reallyTrash( CollectionLocation *loc, const Meta::TrackList &tracks ) const override;
0038     void errorDeleting( CollectionLocation* loc, const Meta::TrackList& tracks ) const override;
0039     void notWriteable(CollectionLocation* loc) const override;
0040     bool deleteEmptyDirs(CollectionLocation* loc) const override;
0041     Transcoding::Configuration transcode( const QStringList &playableFileTypes,
0042                                                   bool *remember, OperationType operation,
0043                                                   const QString &destCollectionName,
0044                                                   const Transcoding::Configuration &prevConfiguration ) const override;
0045 
0046 private:
0047     QStringList trackList( const Meta::TrackList &tracks ) const;
0048 };
0049 
0050 } //namespace Collections
0051 
0052 #endif