Sayonara Player
SomaFMStation.h
1/* SomaFMStation.h */
2
3/* Copyright (C) 2011-2020 Michael Lugmair (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
29class QStringList;
30class QString;
31class MetaDataList;
32
33namespace Cover
34{
35 class Location;
36}
37
38namespace 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 urlType(const QString& url) const;
62 QString urlTypeString(const QString& url) const;
63 Cover::Location coverLocation() const;
64 bool isValid() const;
65
66 MetaDataList metadata() const;
67 void setMetadata(const MetaDataList& tracks);
68
69 bool isLoved() const;
70 void setLoved(bool loved);
71
72 private:
73 void parseStationName();
74 void parseUrls();
75 void parseDescription();
76 void parseImage();
77 };
78}
79
80#endif
81
Definition: CoverLocation.h:39
The MetaDataList class.
Definition: MetaDataList.h:39
Definition: SomaFMStation.h:41