TagLib API Documentation
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 "taglib_export.h"
30#include "tpicturetype.h"
31#include "id3v2frame.h"
32
33namespace TagLib {
34
35 namespace ID3v2 {
36
38
47 {
48 friend class FrameFactory;
49
50 public:
51
52 /*
53 * This describes the function or content of the picture.
54 */
55 DECLARE_PICTURE_TYPE_ENUM(Type)
56
57
62
66 explicit AttachedPictureFrame(const ByteVector &data);
67
72
74 AttachedPictureFrame &operator=(const AttachedPictureFrame &) = delete;
75
79 String toString() const override;
80
84 StringList toStringList() const override;
85
92 String::Type textEncoding() const;
93
99 void setTextEncoding(String::Type t);
100
105 String mimeType() const;
106
111 void setMimeType(const String &m);
112
119 Type type() const;
120
127 void setType(Type t);
128
137 String description() const;
138
147 void setDescription(const String &desc);
148
158 ByteVector picture() const;
159
168 void setPicture(const ByteVector &p);
169
170 protected:
171 void parseFields(const ByteVector &data) override;
172 ByteVector renderFields() const override;
173 class AttachedPictureFramePrivate;
175 std::unique_ptr<AttachedPictureFramePrivate> d;
176
177 private:
178 AttachedPictureFrame(const ByteVector &data, Header *h);
179 };
180
183 {
184 protected:
185 void parseFields(const ByteVector &data) override;
186 private:
188 friend class FrameFactory;
189 };
190 } // namespace ID3v2
191} // namespace TagLib
192
193#endif
A byte vector.
Definition: tbytevector.h:46
support for ID3v2.2 PIC frames
Definition: attachedpictureframe.h:183
void parseFields(const ByteVector &data) override
An ID3v2 attached picture frame implementation.
Definition: attachedpictureframe.h:47
A factory for creating ID3v2 frames during parsing.
Definition: id3v2framefactory.h:68
ID3v2 frame implementation.
Definition: id3v2frame.h:57
An implementation of ID3v2 headers.
Definition: id3v2header.h:49
A list of strings.
Definition: tstringlist.h:44
A wide string class suitable for unicode.
Definition: tstring.h:83
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition: taglib_export.h:55