apefile.h
Go to the documentation of this file.
/***************************************************************************
copyright : (C) 2010 by Alex Novichkov
email : novichko@atnet.ru
copyright : (C) 2006 by Lukáš Lalinský
email : lalinsky@gmail.com
(original WavPack implementation)
copyright : (C) 2004 by Allan Sandfeld Jensen
email : kde@carewolf.org
(original MPC implementation)
***************************************************************************/
/***************************************************************************
* This library is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License version *
* 2.1 as published by the Free Software Foundation. *
* *
* This library 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 *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
* 02110-1301 USA *
* *
* Alternatively, this file is available under the Mozilla Public *
* License Version 1.1. You may obtain a copy of the License at *
* http://www.mozilla.org/MPL/ *
***************************************************************************/
#ifndef TAGLIB_APEFILE_H
#define TAGLIB_APEFILE_H
#include "tfile.h"
#include "taglib_export.h"
#include "apeproperties.h"
namespace TagLib {
class Tag;
namespace ID3v1 { class Tag; }
namespace APE { class Tag; }
namespace APE {
class TAGLIB_EXPORT File : public TagLib::File
{
public:
enum TagTypes {
NoTags = 0x0000,
ID3v1 = 0x0001,
APE = 0x0002,
AllTags = 0xffff
};
File(FileName file, bool readProperties = true,
Properties::ReadStyle propertiesStyle = Properties::Average);
File(IOStream *stream, bool readProperties = true,
Properties::ReadStyle propertiesStyle = Properties::Average);
~File() override;
File(const File &) = delete;
File &operator=(const File &) = delete;
TagLib::Tag *tag() const override;
PropertyMap properties() const override;
void removeUnsupportedProperties(const StringList &properties) override;
PropertyMap setProperties(const PropertyMap &) override;
Properties *audioProperties() const override;
bool save() override;
ID3v1::Tag *ID3v1Tag(bool create = false);
APE::Tag *APETag(bool create = false);
void strip(int tags = AllTags);
bool hasAPETag() const;
bool hasID3v1Tag() const;
static bool isSupported(IOStream *stream);
private:
void read(bool readProperties);
class FilePrivate;
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
std::unique_ptr<FilePrivate> d;
};
} // namespace APE
} // namespace TagLib
#endif
apeproperties.h
TagLib::APE::File::isSupported
static bool isSupported(IOStream *stream)
TagLib::APE::File::TagTypes
TagTypes
Definition apefile.h:75
TagLib::APE::File::APE
@ APE
Matches APE tags.
Definition apefile.h:81
TagLib::APE::File::ID3v1
@ ID3v1
Matches ID3v1 tags.
Definition apefile.h:79
TagLib::APE::File::NoTags
@ NoTags
Empty set. Matches no tag types.
Definition apefile.h:77
TagLib::APE::File::AllTags
@ AllTags
Matches all tag types.
Definition apefile.h:83
TagLib::APE::File::File
File(const File &)=delete
TagLib::APE::File::~File
~File() override
TagLib::APE::File::File
File(IOStream *stream, bool readProperties=true, Properties::ReadStyle propertiesStyle=Properties::Average)
TagLib::APE::File::APETag
APE::Tag * APETag(bool create=false)
TagLib::APE::File::removeUnsupportedProperties
void removeUnsupportedProperties(const StringList &properties) override
TagLib::APE::File::save
bool save() override
TagLib::APE::File::setProperties
PropertyMap setProperties(const PropertyMap &) override
TagLib::APE::File::properties
PropertyMap properties() const override
TagLib::APE::File::strip
void strip(int tags=AllTags)
TagLib::APE::File::audioProperties
Properties * audioProperties() const override
TagLib::APE::File::File
File(FileName file, bool readProperties=true, Properties::ReadStyle propertiesStyle=Properties::Average)
TagLib::APE::File::hasAPETag
bool hasAPETag() const
TagLib::APE::File::tag
TagLib::Tag * tag() const override
TagLib::APE::File::operator=
File & operator=(const File &)=delete
TagLib::APE::File::ID3v1Tag
ID3v1::Tag * ID3v1Tag(bool create=false)
TagLib::APE::File::hasID3v1Tag
bool hasID3v1Tag() const
TagLib::APE::Properties
An implementation of audio property reading for APE.
Definition apeproperties.h:51
TagLib::APE::Tag
An APE tag implementation.
Definition apetag.h:57
TagLib::AudioProperties::ReadStyle
ReadStyle
Definition audioproperties.h:56
TagLib::AudioProperties::Average
@ Average
Read more of the file and make better values guesses.
Definition audioproperties.h:60
TagLib::File
A file class with some useful methods for tag manipulation.
Definition tfile.h:51
TagLib::ID3v1::Tag
The main class in the ID3v1 implementation.
Definition id3v1tag.h:115
TagLib::IOStream
An abstract class that provides operations on a sequence of bytes.
Definition tiostream.h:65
TagLib::PropertyMap
A map for format-independent <key,values> tag representations.
Definition tpropertymap.h:123
TagLib::StringList
A list of strings.
Definition tstringlist.h:44
TagLib::Tag
A simple, generic interface to common audio metadata fields.
Definition tag.h:49
TagLib::APE
An implementation of APE metadata.
Definition apefile.h:46
TagLib::ID3v1
An ID3v1 implementation.
Definition apefile.h:45
TagLib
A namespace for all TagLib related classes and functions.
Definition apefile.h:41
TagLib::FileName
const char * FileName
Definition tiostream.h:59
taglib_export.h
TAGLIB_EXPORT
#define TAGLIB_EXPORT
Definition taglib_export.h:40
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition taglib_export.h:55
tfile.h