matroskatag.h
Go to the documentation of this file.
/***************************************************************************
* 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_MATROSKATAG_H
#define TAGLIB_MATROSKATAG_H
#include <memory>
#include "tag.h"
#include "tlist.h"
#include "matroskaelement.h"
#include "matroskasimpletag.h"
namespace TagLib {
class File;
namespace EBML {
class MkTags;
}
namespace Matroska {
using SimpleTagsList = List<SimpleTag>;
class TAGLIB_EXPORT Tag : public TagLib::Tag
#ifndef DO_NOT_DOCUMENT
, private Element
#endif
{
public:
Tag();
~Tag() override;
String title() const override;
String artist() const override;
String album() const override;
String comment() const override;
String genre() const override;
unsigned int year() const override;
unsigned int track() const override;
void setTitle(const String &s) override;
void setArtist(const String &s) override;
void setAlbum(const String &s) override;
void setComment(const String &s) override;
void setGenre(const String &s) override;
void setYear(unsigned int i) override;
void setTrack(unsigned int i) override;
bool isEmpty() const override;
PropertyMap properties() const override;
PropertyMap setProperties(const PropertyMap &propertyMap) override;
void removeUnsupportedProperties(const StringList &properties) override;
StringList complexPropertyKeys() const override;
List<VariantMap> complexProperties(const String &key) const override;
bool setComplexProperties(const String &key, const List<VariantMap> &value) override;
void addSimpleTag(const SimpleTag &tag);
void addSimpleTags(const SimpleTagsList &simpleTags);
void insertSimpleTag(unsigned int index, const SimpleTag &tag);
void removeSimpleTag(unsigned int index);
void removeSimpleTag(const String &name, SimpleTag::TargetTypeValue targetTypeValue,
unsigned long long trackUid = 0);
// BIC: Merge with the method above
void removeSimpleTag(const String &name, SimpleTag::TargetTypeValue targetTypeValue,
unsigned long long trackUid, unsigned long long editionUid,
unsigned long long chapterUid = 0, unsigned long long attachmentUid = 0);
void clearSimpleTags();
const SimpleTagsList &simpleTagsList() const;
private:
friend class File;
friend class EBML::MkTags;
class TagPrivate;
bool setTag(const String &key, const String &value);
void setSegmentTitle(const String &title);
// private Element implementation
ByteVector renderInternal() override;
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
std::unique_ptr<TagPrivate> d;
};
}
}
#endif
TagLib::ByteVector
A byte vector.
Definition tbytevector.h:46
TagLib::File
A file class with some useful methods for tag manipulation.
Definition tfile.h:51
TagLib::List
A generic, implicitly shared list.
Definition tlist.h:54
TagLib::Matroska::SimpleTag
Attribute of Matroska metadata.
Definition matroskasimpletag.h:35
TagLib::Matroska::SimpleTag::TargetTypeValue
TargetTypeValue
Specifies the level of other elements the tag value applies to.
Definition matroskasimpletag.h:38
TagLib::Matroska::Tag::removeSimpleTag
void removeSimpleTag(const String &name, SimpleTag::TargetTypeValue targetTypeValue, unsigned long long trackUid=0)
TagLib::Matroska::Tag::Tag
Tag()
TagLib::Matroska::Tag::removeSimpleTag
void removeSimpleTag(const String &name, SimpleTag::TargetTypeValue targetTypeValue, unsigned long long trackUid, unsigned long long editionUid, unsigned long long chapterUid=0, unsigned long long attachmentUid=0)
TagLib::Matroska::Tag::clearSimpleTags
void clearSimpleTags()
TagLib::Matroska::Tag::album
String album() const override
TagLib::Matroska::Tag::setComment
void setComment(const String &s) override
TagLib::Matroska::Tag::artist
String artist() const override
TagLib::Matroska::Tag::removeUnsupportedProperties
void removeUnsupportedProperties(const StringList &properties) override
TagLib::Matroska::Tag::setArtist
void setArtist(const String &s) override
TagLib::Matroska::Tag::setTitle
void setTitle(const String &s) override
TagLib::Matroska::Tag::title
String title() const override
TagLib::Matroska::Tag::setComplexProperties
bool setComplexProperties(const String &key, const List< VariantMap > &value) override
TagLib::Matroska::Tag::properties
PropertyMap properties() const override
TagLib::Matroska::Tag::setGenre
void setGenre(const String &s) override
TagLib::Matroska::Tag::File
friend class File
Definition matroskatag.h:142
TagLib::Matroska::Tag::setYear
void setYear(unsigned int i) override
TagLib::Matroska::Tag::track
unsigned int track() const override
TagLib::Matroska::Tag::setProperties
PropertyMap setProperties(const PropertyMap &propertyMap) override
TagLib::Matroska::Tag::setAlbum
void setAlbum(const String &s) override
TagLib::Matroska::Tag::isEmpty
bool isEmpty() const override
TagLib::Matroska::Tag::addSimpleTags
void addSimpleTags(const SimpleTagsList &simpleTags)
TagLib::Matroska::Tag::year
unsigned int year() const override
TagLib::Matroska::Tag::setTrack
void setTrack(unsigned int i) override
TagLib::Matroska::Tag::addSimpleTag
void addSimpleTag(const SimpleTag &tag)
TagLib::Matroska::Tag::removeSimpleTag
void removeSimpleTag(unsigned int index)
TagLib::Matroska::Tag::comment
String comment() const override
TagLib::Matroska::Tag::simpleTagsList
const SimpleTagsList & simpleTagsList() const
TagLib::Matroska::Tag::complexPropertyKeys
StringList complexPropertyKeys() const override
TagLib::Matroska::Tag::complexProperties
List< VariantMap > complexProperties(const String &key) const override
TagLib::Matroska::Tag::genre
String genre() const override
TagLib::Matroska::Tag::insertSimpleTag
void insertSimpleTag(unsigned int index, const SimpleTag &tag)
TagLib::Matroska::Tag::~Tag
~Tag() override
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
matroskaelement.h
matroskasimpletag.h
TagLib::EBML
Definition matroskaattachments.h:32
TagLib::Matroska
An implementation of Matroska metadata.
Definition matroskaattachedfile.h:32
TagLib::Matroska::SimpleTagsList
List< SimpleTag > SimpleTagsList
List of tag attributes.
Definition matroskatag.h:40
TagLib
A namespace for all TagLib related classes and functions.
Definition apefile.h:41
tag.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
tlist.h