18
18
#ifndef LOCATION_SERVICE_COM_UBUNTU_LOCATION_SERVICE_IMPLEMENTATION_H_
19
19
#define LOCATION_SERVICE_COM_UBUNTU_LOCATION_SERVICE_IMPLEMENTATION_H_
21
#include "com/ubuntu/location/engine.h"
22
#include "com/ubuntu/location/service/skeleton.h"
21
#include <com/ubuntu/location/engine.h>
22
#include <com/ubuntu/location/connectivity/manager.h>
23
#include <com/ubuntu/location/service/harvester.h>
24
#include <com/ubuntu/location/service/skeleton.h>
36
38
class Implementation : public Skeleton
39
41
typedef std::shared_ptr<Implementation> Ptr;
42
const core::dbus::Bus::Ptr& bus,
43
const Engine::Ptr& engine,
44
const PermissionManager::Ptr& permission_manager);
45
Implementation(const Implementation&) = delete;
46
virtual ~Implementation() noexcept;
47
Implementation& operator=(const Implementation&) = delete;
49
virtual session::Interface::Ptr create_session_for_criteria(const Criteria& criteria);
43
// Summarizes configuration options for the implementation.
46
// The bus connection to expose the service upon.
47
core::dbus::Bus::Ptr incoming;
48
// The bus connection for querying other services.
49
core::dbus::Bus::Ptr outgoing;
50
// The positioning Engine that the service should use.
52
// The permission manager that the service should use.
53
PermissionManager::Ptr permission_manager;
54
// All harvesting specific options.
55
Harvester::Configuration harvester;
58
// Creates a new instance of the service with the given configuration.
59
// Throws std::runtime_error in case of issues.
60
Implementation(const Configuration& configuration);
62
// Creates a new session for the given criteria.
63
session::Interface::Ptr create_session_for_criteria(const Criteria& criteria);
53
std::unique_ptr<Private> d;
66
// The service configuration.
67
Configuration configuration;
68
// The harvester instance.
70
// All event connections are automatically cut on destruction.
73
core::ScopedConnection is_online;
74
core::ScopedConnection does_report_cell_and_wifi_ids;
75
core::ScopedConnection does_satellite_based_positioning;
76
core::ScopedConnection engine_state;
77
core::ScopedConnection satellite_based_positioning_state;
78
core::ScopedConnection visible_space_vehicles;
79
core::ScopedConnection reference_position;