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:
authorYuri Gorshenin <y@maps.me>2017-06-19 15:25:00 +0300
committerYuri Gorshenin <mipt.vi002@gmail.com>2017-07-05 16:41:38 +0300
commit2abc1da6f13ef3c3e875dfc9f218b8274a732cba (patch)
treec1eebc489b26d7174371f0e200e8a74369aa4e9e /ugc/api.hpp
parent790817bde6afe92bcd4fe867622474514ee490b0 (diff)
[ugc] UGC Api prototype.
Diffstat (limited to 'ugc/api.hpp')
-rw-r--r--ugc/api.hpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/ugc/api.hpp b/ugc/api.hpp
new file mode 100644
index 0000000000..8b13853eae
--- /dev/null
+++ b/ugc/api.hpp
@@ -0,0 +1,30 @@
+#pragma once
+
+#include "base/worker_thread.hpp"
+
+#include <functional>
+
+class Index;
+struct FeatureID;
+
+namespace ugc
+{
+class Api
+{
+public:
+ // TODO (@y, @mgsergio): replace void() by void(UGC const &).
+ using Callback = std::function<void()>;
+
+ explicit Api(Index const & index);
+
+ void GetStaticUGC(FeatureID const & id, Callback callback);
+ void GetDynamicUGC(FeatureID const & id, Callback callback);
+
+private:
+ void GetStaticUGCImpl(FeatureID const & id, Callback callback);
+ void GetDynamicUGCImpl(FeatureID const & id, Callback callback);
+
+ Index const & m_index;
+ base::WorkerThread m_thread;
+};
+} // namespace ugc