Music Hub  ..
A session-wide music playback service
client_death_observer.cpp
Go to the documentation of this file.
1 /*
2  * Copyright © 2014 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser General Public License version 3,
6  * as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Thomas Voß <thomas.voss@canonical.com>
17  */
18 
20 
21 namespace media = core::ubuntu::media;
22 
23 #if defined(MEDIA_HUB_HAVE_HYBRIS_MEDIA_COMPAT_LAYER)
25 
26 // Accesses the default client death observer implementation for the platform.
28 {
30 }
31 #else // MEDIA_HUB_HAVE_HYBRIS_MEDIA_COMPAT_LAYER
32 // Just throws a std::logic_error as we have not yet defined a default way to
33 // identify client death changes. One possible way of implementing the interface
34 // would be to listen to dbus name changes and react accordingly.
36 {
37  throw std::logic_error
38  {
39  "No platform-specific death observer implementation known."
40  };
41 }
42 #endif // MEDIA_HUB_HAVE_HYBRIS_MEDIA_COMPAT_LAYER
std::shared_ptr< ClientDeathObserver > Ptr
ClientDeathObserver::Ptr platform_default_client_death_observer()