Music Hub
..
A session-wide music playback service
recorder_observer.h
Go to the documentation of this file.
1
/*
2
* Copyright © 2014 Canonical Ltd.
3
* Copyright © 2022 UBports Foundation.
4
*
5
* Contact: Alberto Mardegan <mardy@users.sourceforge.net>
6
*
7
* This program is free software: you can redistribute it and/or modify it
8
* under the terms of the GNU Lesser General Public License version 3,
9
* as published by the Free Software Foundation.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU Lesser General Public License for more details.
15
*
16
* You should have received a copy of the GNU Lesser General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
*
19
* Authored by: Thomas Voß <thomas.voss@canonical.com>
20
*/
21
22
#ifndef LOMIRI_MEDIAHUBSERVICE_RECORDER_OBSERVER_H
23
#define LOMIRI_MEDIAHUBSERVICE_RECORDER_OBSERVER_H
24
25
#include <QObject>
26
#include <QScopedPointer>
27
28
namespace
lomiri
29
{
30
namespace
MediaHubService
31
{
32
// All known states of the recorder
33
enum class
RecordingState
34
{
35
// No active recording
36
stopped
,
37
// We have an active recording session
38
started
39
};
40
41
// A RecorderObserver allows for monitoring the recording state
42
// of the service.
43
class
RecorderObserverPrivate;
44
class
RecorderObserver
:
public
QObject
45
{
46
Q_OBJECT
47
48
public
:
49
RecorderObserver
(
QObject
*parent =
nullptr
);
50
RecorderObserver
(
const
RecorderObserver
&) =
delete
;
51
virtual
~RecorderObserver
();
52
RecorderObserver
&
operator=
(
const
RecorderObserver
&) =
delete
;
53
54
RecordingState
recordingState
()
const
;
55
56
Q_SIGNALS:
57
void
recordingStateChanged
();
58
59
private
:
60
Q_DECLARE_PRIVATE(
RecorderObserver
);
61
QScopedPointer<RecorderObserverPrivate> d_ptr;
62
};
63
64
}
65
}
66
67
#endif // LOMIRI_MEDIAHUBSERVICE_RECORDER_OBSERVER_H
QObject
lomiri::MediaHubService::RecorderObserver::operator=
RecorderObserver & operator=(const RecorderObserver &)=delete
lomiri::MediaHubService::RecordingState::started
@ started
lomiri::MediaHubService::RecordingState::stopped
@ stopped
lomiri::MediaHubService::RecordingState
RecordingState
Definition:
recorder_observer.h:33
lomiri::MediaHubService::RecorderObserver::recordingStateChanged
void recordingStateChanged()
lomiri::MediaHubService::RecorderObserver::RecorderObserver
RecorderObserver(QObject *parent=nullptr)
Definition:
recorder_observer.cpp:57
lomiri::MediaHubService::RecorderObserver::~RecorderObserver
virtual ~RecorderObserver()
lomiri::MediaHubService::RecorderObserver::recordingState
RecordingState recordingState() const
Definition:
recorder_observer.cpp:65
lomiri
Definition:
dbus_utils.h:24
lomiri::MediaHubService::RecorderObserver
Definition:
recorder_observer.h:44
src
service
recorder_observer.h
Generated on Fri Dec 16 2022 11:18:10 for Music Hub by
1.8.17