Sayonara Player
Cover.h
1 /* Cover.h */
2 
3 /* Copyright (C) 2011-2016 Lucio Carreras
4  *
5  * This file is part of sayonara player
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11 
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16 
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 
22 
23 #ifndef COVER_H
24 #define COVER_H
25 
26 #include "AbstractFrame.h"
27 
28 #include <QByteArray>
29 #include <QString>
30 #include <taglib/attachedpictureframe.h>
31 
32 namespace ID3v2Frame
33 {
34  class Cover
35  {
36 
37  private:
38  unsigned char text_encoding;
39  unsigned char picture_type;
40  QString description;
41 
42  public:
43  QString mime_type;
44  QByteArray image_data;
45 
46  Cover();
47  Cover(const QString& mime_type, const QByteArray& image_data);
48  };
49 
50 
55  class CoverFrame :
56  public AbstractFrame<Cover, TagLib::ID3v2::AttachedPictureFrame>
57  {
58 
59  public:
60  CoverFrame(TagLib::FileRef* file_ref);
61  ~CoverFrame();
62 
63  void map_model_to_frame() override;
64  void map_frame_to_model() override;
65 
66  TagLib::ID3v2::Frame* create_id3v2_frame() override;
67  };
68 }
69 #endif // COVER_H
Definition: Cover.h:34
The DiscnumberFrame class.
Definition: Cover.h:55
ID3v2Frame namespace.
Definition: AbstractFrame.h:38
The AbstractFrame class for example AbstractFrame<Discnumber, TagLib::ID3v2::TextIdentificationFrame>...
Definition: AbstractFrame.h:47