attachedpictureframe.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_ATTACHEDPICTUREFRAME_H
00027 #define TAGLIB_ATTACHEDPICTUREFRAME_H
00028
00029 #include "id3v2frame.h"
00030 #include "id3v2header.h"
00031 #include "taglib_export.h"
00032
00033 namespace TagLib {
00034
00035 namespace ID3v2 {
00036
00038
00046 class TAGLIB_EXPORT AttachedPictureFrame : public Frame
00047 {
00048 friend class FrameFactory;
00049
00050 public:
00051
00055 enum Type {
00057 Other = 0x00,
00059 FileIcon = 0x01,
00061 OtherFileIcon = 0x02,
00063 FrontCover = 0x03,
00065 BackCover = 0x04,
00067 LeafletPage = 0x05,
00069 Media = 0x06,
00071 LeadArtist = 0x07,
00073 Artist = 0x08,
00075 Conductor = 0x09,
00077 Band = 0x0A,
00079 Composer = 0x0B,
00081 Lyricist = 0x0C,
00083 RecordingLocation = 0x0D,
00085 DuringRecording = 0x0E,
00087 DuringPerformance = 0x0F,
00089 MovieScreenCapture = 0x10,
00091 ColouredFish = 0x11,
00093 Illustration = 0x12,
00095 BandLogo = 0x13,
00097 PublisherLogo = 0x14
00098 };
00099
00104 AttachedPictureFrame();
00105
00109 explicit AttachedPictureFrame(const ByteVector &data);
00110
00114 virtual ~AttachedPictureFrame();
00115
00119 virtual String toString() const;
00120
00127 String::Type textEncoding() const;
00128
00134 void setTextEncoding(String::Type t);
00135
00140 String mimeType() const;
00141
00146 void setMimeType(const String &m);
00147
00154 Type type() const;
00155
00162 void setType(Type t);
00163
00172 String description() const;
00173
00182 void setDescription(const String &desc);
00183
00193 ByteVector picture() const;
00194
00203 void setPicture(const ByteVector &p);
00204
00205 protected:
00206 virtual void parseFields(const ByteVector &data);
00207 virtual ByteVector renderFields() const;
00208 class AttachedPictureFramePrivate;
00209 AttachedPictureFramePrivate *d;
00210
00211 private:
00212 AttachedPictureFrame(const AttachedPictureFrame &);
00213 AttachedPictureFrame &operator=(const AttachedPictureFrame &);
00214 AttachedPictureFrame(const ByteVector &data, Header *h);
00215
00216 };
00217
00219 class TAGLIB_EXPORT AttachedPictureFrameV22 : public AttachedPictureFrame
00220 {
00221 protected:
00222 virtual void parseFields(const ByteVector &data);
00223 private:
00224 AttachedPictureFrameV22(const ByteVector &data, Header *h);
00225 friend class FrameFactory;
00226 };
00227 }
00228 }
00229
00230 #endif