1
#ifndef LOCATION_SERVICE_COM_UBUNTU_LOCATION_PROVIDERS_GEOCLUE_GEOCLUE_H_
2
#define LOCATION_SERVICE_COM_UBUNTU_LOCATION_PROVIDERS_GEOCLUE_GEOCLUE_H_
4
#include "org/freedesktop/dbus/service.h"
5
#include "org/freedesktop/dbus/traits/service.h"
6
#include "org/freedesktop/dbus/types/struct.h"
7
#include "org/freedesktop/dbus/types/stl/tuple.h"
11
namespace dbus = org::freedesktop::dbus;
19
enum class Status : int
27
friend std::ostream& operator<<(std::ostream& out, const Status& status)
29
static std::map<Status, std::string> lut =
31
{Status::error, "error"},
32
{Status::unavailable, "unavailable"},
33
{Status::acquiring, "acquiring"},
34
{Status::available, "available"}
37
return out << lut[status];
40
struct GetProviderInfo
42
inline static std::string name()
44
return "GetProviderInfo";
46
typedef Geoclue Interface;
47
typedef std::tuple<std::string, std::string> ResultType;
48
inline static const std::chrono::milliseconds default_timeout() { return std::chrono::seconds{1}; }
53
inline static std::string name()
57
typedef Geoclue Interface;
58
typedef int32_t ResultType;
59
inline static const std::chrono::milliseconds default_timeout() { return std::chrono::seconds{1}; }
64
inline static std::string name()
66
return "AddReference";
68
typedef Geoclue Interface;
69
typedef void ResultType;
70
inline static const std::chrono::milliseconds default_timeout() { return std::chrono::seconds{1}; }
73
struct RemoveReference
75
inline static std::string name()
77
return "RemoveReference";
79
typedef Geoclue Interface;
80
typedef void ResultType;
81
inline static const std::chrono::milliseconds default_timeout() { return std::chrono::seconds{1}; }
88
inline static std::string name()
92
typedef Address Interface;
93
typedef std::tuple<int32_t, std::map<std::string, std::string>, dbus::types::Struct<std::tuple<int32_t, double, double>>> ResultType;
94
inline static const std::chrono::milliseconds default_timeout() { return std::chrono::seconds{1}; }
101
inline static std::string name()
103
return "PositionChanged";
105
typedef Address Interface;
106
typedef std::tuple<int32_t, std::map<std::string, std::string>, dbus::types::Struct<std::tuple<int32_t, double, double>>> ArgumentType;
117
static const int none = 0;
118
static const int latitude = 1;
119
static const int longitude = 2;
120
static const int altitude = 3;
123
typedef std::bitset<4> FieldFlags;
127
inline static std::string name()
129
return "GetPosition";
131
typedef Position Interface;
132
typedef std::tuple<int32_t, int32_t, double, double, double, dbus::types::Struct<std::tuple<int32_t, double, double>>> ResultType;
133
inline static const std::chrono::milliseconds default_timeout() { return std::chrono::seconds{1}; }
138
struct PositionChanged
140
inline static std::string name()
142
return "PositionChanged";
144
typedef Position Interface;
145
typedef std::tuple<int32_t, int32_t, double, double, double, dbus::types::Struct<std::tuple<int32_t, double, double>>> ArgumentType;
156
static const int none = 0;
157
static const int speed = 1;
158
static const int direction = 2;
159
static const int climb = 3;
162
typedef std::bitset<4> FieldFlags;
166
inline static std::string name()
168
return "GetVelocity";
170
typedef Velocity Interface;
171
typedef std::tuple<int32_t, int32_t, double, double, double> ResultType;
172
inline static const std::chrono::milliseconds default_timeout() { return std::chrono::seconds{1}; }
176
struct VelocityChanged
178
inline static std::string name()
180
return "VelocityChanged";
182
typedef Velocity Interface;
183
typedef std::tuple<int32_t, int32_t, double, double, double> ArgumentType;
193
namespace freedesktop
200
struct Service<org::freedesktop::Geoclue>
202
inline static const std::string& interface_name()
204
static const std::string s{"org.freedesktop.Geoclue"};
210
struct Service<org::freedesktop::Geoclue::Address>
212
inline static const std::string& interface_name()
214
static const std::string s{"org.freedesktop.Geoclue.Address"};
220
struct Service<org::freedesktop::Geoclue::Position>
222
inline static const std::string& interface_name()
224
static const std::string s{"org.freedesktop.Geoclue.Position"};
230
struct Service<org::freedesktop::Geoclue::Velocity>
232
inline static const std::string& interface_name()
234
static const std::string s{"org.freedesktop.Geoclue.Velocity"};
243
#endif // LOCATION_SERVICE_COM_UBUNTU_LOCATION_PROVIDERS_GEOCLUE_GEOCLUE_H_