TagLib API Documentation
asfattribute.h
Go to the documentation of this file.
1/**************************************************************************
2 copyright : (C) 2005-2007 by Lukáš Lalinský
3 email : lalinsky@gmail.com
4 **************************************************************************/
5
6/***************************************************************************
7 * This library is free software; you can redistribute it and/or modify *
8 * it under the terms of the GNU Lesser General Public License version *
9 * 2.1 as published by the Free Software Foundation. *
10 * *
11 * This library is distributed in the hope that it will be useful, but *
12 * WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14 * Lesser General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU Lesser General Public *
17 * License along with this library; if not, write to the Free Software *
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
19 * 02110-1301 USA *
20 * *
21 * Alternatively, this file is available under the Mozilla Public *
22 * License Version 1.1. You may obtain a copy of the License at *
23 * http://www.mozilla.org/MPL/ *
24 ***************************************************************************/
25
26#ifndef TAGLIB_ASFATTRIBUTE_H
27#define TAGLIB_ASFATTRIBUTE_H
28
29#include "tstring.h"
30#include "tbytevector.h"
31#include "taglib_export.h"
32#include "asfpicture.h"
33
34namespace TagLib
35{
36 namespace ASF
37 {
38 class File;
39 class Picture;
40
42
44 {
45 public:
46
51 UnicodeType = 0,
52 BytesType = 1,
53 BoolType = 2,
54 DWordType = 3,
55 QWordType = 4,
56 WordType = 5,
57 GuidType = 6
58 };
59
64
68 Attribute(const String &value);
69
73 Attribute(const ByteVector &value);
74
86 Attribute(const Picture &value);
87
91 Attribute(unsigned int value);
92
96 Attribute(unsigned long long value);
97
101 Attribute(unsigned short value);
102
106 Attribute(bool value);
107
111 Attribute(const Attribute &other);
112
117
121 void swap(Attribute &other) noexcept;
122
127
132
136 unsigned short toBool() const;
137
141 unsigned short toUShort() const;
142
146 unsigned int toUInt() const;
147
151 unsigned long long toULongLong() const;
152
157
162
167
171 int language() const;
172
176 void setLanguage(int value);
177
181 int stream() const;
182
186 void setStream(int value);
187
188#ifndef DO_NOT_DOCUMENT
189 /* THIS IS PRIVATE, DON'T TOUCH IT! */
190 String parse(ASF::File &file, int kind = 0);
191#endif
192
194 int dataSize() const;
195
196 private:
197 friend class File;
198
199 ByteVector render(const String &name, int kind = 0) const;
200
201 class AttributePrivate;
203 std::shared_ptr<AttributePrivate> d;
204 };
205 } // namespace ASF
206} // namespace TagLib
207
208#endif
Attribute of ASF (WMA) metadata.
Definition: asfattribute.h:44
Attribute(const String &value)
void setLanguage(int value)
Attribute(const ByteVector &value)
void setStream(int value)
void swap(Attribute &other) noexcept
unsigned short toUShort() const
Attribute(unsigned long long value)
AttributeTypes
Definition: asfattribute.h:50
Attribute(const Attribute &other)
unsigned short toBool() const
AttributeTypes type() const
unsigned long long toULongLong() const
Attribute(const Picture &value)
Attribute(unsigned int value)
int dataSize() const
Returns the size of the stored data.
unsigned int toUInt() const
String toString() const
Attribute & operator=(const Attribute &other)
ByteVector toByteVector() const
Attribute(unsigned short value)
Picture toPicture() const
An implementation of TagLib::File with ASF specific methods.
Definition: asffile.h:47
An ASF attached picture interface implementation.
Definition: asfpicture.h:49
A byte vector.
Definition: tbytevector.h:46
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