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:
authorAlex Zolotarev <deathbaba@gmail.com>2012-02-29 22:28:24 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:36:09 +0300
commitd58005340580086d42b6d4bd14480574f32db53b (patch)
treec47e60cc39def737e1c656cc729100325e1f366b /platform/platform.hpp
parent899a84a17e0f50431e22f5f91b3bb24b058e9c11 (diff)
Different metaservers for versions with and without search
Diffstat (limited to 'platform/platform.hpp')
-rw-r--r--platform/platform.hpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/platform/platform.hpp b/platform/platform.hpp
index 6991f2db8a..47ba81024f 100644
--- a/platform/platform.hpp
+++ b/platform/platform.hpp
@@ -9,6 +9,7 @@
#include "../std/utility.hpp"
#include "../std/function.hpp"
+#include "../defines.hpp"
DECLARE_EXCEPTION(FileAbsentException, RootException);
DECLARE_EXCEPTION(NotImplementedException, RootException);
@@ -128,9 +129,27 @@ public:
string UniqueClientId() const;
- /// @return true for "search" feature on full ios and desktop versions,
- /// and false for ios lite version
+ /// @return true for "search" feature if app needs search functionality
bool IsFeatureSupported(string const & feature) const;
+
+ /// @return url for clients to download maps
+ /// Different urls are returned for versions with and without search support
+ inline string MetaServerUrl() const
+ {
+ if (IsFeatureSupported("search"))
+ return "http://active.servers.url";
+ else
+ return "http://active.servers.url";
+ }
+
+ /// @return JSON-encoded list of urls if metaserver is unreachable
+ inline string DefaultUrlsJSON() const
+ {
+ if (IsFeatureSupported("search"))
+ return "[\"http://1st.default.server/\",\"http://2nd.default.server/\",\"http://3rd.default.server/\"]";
+ else
+ return "[\"http://1st.default.server/\",\"http://2nd.default.server/\",\"http://3rd.default.server/\"]";
+ }
};
extern "C" Platform & GetPlatform();