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
104 static const bool readable =
true;
105 static const bool writable =
true;
110 inline static const std::string&
name()
112 static const std::string s
114 "DoesSatelliteBasedPositioning" 121 static const bool readable =
true;
122 static const bool writable =
true;
127 inline static const std::string&
name()
129 static const std::string s
131 "DoesReportCellAndWifiIds" 138 static const bool readable =
true;
139 static const bool writable =
true;
144 inline static const std::string&
name()
146 static const std::string s
155 static const bool readable =
true;
156 static const bool writable =
true;
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;
173 static const bool readable =
true;
174 static const bool writable =
false;
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;
212 virtual core::Property<bool>&
is_online() = 0;
250 struct Service<
com::ubuntu::location::service::Interface>
254 static const std::string s
256 "com.ubuntu.location.Service" 267 #endif // LOCATION_SERVICE_COM_UBUNTU_LOCATION_SERVICE_INTERFACE_H_ State
State enumerates the known states of the service.
com::ubuntu::location::service::Interface Interface
static const std::string & interface_name()
static std::string name()
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...
static const std::string & path()
Queries the path that this object is known under.
com::ubuntu::location::service::Interface Interface
static const std::string & name()
Interface & operator=(const Interface &)=delete
com::ubuntu::location::service::Interface Interface
dbus::types::ObjectPath ResultType
virtual core::Property< bool > & is_online()=0
Whether the overall service and its positioning engine is online or not.
static const std::chrono::milliseconds default_timeout()
com::ubuntu::location::service::State ValueType
com::ubuntu::location::service::Interface Interface
static const std::string & name()
virtual core::Property< bool > & does_satellite_based_positioning()=0
Whether the service uses satellite-based positioning.
The Interface class models the primary interface to the location service.
virtual ~Interface()=default
com::ubuntu::location::service::Interface Interface
static const std::string & name()
std::shared_ptr< Interface > Ptr
static const std::string & name()
com::ubuntu::location::service::Interface Interface
std::map< com::ubuntu::location::SpaceVehicle::Key, com::ubuntu::location::SpaceVehicle > ValueType
virtual session::Interface::Ptr create_session_for_criteria(const Criteria &criteria)=0
Starts a new session for the given criteria.
static std::string name()
static const std::string & name()
Summarizes criteria of a client session with respect to functionality and accuracy for position...
virtual core::Property< std::map< SpaceVehicle::Key, SpaceVehicle > > & visible_space_vehicles()=0
All space vehicles currently visible.
virtual const core::Property< State > & state() const =0
The overall state of the service.
std::shared_ptr< Interface > Ptr
static const std::string & name()