18 #ifndef LOCATION_SERVICE_COM_UBUNTU_LOCATION_SERVICE_INTERFACE_H_
19 #define LOCATION_SERVICE_COM_UBUNTU_LOCATION_SERVICE_INTERFACE_H_
21 #include "com/ubuntu/location/service/session/interface.h"
23 #include <org/freedesktop/dbus/service.h>
24 #include <org/freedesktop/dbus/traits/service.h>
25 #include <org/freedesktop/dbus/types/object_path.h>
30 namespace dbus = org::freedesktop::dbus;
48 struct InsufficientPermissions {
inline static std::string name() {
return "com.ubuntu.location.Service.Error.InsufficientPermissions"; } };
49 struct CreatingSession {
inline static std::string name() {
return "com.ubuntu.location.Service.Error.CreatingSession"; } };
56 inline static const std::string& name()
58 static const std::string s
60 "CreateSessionForCriteria"
65 typedef dbus::types::ObjectPath ResultType;
67 inline static const std::chrono::milliseconds default_timeout() {
return std::chrono::seconds{1}; }
73 typedef std::shared_ptr<Interface> Ptr;
75 inline static const std::string& path()
77 static const std::string s{
"/com/ubuntu/location/Service"};
81 Interface(
const Interface&) =
delete;
82 Interface& operator=(
const Interface&) =
delete;
83 virtual ~Interface() =
default;
85 virtual session::Interface::Ptr create_session_for_criteria(
const Criteria& criteria) = 0;
101 struct Service<com::ubuntu::location::service::Interface>
103 static const std::string& interface_name()
105 static const std::string s
107 "com.ubuntu.location.Service"
117 #include "com/ubuntu/location/codec.h"
119 #endif // LOCATION_SERVICE_COM_UBUNTU_LOCATION_SERVICE_INTERFACE_H_