18#ifndef LOCATION_SERVICE_COM_LOMIRI_LOCATION_SERVICE_INTERFACE_H_
19#define LOCATION_SERVICE_COM_LOMIRI_LOCATION_SERVICE_INTERFACE_H_
26#include <core/dbus/service.h>
27#include <core/dbus/traits/service.h>
28#include <core/dbus/types/object_path.h>
29#include <core/dbus/types/stl/vector.h>
55 inline static std::string
name()
57 return "com.lomiri.location.Service.Error.InsufficientPermissions";
62 inline static std::string
name()
64 return "com.lomiri.location.Service.Error.CreatingSession";
73 inline static const std::string&
name()
75 static const std::string s
77 "CreateSessionForCriteria"
86 return std::chrono::seconds{25};
94 inline static const std::string&
name()
96 static const std::string s
111 inline static const std::string&
name()
113 static const std::string s
115 "DoesSatelliteBasedPositioning"
128 inline static const std::string&
name()
130 static const std::string s
132 "DoesReportCellAndWifiIds"
145 inline static const std::string&
name()
147 static const std::string s
162 inline static const std::string&
name()
164 static const std::string s
166 "VisibleSpaceVehicles"
172 typedef std::map<com::lomiri::location::SpaceVehicle::Key, com::lomiri::location::SpaceVehicle>
ValueType;
180 inline static const std::string&
name()
182 static const std::string s
199 typedef std::shared_ptr<Interface>
Ptr;
204 inline static const std::string&
path()
206 static const std::string s{
"/com/lomiri/location/Service"};
218 virtual const core::Property<State>&
state()
const = 0;
274struct Service<
com::lomiri::location::service::Interface>
278 static const std::string s
280 "com.lomiri.location.Service"
The Interface class models the primary interface to the location service.
Interface(const Interface &)=delete
virtual const core::Property< State > & state() const =0
The overall state of the service.
Interface & operator=(const Interface &)=delete
virtual core::Property< std::map< SpaceVehicle::Key, SpaceVehicle > > & visible_space_vehicles()=0
All space vehicles currently visible.
virtual ~Interface()=default
virtual core::Property< bool > & does_satellite_based_positioning()=0
Whether the service uses satellite-based positioning.
static const std::string & path()
Queries the path that this object is known under.
virtual core::Property< std::vector< std::string > > & client_applications()=0
List of application IDs currently requesting position information.
virtual core::Property< bool > & does_report_cell_and_wifi_ids()=0
Whether the engine and its providers/reporters do call home to report reference locations together wi...
std::shared_ptr< Interface > Ptr
virtual session::Interface::Ptr create_session_for_criteria(const Criteria &criteria)=0
Starts a new session for the given criteria.
virtual core::Property< bool > & is_online()=0
Whether the overall service and its positioning engine is online or not.
std::shared_ptr< Interface > Ptr
State
State enumerates the known states of the service.
Summarizes criteria of a client session with respect to functionality and accuracy for position,...
static const std::string & name()
com::lomiri::location::service::Interface Interface
dbus::types::ObjectPath ResultType
static const std::chrono::milliseconds default_timeout()
static std::string name()
static std::string name()
com::lomiri::location::service::Interface Interface
std::vector< std::string > ValueType
static const std::string & name()
static const bool readable
static const bool writable
static const bool writable
static const bool readable
static const std::string & name()
com::lomiri::location::service::Interface Interface
static const std::string & name()
static const bool readable
com::lomiri::location::service::Interface Interface
static const bool writable
static const bool readable
com::lomiri::location::service::Interface Interface
static const std::string & name()
static const bool writable
static const std::string & name()
com::lomiri::location::service::State ValueType
com::lomiri::location::service::Interface Interface
static const bool readable
static const bool writable
std::map< com::lomiri::location::SpaceVehicle::Key, com::lomiri::location::SpaceVehicle > ValueType
static const bool readable
static const bool writable
com::lomiri::location::service::Interface Interface
static const std::string & name()
static const std::string & interface_name()