flacfile.h
Go to the documentation of this file.
/***************************************************************************
copyright : (C) 2003 by Allan Sandfeld Jensen
email : kde@carewolf.org
***************************************************************************/
/***************************************************************************
* 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_FLACFILE_H
#define TAGLIB_FLACFILE_H
#include "tfile.h"
#include "tlist.h"
#include "taglib_export.h"
#include "tag.h"
#include "flacpicture.h"
#include "flacproperties.h"
namespace TagLib {
class Tag;
namespace ID3v2 { class FrameFactory; class Tag; }
namespace ID3v1 { class Tag; }
namespace Ogg { class XiphComment; }
namespace FLAC {
class TAGLIB_EXPORT File : public TagLib::File
{
public:
enum TagTypes {
NoTags = 0x0000,
XiphComment = 0x0001,
ID3v1 = 0x0002,
ID3v2 = 0x0004,
AllTags = 0xffff
};
File(FileName file, bool readProperties = true,
Properties::ReadStyle propertiesStyle = Properties::Average,
ID3v2::FrameFactory *frameFactory = nullptr);
TAGLIB_DEPRECATED
File(FileName file, ID3v2::FrameFactory *frameFactory,
bool readProperties = true,
Properties::ReadStyle propertiesStyle = Properties::Average);
File(IOStream *stream, bool readProperties = true,
Properties::ReadStyle propertiesStyle = Properties::Average,
ID3v2::FrameFactory *frameFactory = nullptr);
TAGLIB_DEPRECATED
File(IOStream *stream, ID3v2::FrameFactory *frameFactory,
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 &) override;
PropertyMap setProperties(const PropertyMap &) override;
StringList complexPropertyKeys() const override;
List<VariantMap> complexProperties(const String &key) const override;
bool setComplexProperties(const String &key, const List<VariantMap> &value) override;
Properties *audioProperties() const override;
bool save() override;
ID3v2::Tag *ID3v2Tag(bool create = false);
ID3v1::Tag *ID3v1Tag(bool create = false);
Ogg::XiphComment *xiphComment(bool create = false);
List<Picture *> pictureList();
void removePicture(Picture *picture, bool del = true);
void removePictures();
void addPicture(Picture *picture);
String iXMLData() const;
void setiXMLData(const String &data);
ByteVector BEXTData() const;
void setBEXTData(const ByteVector &data);
void strip(int tags = AllTags);
bool hasXiphComment() const;
bool hasID3v1Tag() const;
bool hasID3v2Tag() const;
bool hasiXMLData() const;
bool hasBEXTData() const;
static bool isSupported(IOStream *stream);
private:
void read(bool readProperties);
void scan();
class FilePrivate;
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
std::unique_ptr<FilePrivate> d;
};
} // namespace FLAC
} // namespace TagLib
#endif
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::ByteVector
A byte vector.
Definition tbytevector.h:46
TagLib::FLAC::File::removeUnsupportedProperties
void removeUnsupportedProperties(const StringList &) override
TagLib::FLAC::File::isSupported
static bool isSupported(IOStream *stream)
TagLib::FLAC::File::complexPropertyKeys
StringList complexPropertyKeys() const override
TagLib::FLAC::File::removePictures
void removePictures()
TagLib::FLAC::File::hasID3v1Tag
bool hasID3v1Tag() const
TagLib::FLAC::File::File
File(const File &)=delete
TagLib::FLAC::File::audioProperties
Properties * audioProperties() const override
TagLib::FLAC::File::setiXMLData
void setiXMLData(const String &data)
TagLib::FLAC::File::BEXTData
ByteVector BEXTData() const
TagLib::FLAC::File::hasBEXTData
bool hasBEXTData() const
TagLib::FLAC::File::File
File(FileName file, bool readProperties=true, Properties::ReadStyle propertiesStyle=Properties::Average, ID3v2::FrameFactory *frameFactory=nullptr)
TagLib::FLAC::File::complexProperties
List< VariantMap > complexProperties(const String &key) const override
TagLib::FLAC::File::pictureList
List< Picture * > pictureList()
TagLib::FLAC::File::hasID3v2Tag
bool hasID3v2Tag() const
TagLib::FLAC::File::ID3v1Tag
ID3v1::Tag * ID3v1Tag(bool create=false)
TagLib::FLAC::File::save
bool save() override
TagLib::FLAC::File::addPicture
void addPicture(Picture *picture)
TagLib::FLAC::File::iXMLData
String iXMLData() const
TagLib::FLAC::File::hasXiphComment
bool hasXiphComment() const
TagLib::FLAC::File::File
TAGLIB_DEPRECATED File(IOStream *stream, ID3v2::FrameFactory *frameFactory, bool readProperties=true, Properties::ReadStyle propertiesStyle=Properties::Average)
TagLib::FLAC::File::hasiXMLData
bool hasiXMLData() const
TagLib::FLAC::File::setComplexProperties
bool setComplexProperties(const String &key, const List< VariantMap > &value) override
TagLib::FLAC::File::setBEXTData
void setBEXTData(const ByteVector &data)
TagLib::FLAC::File::xiphComment
Ogg::XiphComment * xiphComment(bool create=false)
TagLib::FLAC::File::setProperties
PropertyMap setProperties(const PropertyMap &) override
TagLib::FLAC::File::removePicture
void removePicture(Picture *picture, bool del=true)
TagLib::FLAC::File::tag
TagLib::Tag * tag() const override
TagLib::FLAC::File::properties
PropertyMap properties() const override
TagLib::FLAC::File::TagTypes
TagTypes
Definition flacfile.h:72
TagLib::FLAC::File::ID3v2
@ ID3v2
Matches ID3v2 tags.
Definition flacfile.h:80
TagLib::FLAC::File::NoTags
@ NoTags
Empty set. Matches no tag types.
Definition flacfile.h:74
TagLib::FLAC::File::XiphComment
@ XiphComment
Matches Vorbis comments.
Definition flacfile.h:76
TagLib::FLAC::File::AllTags
@ AllTags
Matches all tag types.
Definition flacfile.h:82
TagLib::FLAC::File::ID3v1
@ ID3v1
Matches ID3v1 tags.
Definition flacfile.h:78
TagLib::FLAC::File::strip
void strip(int tags=AllTags)
TagLib::FLAC::File::ID3v2Tag
ID3v2::Tag * ID3v2Tag(bool create=false)
TagLib::FLAC::File::File
TAGLIB_DEPRECATED File(FileName file, ID3v2::FrameFactory *frameFactory, bool readProperties=true, Properties::ReadStyle propertiesStyle=Properties::Average)
TagLib::FLAC::File::~File
~File() override
TagLib::FLAC::File::operator=
File & operator=(const File &)=delete
TagLib::FLAC::File::File
File(IOStream *stream, bool readProperties=true, Properties::ReadStyle propertiesStyle=Properties::Average, ID3v2::FrameFactory *frameFactory=nullptr)
TagLib::FLAC::Picture
FLAC picture.
Definition flacpicture.h:40
TagLib::FLAC::Properties
An implementation of audio property reading for FLAC.
Definition flacproperties.h:45
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::ID3v2::FrameFactory
A factory for creating ID3v2 frames during parsing.
Definition id3v2framefactory.h:68
TagLib::ID3v2::Tag
The main class in the ID3v2 implementation.
Definition id3v2tag.h:134
TagLib::IOStream
An abstract class that provides operations on a sequence of bytes.
Definition tiostream.h:65
TagLib::List
A generic, implicitly shared list.
Definition tlist.h:54
TagLib::Ogg::XiphComment
Ogg Vorbis comment implementation.
Definition xiphcomment.h:71
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::String
A wide string class suitable for unicode.
Definition tstring.h:83
TagLib::Tag
A simple, generic interface to common audio metadata fields.
Definition tag.h:49
flacpicture.h
flacproperties.h
TagLib::FLAC
An implementation of FLAC metadata.
Definition flacfile.h:54
TagLib::ID3v1
An ID3v1 implementation.
Definition apefile.h:45
TagLib::ID3v2
An ID3v2 implementation.
Definition flacfile.h:39
TagLib::Ogg
A namespace for the classes used by Ogg-based metadata files.
Definition flacfile.h:41
TagLib
A namespace for all TagLib related classes and functions.
Definition apefile.h:41
TagLib::FileName
const char * FileName
Definition tiostream.h:59
tag.h
TAGLIB_DEPRECATED
#define TAGLIB_DEPRECATED
Definition taglib.h:39
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
tlist.h