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:
authorArsentiy Milchakov <milcars@mapswithme.com>2018-11-13 15:58:52 +0300
committerVlad Mihaylenko <vxmihaylenko@gmail.com>2018-11-13 16:19:17 +0300
commit703971ad1110e97b992289c8ada6c851acf6c35e (patch)
tree1a71aeaf2c613d413f0c83e86b33e16b4bd085cd /ugc/api.hpp
parent4fa50bb98d5c1f619442b730d42ed28f11a2c4a0 (diff)
[ugc] HasUGCForPlace method is added
Diffstat (limited to 'ugc/api.hpp')
-rw-r--r--ugc/api.hpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/ugc/api.hpp b/ugc/api.hpp
index b531be5943..e77bfc6e1c 100644
--- a/ugc/api.hpp
+++ b/ugc/api.hpp
@@ -6,6 +6,8 @@
#include "platform/safe_callback.hpp"
+#include "geometry/point2d.hpp"
+
#include "base/worker_thread.hpp"
#include <functional>
@@ -13,6 +15,11 @@
class DataSource;
struct FeatureID;
+namespace feature
+{
+class TypesHolder;
+}
+
namespace ugc
{
class Api
@@ -23,6 +30,7 @@ public:
using UGCJsonToSendCallback = std::function<void(std::string && jsonStr, size_t numberOfUnsynchronized)>;
using OnResultCallback = platform::SafeCallback<void(Storage::SettingResult const result)>;
using NumberOfUnsynchronizedCallback = std::function<void(size_t number)>;
+ using HasUGCForPlaceCallback = std::function<void(bool result)>;
Api(DataSource const & dataSource, NumberOfUnsynchronizedCallback const & callback);
@@ -30,6 +38,8 @@ public:
void SetUGCUpdate(FeatureID const & id, UGCUpdate const & ugc,
OnResultCallback const & callback = nullptr);
void GetUGCToSend(UGCJsonToSendCallback const & callback);
+ void HasUGCForPlace(feature::TypesHolder const & types, m2::PointD const & point,
+ HasUGCForPlaceCallback const & callback);
void SendingCompleted();
void SaveUGCOnDisk();
@@ -39,6 +49,8 @@ private:
void GetUGCImpl(FeatureID const & id, UGCCallbackUnsafe const & callback);
Storage::SettingResult SetUGCUpdateImpl(FeatureID const & id, UGCUpdate const & ugc);
void GetUGCToSendImpl(UGCJsonToSendCallback const & callback);
+ void HasUGCForPlaceImpl(uint32_t bestType, m2::PointD const & point,
+ HasUGCForPlaceCallback const & callback) const;
void SendingCompletedImpl();
void SaveUGCOnDiskImpl();