18 #ifndef LOCATION_SERVICE_COM_UBUNTU_LOCATION_UPDATE_H_
19 #define LOCATION_SERVICE_COM_UBUNTU_LOCATION_UPDATE_H_
21 #include "com/ubuntu/location/clock.h"
34 Update(
const T& value = T{},
const Clock::Timestamp& when = Clock::Timestamp{}) : value{value}, when{when}
38 bool operator==(
const Update<T>& rhs)
const
40 return value == rhs.value && when == rhs.when;
43 bool operator!=(
const Update<T>& rhs)
const
45 return !(value == rhs.value && when == rhs.when);
49 Clock::Timestamp when;
53 inline std::ostream& operator<<(std::ostream& out, const Update<T>& update)
55 out <<
"Update(" << update.value <<
", " << update.when.time_since_epoch().count() <<
")";
63 #endif // LOCATION_SERVICE_COM_UBUNTU_LOCATION_UPDATE_H_