TagLib  2.0.2
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 "tpicturetype.h"
32 #include "taglib_export.h"
33 
34 namespace TagLib
35 {
36  namespace ASF
37  {
38 
40 
50  public:
51 
52  /*
53  * This describes the function or content of the picture.
54  */
55  DECLARE_PICTURE_TYPE_ENUM(Type)
56 
57 
60  Picture();
61 
65  Picture(const Picture& other);
66 
70  ~Picture();
71 
75  Picture& operator=(const Picture& other);
76 
80  void swap(Picture &other) noexcept;
81 
85  bool isValid() const;
86 
94  String mimeType() const;
95 
103  void setMimeType(const String &value);
104 
111  Type type() const;
112 
119  void setType(const ASF::Picture::Type& t);
120 
126  String description() const;
127 
133  void setDescription(const String &desc);
134 
144  ByteVector picture() const;
145 
154  void setPicture(const ByteVector &p);
155 
159  ByteVector render() const;
160 
164  int dataSize() const;
165 
166 #ifndef DO_NOT_DOCUMENT
167  /* THIS IS PRIVATE, DON'T TOUCH IT! */
168  void parse(const ByteVector& );
169  static Picture fromInvalid();
170 #endif
171 
172  private:
173  class PicturePrivate;
175  std::shared_ptr<PicturePrivate> d;
176  };
177  } // namespace ASF
178 } // namespace TagLib
179 
180 #endif // ASFPICTURE_H
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
An ASF attached picture interface implementation.
Definition: asfpicture.h:49
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41