TagLib API Documentation
matroskatag.h
Go to the documentation of this file.
1/***************************************************************************
2 * This library is free software; you can redistribute it and/or modify *
3 * it under the terms of the GNU Lesser General Public License version *
4 * 2.1 as published by the Free Software Foundation. *
5 * *
6 * This library is distributed in the hope that it will be useful, but *
7 * WITHOUT ANY WARRANTY; without even the implied warranty of *
8 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
9 * Lesser General Public License for more details. *
10 * *
11 * You should have received a copy of the GNU Lesser General Public *
12 * License along with this library; if not, write to the Free Software *
13 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
14 * 02110-1301 USA *
15 * *
16 * Alternatively, this file is available under the Mozilla Public *
17 * License Version 1.1. You may obtain a copy of the License at *
18 * http://www.mozilla.org/MPL/ *
19 ***************************************************************************/
20
21#ifndef TAGLIB_MATROSKATAG_H
22#define TAGLIB_MATROSKATAG_H
23
24#include <memory>
25
26#include "tag.h"
27#include "tlist.h"
28#include "matroskaelement.h"
29#include "matroskasimpletag.h"
30
31namespace TagLib {
32 class File;
33
34 namespace EBML {
35 class MkTags;
36 }
37
38 namespace Matroska {
41
44#ifndef DO_NOT_DOCUMENT
45 , private Element
46#endif
47 {
48 public:
52 Tag();
53
54 ~Tag() override;
55 String title() const override;
56 String artist() const override;
57 String album() const override;
58 String comment() const override;
59 String genre() const override;
60 unsigned int year() const override;
61 unsigned int track() const override;
62 void setTitle(const String &s) override;
63 void setArtist(const String &s) override;
64 void setAlbum(const String &s) override;
65 void setComment(const String &s) override;
66 void setGenre(const String &s) override;
67 void setYear(unsigned int i) override;
68 void setTrack(unsigned int i) override;
69 bool isEmpty() const override;
70 PropertyMap properties() const override;
72 void removeUnsupportedProperties(const StringList &properties) override;
73
78
85 List<VariantMap> complexProperties(const String &key) const override;
86
95 bool setComplexProperties(const String &key, const List<VariantMap> &value) override;
96
100 void addSimpleTag(const SimpleTag &tag);
101
106
110 void insertSimpleTag(unsigned int index, const SimpleTag &tag);
111
115 void removeSimpleTag(unsigned int index);
116
120 void removeSimpleTag(const String &name, SimpleTag::TargetTypeValue targetTypeValue,
121 unsigned long long trackUid = 0);
122
127
132
133 private:
134 friend class File;
135 friend class EBML::MkTags;
136 class TagPrivate;
137
138 bool setTag(const String &key, const String &value);
139 void setSegmentTitle(const String &title);
140
141 // private Element implementation
142 ByteVector renderInternal() override;
143
145 std::unique_ptr<TagPrivate> d;
146 };
147 }
148}
149
150#endif
A byte vector.
Definition tbytevector.h:46
A generic, implicitly shared list.
Definition tlist.h:54
An implementation of TagLib::File with Matroska specific methods.
Definition matroskafile.h:40
Attribute of Matroska metadata.
Definition matroskasimpletag.h:35
TargetTypeValue
Specifies the level of other elements the tag value applies to.
Definition matroskasimpletag.h:38
Matroska tag implementation.
Definition matroskatag.h:47
void removeSimpleTag(const String &name, SimpleTag::TargetTypeValue targetTypeValue, unsigned long long trackUid=0)
String album() const override
void setComment(const String &s) override
String artist() const override
void removeUnsupportedProperties(const StringList &properties) override
void setArtist(const String &s) override
void setTitle(const String &s) override
String title() const override
bool setComplexProperties(const String &key, const List< VariantMap > &value) override
PropertyMap properties() const override
void setGenre(const String &s) override
void setYear(unsigned int i) override
unsigned int track() const override
PropertyMap setProperties(const PropertyMap &propertyMap) override
void setAlbum(const String &s) override
bool isEmpty() const override
void addSimpleTags(const SimpleTagsList &simpleTags)
unsigned int year() const override
void setTrack(unsigned int i) override
void addSimpleTag(const SimpleTag &tag)
void removeSimpleTag(unsigned int index)
String comment() const override
const SimpleTagsList & simpleTagsList() const
StringList complexPropertyKeys() const override
List< VariantMap > complexProperties(const String &key) const override
String genre() const override
void insertSimpleTag(unsigned int index, const SimpleTag &tag)
A map for format-independent <key,values> tag representations.
Definition tpropertymap.h:123
A list of strings.
Definition tstringlist.h:44
A wide string class suitable for unicode.
Definition tstring.h:83
A simple, generic interface to common audio metadata fields.
Definition tag.h:49
A namespace for all TagLib related classes and functions.
Definition apefile.h:41
#define TAGLIB_EXPORT
Definition taglib_export.h:40
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition taglib_export.h:55