Sayonara Player
SomaFMStation.h
1 /* SomaFMStation.h */
2 
3 /* Copyright (C) 2011-2019 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 "Utils/Pimpl.h"
28 
29 class QStringList;
30 class QString;
31 class MetaDataList;
32 
33 namespace Cover
34 {
35  class Location;
36 }
37 
38 namespace SomaFM
39 {
40  class Station
41  {
42  PIMPL(Station)
43 
44  public:
45  enum class UrlType : unsigned char
46  {
47  AAC=0,
48  MP3,
49  Undefined
50  };
51 
52  Station();
53  explicit Station(const QString& content);
54  Station(const Station& other);
55  Station& operator=(const Station& other);
56  ~Station();
57 
58  QString name() const;
59  QStringList playlists() const;
60  QString description() const;
61  UrlType url_type(const QString& url) const;
62  Cover::Location cover_location() const;
63  bool is_valid() const;
64  MetaDataList metadata() const;
65  void set_metadata(const MetaDataList& v_md);
66 
67  void set_loved(bool loved);
68  bool is_loved() const;
69 
70  private:
71  void parse_station_name();
72  void parse_urls();
73  void parse_description();
74  void parse_image();
75  };
76 }
77 
78 #endif
79 
SomaFM::Station
Definition: SomaFMStation.h:40
MetaDataList
The MetaDataList class.
Definition: MetaDataList.h:37
Cover::Location
The CoverLocation class.
Definition: CoverLocation.h:42