18 #ifndef LOCATION_SERVICE_COM_UBUNTU_LOCATIONNEWER_OR_MORE_ACCURATE_UPDATE_SELECTOR_H
19 #define LOCATION_SERVICE_COM_UBUNTU_LOCATIONNEWER_OR_MORE_ACCURATE_UPDATE_SELECTOR_H
32 typedef std::shared_ptr<NewerOrMoreAccurateUpdateSelector>
Ptr;
38 static const std::chrono::seconds cutoff(11);
41 if (newer.source == older.source) {
46 if (newer.value.when > older.value.when + cutoff) {
51 if (!older.value.value.accuracy.horizontal)
53 if (!newer.value.value.accuracy.horizontal)
55 if (newer.value.value.accuracy.horizontal < older.value.value.accuracy.horizontal)
std::shared_ptr< NewerOrMoreAccurateUpdateSelector > Ptr
WithSource< Update< Position > > select(const WithSource< Update< Position >> &older, const WithSource< Update< Position >> &newer) override
Templated class that wraps a value and timestamp.