asfattribute.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef TAGLIB_ASFATTRIBUTE_H
00027 #define TAGLIB_ASFATTRIBUTE_H
00028
00029 #include "tstring.h"
00030 #include "tbytevector.h"
00031 #include "taglib_export.h"
00032 #include "asfpicture.h"
00033
00034 namespace TagLib
00035 {
00036
00037 namespace ASF
00038 {
00039
00040 class File;
00041 class Picture;
00042
00043 class TAGLIB_EXPORT Attribute
00044 {
00045 public:
00046
00050 enum AttributeTypes {
00051 UnicodeType = 0,
00052 BytesType = 1,
00053 BoolType = 2,
00054 DWordType = 3,
00055 QWordType = 4,
00056 WordType = 5,
00057 GuidType = 6
00058 };
00059
00063 Attribute();
00064
00068 Attribute(const String &value);
00069
00073 Attribute(const ByteVector &value);
00074
00086 Attribute(const Picture &value);
00087
00091 Attribute(unsigned int value);
00092
00096 Attribute(unsigned long long value);
00097
00101 Attribute(unsigned short value);
00102
00106 Attribute(bool value);
00107
00111 Attribute(const Attribute &item);
00112
00116 ASF::Attribute &operator=(const Attribute &other);
00117
00121 virtual ~Attribute();
00122
00126 AttributeTypes type() const;
00127
00131 unsigned short toBool() const;
00132
00136 unsigned short toUShort() const;
00137
00141 unsigned int toUInt() const;
00142
00146 unsigned long long toULongLong() const;
00147
00151 String toString() const;
00152
00156 ByteVector toByteVector() const;
00157
00161 Picture toPicture() const;
00162
00166 int language() const;
00167
00171 void setLanguage(int value);
00172
00176 int stream() const;
00177
00181 void setStream(int value);
00182
00183 #ifndef DO_NOT_DOCUMENT
00184
00185 String parse(ASF::File &file, int kind = 0);
00186 #endif
00187
00189 int dataSize() const;
00190
00191 private:
00192 friend class File;
00193
00194 ByteVector render(const String &name, int kind = 0) const;
00195
00196 class AttributePrivate;
00197 AttributePrivate *d;
00198 };
00199 }
00200
00201 }
00202
00203 #endif