00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef TAGLIB_WMAATTRIBUTE_H
00023 #define TAGLIB_WMAATTRIBUTE_H
00024
00025 #include <tstring.h>
00026 #include <tbytevector.h>
00027
00028 namespace TagLib {
00029
00030 namespace WMA {
00031
00032 class File;
00033
00034 class Attribute {
00035
00036 friend class File;
00037
00038 public:
00039
00043 enum AttributeTypes {
00044 UnicodeType = 0,
00045 BytesType = 1,
00046 BoolType = 2,
00047 DWordType = 3,
00048 QWordType = 4,
00049 WordType = 5
00050 };
00051
00055 Attribute();
00056
00060 Attribute(const String &key, const String &value);
00061 Attribute(const String &key, const ByteVector &value);
00062 Attribute(const String &key, unsigned int value);
00063 Attribute(const String &key, unsigned long long value);
00064 Attribute(const String &key, unsigned short value);
00065 Attribute(const String &key, bool value);
00066
00070 Attribute(const Attribute &item);
00071
00075 virtual ~Attribute();
00076
00080 String name() const;
00081
00085 AttributeTypes type() const;
00086
00090 String toString() const;
00091
00095 ByteVector toByteVector() const;
00096
00100 int toInt() const;
00101
00105 long long toLongLong() const;
00106
00107 ByteVector render() const;
00108
00109 protected:
00110
00111 Attribute(WMA::File &file);
00112 bool parse(WMA::File &file);
00113
00114 private:
00115
00116 class AttributePrivate;
00117 AttributePrivate *d;
00118
00119 };
00120
00121 }
00122
00123 }
00124
00125 #endif