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
00033 namespace TagLib
00034 {
00035
00036 namespace ASF
00037 {
00038
00039 class File;
00040
00041 class TAGLIB_EXPORT Attribute
00042 {
00043 public:
00044
00048 enum AttributeTypes {
00049 UnicodeType = 0,
00050 BytesType = 1,
00051 BoolType = 2,
00052 DWordType = 3,
00053 QWordType = 4,
00054 WordType = 5,
00055 GuidType = 6
00056 };
00057
00061 Attribute();
00062
00066 Attribute(const String &value);
00067
00071 Attribute(const ByteVector &value);
00072
00076 Attribute(unsigned int value);
00077
00081 Attribute(unsigned long long value);
00082
00086 Attribute(unsigned short value);
00087
00091 Attribute(bool value);
00092
00096 Attribute(const Attribute &item);
00097
00101 ASF::Attribute &operator=(const Attribute &other);
00102
00106 virtual ~Attribute();
00107
00111 AttributeTypes type() const;
00112
00116 unsigned short toBool() const;
00117
00121 unsigned short toUShort() const;
00122
00126 unsigned int toUInt() const;
00127
00131 unsigned long long toULongLong() const;
00132
00136 String toString() const;
00137
00141 ByteVector toByteVector() const;
00142
00146 int language() const;
00147
00151 void setLanguage(int value);
00152
00156 int stream() const;
00157
00161 void setStream(int value);
00162
00163 #ifndef DO_NOT_DOCUMENT
00164
00165 String parse(ASF::File &file, int kind = 0);
00166 #endif
00167
00168 private:
00169 friend class File;
00170
00171 ByteVector render(const String &name, int kind = 0) const;
00172
00173 class AttributePrivate;
00174 AttributePrivate *d;
00175 };
00176
00177 }
00178
00179 }
00180
00181 #endif