Music Hub  ..
A session-wide music playback service
recorder_observer_p.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2021-2022 UBports Foundation.
3  *
4  * Contact: Alberto Mardegan <mardy@users.sourceforge.net>
5  *
6  * This program is free software: you can redistribute it and/or modify it
7  * under the terms of the GNU Lesser General Public License version 3,
8  * as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #ifndef LOMIRI_MEDIAHUBSERVICE_HYBRIS_RECORDER_OBSERVER_PRIVATE_H
20 #define LOMIRI_MEDIAHUBSERVICE_HYBRIS_RECORDER_OBSERVER_PRIVATE_H
21 
22 #include "recorder_observer.h"
23 
24 namespace lomiri {
25 namespace MediaHubService {
26 
28 {
29  Q_DECLARE_PUBLIC(RecorderObserver)
30 
31 public:
33  q_ptr(q)
34  {
35  }
36 
38  return m_recordingState;
39  }
40 
41 protected:
43  Q_Q(RecorderObserver);
44  if (state == m_recordingState) return;
45  m_recordingState = state;
46  Q_EMIT q->recordingStateChanged();
47  }
48 
49 private:
50  RecordingState m_recordingState;
51  RecorderObserver *q_ptr;
52 };
53 
54 }} // namespace
55 
56 #endif // LOMIRI_MEDIAHUBSERVICE_HYBRIS_RECORDER_OBSERVER_PRIVATE_H
lomiri::MediaHubService::RecorderObserverPrivate::recordingState
RecordingState recordingState() const
Definition: recorder_observer_p.h:37
recorder_observer.h
lomiri::MediaHubService::RecorderObserverPrivate::RecorderObserverPrivate
RecorderObserverPrivate(RecorderObserver *q)
Definition: recorder_observer_p.h:32
lomiri::MediaHubService::RecordingState
RecordingState
Definition: recorder_observer.h:33
lomiri::MediaHubService::RecorderObserverPrivate::setRecordingState
void setRecordingState(RecordingState state)
Definition: recorder_observer_p.h:42
lomiri
Definition: dbus_utils.h:24
lomiri::MediaHubService::RecorderObserverPrivate
Definition: recorder_observer_p.h:27
lomiri::MediaHubService::RecorderObserver
Definition: recorder_observer.h:44