chapterframe.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_CHAPTERFRAME
#define TAGLIB_CHAPTERFRAME
#include "taglib_export.h"
#include "id3v2tag.h"
#include "id3v2frame.h"
namespace TagLib {
namespace ID3v2 {
class TAGLIB_EXPORT ChapterFrame : public ID3v2::Frame
{
friend class FrameFactory;
public:
ChapterFrame(const ID3v2::Header *tagHeader, const ByteVector &data);
ChapterFrame(const ByteVector &elementID,
unsigned int startTime, unsigned int endTime,
unsigned int startOffset, unsigned int endOffset,
const FrameList &embeddedFrames = FrameList());
~ChapterFrame() override;
ChapterFrame(const ChapterFrame &) = delete;
ChapterFrame &operator=(const ChapterFrame &) = delete;
ByteVector elementID() const;
unsigned int startTime() const;
unsigned int endTime() const;
unsigned int startOffset() const;
unsigned int endOffset() const;
void setElementID(const ByteVector &eID);
void setStartTime(const unsigned int &sT);
void setEndTime(const unsigned int &eT);
void setStartOffset(const unsigned int &sO);
void setEndOffset(const unsigned int &eO);
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 ChapterFrame *findByElementID(const Tag *tag, const ByteVector &eID);
protected:
void parseFields(const ByteVector &data) override;
ByteVector renderFields() const override;
private:
ChapterFrame(const ID3v2::Header *tagHeader, const ByteVector &data, Header *h);
class ChapterFramePrivate;
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
std::unique_ptr<ChapterFramePrivate> d;
};
} // namespace ID3v2
} // namespace TagLib
#endif
TagLib::ByteVector
A byte vector.
Definition tbytevector.h:46
TagLib::ID3v2::ChapterFrame::elementID
ByteVector elementID() const
TagLib::ID3v2::ChapterFrame::ChapterFrame
ChapterFrame(const ID3v2::Header *tagHeader, const ByteVector &data)
TagLib::ID3v2::ChapterFrame::addEmbeddedFrame
void addEmbeddedFrame(Frame *frame)
TagLib::ID3v2::ChapterFrame::setEndTime
void setEndTime(const unsigned int &eT)
TagLib::ID3v2::ChapterFrame::endTime
unsigned int endTime() const
TagLib::ID3v2::ChapterFrame::embeddedFrameListMap
const FrameListMap & embeddedFrameListMap() const
TagLib::ID3v2::ChapterFrame::startTime
unsigned int startTime() const
TagLib::ID3v2::ChapterFrame::setElementID
void setElementID(const ByteVector &eID)
TagLib::ID3v2::ChapterFrame::endOffset
unsigned int endOffset() const
TagLib::ID3v2::ChapterFrame::removeEmbeddedFrames
void removeEmbeddedFrames(const ByteVector &id)
TagLib::ID3v2::ChapterFrame::embeddedFrameList
const FrameList & embeddedFrameList() const
TagLib::ID3v2::ChapterFrame::ChapterFrame
ChapterFrame(const ByteVector &elementID, unsigned int startTime, unsigned int endTime, unsigned int startOffset, unsigned int endOffset, const FrameList &embeddedFrames=FrameList())
TagLib::ID3v2::ChapterFrame::parseFields
void parseFields(const ByteVector &data) override
TagLib::ID3v2::ChapterFrame::ChapterFrame
ChapterFrame(const ChapterFrame &)=delete
TagLib::ID3v2::ChapterFrame::removeEmbeddedFrame
void removeEmbeddedFrame(Frame *frame, bool del=true)
TagLib::ID3v2::ChapterFrame::FrameFactory
friend class FrameFactory
Definition chapterframe.h:46
TagLib::ID3v2::ChapterFrame::setStartTime
void setStartTime(const unsigned int &sT)
TagLib::ID3v2::ChapterFrame::~ChapterFrame
~ChapterFrame() override
TagLib::ID3v2::ChapterFrame::setEndOffset
void setEndOffset(const unsigned int &eO)
TagLib::ID3v2::ChapterFrame::operator=
ChapterFrame & operator=(const ChapterFrame &)=delete
TagLib::ID3v2::ChapterFrame::embeddedFrameList
const FrameList & embeddedFrameList(const ByteVector &frameID) const
TagLib::ID3v2::ChapterFrame::asProperties
PropertyMap asProperties() const override
TagLib::ID3v2::ChapterFrame::setStartOffset
void setStartOffset(const unsigned int &sO)
TagLib::ID3v2::ChapterFrame::renderFields
ByteVector renderFields() const override
TagLib::ID3v2::ChapterFrame::findByElementID
static ChapterFrame * findByElementID(const Tag *tag, const ByteVector &eID)
TagLib::ID3v2::ChapterFrame::startOffset
unsigned int startOffset() const
TagLib::ID3v2::ChapterFrame::toString
String toString() const override
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::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.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