asfpicture.h
Go to the documentation of this file.
1 /**************************************************************************
2  copyright : (C) 2010 by Anton Sergunov
3  email : setosha@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 ASFPICTURE_H
27 #define ASFPICTURE_H
28 
29 #include "tstring.h"
30 #include "tbytevector.h"
31 #include "taglib_export.h"
32 #include "attachedpictureframe.h"
33 
34 namespace TagLib
35 {
36  namespace ASF
37  {
38 
40 
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 
103  Picture();
104 
108  Picture(const Picture& other);
109 
113  virtual ~Picture();
114 
118  Picture& operator=(const Picture& other);
119 
123  bool isValid() const;
124 
132  String mimeType() const;
133 
141  void setMimeType(const String &value);
142 
149  Type type() const;
150 
157  void setType(const ASF::Picture::Type& t);
158 
164  String description() const;
165 
171  void setDescription(const String &desc);
172 
182  ByteVector picture() const;
183 
192  void setPicture(const ByteVector &p);
193 
197  ByteVector render() const;
198 
202  int dataSize() const;
203 
204 #ifndef DO_NOT_DOCUMENT
205  /* THIS IS PRIVATE, DON'T TOUCH IT! */
206  void parse(const ByteVector& );
207  static Picture fromInvalid();
208  friend class Attribute;
209 #endif
210  private:
211  class PicturePrivate;
212  PicturePrivate *d;
213  };
214  }
215 }
216 
217 #endif // ASFPICTURE_H