Sayonara Player
SomaFMStation.h
1 /* SomaFMStation.h */
2 
3 /* Copyright (C) 2011-2017 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 /* SomaFMStation.h */
23 
24 #ifndef SOMAFMSTATION_H
25 #define SOMAFMSTATION_H
26 
27 #include <QtGlobal>
28 #include "Helper/Pimpl.h"
29 
30 class QStringList;
31 class QString;
32 class CoverLocation;
33 class MetaDataList;
34 
36 {
37 public:
38 
39  enum class UrlType : quint8
40  {
41  AAC=0,
42  MP3,
43  Undefined
44  };
45 
46  SomaFMStation();
47  explicit SomaFMStation(const QString& content);
48  SomaFMStation(const SomaFMStation& other);
49  SomaFMStation& operator=(const SomaFMStation& other);
50  ~SomaFMStation();
51 
52  QString get_name() const;
53  QStringList get_urls() const;
54  QString get_description() const;
55  UrlType get_url_type(const QString& url) const;
56  CoverLocation get_cover_location() const;
57  bool is_valid() const;
58  MetaDataList get_metadata() const;
59  void set_metadata(const MetaDataList& v_md);
60 
61  void set_loved(bool loved);
62  bool is_loved() const;
63 
64 
65 private:
66  PIMPL(SomaFMStation)
67 
68 private:
69  void parse_station_name();
70  void parse_urls();
71  void parse_description();
72  void parse_image();
73 };
74 
75 #endif
Definition: SomaFMStation.h:35
Definition: MetaDataList.h:39
The CoverLocation class.
Definition: CoverLocation.h:37