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 SimpleTag(const String &name, const ByteVector &value,
67 TargetTypeValue targetTypeValue = None,
68 const String &language = String(), bool defaultLanguage = true,
69 unsigned long long trackUid = 0);
70
75
80
85
90
95
99 void swap(SimpleTag &other) noexcept;
100
104 const String &name() const;
105
110
114 const String &language() const;
115
120
125 unsigned long long trackUid() const;
126
131
136
141
142 private:
143 class SimpleTagPrivate;
145 std::unique_ptr<SimpleTagPrivate> d;
146 };
147
148 }
149}
150
151#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)
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
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)
TargetTypeValue targetTypeValue() const
SimpleTag(SimpleTag &&other) noexcept
ValueType
The types the value can have.
Definition matroskasimpletag.h:50
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