Music Hub  ..
A session-wide music playback service
hybris_client_death_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_HYBRIS_CLIENT_DEATH_OBSERVER_H
23 #define LOMIRI_MEDIAHUBSERVICE_HYBRIS_CLIENT_DEATH_OBSERVER_H
24 
26 
27 #include <QObject>
28 
29 namespace lomiri
30 {
31 namespace MediaHubService
32 {
33 // Models functionality to be notified whenever a client
34 // of the service goes away, and thus allows us to clean
35 // up in that case.
36 // Specific implementation for a hybris-based platform.
39 {
40  Q_OBJECT
41 
42 public:
43  // Our static callback that we inject to the hybris world.
44  static void on_client_died_cb(void* context);
45 
48 
49  // Registers the given client for death notifications.
50  void registerForDeathNotifications(const Player::Client &) override;
51 };
52 
53 }
54 }
55 
56 #endif // LOMIRI_MEDIAHUBSERVICE_HYBRIS_CLIENT_DEATH_OBSERVER_H
QObject
lomiri::MediaHubService::ClientDeathObserver
Definition: client_death_observer.h:39
lomiri::MediaHubService::HybrisClientDeathObserver::~HybrisClientDeathObserver
~HybrisClientDeathObserver()
Definition: hybris_client_death_observer.cpp:60
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::HybrisClientDeathObserver::HybrisClientDeathObserver
HybrisClientDeathObserver(ClientDeathObserver *q)
Definition: hybris_client_death_observer.cpp:55
lomiri::MediaHubService::HybrisClientDeathObserver::registerForDeathNotifications
void registerForDeathNotifications(const Player::Client &) override
Definition: hybris_client_death_observer.cpp:64
lomiri
Definition: dbus_utils.h:24
lomiri::MediaHubService::HybrisClientDeathObserver
Definition: hybris_client_death_observer.h:37
lomiri::MediaHubService::HybrisClientDeathObserver::on_client_died_cb
static void on_client_died_cb(void *context)
Definition: hybris_client_death_observer.cpp:38