TagLib  1.13.1
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
33namespace TagLib {
34
35 namespace ID3v2 {
36
38
45
47 {
48 friend class FrameFactory;
49
50 public:
51
55 enum Type {
57 Other = 0x00,
59 FileIcon = 0x01,
63 FrontCover = 0x03,
65 BackCover = 0x04,
69 Media = 0x06,
71 LeadArtist = 0x07,
73 Artist = 0x08,
75 Conductor = 0x09,
77 Band = 0x0A,
79 Composer = 0x0B,
81 Lyricist = 0x0C,
95 BandLogo = 0x13,
98 };
99
105
109 explicit AttachedPictureFrame(const ByteVector &data);
110
115
119 virtual String toString() const;
120
128
135
141
146 void setMimeType(const String &m);
147
154 Type type() const;
155
162 void setType(Type t);
163
171
173
181
182 void setDescription(const String &desc);
183
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:
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 } // namespace ID3v2
228} // namespace TagLib
229
230#endif
A byte vector.
Definition tbytevector.h:46
virtual void parseFields(const ByteVector &data)
friend class FrameFactory
Definition attachedpictureframe.h:225
AttachedPictureFramePrivate * d
Definition attachedpictureframe.h:209
String::Type textEncoding() const
Type
Definition attachedpictureframe.h:55
@ Conductor
Picture of the conductor.
Definition attachedpictureframe.h:75
@ Media
Image from the album itself.
Definition attachedpictureframe.h:69
@ BackCover
Back cover image of the album.
Definition attachedpictureframe.h:65
@ Illustration
Illustration related to the track.
Definition attachedpictureframe.h:93
@ Lyricist
Picture of the lyricist or text writer.
Definition attachedpictureframe.h:81
@ OtherFileIcon
File icon of a different size or format.
Definition attachedpictureframe.h:61
@ Other
A type not enumerated below.
Definition attachedpictureframe.h:57
@ MovieScreenCapture
Picture from a movie or video related to the track.
Definition attachedpictureframe.h:89
@ RecordingLocation
Picture of the recording location or studio.
Definition attachedpictureframe.h:83
@ LeadArtist
Picture of the lead artist or soloist.
Definition attachedpictureframe.h:71
@ DuringPerformance
Picture of the artists during performance.
Definition attachedpictureframe.h:87
@ DuringRecording
Picture of the artists during recording.
Definition attachedpictureframe.h:85
@ Band
Picture of the band or orchestra.
Definition attachedpictureframe.h:77
@ PublisherLogo
Logo of the publisher (record company)
Definition attachedpictureframe.h:97
@ Composer
Picture of the composer.
Definition attachedpictureframe.h:79
@ FrontCover
Front cover image of the album.
Definition attachedpictureframe.h:63
@ LeafletPage
Inside leaflet page of the album.
Definition attachedpictureframe.h:67
@ BandLogo
Logo of the band or performer.
Definition attachedpictureframe.h:95
@ Artist
Picture of the artist or performer.
Definition attachedpictureframe.h:73
@ ColouredFish
Picture of a large, coloured fish.
Definition attachedpictureframe.h:91
@ FileIcon
32x32 PNG image that should be used as the file icon
Definition attachedpictureframe.h:59
virtual ByteVector renderFields() const
void setPicture(const ByteVector &p)
void setDescription(const String &desc)
virtual String toString() const
friend class FrameFactory
Definition attachedpictureframe.h:48
void setTextEncoding(String::Type t)
virtual void parseFields(const ByteVector &data)
void setMimeType(const String &m)
AttachedPictureFrame(const ByteVector &data)
ID3v2 frame header implementation.
Definition id3v2frame.h:330
Frame(const ByteVector &data)
A wide string class suitable for unicode.
Definition tstring.h:85
Type
Definition tstring.h:97
An ID3v2 implementation.
Definition flacfile.h:40
A namespace for all TagLib related classes and functions.
Definition apefile.h:41
#define TAGLIB_EXPORT
Definition taglib_export.h:40