| TagLib 1.13 |  |

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
34 namespace TagLib
35{
36
37 namespace ASF
38 {
39
40 class File;
41 class Picture;
42
43 class TAGLIB_EXPORT Attribute
44 {
45 public:
46
50 enum AttributeTypes {
51 UnicodeType = 0,
52 BytesType = 1,
53 BoolType = 2,
54 DWordType = 3,
55 QWordType = 4,
56 WordType = 5,
57 GuidType = 6
58 };
59
63 Attribute();
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 &item);
112
116 Attribute &operator=(const Attribute &other);
117
121 void swap(Attribute &other);
122
126 virtual ~Attribute();
127
131 AttributeTypes type() const;
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
156 String toString() const;
157
161 ByteVector toByteVector() const;
162
166 Picture toPicture() const;
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;
202 AttributePrivate *d;
203 };
204 }
205
206}
207
208#endif
asfpicture.h
TagLib::ASF::Attribute
Definition: asfattribute.h:44
TagLib::ASF::Attribute::Attribute
Attribute(const String &value)
TagLib::ASF::Attribute::setLanguage
void setLanguage(int value)
TagLib::ASF::Attribute::Attribute
Attribute(const ByteVector &value)
TagLib::ASF::Attribute::Attribute
Attribute(const Attribute &item)
TagLib::ASF::Attribute::setStream
void setStream(int value)
TagLib::ASF::Attribute::toUShort
unsigned short toUShort() const
TagLib::ASF::Attribute::Attribute
Attribute(unsigned long long value)
TagLib::ASF::Attribute::Attribute
Attribute()
TagLib::ASF::Attribute::AttributeTypes
AttributeTypes
Definition: asfattribute.h:50
TagLib::ASF::Attribute::swap
void swap(Attribute &other)
TagLib::ASF::Attribute::~Attribute
virtual ~Attribute()
TagLib::ASF::Attribute::stream
int stream() const
TagLib::ASF::Attribute::toBool
unsigned short toBool() const
TagLib::ASF::Attribute::type
AttributeTypes type() const
TagLib::ASF::Attribute::toULongLong
unsigned long long toULongLong() const
TagLib::ASF::Attribute::Attribute
Attribute(const Picture &value)
TagLib::ASF::Attribute::Attribute
Attribute(unsigned int value)
TagLib::ASF::Attribute::dataSize
int dataSize() const
Returns the size of the stored data.
TagLib::ASF::Attribute::language
int language() const
TagLib::ASF::Attribute::toUInt
unsigned int toUInt() const
TagLib::ASF::Attribute::toString
String toString() const
TagLib::ASF::Attribute::operator=
Attribute & operator=(const Attribute &other)
TagLib::ASF::Attribute::Attribute
Attribute(bool value)
TagLib::ASF::Attribute::toByteVector
ByteVector toByteVector() const
TagLib::ASF::Attribute::Attribute
Attribute(unsigned short value)
TagLib::ASF::Attribute::toPicture
Picture toPicture() const
TagLib::ASF::File
Definition: asffile.h:47
TagLib::ASF::Picture
An ASF attached picture interface implementation.
Definition: asfpicture.h:49
TagLib::ByteVector
A byte vector.
Definition: tbytevector.h:46
TagLib::String
A wide string class suitable for unicode.
Definition: tstring.h:85
TagLib
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41
taglib_export.h
TAGLIB_EXPORT
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
tbytevector.h
tstring.h