18 #ifndef LOCATION_SERVICE_COM_UBUNTU_LOCATION_SERVICE_INTERFACE_H_
19 #define LOCATION_SERVICE_COM_UBUNTU_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>
54 inline static std::string
name()
56 return "com.ubuntu.location.Service.Error.InsufficientPermissions";
61 inline static std::string
name()
63 return "com.ubuntu.location.Service.Error.CreatingSession";
72 inline static const std::string&
name()
74 static const std::string s
76 "CreateSessionForCriteria"
85 return std::chrono::seconds{25};
93 inline static const std::string&
name()
95 static const std::string s
110 inline static const std::string&
name()
112 static const std::string s
114 "DoesSatelliteBasedPositioning"
127 inline static const std::string&
name()
129 static const std::string s
131 "DoesReportCellAndWifiIds"
144 inline static const std::string&
name()
146 static const std::string s
161 inline static const std::string&
name()
163 static const std::string s
165 "VisibleSpaceVehicles"
171 typedef std::map<com::ubuntu::location::SpaceVehicle::Key, com::ubuntu::location::SpaceVehicle>
ValueType;
181 typedef std::shared_ptr<Interface>
Ptr;
186 inline static const std::string&
path()
188 static const std::string s{
"/com/ubuntu/location/Service"};
200 virtual const core::Property<State>&
state()
const = 0;
250 struct Service<
com::ubuntu::location::service::Interface>
254 static const std::string s
256 "com.ubuntu.location.Service"
The Interface class models the primary interface to the location service.
virtual const core::Property< State > & state() const =0
The overall state of the service.
virtual core::Property< bool > & does_satellite_based_positioning()=0
Whether the service uses satellite-based positioning.
Interface & operator=(const Interface &)=delete
static const std::string & path()
Queries the path that this object is known under.
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...
virtual ~Interface()=default
virtual core::Property< std::map< SpaceVehicle::Key, SpaceVehicle > > & visible_space_vehicles()=0
All space vehicles currently visible.
virtual core::Property< bool > & is_online()=0
Whether the overall service and its positioning engine is online or not.
Interface(const Interface &)=delete
virtual session::Interface::Ptr create_session_for_criteria(const Criteria &criteria)=0
Starts a new session for the given criteria.
std::shared_ptr< Interface > Ptr
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::chrono::milliseconds default_timeout()
dbus::types::ObjectPath ResultType
static const std::string & name()
com::ubuntu::location::service::Interface Interface
static std::string name()
static std::string name()
static const bool writable
com::ubuntu::location::service::Interface Interface
static const std::string & name()
static const bool readable
static const std::string & name()
static const bool writable
com::ubuntu::location::service::Interface Interface
static const bool readable
static const std::string & name()
com::ubuntu::location::service::Interface Interface
static const bool readable
static const bool writable
com::ubuntu::location::service::State ValueType
static const bool readable
static const bool writable
static const std::string & name()
com::ubuntu::location::service::Interface Interface
static const bool writable
com::ubuntu::location::service::Interface Interface
std::map< com::ubuntu::location::SpaceVehicle::Key, com::ubuntu::location::SpaceVehicle > ValueType
static const bool readable
static const std::string & name()
static const std::string & interface_name()