diff options
author | Ilya Grechuhin <i.grechuhin@gmail.com> | 2016-07-21 18:01:52 +0300 |
---|---|---|
committer | Ilya Grechuhin <i.grechuhin@gmail.com> | 2016-07-21 18:01:52 +0300 |
commit | 43291c8d7cbcd1f81bc2f34371b7a228441ed16a (patch) | |
tree | 896fc9d4c5af6d11106e39e9e585592519665531 /platform | |
parent | 154c2171e60886ad67be6875f7755e23bd966c21 (diff) |
[ios] Added PushWoosh callback to Platform.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/platform.hpp | 5 | ||||
-rw-r--r-- | platform/platform_ios.mm | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/platform/platform.hpp b/platform/platform.hpp index b654c3e75c..0e1c09f405 100644 --- a/platform/platform.hpp +++ b/platform/platform.hpp @@ -54,6 +54,7 @@ public: }; using TFilesWithType = vector<pair<string, EFileType>>; + using TPushWooshSenderFn = function<void(string const & tag, vector<string> const & values)>; protected: /// Usually read-only directory for application resources @@ -86,6 +87,9 @@ protected: /// Returns last system call error as EError. static EError ErrnoToError(); + /// Callback fucntion for setting PushWoosh tags. + TPushWooshSenderFn m_pushwooshSender; + public: Platform(); @@ -224,6 +228,7 @@ public: void SetupMeasurementSystem() const; + void SetPushWooshSender(TPushWooshSenderFn const & fn) { m_pushwooshSender = fn; } void SendPushWooshTag(string const & tag); void SendPushWooshTag(string const & tag, string const & value); void SendPushWooshTag(string const & tag, vector<string> const & values); diff --git a/platform/platform_ios.mm b/platform/platform_ios.mm index babe36072a..acd3c96b06 100644 --- a/platform/platform_ios.mm +++ b/platform/platform_ios.mm @@ -283,7 +283,8 @@ void Platform::SendPushWooshTag(string const & tag, string const & value) void Platform::SendPushWooshTag(string const & tag, vector<string> const & values) { - //TODO: implement + if (m_pushwooshSender) + m_pushwooshSender(tag, values); } //////////////////////////////////////////////////////////////////////// |