File indexing completed on 2024-05-19 04:49:27
0001 /**************************************************************************************** 0002 * Copyright (c) 2010 Maximilian Kossick <maximilian.kossick@googlemail.com> * 0003 * Copyright (c) 2010 Casey Link <unnamedrambler@gmail.com> * 0004 * * 0005 * This program is free software; you can redistribute it and/or modify it under * 0006 * the terms of the GNU General Public License as published by the Free Software * 0007 * Foundation; either version 2 of the License, or (at your option) any later * 0008 * version. * 0009 * * 0010 * This program is distributed in the hope that it will be useful, but WITHOUT ANY * 0011 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * 0012 * PARTICULAR PURPOSE. See the GNU General Public License for more details. * 0013 * * 0014 * You should have received a copy of the GNU General Public License along with * 0015 * this program. If not, see <http://www.gnu.org/licenses/>. * 0016 ****************************************************************************************/ 0017 0018 #ifndef COLLECTIONLOCATIONDELEGATE_H 0019 #define COLLECTIONLOCATIONDELEGATE_H 0020 0021 #include "core/amarokcore_export.h" 0022 #include "core/meta/forward_declarations.h" 0023 #include "core/transcoding/TranscodingConfiguration.h" 0024 0025 namespace Collections { 0026 0027 class CollectionLocation; 0028 0029 class AMAROKCORE_EXPORT CollectionLocationDelegate 0030 { 0031 public: 0032 enum OperationType { 0033 Copy, 0034 Move 0035 }; 0036 0037 CollectionLocationDelegate() {} 0038 virtual ~ CollectionLocationDelegate() {} 0039 0040 virtual bool reallyDelete( CollectionLocation *loc, const Meta::TrackList &tracks ) const = 0; 0041 virtual bool reallyMove( CollectionLocation *loc, const Meta::TrackList &tracks ) const = 0; 0042 virtual bool reallyTrash( CollectionLocation *loc, const Meta::TrackList &tracks ) const = 0; 0043 virtual void errorDeleting( CollectionLocation *loc, const Meta::TrackList &tracks ) const = 0; 0044 virtual void notWriteable( CollectionLocation *loc ) const = 0; 0045 virtual bool deleteEmptyDirs( CollectionLocation *loc ) const = 0; 0046 0047 /** 0048 * Displays a dialog requesting what transcoding configuration to use. 0049 * 0050 * @param playableFileTypes list of filetypes that are playable (empty if everything playable) 0051 * @param remember is set to true if user checks this transcoding config should be 0052 * remembered per target collection. If null, such option is disabled in the UI. 0053 * @param operation whether this is copying or moving 0054 * @param destCollectionName name of the destination collection 0055 * @param prevConfiguration the previously saved configuration, for restoring values from 0056 * 0057 * @return Transcoding configuration user requested or invalid configuration if user 0058 * has hit Cancel or closed the dialog. 0059 */ 0060 virtual Transcoding::Configuration transcode( const QStringList &playableFileTypes, 0061 bool *remember, OperationType operation, 0062 const QString &destCollectionName, 0063 const Transcoding::Configuration &prevConfiguration ) const = 0; 0064 }; 0065 0066 } //namespace Collections 0067 0068 #endif