TagLib 1.6.1 (TagLib: attachedpictureframe.h Source File)

attachedpictureframe.h

Go to the documentation of this file.
00001 /***************************************************************************
00002     copyright            : (C) 2002 - 2008 by Scott Wheeler
00003     email                : wheeler@kde.org
00004  ***************************************************************************/
00005 
00006 /***************************************************************************
00007  *   This library is free software; you can redistribute it and/or modify  *
00008  *   it under the terms of the GNU Lesser General Public License version   *
00009  *   2.1 as published by the Free Software Foundation.                     *
00010  *                                                                         *
00011  *   This library is distributed in the hope that it will be useful, but   *
00012  *   WITHOUT ANY WARRANTY; without even the implied warranty of            *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00014  *   Lesser General Public License for more details.                       *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU Lesser General Public      *
00017  *   License along with this library; if not, write to the Free Software   *
00018  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  *
00019  *   USA                                                                   *
00020  *                                                                         *
00021  *   Alternatively, this file is available under the Mozilla Public        *
00022  *   License Version 1.1.  You may obtain a copy of the License at         *
00023  *   http://www.mozilla.org/MPL/                                           *
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