Sayonara Player
Loading...
Searching...
No Matches
src
Utils
Streams
Station.h
1
/* Station.h
2
*
3
* Copyright (C) 2011-2024 Michael Lugmair
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
#ifndef ABSTRACTUTILSTREAM_H
22
#define ABSTRACTUTILSTREAM_H
23
24
#include "Utils/Pimpl.h"
25
26
class
QString;
27
28
namespace
Cover
29
{
30
class
Location;
31
}
32
33
class
Station
34
{
35
public
:
36
Station
();
37
virtual
~Station
();
38
Station
(
const
Station
& other);
39
40
Station
& station(
const
Station
& other);
41
42
[[nodiscard]]
virtual
QString url()
const
= 0;
43
[[nodiscard]]
virtual
QString name()
const
= 0;
44
};
45
46
class
Stream
:
47
public
Station
48
{
49
PIMPL(
Stream
)
50
51
public
:
52
Stream
();
53
Stream
(
const
QString& name,
const
QString& url,
bool
isUpdatable =
true
);
54
Stream
(
const
Stream
& other);
55
~Stream
()
override
;
56
57
Stream
& operator=(
const
Stream
& stream);
58
59
[[nodiscard]] QString name()
const override
;
60
void
setName(
const
QString& name);
61
62
[[nodiscard]] QString url()
const override
;
63
void
setUrl(
const
QString& url);
64
65
[[nodiscard]]
bool
isUpdatable()
const
;
66
};
67
68
class
Podcast
:
69
public
Station
70
{
71
PIMPL(
Podcast
)
72
73
public
:
74
Podcast
();
75
Podcast
(
const
QString& name,
const
QString& url,
bool
reversed =
false
);
76
Podcast
(
const
Podcast
& other);
77
78
~Podcast
()
override
;
79
80
[[nodiscard]] QString name()
const override
;
81
void
setName(
const
QString& name);
82
83
[[nodiscard]] QString url()
const override
;
84
void
setUrl(
const
QString& url);
85
86
[[nodiscard]]
bool
reversed()
const
;
87
void
setReversed(
bool
b);
88
89
Podcast
& operator=(
const
Podcast
& podcast);
90
};
91
92
using
StationPtr = std::shared_ptr<Station>;
93
94
#endif
// ABSTRACTUTILSTREAM_H
Podcast
Definition
Station.h:70
Station
Definition
Station.h:34
Stream
Definition
Station.h:48
Generated on Sat Jan 27 2024 00:00:00 for Sayonara Player by
1.10.0