tableofcontentsframe.h
Go to the documentation of this file.
/***************************************************************************
copyright : (C) 2013 by Lukas Krejci
email : krejclu6@fel.cvut.cz
***************************************************************************/
/***************************************************************************
* 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_TABLEOFCONTENTSFRAME
#define TAGLIB_TABLEOFCONTENTSFRAME
#include "tbytevectorlist.h"
#include "id3v2tag.h"
#include "id3v2frame.h"
namespace TagLib {
namespace ID3v2 {
class TAGLIB_EXPORT TableOfContentsFrame : public ID3v2::Frame
{
friend class FrameFactory;
public:
TableOfContentsFrame(const ID3v2::Header *tagHeader, const ByteVector &data);
TableOfContentsFrame(const ByteVector &elementID,
const ByteVectorList &children = ByteVectorList(),
const FrameList &embeddedFrames = FrameList());
~TableOfContentsFrame() override;
TableOfContentsFrame(const TableOfContentsFrame &) = delete;
TableOfContentsFrame &operator=(const TableOfContentsFrame &) = delete;
ByteVector elementID() const;
bool isTopLevel() const;
bool isOrdered() const;
unsigned int entryCount() const;
ByteVectorList childElements() const;
void setElementID(const ByteVector &eID);
void setIsTopLevel(const bool &t);
void setIsOrdered(const bool &o);
void setChildElements(const ByteVectorList &l);
void addChildElement(const ByteVector &cE);
void removeChildElement(const ByteVector &cE);
const FrameListMap &embeddedFrameListMap() const;
const FrameList &embeddedFrameList() const;
const FrameList &embeddedFrameList(const ByteVector &frameID) const;
void addEmbeddedFrame(Frame *frame);
void removeEmbeddedFrame(Frame *frame, bool del = true);
void removeEmbeddedFrames(const ByteVector &id);
String toString() const override;
PropertyMap asProperties() const override;
static TableOfContentsFrame *findByElementID(const Tag *tag, const ByteVector &eID);
static TableOfContentsFrame *findTopLevel(const Tag *tag);
protected:
void parseFields(const ByteVector &data) override;
ByteVector renderFields() const override;
private:
TableOfContentsFrame(const ID3v2::Header *tagHeader, const ByteVector &data, Header *h);
class TableOfContentsFramePrivate;
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
std::unique_ptr<TableOfContentsFramePrivate> d;
};
} // namespace ID3v2
} // namespace TagLib
#endif
TagLib::ByteVectorList
A list of ByteVectors.
Definition tbytevectorlist.h:42
TagLib::ByteVector
A byte vector.
Definition tbytevector.h:46
TagLib::ID3v2::Frame::Header
ID3v2 frame header implementation.
Definition id3v2frame.h:293
TagLib::ID3v2::Frame
ID3v2 frame implementation.
Definition id3v2frame.h:57
TagLib::ID3v2::Frame::Frame
Frame(const Frame &)=delete
TagLib::ID3v2::Frame::frameID
ByteVector frameID() const
TagLib::ID3v2::Frame::Tag
friend class Tag
Definition id3v2frame.h:58
TagLib::ID3v2::Header
An implementation of ID3v2 headers.
Definition id3v2header.h:49
TagLib::ID3v2::TableOfContentsFrame::embeddedFrameList
const FrameList & embeddedFrameList(const ByteVector &frameID) const
TagLib::ID3v2::TableOfContentsFrame::removeChildElement
void removeChildElement(const ByteVector &cE)
TagLib::ID3v2::TableOfContentsFrame::findByElementID
static TableOfContentsFrame * findByElementID(const Tag *tag, const ByteVector &eID)
TagLib::ID3v2::TableOfContentsFrame::toString
String toString() const override
TagLib::ID3v2::TableOfContentsFrame::setElementID
void setElementID(const ByteVector &eID)
TagLib::ID3v2::TableOfContentsFrame::setIsOrdered
void setIsOrdered(const bool &o)
TagLib::ID3v2::TableOfContentsFrame::asProperties
PropertyMap asProperties() const override
TagLib::ID3v2::TableOfContentsFrame::renderFields
ByteVector renderFields() const override
TagLib::ID3v2::TableOfContentsFrame::addEmbeddedFrame
void addEmbeddedFrame(Frame *frame)
TagLib::ID3v2::TableOfContentsFrame::~TableOfContentsFrame
~TableOfContentsFrame() override
TagLib::ID3v2::TableOfContentsFrame::TableOfContentsFrame
TableOfContentsFrame(const ID3v2::Header *tagHeader, const ByteVector &data)
TagLib::ID3v2::TableOfContentsFrame::addChildElement
void addChildElement(const ByteVector &cE)
TagLib::ID3v2::TableOfContentsFrame::entryCount
unsigned int entryCount() const
TagLib::ID3v2::TableOfContentsFrame::setIsTopLevel
void setIsTopLevel(const bool &t)
TagLib::ID3v2::TableOfContentsFrame::embeddedFrameListMap
const FrameListMap & embeddedFrameListMap() const
TagLib::ID3v2::TableOfContentsFrame::parseFields
void parseFields(const ByteVector &data) override
TagLib::ID3v2::TableOfContentsFrame::FrameFactory
friend class FrameFactory
Definition tableofcontentsframe.h:46
TagLib::ID3v2::TableOfContentsFrame::isOrdered
bool isOrdered() const
TagLib::ID3v2::TableOfContentsFrame::operator=
TableOfContentsFrame & operator=(const TableOfContentsFrame &)=delete
TagLib::ID3v2::TableOfContentsFrame::childElements
ByteVectorList childElements() const
TagLib::ID3v2::TableOfContentsFrame::embeddedFrameList
const FrameList & embeddedFrameList() const
TagLib::ID3v2::TableOfContentsFrame::isTopLevel
bool isTopLevel() const
TagLib::ID3v2::TableOfContentsFrame::TableOfContentsFrame
TableOfContentsFrame(const ByteVector &elementID, const ByteVectorList &children=ByteVectorList(), const FrameList &embeddedFrames=FrameList())
TagLib::ID3v2::TableOfContentsFrame::removeEmbeddedFrames
void removeEmbeddedFrames(const ByteVector &id)
TagLib::ID3v2::TableOfContentsFrame::elementID
ByteVector elementID() const
TagLib::ID3v2::TableOfContentsFrame::removeEmbeddedFrame
void removeEmbeddedFrame(Frame *frame, bool del=true)
TagLib::ID3v2::TableOfContentsFrame::setChildElements
void setChildElements(const ByteVectorList &l)
TagLib::ID3v2::TableOfContentsFrame::findTopLevel
static TableOfContentsFrame * findTopLevel(const Tag *tag)
TagLib::ID3v2::TableOfContentsFrame::TableOfContentsFrame
TableOfContentsFrame(const TableOfContentsFrame &)=delete
TagLib::PropertyMap
A map for format-independent <key,values> tag representations.
Definition tpropertymap.h:123
TagLib::String
A wide string class suitable for unicode.
Definition tstring.h:83
id3v2frame.h
id3v2tag.h
TagLib::ID3v2
An ID3v2 implementation.
Definition flacfile.h:39
TagLib::ID3v2::FrameList
List< Frame * > FrameList
Definition id3v2tag.h:48
TagLib::ID3v2::FrameListMap
Map< ByteVector, FrameList > FrameListMap
Definition id3v2tag.h:49
TagLib
A namespace for all TagLib related classes and functions.
Definition apefile.h:41
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
tbytevectorlist.h