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:
authorvng <viktor.govako@gmail.com>2012-06-19 07:01:24 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:39:58 +0300
commit886aaae06d20427c376fc0e9c5eac469330b62bf (patch)
tree265ac08316e27079ead6ab67fb5e6d7207d8c166 /storage
parentbd3dea56ebdf516bdc2da1efbc3bacbecb0f4d35 (diff)
[search] Remove index generation call from downloader. It doesn't work on android.
Diffstat (limited to 'storage')
-rw-r--r--storage/storage.cpp54
-rw-r--r--storage/storage.hpp2
2 files changed, 32 insertions, 24 deletions
diff --git a/storage/storage.cpp b/storage/storage.cpp
index e4de24d0b2..6c8f8fe98b 100644
--- a/storage/storage.cpp
+++ b/storage/storage.cpp
@@ -3,7 +3,7 @@
#include "../defines.hpp"
#include "../indexer/data_factory.hpp"
-#include "../indexer/search_index_builder.hpp"
+//#include "../indexer/search_index_builder.hpp"
#include "../platform/platform.hpp"
#include "../platform/servers_list.hpp"
@@ -37,28 +37,30 @@ namespace storage
return out.str();
}
-// static string ErrorString(DownloadResultT res)
-// {
-// switch (res)
-// {
-// case EHttpDownloadCantCreateFile:
-// return "File can't be created. Probably, you have no disk space available or "
-// "using read-only file system.";
-// case EHttpDownloadFailed:
-// return "Download failed due to missing or poor connection. "
-// "Please, try again later.";
-// case EHttpDownloadFileIsLocked:
-// return "Download can't be finished because file is locked. "
-// "Please, try again after restarting application.";
-// case EHttpDownloadFileNotFound:
-// return "Requested file is absent on the server.";
-// case EHttpDownloadNoConnectionAvailable:
-// return "No network connection is available.";
-// case EHttpDownloadOk:
-// return "Download finished successfully.";
-// }
-// return "Unknown error";
-// }
+ /*
+ static string ErrorString(DownloadResultT res)
+ {
+ switch (res)
+ {
+ case EHttpDownloadCantCreateFile:
+ return "File can't be created. Probably, you have no disk space available or "
+ "using read-only file system.";
+ case EHttpDownloadFailed:
+ return "Download failed due to missing or poor connection. "
+ "Please, try again later.";
+ case EHttpDownloadFileIsLocked:
+ return "Download can't be finished because file is locked. "
+ "Please, try again after restarting application.";
+ case EHttpDownloadFileNotFound:
+ return "Requested file is absent on the server.";
+ case EHttpDownloadNoConnectionAvailable:
+ return "No network connection is available.";
+ case EHttpDownloadOk:
+ return "Download finished successfully.";
+ }
+ return "Unknown error";
+ }
+ */
Storage::Storage() : m_currentSlotId(0)
{
@@ -384,6 +386,9 @@ namespace storage
if (i != string::npos)
file = file.substr(i+1);
+ /// @todo By the way - this code os obsolete.
+ /// It doesn't supported properly in android now (because of Platform::RunOnGuiThread).
+ /*
Platform & pl = GetPlatform();
if (pl.IsFeatureSupported("search"))
{
@@ -392,6 +397,7 @@ namespace storage
pl.RunAsync(bind(&Storage::GenerateSearchIndex, this, index, file));
}
else
+ */
{
// Or simply activate downloaded map
UpdateAfterSearchIndex(index, file);
@@ -402,6 +408,7 @@ namespace storage
DownloadNextCountryFromQueue();
}
+ /*
void Storage::GenerateSearchIndex(TIndex const & index, string const & fName)
{
if (indexer::BuildSearchIndexFromDatFile(fName))
@@ -413,6 +420,7 @@ namespace storage
LOG(LERROR, ("Can't build search index for", fName));
}
}
+ */
void Storage::UpdateAfterSearchIndex(TIndex const & index, string const & fName)
{
diff --git a/storage/storage.hpp b/storage/storage.hpp
index 9f0aaecbc3..e5ed5c05b6 100644
--- a/storage/storage.hpp
+++ b/storage/storage.hpp
@@ -122,7 +122,7 @@ namespace storage
void DownloadNextCountryFromQueue();
Country const & CountryByIndex(TIndex const & index) const;
- void GenerateSearchIndex(TIndex const & index, string const & fName);
+ //void GenerateSearchIndex(TIndex const & index, string const & fName);
void UpdateAfterSearchIndex(TIndex const & index, string const & fName);
/// @TODO temporarily made public for Android, refactor