Music Hub  ..
A session-wide music playback service
dbus_client_death_observer.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_DBUS_CLIENT_DEATH_OBSERVER_H
20 #define LOMIRI_MEDIAHUBSERVICE_DBUS_CLIENT_DEATH_OBSERVER_H
21 
23 
24 #include <QDBusServiceWatcher>
25 #include <QObject>
26 #include <QVector>
27 
28 namespace lomiri {
29 namespace MediaHubService {
30 
33 {
34  Q_OBJECT
35 
36 public:
39 
40  // Registers the given client for death notifications.
41  void registerForDeathNotifications(const Player::Client &) override;
42 
43 protected:
44  void onServiceDied(const QString &serviceName);
45 
46 private:
47  QVector<Player::Client> m_clients;
48  QDBusServiceWatcher m_watcher;
49 };
50 
51 }
52 }
53 
54 #endif // LOMIRI_MEDIAHUBSERVICE_DBUS_CLIENT_DEATH_OBSERVER_H
QObject
lomiri::MediaHubService::DBusClientDeathObserver::registerForDeathNotifications
void registerForDeathNotifications(const Player::Client &) override
Definition: dbus_client_death_observer.cpp:55
lomiri::MediaHubService::ClientDeathObserver
Definition: client_death_observer.h:39
lomiri::MediaHubService::DBusClientDeathObserver::~DBusClientDeathObserver
~DBusClientDeathObserver()
Definition: dbus_client_death_observer.cpp:38
lomiri::MediaHubService::Player::Client
Definition: player.h:61
client_death_observer_p.h
lomiri::MediaHubService::ClientDeathObserverPrivate
Definition: client_death_observer_p.h:27
lomiri::MediaHubService::DBusClientDeathObserver::onServiceDied
void onServiceDied(const QString &serviceName)
Definition: dbus_client_death_observer.cpp:42
lomiri::MediaHubService::DBusClientDeathObserver::DBusClientDeathObserver
DBusClientDeathObserver(ClientDeathObserver *q)
Definition: dbus_client_death_observer.cpp:29
lomiri::MediaHubService::DBusClientDeathObserver
Definition: dbus_client_death_observer.h:31
lomiri
Definition: dbus_utils.h:24