diff options
author | Добрый Ээх <bukharaev@gmail.com> | 2016-10-07 17:17:03 +0300 |
---|---|---|
committer | Добрый Ээх <bukharaev@gmail.com> | 2016-10-13 21:25:22 +0300 |
commit | a65d86ebcf216bd0480c7f576d0eff60df44a160 (patch) | |
tree | 0ba4b8802b4d60179190523d327b2246966fc1b8 /tracking/reporter.hpp | |
parent | a8067e8826da51278fa78ce652b80cec2848536b (diff) |
gps tracking reporter
Diffstat (limited to 'tracking/reporter.hpp')
-rw-r--r-- | tracking/reporter.hpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/tracking/reporter.hpp b/tracking/reporter.hpp new file mode 100644 index 0000000000..13b5ffea7a --- /dev/null +++ b/tracking/reporter.hpp @@ -0,0 +1,38 @@ +#pragma once + +#include "std/unique_ptr.hpp" + +namespace location +{ +class GpsInfo; +} + +namespace platform +{ +class Socket; +} + +namespace tracking +{ +class Reporter final +{ +public: + static size_t constexpr kPushDelayMs = 10000; + static const char kAllowKey[]; + + Reporter(unique_ptr<platform::Socket> socket, size_t pushDelayMs); + ~Reporter(); + void AddLocation(location::GpsInfo const & info); + + class Worker + { + public: + virtual void AddLocation(location::GpsInfo const & info) = 0; + virtual void Stop() = 0; + }; + +private: + Worker * m_worker; +}; + +} // namespace tracking |