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:
Diffstat (limited to 'storage/diff_scheme_checker.hpp')
-rw-r--r--storage/diff_scheme_checker.hpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/storage/diff_scheme_checker.hpp b/storage/diff_scheme_checker.hpp
new file mode 100644
index 0000000000..c338604769
--- /dev/null
+++ b/storage/diff_scheme_checker.hpp
@@ -0,0 +1,27 @@
+#pragma once
+
+#include "storage/diff_types.hpp"
+
+#include <cstdint>
+#include <functional>
+#include <string>
+#include <unordered_map>
+
+namespace diff_scheme
+{
+class Checker final
+{
+public:
+ using NameVersionMap = std::unordered_map<std::string, uint64_t>;
+
+ struct LocalMapsInfo final
+ {
+ uint64_t m_currentDataVersion = 0;
+ NameVersionMap m_localMaps;
+ };
+
+ using Callback = std::function<void(NameFileMap const & diffs)>;
+
+ static void Check(LocalMapsInfo const & info, Callback const & fn);
+};
+} // namespace diff_scheme