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 
46  enum class UrlType : unsigned char
47  {
48  AAC=0,
49  MP3,
50  Undefined
51  };
52 
53  Station();
54  explicit Station(const QString& content);
55  Station(const Station& other);
56  Station& operator=(const Station& other);
57  ~Station();
58 
59  QString name() const;
60  QStringList urls() const;
61  QString description() const;
62  UrlType url_type(const QString& url) const;
63  Cover::Location cover_location() const;
64  bool is_valid() const;
65  MetaDataList metadata() const;
66  void set_metadata(const MetaDataList& v_md);
67 
68  void set_loved(bool loved);
69  bool is_loved() const;
70 
71  private:
72  void parse_station_name();
73  void parse_urls();
74  void parse_description();
75  void parse_image();
76  };
77 }
78 
79 #endif
The MetaDataList class.
Definition: MetaDataList.h:37
The CoverLocation class.
Definition: CoverLocation.h:37
Definition: SomaFMLibrary.h:30
Definition: SomaFMStation.h:40
Definition: SomaFMStation.h:33