TagLib  2.2.1
flacpicture.h
Go to the documentation of this file.
1 /**************************************************************************
2  copyright : (C) 2010 by Lukáš Lalinský
3  email : lalinsky@gmail.com
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_FLACPICTURE_H
27 #define TAGLIB_FLACPICTURE_H
28 
29 #include "tlist.h"
30 #include "tstring.h"
31 #include "tbytevector.h"
32 #include "tpicturetype.h"
33 #include "taglib_export.h"
34 #include "flacmetadatablock.h"
35 
36 namespace TagLib {
37  namespace FLAC {
40  {
41  public:
42 
43  /*
44  * This describes the function or content of the picture.
45  */
46  DECLARE_PICTURE_TYPE_ENUM(Type)
47 
48  Picture();
49  Picture(const ByteVector &data);
50  ~Picture() override;
51 
52  Picture(const Picture &item) = delete;
53  Picture &operator=(const Picture &item) = delete;
54 
58  Type type() const;
59 
63  void setType(Type type);
64 
69  String mimeType() const;
70 
75  void setMimeType(const String &mimeType);
76 
81  String description() const;
82 
87  void setDescription(const String &description);
88 
92  int width() const;
93 
97  void setWidth(int width);
98 
102  int height() const;
103 
107  void setHeight(int height);
108 
112  int colorDepth() const;
113 
117  void setColorDepth(int colorDepth);
118 
122  int numColors() const;
123 
127  void setNumColors(int numColors);
128 
132  ByteVector data() const;
133 
137  void setData(const ByteVector &data);
138 
142  int code() const override;
143 
147  ByteVector render() const override;
148 
152  bool parse(const ByteVector &data);
153 
154  private:
155  class PicturePrivate;
157  std::unique_ptr<PicturePrivate> d;
158  };
159 
161  } // namespace FLAC
162 } // namespace TagLib
163 #endif
FLAC metadata block.
Definition: flacmetadatablock.h:35
A generic, implicitly shared list.
Definition: tlist.h:53
A wide string class suitable for unicode.
Definition: tstring.h:82
A byte vector.
Definition: tbytevector.h:45
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition: taglib_export.h:55
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
FLAC picture.
Definition: flacpicture.h:39
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41