diff options
author | Yuri Gorshenin <y@maps.me> | 2017-06-19 15:25:00 +0300 |
---|---|---|
committer | Yuri Gorshenin <mipt.vi002@gmail.com> | 2017-07-05 16:41:38 +0300 |
commit | 2abc1da6f13ef3c3e875dfc9f218b8274a732cba (patch) | |
tree | c1eebc489b26d7174371f0e200e8a74369aa4e9e /ugc/api.hpp | |
parent | 790817bde6afe92bcd4fe867622474514ee490b0 (diff) |
[ugc] UGC Api prototype.
Diffstat (limited to 'ugc/api.hpp')
-rw-r--r-- | ugc/api.hpp | 30 |
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 |