File indexing completed on 2024-04-21 04:45:41

0001 /****************************************************************************************
0002  * Copyright (c) 2005 Martin Aumueller <aumueller@reserv.at>                            *
0003  * Copyright (c) 2011 Ralf Engels <ralf-engels@gmx.de>                                  *
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 AMAROK_FILETYPERESOLVER_H
0019 #define AMAROK_FILETYPERESOLVER_H
0020 
0021 #pragma GCC diagnostic push
0022 #pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
0023 #include <fileref.h>
0024 #pragma GCC diagnostic pop
0025 
0026 namespace Meta
0027 {
0028     namespace Tag
0029     {
0030         /** A FileTypeResolver for taglib.
0031             The resolver will look at the file and then return a proper TagLib::File as result.
0032             This specific resolver will first look at the mime type and then at the extension.
0033         */
0034         class FileTypeResolver : public TagLib::FileRef::FileTypeResolver
0035         {
0036             TagLib::File *createFile(TagLib::FileName fileName,
0037                                      bool readAudioProperties,
0038                                      TagLib::AudioProperties::ReadStyle audioPropertiesStyle) const override;
0039 
0040         public:
0041             virtual ~FileTypeResolver() {}
0042         };
0043     }
0044 }
0045 
0046 #endif