ubuntu-location-service: /build/location-service-git/src/location-service/include/location_service/com/ubuntu/location/codec.h Source File

ubuntu-location-service .. An aggregating location service providing positioning and geocoding capabilities to applications.

codec.h
Go to the documentation of this file.
1 /*
2 * Copyright © 2012-2013 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License version 3,
6 * as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authored by: Thomas Voß <thomas.voss@canonical.com>
17 */
18 #ifndef LOCATION_SERVICE_COM_UBUNTU_LOCATION_CODEC_H_
19 #define LOCATION_SERVICE_COM_UBUNTU_LOCATION_CODEC_H_
20
21 #include <com/ubuntu/location/criteria.h>
22 #include <com/ubuntu/location/heading.h>
23 #include <com/ubuntu/location/position.h>
24 #include <com/ubuntu/location/provider.h>
25 #include <com/ubuntu/location/space_vehicle.h>
26 #include <com/ubuntu/location/update.h>
27 #include <com/ubuntu/location/velocity.h>
28 #include <com/ubuntu/location/service/state.h>
29 #include <com/ubuntu/location/units/units.h>
30 #include <com/ubuntu/location/wgs84/altitude.h>
31 #include <com/ubuntu/location/wgs84/latitude.h>
32 #include <com/ubuntu/location/wgs84/longitude.h>
33
34 #include <core/dbus/codec.h>
35
36 #include <sstream>
37
38 namespace core
39 {
40 namespace dbus
41 {
42 namespace helper
43 {
44 template<>
45 struct TypeMapper<com::ubuntu::location::service::State>
46 {
47 constexpr static ArgumentType type_value()
48 {
49 return ArgumentType::string;
50 }
51
52 constexpr static bool is_basic_type()
53 {
54 return true;
55 }
56 constexpr static bool requires_signature()
57 {
58 return false;
59 }
60
61 static std::string signature()
62 {
63 static const std::string s = TypeMapper<std::string>::signature();
64 return s;
65 }
66 };
67 }
68
69 template<>
70 struct Codec<com::ubuntu::location::service::State>
71 {
72 static void encode_argument(Message::Writer& writer, const com::ubuntu::location::service::State& in)
73 {
74 std::stringstream ss; ss << in; auto s = ss.str();
75 writer.push_stringn(s.c_str(), s.size());
76 }
77
78 static void decode_argument(Message::Reader& reader, com::ubuntu::location::service::State& in)
79 {
80 auto s = reader.pop_string();
81 std::stringstream ss{s}; ss >> in;
82 }
83 };
84 namespace helper
85 {
86 template<typename T>
87 struct TypeMapper<com::ubuntu::location::units::Quantity<T>>
88 {
89 constexpr static ArgumentType type_value()
90 {
91 return ArgumentType::floating_point;
92 }
93
94 constexpr static bool is_basic_type()
95 {
96 return true;
97 }
98 constexpr static bool requires_signature()
99 {
100 return false;
101 }
102
103 static std::string signature()
104 {
105 static const std::string s = TypeMapper<double>::signature();
106 return s;
107 }
108 };
109 }
110
111 template<typename T>
112 struct Codec<com::ubuntu::location::Optional<T>>
113 {
114 static void encode_argument(Message::Writer& writer, const com::ubuntu::location::Optional<T>& in)
115 {
116 bool has_value{in};
117 Codec<bool>::encode_argument(writer, has_value);
118 if (has_value)
119 Codec<typename com::ubuntu::location::Optional<T>::value_type>::encode_argument(writer, *in);
120 }
121
122 static void decode_argument(Message::Reader& reader, com::ubuntu::location::Optional<T>& in)
123 {
124 bool has_value{false};
125 Codec<bool>::decode_argument(reader, has_value);
126 if (has_value)
127 {
128 typename com::ubuntu::location::Optional<T>::value_type value;
129 Codec<typename com::ubuntu::location::Optional<T>::value_type>::decode_argument(reader, value);
130 in = value;
131 } else
132 {
133 in.reset();
134 }
135 }
136 };
137
138 template<typename T>
139 struct Codec<com::ubuntu::location::units::Quantity<T>>
140 {
141 static void encode_argument(Message::Writer& writer, const com::ubuntu::location::units::Quantity<T>& in)
142 {
143 Codec<typename com::ubuntu::location::units::Quantity<T>::value_type>::encode_argument(writer, in.value());
144 }
145
146 static void decode_argument(Message::Reader& reader, com::ubuntu::location::units::Quantity<T>& in)
147 {
148 typename com::ubuntu::location::units::Quantity<T>::value_type value;
149 Codec<typename com::ubuntu::location::units::Quantity<T>::value_type>::decode_argument(reader, value);
150 in = com::ubuntu::location::units::Quantity<T>::from_value(value);
151 }
152 };
153
154 template<typename T, typename U>
155 struct Codec<com::ubuntu::location::wgs84::Coordinate<T,U>>
156 {
157 static void encode_argument(Message::Writer& writer, const com::ubuntu::location::wgs84::Coordinate<T, U>& in)
158 {
159 Codec<com::ubuntu::location::units::Quantity<U>>::encode_argument(writer, in.value);
160 }
161
162 static void decode_argument(Message::Reader& reader, com::ubuntu::location::wgs84::Coordinate<T, U>& in)
163 {
164 Codec<com::ubuntu::location::units::Quantity<U>>::decode_argument(reader, in.value);
165 }
166 };
167
168 template<>
169 struct Codec<com::ubuntu::location::Position>
170 {
171 typedef com::ubuntu::location::Position::Accuracy::Horizontal HorizontalAccuracy;
172 typedef com::ubuntu::location::Position::Accuracy::Vertical VerticalAccuracy;
173
174 static void encode_argument(Message::Writer& writer, const com::ubuntu::location::Position& in)
175 {
176 Codec<com::ubuntu::location::wgs84::Latitude>::encode_argument(writer, in.latitude);
177 Codec<com::ubuntu::location::wgs84::Longitude>::encode_argument(writer, in.longitude);
178 Codec<com::ubuntu::location::Optional<com::ubuntu::location::wgs84::Altitude>>::encode_argument(writer, in.altitude);
179
180 Codec<com::ubuntu::location::Optional<HorizontalAccuracy>>::encode_argument(writer, in.accuracy.horizontal);
181 Codec<com::ubuntu::location::Optional<VerticalAccuracy>>::encode_argument(writer, in.accuracy.vertical);
182 }
183
184 static void decode_argument(Message::Reader& reader, com::ubuntu::location::Position& in)
185 {
186 Codec<com::ubuntu::location::wgs84::Latitude>::decode_argument(reader, in.latitude);
187 Codec<com::ubuntu::location::wgs84::Longitude>::decode_argument(reader, in.longitude);
188 Codec<com::ubuntu::location::Optional<com::ubuntu::location::wgs84::Altitude>>::decode_argument(reader, in.altitude);
189
190 Codec<com::ubuntu::location::Optional<HorizontalAccuracy>>::decode_argument(reader, in.accuracy.horizontal);
191 Codec<com::ubuntu::location::Optional<VerticalAccuracy>>::decode_argument(reader, in.accuracy.vertical);
192 }
193 };
194
195
196 namespace helper
197 {
198 template<>
199 struct TypeMapper<com::ubuntu::location::SpaceVehicle::Key>
200 {
201 constexpr static ArgumentType type_value()
202 {
203 return ArgumentType::structure;
204 }
205 constexpr static bool is_basic_type()
206 {
207 return false;
208 }
209 constexpr static bool requires_signature()
210 {
211 return true;
212 }
213
214 static std::string signature()
215 {
216 static const std::string s =
217 helper::TypeMapper<std::uint32_t>::signature() +
218 helper::TypeMapper<std::uint32_t>::signature();
219 return s;
220 }
221 };
222 template<>
223 struct TypeMapper<com::ubuntu::location::SpaceVehicle>
224 {
225 constexpr static ArgumentType type_value()
226 {
227 return ArgumentType::structure;
228 }
229 constexpr static bool is_basic_type()
230 {
231 return false;
232 }
233 constexpr static bool requires_signature()
234 {
235 return true;
236 }
237
238 inline static std::string signature()
239 {
240 std::string s =
241 DBUS_STRUCT_BEGIN_CHAR_AS_STRING +
242 helper::TypeMapper<com::ubuntu::location::SpaceVehicle::Key>::signature() +
243 helper::TypeMapper<float>::signature() +
244 helper::TypeMapper<bool>::signature() +
245 helper::TypeMapper<bool>::signature() +
246 helper::TypeMapper<bool>::signature() +
247 helper::TypeMapper<com::ubuntu::location::units::Quantity<com::ubuntu::location::units::PlaneAngle>>::signature() +
248 helper::TypeMapper<com::ubuntu::location::units::Quantity<com::ubuntu::location::units::PlaneAngle>>::signature() +
249 DBUS_STRUCT_END_CHAR_AS_STRING;
250 return s;
251 }
252 };
253 }
254
255 template<>
256 struct Codec<com::ubuntu::location::SpaceVehicle::Key>
257 {
258 static void encode_argument(Message::Writer& writer, const com::ubuntu::location::SpaceVehicle::Key& in)
259 {
260 writer.push_uint32(static_cast<std::uint32_t>(in.type));
261 writer.push_uint32(in.id);
262 }
263
264 static void decode_argument(Message::Reader& reader, com::ubuntu::location::SpaceVehicle::Key& in)
265 {
266 in.type = static_cast<com::ubuntu::location::SpaceVehicle::Type>(reader.pop_uint32());
267 in.id = reader.pop_uint32();
268 }
269 };
270
271 template<>
272 struct Codec<com::ubuntu::location::SpaceVehicle>
273 {
274 inline static void encode_argument(Message::Writer& writer, const com::ubuntu::location::SpaceVehicle& in)
275 {
276 auto sub = writer.open_structure();
277
278 Codec<com::ubuntu::location::SpaceVehicle::Key>::encode_argument(sub, in.key);
279 sub.push_floating_point(in.snr);
280 sub.push_boolean(in.has_almanac_data);
281 sub.push_boolean(in.has_ephimeris_data);
282 sub.push_boolean(in.used_in_fix);
283 Codec<com::ubuntu::location::units::Quantity<com::ubuntu::location::units::PlaneAngle>>::encode_argument(sub, in.azimuth);
284 Codec<com::ubuntu::location::units::Quantity<com::ubuntu::location::units::PlaneAngle>>::encode_argument(sub, in.elevation);
285
286 writer.close_structure(std::move(sub));
287 }
288
289 inline static void decode_argument(Message::Reader& reader, com::ubuntu::location::SpaceVehicle& in)
290 {
291 auto sub = reader.pop_structure();
292
293 Codec<com::ubuntu::location::SpaceVehicle::Key>::decode_argument(sub, in.key);
294 in.snr = sub.pop_floating_point();
295 in.has_almanac_data = sub.pop_boolean();
296 in.has_ephimeris_data = sub.pop_boolean();
297 in.used_in_fix = sub.pop_boolean();
298 Codec<com::ubuntu::location::units::Quantity<com::ubuntu::location::units::PlaneAngle>>::decode_argument(sub, in.azimuth);
299 Codec<com::ubuntu::location::units::Quantity<com::ubuntu::location::units::PlaneAngle>>::decode_argument(sub, in.elevation);
300 }
301 };
302
303 namespace helper
304 {
305 template<>
306 struct TypeMapper<std::map<com::ubuntu::location::SpaceVehicle::Key, com::ubuntu::location::SpaceVehicle>>
307 {
308 constexpr static ArgumentType type_value()
309 {
310 return ArgumentType::array;
311 }
312 constexpr static bool is_basic_type()
313 {
314 return false;
315 }
316 constexpr static bool requires_signature()
317 {
318 return true;
319 }
320
321 static std::string signature()
322 {
323 static const std::string s = DBUS_TYPE_ARRAY_AS_STRING + TypeMapper<com::ubuntu::location::SpaceVehicle>::signature();
324 return s;
325 }
326 };
327 }
328 template<>
329 struct Codec<std::map<com::ubuntu::location::SpaceVehicle::Key, com::ubuntu::location::SpaceVehicle>>
330 {
331 inline static void encode_argument(Message::Writer& writer, const std::map<com::ubuntu::location::SpaceVehicle::Key, com::ubuntu::location::SpaceVehicle>& arg)
332 {
333 types::Signature signature(helper::TypeMapper<com::ubuntu::location::SpaceVehicle>::signature());
334 auto sub = writer.open_array(signature);
335
336 for(const auto& element : arg)
337 {
338 Codec<com::ubuntu::location::SpaceVehicle>::encode_argument(sub, element.second);
339 }
340
341 writer.close_array(std::move(sub));
342 }
343
344 inline static void decode_argument(Message::Reader& reader, std::map<com::ubuntu::location::SpaceVehicle::Key, com::ubuntu::location::SpaceVehicle>& out)
345 {
346 auto sub = reader.pop_array();
347 while (sub.type() != ArgumentType::invalid)
348 {
349 com::ubuntu::location::SpaceVehicle sv;
350 Codec<com::ubuntu::location::SpaceVehicle>::decode_argument(sub, sv);
351 out.insert(std::make_pair(sv.key, sv));
352 }
353 }
354 };
355
356 template<>
357 struct Codec<com::ubuntu::location::Criteria>
358 {
359 typedef com::ubuntu::location::units::Quantity<com::ubuntu::location::units::Length> HorizontalAccuracy;
360 typedef com::ubuntu::location::units::Quantity<com::ubuntu::location::units::Length> VerticalAccuracy;
361 typedef com::ubuntu::location::units::Quantity<com::ubuntu::location::units::Velocity> VelocityAccuracy;
362 typedef com::ubuntu::location::units::Quantity<com::ubuntu::location::units::PlaneAngle> HeadingAccuracy;
363
364 static void encode_argument(Message::Writer& writer, const com::ubuntu::location::Criteria& in)
365 {
366 Codec<bool>::encode_argument(writer, in.requires.position);
367 Codec<bool>::encode_argument(writer, in.requires.altitude);
368 Codec<bool>::encode_argument(writer, in.requires.heading);
369 Codec<bool>::encode_argument(writer, in.requires.velocity);
370
371 Codec<HorizontalAccuracy>::encode_argument(writer, in.accuracy.horizontal);
372 Codec<com::ubuntu::location::Optional<VerticalAccuracy>>::encode_argument(writer, in.accuracy.vertical);
373 Codec<com::ubuntu::location::Optional<VelocityAccuracy>>::encode_argument(writer, in.accuracy.velocity);
374 Codec<com::ubuntu::location::Optional<HeadingAccuracy>>::encode_argument(writer, in.accuracy.heading);
375 }
376
377 static void decode_argument(Message::Reader& reader, com::ubuntu::location::Criteria& in)
378 {
379 Codec<bool>::decode_argument(reader, in.requires.position);
380 Codec<bool>::decode_argument(reader, in.requires.altitude);
381 Codec<bool>::decode_argument(reader, in.requires.heading);
382 Codec<bool>::decode_argument(reader, in.requires.velocity);
383
384 Codec<HorizontalAccuracy>::decode_argument(reader, in.accuracy.horizontal);
385 Codec<com::ubuntu::location::Optional<VerticalAccuracy>>::decode_argument(reader, in.accuracy.vertical);
386 Codec<com::ubuntu::location::Optional<VelocityAccuracy>>::decode_argument(reader, in.accuracy.velocity);
387 Codec<com::ubuntu::location::Optional<HeadingAccuracy>>::decode_argument(reader, in.accuracy.heading);
388 }
389 };
390
391 template<>
392 struct Codec<com::ubuntu::location::Provider::Features>
393 {
394 static void encode_argument(Message::Writer& writer, const com::ubuntu::location::Provider::Features& in)
395 {
396 writer.push_int32(static_cast<std::int32_t>(in));
397 }
398
399 static void decode_argument(Message::Reader& reader, com::ubuntu::location::Provider::Features& in)
400 {
401 in = static_cast<com::ubuntu::location::Provider::Features>(reader.pop_int32());
402 }
403 };
404
405 template<>
406 struct Codec<com::ubuntu::location::Provider::Requirements>
407 {
408 static void encode_argument(Message::Writer& writer, const com::ubuntu::location::Provider::Requirements& in)
409 {
410 writer.push_int32(static_cast<std::int32_t>(in));
411 }
412
413 static void decode_argument(Message::Reader& reader, com::ubuntu::location::Provider::Requirements& in)
414 {
415 in = static_cast<com::ubuntu::location::Provider::Requirements>(reader.pop_int32());
416 }
417 };
418
419 template<>
420 struct Codec<com::ubuntu::location::WifiAndCellIdReportingState>
421 {
422 static void encode_argument(Message::Writer& writer, const com::ubuntu::location::WifiAndCellIdReportingState& in)
423 {
424 writer.push_int32(static_cast<std::int32_t>(in));
425 }
426
427 static void decode_argument(Message::Reader& reader, com::ubuntu::location::WifiAndCellIdReportingState& in)
428 {
429 in = static_cast<com::ubuntu::location::WifiAndCellIdReportingState>(reader.pop_int32());
430 }
431 };
432
433 namespace helper
434 {
435 template<typename T>
436 struct TypeMapper<com::ubuntu::location::Update<T>>
437 {
438 constexpr static ArgumentType type_value()
439 {
440 return ArgumentType::structure;
441 }
442 constexpr static bool is_basic_type()
443 {
444 return false;
445 }
446 constexpr static bool requires_signature()
447 {
448 return true;
449 }
450
451 static std::string signature()
452 {
453 static const std::string s =
454 helper::TypeMapper<T>::signature() +
455 helper::TypeMapper<uint64_t>::signature();
456 return s;
457 }
458 };
459 }
460
461 template<typename T>
462 struct Codec<com::ubuntu::location::Update<T>>
463 {
464 static void encode_argument(Message::Writer& writer, const com::ubuntu::location::Update<T>& in)
465 {
466 Codec<T>::encode_argument(writer, in.value);
467 Codec<int64_t>::encode_argument(writer, in.when.time_since_epoch().count());
468 }
469
470 static void decode_argument(Message::Reader& reader, com::ubuntu::location::Update<T>& in)
471 {
472 Codec<T>::decode_argument(reader, in.value);
473 in.when = com::ubuntu::location::Clock::Timestamp(com::ubuntu::location::Clock::Duration(reader.pop_int64()));
474 }
475 };
476 }
477 }
478
479 #endif // LOCATION_SERVICE_COM_UBUNTU_LOCATION_CODEC_H_
altitude.h
com::ubuntu::location::Provider::Features
Features
Enumerates the known features that can be supported by providers.
Definition: provider.h:54
com::ubuntu::location::Provider::Requirements
Requirements
Enumerates the requirements of a provider implementation.
Definition: provider.h:65
com::ubuntu::location::wgs84::Coordinate
Definition: coordinate.h:43
com::ubuntu::location::wgs84::Coordinate::value
Quantity value
Definition: coordinate.h:64
criteria.h
heading.h
latitude.h
longitude.h
com::ubuntu::location::connectivity::State
State
Enumerates all known system connectivity states.
Definition: manager.h:40
com::ubuntu::location::service::State
State
State enumerates the known states of the service.
Definition: state.h:27
com::ubuntu::location::units::Quantity
boost::units::quantity< Unit, double > Quantity
Definition: units.h:53
com::ubuntu::location::Optional
boost::optional< T > Optional
Definition: optional.h:30
com::ubuntu::location::WifiAndCellIdReportingState
WifiAndCellIdReportingState
Definition: wifi_and_cell_reporting_state.h:30
com
Definition: accuracy.h:24
core::dbus
Definition: codec.h:41
core
Definition: codec.h:39
position.h
provider.h
space_vehicle.h
state.h
com::ubuntu::location::Clock::Timestamp
std::chrono::high_resolution_clock::time_point Timestamp
Timestamp type of the location service clock.
Definition: clock.h:45
com::ubuntu::location::Clock::Duration
std::chrono::high_resolution_clock::duration Duration
Duration type of the location service clock.
Definition: clock.h:40
com::ubuntu::location::Criteria::Accuracy::horizontal
units::Quantity< units::Length > horizontal
The client requires measurements of at least this horizontal accuracy.
Definition: criteria.h:53
com::ubuntu::location::Criteria::Accuracy::heading
Optional< units::Quantity< units::PlaneAngle > > heading
The client requires measurements of at least this heading accuracy.
Definition: criteria.h:56
com::ubuntu::location::Criteria::Accuracy::velocity
Optional< units::Quantity< units::Velocity > > velocity
The client requires measurements of at least this velocity accuracy.
Definition: criteria.h:55
com::ubuntu::location::Criteria::Accuracy::vertical
Optional< units::Quantity< units::Length > > vertical
The client requires measurements of at least this vertical accuracy.
Definition: criteria.h:54
com::ubuntu::location::Criteria::Requires::position
bool position
The client needs position measurements.
Definition: criteria.h:45
com::ubuntu::location::Criteria::Requires::heading
bool heading
The client needs heading measurements.
Definition: criteria.h:48
com::ubuntu::location::Criteria::Requires::velocity
bool velocity
The client needs velocity measurments.
Definition: criteria.h:47
com::ubuntu::location::Criteria::Requires::altitude
bool altitude
The client needs altitude measurements.
Definition: criteria.h:46
com::ubuntu::location::Criteria
Summarizes criteria of a client session with respect to functionality and accuracy for position,...
Definition: criteria.h:35
com::ubuntu::location::Criteria::accuracy
struct com::ubuntu::location::Criteria::Accuracy accuracy
com::ubuntu::location::Criteria::requires
struct com::ubuntu::location::Criteria::Requires requires
com::ubuntu::location::Position::Accuracy::vertical
Optional< Vertical > vertical
Definition: position.h:47
com::ubuntu::location::Position::Accuracy::Vertical
units::Quantity< units::Length > Vertical
Definition: position.h:44
com::ubuntu::location::Position::Accuracy::Horizontal
units::Quantity< units::Length > Horizontal
Definition: position.h:43
com::ubuntu::location::Position::Accuracy::horizontal
Optional< Horizontal > horizontal
Definition: position.h:46
com::ubuntu::location::Position
The Position struct models a position in the wgs84 coordinate system.
Definition: position.h:40
com::ubuntu::location::Position::longitude
wgs84::Longitude longitude
Definition: position.h:60
com::ubuntu::location::Position::altitude
Optional< wgs84::Altitude > altitude
Definition: position.h:61
com::ubuntu::location::Position::latitude
wgs84::Latitude latitude
Definition: position.h:59
com::ubuntu::location::Position::accuracy
Accuracy accuracy
Definition: position.h:62
com::ubuntu::location::SpaceVehicle::Key
Uniquely identifies a space vehicle, given its type and its id.
Definition: space_vehicle.h:53
com::ubuntu::location::SpaceVehicle::Key::type
Type type
The positioning system this vehicle belongs to.
Definition: space_vehicle.h:54
com::ubuntu::location::SpaceVehicle::Key::id
Id id
Unique id of the space vehicle.
Definition: space_vehicle.h:55
com::ubuntu::location::SpaceVehicle
A space-vehicle as visible to providers.
Definition: space_vehicle.h:34
com::ubuntu::location::SpaceVehicle::key
Key key
Unique key identifying an instance.
Definition: space_vehicle.h:86
com::ubuntu::location::SpaceVehicle::has_ephimeris_data
bool has_ephimeris_data
Ephimeris data is available for this vehicle.
Definition: space_vehicle.h:89
com::ubuntu::location::SpaceVehicle::snr
float snr
Signal to noise ratio;.
Definition: space_vehicle.h:87
com::ubuntu::location::SpaceVehicle::used_in_fix
bool used_in_fix
This vehicle has been used to obtain a fix.
Definition: space_vehicle.h:90
com::ubuntu::location::SpaceVehicle::azimuth
units::Quantity< units::PlaneAngle > azimuth
Azimuth of SV.
Definition: space_vehicle.h:91
com::ubuntu::location::SpaceVehicle::elevation
units::Quantity< units::PlaneAngle > elevation
Elevation of SV.
Definition: space_vehicle.h:92
com::ubuntu::location::SpaceVehicle::Type
Type
Enumerates all known space-vehicle types.
Definition: space_vehicle.h:40
com::ubuntu::location::SpaceVehicle::has_almanac_data
bool has_almanac_data
Almanac data available for this vehicle.
Definition: space_vehicle.h:88
com::ubuntu::location::Update
Templated class that wraps a value and timestamp.
Definition: update.h:37
com::ubuntu::location::Update::when
Clock::Timestamp when
Definition: update.h:73
com::ubuntu::location::Update::value
T value
Definition: update.h:70
core::dbus::Codec< com::ubuntu::location::Criteria >::VerticalAccuracy
com::ubuntu::location::units::Quantity< com::ubuntu::location::units::Length > VerticalAccuracy
Definition: codec.h:360
core::dbus::Codec< com::ubuntu::location::Criteria >::VelocityAccuracy
com::ubuntu::location::units::Quantity< com::ubuntu::location::units::Velocity > VelocityAccuracy
Definition: codec.h:361
core::dbus::Codec< com::ubuntu::location::Criteria >::HorizontalAccuracy
com::ubuntu::location::units::Quantity< com::ubuntu::location::units::Length > HorizontalAccuracy
Definition: codec.h:359
core::dbus::Codec< com::ubuntu::location::Criteria >::decode_argument
static void decode_argument(Message::Reader &reader, com::ubuntu::location::Criteria &in)
Definition: codec.h:377
core::dbus::Codec< com::ubuntu::location::Criteria >::encode_argument
static void encode_argument(Message::Writer &writer, const com::ubuntu::location::Criteria &in)
Definition: codec.h:364
core::dbus::Codec< com::ubuntu::location::Criteria >::HeadingAccuracy
com::ubuntu::location::units::Quantity< com::ubuntu::location::units::PlaneAngle > HeadingAccuracy
Definition: codec.h:362
core::dbus::Codec< com::ubuntu::location::Optional< T > >::decode_argument
static void decode_argument(Message::Reader &reader, com::ubuntu::location::Optional< T > &in)
Definition: codec.h:122
core::dbus::Codec< com::ubuntu::location::Optional< T > >::encode_argument
static void encode_argument(Message::Writer &writer, const com::ubuntu::location::Optional< T > &in)
Definition: codec.h:114
core::dbus::Codec< com::ubuntu::location::Position >::HorizontalAccuracy
com::ubuntu::location::Position::Accuracy::Horizontal HorizontalAccuracy
Definition: codec.h:171
core::dbus::Codec< com::ubuntu::location::Position >::VerticalAccuracy
com::ubuntu::location::Position::Accuracy::Vertical VerticalAccuracy
Definition: codec.h:172
core::dbus::Codec< com::ubuntu::location::Position >::encode_argument
static void encode_argument(Message::Writer &writer, const com::ubuntu::location::Position &in)
Definition: codec.h:174
core::dbus::Codec< com::ubuntu::location::Position >::decode_argument
static void decode_argument(Message::Reader &reader, com::ubuntu::location::Position &in)
Definition: codec.h:184
core::dbus::Codec< com::ubuntu::location::Provider::Features >::decode_argument
static void decode_argument(Message::Reader &reader, com::ubuntu::location::Provider::Features &in)
Definition: codec.h:399
core::dbus::Codec< com::ubuntu::location::Provider::Features >::encode_argument
static void encode_argument(Message::Writer &writer, const com::ubuntu::location::Provider::Features &in)
Definition: codec.h:394
core::dbus::Codec< com::ubuntu::location::Provider::Requirements >::decode_argument
static void decode_argument(Message::Reader &reader, com::ubuntu::location::Provider::Requirements &in)
Definition: codec.h:413
core::dbus::Codec< com::ubuntu::location::Provider::Requirements >::encode_argument
static void encode_argument(Message::Writer &writer, const com::ubuntu::location::Provider::Requirements &in)
Definition: codec.h:408
core::dbus::Codec< com::ubuntu::location::SpaceVehicle >::encode_argument
static void encode_argument(Message::Writer &writer, const com::ubuntu::location::SpaceVehicle &in)
Definition: codec.h:274
core::dbus::Codec< com::ubuntu::location::SpaceVehicle >::decode_argument
static void decode_argument(Message::Reader &reader, com::ubuntu::location::SpaceVehicle &in)
Definition: codec.h:289
core::dbus::Codec< com::ubuntu::location::SpaceVehicle::Key >::decode_argument
static void decode_argument(Message::Reader &reader, com::ubuntu::location::SpaceVehicle::Key &in)
Definition: codec.h:264
core::dbus::Codec< com::ubuntu::location::SpaceVehicle::Key >::encode_argument
static void encode_argument(Message::Writer &writer, const com::ubuntu::location::SpaceVehicle::Key &in)
Definition: codec.h:258
core::dbus::Codec< com::ubuntu::location::Update< T > >::decode_argument
static void decode_argument(Message::Reader &reader, com::ubuntu::location::Update< T > &in)
Definition: codec.h:470
core::dbus::Codec< com::ubuntu::location::Update< T > >::encode_argument
static void encode_argument(Message::Writer &writer, const com::ubuntu::location::Update< T > &in)
Definition: codec.h:464
core::dbus::Codec< com::ubuntu::location::WifiAndCellIdReportingState >::encode_argument
static void encode_argument(Message::Writer &writer, const com::ubuntu::location::WifiAndCellIdReportingState &in)
Definition: codec.h:422
core::dbus::Codec< com::ubuntu::location::WifiAndCellIdReportingState >::decode_argument
static void decode_argument(Message::Reader &reader, com::ubuntu::location::WifiAndCellIdReportingState &in)
Definition: codec.h:427
core::dbus::Codec< com::ubuntu::location::service::State >::decode_argument
static void decode_argument(Message::Reader &reader, com::ubuntu::location::service::State &in)
Definition: codec.h:78
core::dbus::Codec< com::ubuntu::location::service::State >::encode_argument
static void encode_argument(Message::Writer &writer, const com::ubuntu::location::service::State &in)
Definition: codec.h:72
core::dbus::Codec< com::ubuntu::location::units::Quantity< T > >::decode_argument
static void decode_argument(Message::Reader &reader, com::ubuntu::location::units::Quantity< T > &in)
Definition: codec.h:146
core::dbus::Codec< com::ubuntu::location::units::Quantity< T > >::encode_argument
static void encode_argument(Message::Writer &writer, const com::ubuntu::location::units::Quantity< T > &in)
Definition: codec.h:141
core::dbus::Codec< com::ubuntu::location::wgs84::Coordinate< T, U > >::decode_argument
static void decode_argument(Message::Reader &reader, com::ubuntu::location::wgs84::Coordinate< T, U > &in)
Definition: codec.h:162
core::dbus::Codec< com::ubuntu::location::wgs84::Coordinate< T, U > >::encode_argument
static void encode_argument(Message::Writer &writer, const com::ubuntu::location::wgs84::Coordinate< T, U > &in)
Definition: codec.h:157
core::dbus::Codec< std::map< com::ubuntu::location::SpaceVehicle::Key, com::ubuntu::location::SpaceVehicle > >::encode_argument
static void encode_argument(Message::Writer &writer, const std::map< com::ubuntu::location::SpaceVehicle::Key, com::ubuntu::location::SpaceVehicle > &arg)
Definition: codec.h:331
core::dbus::Codec< std::map< com::ubuntu::location::SpaceVehicle::Key, com::ubuntu::location::SpaceVehicle > >::decode_argument
static void decode_argument(Message::Reader &reader, std::map< com::ubuntu::location::SpaceVehicle::Key, com::ubuntu::location::SpaceVehicle > &out)
Definition: codec.h:344
core::dbus::helper::TypeMapper< com::ubuntu::location::SpaceVehicle >::type_value
constexpr static ArgumentType type_value()
Definition: codec.h:225
core::dbus::helper::TypeMapper< com::ubuntu::location::SpaceVehicle >::signature
static std::string signature()
Definition: codec.h:238
core::dbus::helper::TypeMapper< com::ubuntu::location::SpaceVehicle >::requires_signature
constexpr static bool requires_signature()
Definition: codec.h:233
core::dbus::helper::TypeMapper< com::ubuntu::location::SpaceVehicle >::is_basic_type
constexpr static bool is_basic_type()
Definition: codec.h:229
core::dbus::helper::TypeMapper< com::ubuntu::location::SpaceVehicle::Key >::signature
static std::string signature()
Definition: codec.h:214
core::dbus::helper::TypeMapper< com::ubuntu::location::SpaceVehicle::Key >::is_basic_type
constexpr static bool is_basic_type()
Definition: codec.h:205
core::dbus::helper::TypeMapper< com::ubuntu::location::SpaceVehicle::Key >::requires_signature
constexpr static bool requires_signature()
Definition: codec.h:209
core::dbus::helper::TypeMapper< com::ubuntu::location::SpaceVehicle::Key >::type_value
constexpr static ArgumentType type_value()
Definition: codec.h:201
core::dbus::helper::TypeMapper< com::ubuntu::location::Update< T > >::signature
static std::string signature()
Definition: codec.h:451
core::dbus::helper::TypeMapper< com::ubuntu::location::Update< T > >::is_basic_type
constexpr static bool is_basic_type()
Definition: codec.h:442
core::dbus::helper::TypeMapper< com::ubuntu::location::Update< T > >::type_value
constexpr static ArgumentType type_value()
Definition: codec.h:438
core::dbus::helper::TypeMapper< com::ubuntu::location::Update< T > >::requires_signature
constexpr static bool requires_signature()
Definition: codec.h:446
core::dbus::helper::TypeMapper< com::ubuntu::location::service::State >::requires_signature
constexpr static bool requires_signature()
Definition: codec.h:56
core::dbus::helper::TypeMapper< com::ubuntu::location::service::State >::is_basic_type
constexpr static bool is_basic_type()
Definition: codec.h:52
core::dbus::helper::TypeMapper< com::ubuntu::location::service::State >::signature
static std::string signature()
Definition: codec.h:61
core::dbus::helper::TypeMapper< com::ubuntu::location::service::State >::type_value
constexpr static ArgumentType type_value()
Definition: codec.h:47
core::dbus::helper::TypeMapper< com::ubuntu::location::units::Quantity< T > >::is_basic_type
constexpr static bool is_basic_type()
Definition: codec.h:94
core::dbus::helper::TypeMapper< com::ubuntu::location::units::Quantity< T > >::requires_signature
constexpr static bool requires_signature()
Definition: codec.h:98
core::dbus::helper::TypeMapper< com::ubuntu::location::units::Quantity< T > >::signature
static std::string signature()
Definition: codec.h:103
core::dbus::helper::TypeMapper< com::ubuntu::location::units::Quantity< T > >::type_value
constexpr static ArgumentType type_value()
Definition: codec.h:89
core::dbus::helper::TypeMapper< std::map< com::ubuntu::location::SpaceVehicle::Key, com::ubuntu::location::SpaceVehicle > >::is_basic_type
constexpr static bool is_basic_type()
Definition: codec.h:312
core::dbus::helper::TypeMapper< std::map< com::ubuntu::location::SpaceVehicle::Key, com::ubuntu::location::SpaceVehicle > >::type_value
constexpr static ArgumentType type_value()
Definition: codec.h:308
core::dbus::helper::TypeMapper< std::map< com::ubuntu::location::SpaceVehicle::Key, com::ubuntu::location::SpaceVehicle > >::requires_signature
constexpr static bool requires_signature()
Definition: codec.h:316
core::dbus::helper::TypeMapper< std::map< com::ubuntu::location::SpaceVehicle::Key, com::ubuntu::location::SpaceVehicle > >::signature
static std::string signature()
Definition: codec.h:321
units.h
update.h
velocity.h