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
path: root/ugc
diff options
context:
space:
mode:
Diffstat (limited to 'ugc')
-rw-r--r--ugc/api.cpp4
-rw-r--r--ugc/api.hpp5
2 files changed, 5 insertions, 4 deletions
diff --git a/ugc/api.cpp b/ugc/api.cpp
index d6b42c4071..65f77af714 100644
--- a/ugc/api.cpp
+++ b/ugc/api.cpp
@@ -14,7 +14,7 @@ Api::Api(Index const & index) : m_storage(index), m_loader(index)
m_thread.Push([this] { m_storage.Load(); });
}
-void Api::GetUGC(FeatureID const & id, UGCCallback const & callback)
+void Api::GetUGC(FeatureID const & id, UGCCallbackUnsafe const & callback)
{
m_thread.Push([=] { GetUGCImpl(id, callback); });
}
@@ -44,7 +44,7 @@ void Api::SaveUGCOnDisk()
m_thread.Push([this] { SaveUGCOnDiskImpl(); });
}
-void Api::GetUGCImpl(FeatureID const & id, UGCCallback const & callback)
+void Api::GetUGCImpl(FeatureID const & id, UGCCallbackUnsafe const & callback)
{
CHECK(callback, ());
if (!id.IsValid())
diff --git a/ugc/api.hpp b/ugc/api.hpp
index b507ac1f95..9af3ef365a 100644
--- a/ugc/api.hpp
+++ b/ugc/api.hpp
@@ -19,12 +19,13 @@ class Api
{
public:
using UGCCallback = platform::SafeCallback<void(UGC const & ugc, UGCUpdate const & update)>;
+ using UGCCallbackUnsafe = std::function<void(UGC const & ugc, UGCUpdate const & update)>;
using UGCJsonToSendCallback = std::function<void(std::string && jsonStr)>;
using OnResultCallback = platform::SafeCallback<void(Storage::SettingResult const result)>;
explicit Api(Index const & index);
- void GetUGC(FeatureID const & id, UGCCallback const & callback);
+ void GetUGC(FeatureID const & id, UGCCallbackUnsafe const & callback);
void SetUGCUpdate(FeatureID const & id, UGCUpdate const & ugc,
OnResultCallback const & callback = nullptr);
void GetUGCToSend(UGCJsonToSendCallback const & callback);
@@ -32,7 +33,7 @@ public:
void SaveUGCOnDisk();
private:
- void GetUGCImpl(FeatureID const & id, UGCCallback const & callback);
+ void GetUGCImpl(FeatureID const & id, UGCCallbackUnsafe const & callback);
Storage::SettingResult SetUGCUpdateImpl(FeatureID const & id, UGCUpdate const & ugc);
void GetUGCToSendImpl(UGCJsonToSendCallback const & callback);
void SendingCompletedImpl();