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 "taglib_export.h"
33 #include "flacmetadatablock.h"
34 
35 namespace TagLib {
36 
37  namespace FLAC {
38 
40  {
41  public:
42 
46  enum Type {
48  Other = 0x00,
50  FileIcon = 0x01,
52  OtherFileIcon = 0x02,
54  FrontCover = 0x03,
56  BackCover = 0x04,
58  LeafletPage = 0x05,
60  Media = 0x06,
62  LeadArtist = 0x07,
64  Artist = 0x08,
66  Conductor = 0x09,
68  Band = 0x0A,
70  Composer = 0x0B,
72  Lyricist = 0x0C,
74  RecordingLocation = 0x0D,
76  DuringRecording = 0x0E,
78  DuringPerformance = 0x0F,
80  MovieScreenCapture = 0x10,
82  ColouredFish = 0x11,
84  Illustration = 0x12,
86  BandLogo = 0x13,
88  PublisherLogo = 0x14
89  };
90 
91  Picture();
92  Picture(const ByteVector &data);
93  ~Picture();
94 
98  Type type() const;
99 
103  void setType(Type type);
104 
109  String mimeType() const;
110 
115  void setMimeType(const String &m);
116 
121  String description() const;
122 
127  void setDescription(const String &desc);
128 
132  int width() const;
133 
137  void setWidth(int w);
138 
142  int height() const;
143 
147  void setHeight(int h);
148 
152  int colorDepth() const;
153 
157  void setColorDepth(int depth);
158 
162  int numColors() const;
163 
167  void setNumColors(int numColors);
168 
172  ByteVector data() const;
173 
177  void setData(const ByteVector &data);
178 
182  int code() const;
183 
187  ByteVector render() const;
188 
192  bool parse(const ByteVector &rawData);
193 
194  private:
195  Picture(const Picture &item);
196  Picture &operator=(const Picture &item);
197 
198  class PicturePrivate;
199  PicturePrivate *d;
200  };
201 
203 
204  }
205 
206 }
207 
208 #endif