TagLib API Documentation
matroskasimpletag.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_MATROSKASIMPLETAG_H
22#define TAGLIB_MATROSKASIMPLETAG_H
23
24#include <memory>
25
26#include "tstring.h"
27
28namespace TagLib {
29 class String;
30 class ByteVector;
31
32 namespace Matroska {
35 {
36 public:
39 None = 0,
40 Shot = 10,
41 Subtrack = 20,
42 Track = 30,
43 Part = 40,
44 Album = 50,
45 Edition = 60,
46 Collection = 70
47 };
48
50 enum ValueType {
51 StringType = 0,
52 BinaryType = 1
53 };
54
58 SimpleTag(const String &name, const String &value,
59 TargetTypeValue targetTypeValue = None,
60 const String &language = String(), bool defaultLanguage = true,
61 unsigned long long trackUid = 0);
62
66 // BIC: merge with constructor above
67 SimpleTag(const String& name, const String& value, TargetTypeValue targetTypeValue, const String& language,
68 bool defaultLanguage, unsigned long long trackUid, unsigned long long editionUid,
69 unsigned long long chapterUid = 0, unsigned long long attachmentUid = 0);
70
74 SimpleTag(const String &name, const ByteVector &value,
75 TargetTypeValue targetTypeValue = None,
76 const String &language = String(), bool defaultLanguage = true,
77 unsigned long long trackUid = 0);
78
82 // BIC: merge with constructor above
83 SimpleTag(const String& name, const ByteVector& value, TargetTypeValue targetTypeValue, const String& language,
84 bool defaultLanguage, unsigned long long trackUid, unsigned long long editionUid,
85 unsigned long long chapterUid = 0, unsigned long long attachmentUid = 0);
86
91
96
101
106
111
115 void swap(SimpleTag &other) noexcept;
116
120 const String &name() const;
121
126
130 const String &language() const;
131
136
141 unsigned long long trackUid() const;
142
147 unsigned long long editionUid() const;
148
153 unsigned long long chapterUid() const;
154
159 unsigned long long attachmentUid() const;
160
165
170
175
176 private:
177 class SimpleTagPrivate;
179 std::unique_ptr<SimpleTagPrivate> d;
180 };
181
182 }
183}
184
185#endif
A byte vector.
Definition tbytevector.h:46
A generic, implicitly shared list.
Definition tlist.h:54
Attribute of Matroska metadata.
Definition matroskasimpletag.h:35
ByteVector toByteVector() const
ValueType type() const
SimpleTag & operator=(const SimpleTag &other)
SimpleTag(const String &name, const ByteVector &value, TargetTypeValue targetTypeValue, const String &language, bool defaultLanguage, unsigned long long trackUid, unsigned long long editionUid, unsigned long long chapterUid=0, unsigned long long attachmentUid=0)
unsigned long long trackUid() const
const String & language() const
SimpleTag & operator=(SimpleTag &&other) noexcept
TargetTypeValue
Specifies the level of other elements the tag value applies to.
Definition matroskasimpletag.h:38
SimpleTag(const String &name, const String &value, TargetTypeValue targetTypeValue=None, const String &language=String(), bool defaultLanguage=true, unsigned long long trackUid=0)
void swap(SimpleTag &other) noexcept
const String & name() const
unsigned long long attachmentUid() const
bool defaultLanguageFlag() const
SimpleTag(const SimpleTag &other)
SimpleTag(const String &name, const ByteVector &value, TargetTypeValue targetTypeValue=None, const String &language=String(), bool defaultLanguage=true, unsigned long long trackUid=0)
unsigned long long editionUid() const
TargetTypeValue targetTypeValue() const
SimpleTag(SimpleTag &&other) noexcept
SimpleTag(const String &name, const String &value, TargetTypeValue targetTypeValue, const String &language, bool defaultLanguage, unsigned long long trackUid, unsigned long long editionUid, unsigned long long chapterUid=0, unsigned long long attachmentUid=0)
ValueType
The types the value can have.
Definition matroskasimpletag.h:50
unsigned long long chapterUid() const
A wide string class suitable for unicode.
Definition tstring.h:83
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