TagLib  2.2.1
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 
28 namespace 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 
90  SimpleTag(const SimpleTag &other);
91 
95  SimpleTag(SimpleTag &&other) noexcept;
96 
100  ~SimpleTag();
101 
105  SimpleTag &operator=(const SimpleTag &other);
106 
110  SimpleTag &operator=(SimpleTag &&other) noexcept;
111 
115  void swap(SimpleTag &other) noexcept;
116 
120  const String &name() const;
121 
125  TargetTypeValue targetTypeValue() const;
126 
130  const String &language() const;
131 
135  bool defaultLanguageFlag() const;
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 
164  ValueType type() const;
165 
169  String toString() const;
170 
174  ByteVector toByteVector() const;
175 
176  private:
177  class SimpleTagPrivate;
179  std::unique_ptr<SimpleTagPrivate> d;
180  };
181 
182  }
183 }
184 
185 #endif
TargetTypeValue
Specifies the level of other elements the tag value applies to.
Definition: matroskasimpletag.h:38
A wide string class suitable for unicode.
Definition: tstring.h:82
A byte vector.
Definition: tbytevector.h:45
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition: taglib_export.h:55
Attribute of Matroska metadata.
Definition: matroskasimpletag.h:34
ValueType
The types the value can have.
Definition: matroskasimpletag.h:50
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41