2011-06-17 19:07:06 +00:00
|
|
|
/*
|
|
|
|
Copyright (C) 2011 Birunthan Mohanathas (www.poiru.net)
|
|
|
|
|
|
|
|
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, write to the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __COVER_H__
|
|
|
|
#define __COVER_H__
|
|
|
|
|
2011-06-19 14:58:48 +00:00
|
|
|
// TagLib
|
|
|
|
#include "fileref.h"
|
2011-06-17 19:07:06 +00:00
|
|
|
#include "apefile.h"
|
|
|
|
#include "apetag.h"
|
|
|
|
#include "asffile.h"
|
|
|
|
#include "attachedpictureframe.h"
|
|
|
|
#include "commentsframe.h"
|
|
|
|
#include "flacfile.h"
|
|
|
|
#include "id3v1genres.h"
|
|
|
|
#include "id3v2tag.h"
|
|
|
|
#include "mpcfile.h"
|
|
|
|
#include "mp4file.h"
|
|
|
|
#include "mpegfile.h"
|
|
|
|
#include "tag.h"
|
|
|
|
#include "taglib.h"
|
|
|
|
#include "textidentificationframe.h"
|
|
|
|
#include "tstring.h"
|
|
|
|
#include "vorbisfile.h"
|
|
|
|
#include "wavpackfile.h"
|
|
|
|
|
|
|
|
class CCover
|
|
|
|
{
|
|
|
|
public:
|
2011-06-19 14:58:48 +00:00
|
|
|
static bool GetCached(std::wstring& path);
|
|
|
|
static bool GetLocal(std::wstring filename, const std::wstring& folder, std::wstring& target);
|
2011-11-05 17:52:53 +00:00
|
|
|
static bool GetEmbedded(const TagLib::FileRef& fr, const std::wstring& target);
|
2011-06-17 19:07:06 +00:00
|
|
|
static std::wstring GetFileFolder(const std::wstring& file);
|
|
|
|
|
|
|
|
private:
|
|
|
|
static bool ExtractAPE(TagLib::APE::Tag* tag, const std::wstring& target);
|
|
|
|
static bool ExtractID3(TagLib::ID3v2::Tag* tag, const std::wstring& target);
|
|
|
|
static bool ExtractASF(TagLib::ASF::File* file, const std::wstring& target);
|
|
|
|
static bool ExtractFLAC(TagLib::FLAC::File* file, const std::wstring& target);
|
|
|
|
static bool ExtractMP4(TagLib::MP4::File* file, const std::wstring& target);
|
|
|
|
static bool WriteCover(const TagLib::ByteVector& data, const std::wstring& target);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|