ubuntu-location-service: /build/location-service-git/src/location-service/include/location_service/com/ubuntu/location/service/system_configuration.h Source File

ubuntu-location-service .. An aggregating location service providing positioning and geocoding capabilities to applications.

system_configuration.h
Go to the documentation of this file.
1 /*
2 * Copyright © 2016 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 * Scott Sweeny <scott.sweeny@canonical.com>
18 */
19 #ifndef LOCATION_SERVICE_COM_UBUNTU_LOCATION_SERVICE_SYSTEM_CONFIGURATION_H_
20 #define LOCATION_SERVICE_COM_UBUNTU_LOCATION_SERVICE_SYSTEM_CONFIGURATION_H_
21
22 #include <com/ubuntu/location/service/permission_manager.h>
23
24 #include <boost/filesystem.hpp>
25
26 #include <core/dbus/bus.h>
27
28 namespace fs = boost::filesystem;
29
30 namespace com
31 {
32 namespace ubuntu
33 {
34 namespace location
35 {
36 namespace service
37 {
38 class SystemConfiguration
39 {
40 public:
41 // A singleton is ugly, but it's the easier way forward
42 // if we want to contain snappy-specific setup for now.
43 static SystemConfiguration& instance();
44
45 virtual ~SystemConfiguration() = default;
46
47 // runtime_data_dir returns the path to the directory the service should
48 // use to store runtime persistent data.
49 virtual fs::path runtime_persistent_data_dir() const = 0;
50
51 // create_permission_manager returns an instance of PermissionManager that
52 // is meant to be used by the service to verify incoming connection requests.
53 virtual PermissionManager::Ptr create_permission_manager(const std::shared_ptr<core::dbus::Bus>& bus) const = 0;
54
55 protected:
56 SystemConfiguration() = default;
57 };
58 }
59 }
60 }
61 }
62
63 #endif // LOCATION_SERVICE_COM_UBUNTU_LOCATION_SERVICE_CONFIGURATION_H_
com::ubuntu::location::service::PermissionManager::Ptr
std::shared_ptr< PermissionManager > Ptr
Definition: permission_manager.h:50
com::ubuntu::location::service::SystemConfiguration
Definition: system_configuration.h:39
com::ubuntu::location::service::SystemConfiguration::instance
static SystemConfiguration & instance()
com::ubuntu::location::service::SystemConfiguration::~SystemConfiguration
virtual ~SystemConfiguration()=default
com::ubuntu::location::service::SystemConfiguration::SystemConfiguration
SystemConfiguration()=default
com::ubuntu::location::service::SystemConfiguration::create_permission_manager
virtual PermissionManager::Ptr create_permission_manager(const std::shared_ptr< core::dbus::Bus > &bus) const =0
com::ubuntu::location::service::SystemConfiguration::runtime_persistent_data_dir
virtual fs::path runtime_persistent_data_dir() const =0
com
Definition: accuracy.h:24
permission_manager.h