apeitem.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_APEITEM_H
00027 #define TAGLIB_APEITEM_H
00028
00029 #include "tbytevector.h"
00030 #include "tstring.h"
00031 #include "tstringlist.h"
00032
00033 namespace TagLib {
00034
00035 namespace APE {
00036
00038
00042 class TAGLIB_EXPORT Item
00043 {
00044 public:
00048 enum ItemTypes {
00050 Text = 0,
00052 Binary = 1,
00054 Locator = 2
00055 };
00059 Item();
00060
00064
00065 Item(const String &key, const String &value);
00066
00070 Item(const String &key, const StringList &values);
00071
00076 Item(const String &key, const ByteVector &value, bool binary);
00077
00081 Item(const Item &item);
00082
00086 virtual ~Item();
00087
00091 Item &operator=(const Item &item);
00092
00096 void swap(Item &item);
00097
00101 String key() const;
00102
00107 ByteVector binaryData() const;
00108
00113 void setBinaryData(const ByteVector &value);
00114
00115 #ifndef DO_NOT_DOCUMENT
00116
00117 ByteVector value() const;
00118 #endif
00119
00123 void setKey(const String &key);
00124
00130 void setValue(const String &value);
00131
00138 void setValues(const StringList &values);
00139
00145 void appendValue(const String &value);
00146
00152 void appendValues(const StringList &values);
00153
00157 int size() const;
00158
00164 String toString() const;
00165
00166 #ifndef DO_NOT_DOCUMENT
00167
00168 StringList toStringList() const;
00169 #endif
00170
00175 StringList values() const;
00176
00180 ByteVector render() const;
00181
00185 void parse(const ByteVector& data);
00186
00190 void setReadOnly(bool readOnly);
00191
00195 bool isReadOnly() const;
00196
00202 void setType(ItemTypes type);
00203
00207 ItemTypes type() const;
00208
00212 bool isEmpty() const;
00213
00214 private:
00215 class ItemPrivate;
00216 ItemPrivate *d;
00217 };
00218 }
00219
00220 }
00221
00222 #endif
00223
00224