textidentificationframe.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_TEXTIDENTIFICATIONFRAME_H
00027 #define TAGLIB_TEXTIDENTIFICATIONFRAME_H
00028
00029 #include <tstringlist.h>
00030 #include "taglib_export.h"
00031
00032 #include <id3v2frame.h>
00033
00034 namespace TagLib {
00035
00036 namespace ID3v2 {
00037
00038 class Tag;
00039
00041
00104 class TAGLIB_EXPORT TextIdentificationFrame : public Frame
00105 {
00106 friend class FrameFactory;
00107
00108 public:
00118 TextIdentificationFrame(const ByteVector &type, String::Type encoding);
00119
00124 explicit TextIdentificationFrame(const ByteVector &data);
00125
00129 virtual ~TextIdentificationFrame();
00130
00141 void setText(const StringList &l);
00142
00143
00144
00145 virtual void setText(const String &s);
00146 virtual String toString() const;
00147
00158 String::Type textEncoding() const;
00159
00169 void setTextEncoding(String::Type encoding);
00170
00174 StringList fieldList() const;
00175
00176 protected:
00177
00178
00179 virtual void parseFields(const ByteVector &data);
00180 virtual ByteVector renderFields() const;
00181
00185 TextIdentificationFrame(const ByteVector &data, Header *h);
00186
00187 private:
00188 TextIdentificationFrame(const TextIdentificationFrame &);
00189 TextIdentificationFrame &operator=(const TextIdentificationFrame &);
00190
00191 class TextIdentificationFramePrivate;
00192 TextIdentificationFramePrivate *d;
00193 };
00194
00203
00204
00205 class TAGLIB_EXPORT UserTextIdentificationFrame : public TextIdentificationFrame
00206 {
00207 friend class FrameFactory;
00208
00209 public:
00214 explicit UserTextIdentificationFrame(String::Type encoding = String::Latin1);
00215
00219 explicit UserTextIdentificationFrame(const ByteVector &data);
00220
00221 virtual String toString() const;
00222
00226 String description() const;
00227
00233 void setDescription(const String &s);
00234
00235 StringList fieldList() const;
00236 void setText(const String &text);
00237 void setText(const StringList &fields);
00238
00243 static UserTextIdentificationFrame *find(Tag *tag, const String &description);
00244
00245 private:
00246 UserTextIdentificationFrame(const ByteVector &data, Header *h);
00247 UserTextIdentificationFrame(const TextIdentificationFrame &);
00248 UserTextIdentificationFrame &operator=(const UserTextIdentificationFrame &);
00249
00250 void checkFields();
00251
00252 class UserTextIdentificationFramePrivate;
00253 UserTextIdentificationFramePrivate *d;
00254 };
00255
00256 }
00257 }
00258 #endif