| TagLib 1.13 |  |

attachedpictureframe.h
Go to the documentation of this file.
1/***************************************************************************
2 copyright : (C) 2002 - 2008 by Scott Wheeler
3 email : wheeler@kde.org
4 ***************************************************************************/
5
6/***************************************************************************
7 * This library is free software; you can redistribute it and/or modify *
8 * it under the terms of the GNU Lesser General Public License version *
9 * 2.1 as published by the Free Software Foundation. *
10 * *
11 * This library is distributed in the hope that it will be useful, but *
12 * WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14 * Lesser General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU Lesser General Public *
17 * License along with this library; if not, write to the Free Software *
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
19 * 02110-1301 USA *
20 * *
21 * Alternatively, this file is available under the Mozilla Public *
22 * License Version 1.1. You may obtain a copy of the License at *
23 * http://www.mozilla.org/MPL/ *
24 ***************************************************************************/
25
26#ifndef TAGLIB_ATTACHEDPICTUREFRAME_H
27#define TAGLIB_ATTACHEDPICTUREFRAME_H
28
29#include "id3v2frame.h"
30#include "id3v2header.h"
31#include "taglib_export.h"
32
33 namespace TagLib {
34
35 namespace ID3v2 {
36
38
46 class TAGLIB_EXPORT AttachedPictureFrame : public Frame
47 {
48 friend class FrameFactory;
49
50 public:
51
55 enum Type {
57 Other = 0x00,
59 FileIcon = 0x01,
61 OtherFileIcon = 0x02,
63 FrontCover = 0x03,
65 BackCover = 0x04,
67 LeafletPage = 0x05,
69 Media = 0x06,
71 LeadArtist = 0x07,
73 Artist = 0x08,
75 Conductor = 0x09,
77 Band = 0x0A,
79 Composer = 0x0B,
81 Lyricist = 0x0C,
83 RecordingLocation = 0x0D,
85 DuringRecording = 0x0E,
87 DuringPerformance = 0x0F,
89 MovieScreenCapture = 0x10,
91 ColouredFish = 0x11,
93 Illustration = 0x12,
95 BandLogo = 0x13,
97 PublisherLogo = 0x14
98 };
99
104 AttachedPictureFrame();
105
109 explicit AttachedPictureFrame(const ByteVector &data);
110
114 virtual ~AttachedPictureFrame();
115
119 virtual String toString() const;
120
127 String::Type textEncoding() const;
128
134 void setTextEncoding(String::Type t);
135
140 String mimeType() const;
141
146 void setMimeType(const String &m);
147
154 Type type() const;
155
162 void setType(Type t);
163
172 String description() const;
173
182 void setDescription(const String &desc);
183
193 ByteVector picture() const;
194
203 void setPicture(const ByteVector &p);
204
205 protected:
206 virtual void parseFields(const ByteVector &data);
207 virtual ByteVector renderFields() const;
208 class AttachedPictureFramePrivate;
209 AttachedPictureFramePrivate *d;
210
211 private:
212 AttachedPictureFrame(const AttachedPictureFrame &);
213 AttachedPictureFrame &operator=(const AttachedPictureFrame &);
214 AttachedPictureFrame(const ByteVector &data, Header *h);
215
216 };
217
219 class TAGLIB_EXPORT AttachedPictureFrameV22 : public AttachedPictureFrame
220 {
221 protected:
222 virtual void parseFields(const ByteVector &data);
223 private:
224 AttachedPictureFrameV22(const ByteVector &data, Header *h);
225 friend class FrameFactory;
226 };
227 }
228}
229
230#endif
TagLib::ByteVector
A byte vector.
Definition: tbytevector.h:46
TagLib::ID3v2::AttachedPictureFrameV22
support for ID3v2.2 PIC frames
Definition: attachedpictureframe.h:220
TagLib::ID3v2::AttachedPictureFrameV22::parseFields
virtual void parseFields(const ByteVector &data)
TagLib::ID3v2::AttachedPictureFrame
An ID3v2 attached picture frame implementation.
Definition: attachedpictureframe.h:47
TagLib::ID3v2::AttachedPictureFrame::type
Type type() const
TagLib::ID3v2::AttachedPictureFrame::AttachedPictureFrame
AttachedPictureFrame()
TagLib::ID3v2::AttachedPictureFrame::mimeType
String mimeType() const
TagLib::ID3v2::AttachedPictureFrame::d
AttachedPictureFramePrivate * d
Definition: attachedpictureframe.h:208
TagLib::ID3v2::AttachedPictureFrame::textEncoding
String::Type textEncoding() const
TagLib::ID3v2::AttachedPictureFrame::Type
Type
Definition: attachedpictureframe.h:55
TagLib::ID3v2::AttachedPictureFrame::renderFields
virtual ByteVector renderFields() const
TagLib::ID3v2::AttachedPictureFrame::setType
void setType(Type t)
TagLib::ID3v2::AttachedPictureFrame::description
String description() const
TagLib::ID3v2::AttachedPictureFrame::~AttachedPictureFrame
virtual ~AttachedPictureFrame()
TagLib::ID3v2::AttachedPictureFrame::setPicture
void setPicture(const ByteVector &p)
TagLib::ID3v2::AttachedPictureFrame::setDescription
void setDescription(const String &desc)
TagLib::ID3v2::AttachedPictureFrame::toString
virtual String toString() const
TagLib::ID3v2::AttachedPictureFrame::setTextEncoding
void setTextEncoding(String::Type t)
TagLib::ID3v2::AttachedPictureFrame::parseFields
virtual void parseFields(const ByteVector &data)
TagLib::ID3v2::AttachedPictureFrame::setMimeType
void setMimeType(const String &m)
TagLib::ID3v2::AttachedPictureFrame::AttachedPictureFrame
AttachedPictureFrame(const ByteVector &data)
TagLib::ID3v2::AttachedPictureFrame::picture
ByteVector picture() const
TagLib::ID3v2::FrameFactory
A factory for creating ID3v2 frames during parsing.
Definition: id3v2framefactory.h:66
TagLib::ID3v2::Frame
ID3v2 frame implementation.
Definition: id3v2frame.h:55
TagLib::ID3v2::Header
An implementation of ID3v2 headers.
Definition: id3v2header.h:49
TagLib::String
A wide string class suitable for unicode.
Definition: tstring.h:85
TagLib::String::Type
Type
Definition: tstring.h:97
id3v2frame.h
id3v2header.h
TagLib
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41
taglib_export.h
TAGLIB_EXPORT
#define TAGLIB_EXPORT
Definition: taglib_export.h:40