Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2016-12-01 13:41:57 +0300
committerVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2016-12-03 11:54:57 +0300
commitc5c9eb5c06984fafaac9dc58828b6427ad0500d3 (patch)
tree187d024b5a29644caf22ed1a74198a026e9eae5e /traffic
parent47ded79083994e11c2a606f8bd188ef72ec9d35b (diff)
Review fixes.
Diffstat (limited to 'traffic')
-rw-r--r--traffic/traffic_info.hpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/traffic/traffic_info.hpp b/traffic/traffic_info.hpp
index a07e4d8cc4..99d5a8d974 100644
--- a/traffic/traffic_info.hpp
+++ b/traffic/traffic_info.hpp
@@ -6,6 +6,7 @@
#include "std/cstdint.hpp"
#include "std/map.hpp"
+#include "std/shared_ptr.hpp"
#include "std/vector.hpp"
namespace traffic
@@ -67,6 +68,8 @@ public:
TrafficInfo(MwmSet::MwmId const & mwmId, int64_t currentDataVersion);
+ void SetColoringForTesting(Coloring & coloring) { m_coloring = coloring; }
+
// Fetches the latest traffic data from the server and updates the coloring.
// Construct the url by passing an MwmId.
// *NOTE* This method must not be called on the UI thread.
@@ -90,4 +93,22 @@ private:
Availability m_availability = Availability::Unknown;
int64_t m_currentDataVersion = 0;
};
+
+class RoutingObserver
+{
+public:
+ virtual ~RoutingObserver() = default;
+
+ virtual void OnTrafficEnabled(bool enable) = 0;
+ virtual void OnTrafficInfoAdded(traffic::TrafficInfo const & info) = 0;
+ virtual void OnTrafficInfoRemoved(MwmSet::MwmId const & mwmId) = 0;
+};
+
+class TrafficInfoGetter
+{
+public:
+ virtual ~TrafficInfoGetter() = default;
+
+ virtual shared_ptr<traffic::TrafficInfo>GetTrafficInfo(MwmSet::MwmId const & mwmId) const = 0;
+};
} // namespace traffic