diff --git a/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloadTransitMapAlert.mm b/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloadTransitMapAlert.mm index 984bf643d4..f226a078f5 100644 --- a/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloadTransitMapAlert.mm +++ b/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloadTransitMapAlert.mm @@ -97,7 +97,7 @@ CGFloat const kAnimationDuration = .05; MWMDownloadTransitMapAlert * alert = [[[NSBundle mainBundle] loadNibNamed:kDownloadTransitMapAlertNibName owner:nil options:nil] firstObject]; NSMutableArray * titles = [@[] mutableCopy]; - storage::TMwmSize totalSize = 0; + TMwmSize totalSize = 0; auto const & s = GetFramework().Storage(); for (auto const & countryId : countries) { @@ -143,7 +143,7 @@ CGFloat const kAnimationDuration = .05; } } -- (void)processCountry:(TCountryId const &)countryId progress:(TLocalAndRemoteSize const &)progress +- (void)processCountry:(TCountryId const &)countryId progress:(MapFilesDownloader::TProgress const &)progress { auto const overallProgress = GetFramework().Storage().GetOverallProgress(m_countries); CGFloat const progressValue = static_cast(overallProgress.first) / overallProgress.second; diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/Search/MWMSearchManager.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/Search/MWMSearchManager.mm index a10bda9d6a..2e691c6d48 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/Search/MWMSearchManager.mm +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/Search/MWMSearchManager.mm @@ -216,7 +216,7 @@ extern NSString * const kSearchStateKey = @"SearchStateKey"; } } -- (void)processCountry:(storage::TCountryId const &)countryId progress:(storage::TLocalAndRemoteSize const &)progress +- (void)processCountry:(storage::TCountryId const &)countryId progress:(storage::MapFilesDownloader::TProgress const &)progress { [self.downloadController downloadProgress:static_cast(progress.first) / progress.second]; } diff --git a/iphone/Maps/Classes/Framework/MWMFrameworkListener.mm b/iphone/Maps/Classes/Framework/MWMFrameworkListener.mm index 1684fe74ed..665f2c3e80 100644 --- a/iphone/Maps/Classes/Framework/MWMFrameworkListener.mm +++ b/iphone/Maps/Classes/Framework/MWMFrameworkListener.mm @@ -133,7 +133,7 @@ void loopWrappers(TObservers * observers, TLoopBlock block) for (TStorageObserver observer in observers) [observer processCountryEvent:countryId]; }, - [observers](TCountryId const & countryId, TLocalAndRemoteSize const & progress) + [observers](TCountryId const & countryId, MapFilesDownloader::TProgress const & progress) { for (TStorageObserver observer in observers) { diff --git a/iphone/Maps/Classes/Framework/MWMFrameworkObservers.h b/iphone/Maps/Classes/Framework/MWMFrameworkObservers.h index 4133d07f90..8a28e284a8 100644 --- a/iphone/Maps/Classes/Framework/MWMFrameworkObservers.h +++ b/iphone/Maps/Classes/Framework/MWMFrameworkObservers.h @@ -1,6 +1,6 @@ #include "routing/router.hpp" #include "storage/index.hpp" -#include "storage/storage_defines.hpp" +#include "storage/storage.hpp" using namespace storage; @@ -25,7 +25,7 @@ using namespace storage; @optional -- (void)processCountry:(TCountryId const &)countryId progress:(TLocalAndRemoteSize const &)progress; +- (void)processCountry:(TCountryId const &)countryId progress:(MapFilesDownloader::TProgress const &)progress; @end diff --git a/iphone/Maps/Classes/MapDownloader/Cells/MWMMapDownloaderTableViewCell.mm b/iphone/Maps/Classes/MapDownloader/Cells/MWMMapDownloaderTableViewCell.mm index f3d5813f30..587bd43e79 100644 --- a/iphone/Maps/Classes/MapDownloader/Cells/MWMMapDownloaderTableViewCell.mm +++ b/iphone/Maps/Classes/MapDownloader/Cells/MWMMapDownloaderTableViewCell.mm @@ -133,7 +133,7 @@ namespace [self config:nodeAttrs]; } -- (void)processCountry:(TCountryId const &)countryId progress:(TLocalAndRemoteSize const &)progress +- (void)processCountry:(TCountryId const &)countryId progress:(MapFilesDownloader::TProgress const &)progress { if (countryId != m_countryId) return; diff --git a/iphone/Maps/Classes/MapDownloader/MWMBaseMapDownloaderViewController.mm b/iphone/Maps/Classes/MapDownloader/MWMBaseMapDownloaderViewController.mm index 03ec287ea6..0804ea8e77 100644 --- a/iphone/Maps/Classes/MapDownloader/MWMBaseMapDownloaderViewController.mm +++ b/iphone/Maps/Classes/MapDownloader/MWMBaseMapDownloaderViewController.mm @@ -155,7 +155,7 @@ using namespace storage; } } -- (void)processCountry:(TCountryId const &)countryId progress:(TLocalAndRemoteSize const &)progress +- (void)processCountry:(TCountryId const &)countryId progress:(MapFilesDownloader::TProgress const &)progress { for (MWMMapDownloaderTableViewCell * cell in self.tableView.visibleCells) [cell processCountry:countryId progress:progress]; @@ -328,7 +328,7 @@ using namespace storage; s.GetQueuedChildren(parentCountryId, queuedChildren); if (!queuedChildren.empty()) { - storage::TMwmSize queuedSize = 0; + TMwmSize queuedSize = 0; for (TCountryId const & countryId : queuedChildren) { NodeAttrs nodeAttrs; diff --git a/iphone/Maps/Classes/Widgets/MWMMapDownloadDialog.mm b/iphone/Maps/Classes/Widgets/MWMMapDownloadDialog.mm index 007ce1b2cb..05212aab14 100644 --- a/iphone/Maps/Classes/Widgets/MWMMapDownloadDialog.mm +++ b/iphone/Maps/Classes/Widgets/MWMMapDownloadDialog.mm @@ -265,7 +265,7 @@ using namespace storage; [self removeFromSuperview]; } -- (void)processCountry:(TCountryId const &)countryId progress:(TLocalAndRemoteSize const &)progress +- (void)processCountry:(TCountryId const &)countryId progress:(MapFilesDownloader::TProgress const &)progress { if (self.superview && m_countryId == countryId) [self showDownloading:static_cast(progress.first) / progress.second]; diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj index c0f58b9504..f508d85568 100644 --- a/iphone/Maps/Maps.xcodeproj/project.pbxproj +++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj @@ -309,7 +309,6 @@ 5605022F1B6211E100169CAD /* sound-strings in Resources */ = {isa = PBXBuildFile; fileRef = 5605022E1B6211E100169CAD /* sound-strings */; }; 560634F21B78806100F3D670 /* MWMTextToSpeech.mm in Sources */ = {isa = PBXBuildFile; fileRef = 560634F11B78806100F3D670 /* MWMTextToSpeech.mm */; }; 56C74C391C74A3BC00B71B9F /* MWMInputEmailValidator.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34ABA62F1C2D58F300FE1BEC /* MWMInputEmailValidator.mm */; }; - 56CA8DAE1C9C25B000949C04 /* MWMAddPlaceNavigationBar.xib in Resources */ = {isa = PBXBuildFile; fileRef = F653CE171C71F62400A453F1 /* MWMAddPlaceNavigationBar.xib */; }; 56D545631C74A41900E3719C /* Framework.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34479C751C60C6130065D261 /* Framework.cpp */; }; 671182E11C7F0DD400CB8177 /* countries_obsolete.txt in Resources */ = {isa = PBXBuildFile; fileRef = 671182DE1C7F0DD400CB8177 /* countries_obsolete.txt */; }; 671182E21C7F0DD400CB8177 /* packed_polygons_obsolete.bin in Resources */ = {isa = PBXBuildFile; fileRef = 671182DF1C7F0DD400CB8177 /* packed_polygons_obsolete.bin */; }; @@ -3136,7 +3135,7 @@ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0720; + LastUpgradeCheck = 0730; ORGANIZATIONNAME = MapsWithMe; TargetAttributes = { 1D6058900D05DD3D006BFB54 = { @@ -3369,7 +3368,6 @@ 6741A94A1BF340DE002C974C /* resources-6plus_clear in Resources */, 6741A94B1BF340DE002C974C /* unicode_blocks.txt in Resources */, 6741A94C1BF340DE002C974C /* fonts_blacklist.txt in Resources */, - 56CA8DAE1C9C25B000949C04 /* MWMAddPlaceNavigationBar.xib in Resources */, 3401CD721C3C0C420028C6F8 /* MWMEditorNameTableViewCell.xib in Resources */, 34CCFDE31C22A2EF00F28959 /* MWMPlacePageOpeningHoursCell.xib in Resources */, 6741A94D1BF340DE002C974C /* resources-xxhdpi_clear in Resources */, diff --git a/iphone/Maps/Maps.xcodeproj/xcshareddata/xcschemes/ci.MAPS.ME.xcscheme b/iphone/Maps/Maps.xcodeproj/xcshareddata/xcschemes/ci.MAPS.ME.xcscheme index ba0c33778e..982ba95339 100644 --- a/iphone/Maps/Maps.xcodeproj/xcshareddata/xcschemes/ci.MAPS.ME.xcscheme +++ b/iphone/Maps/Maps.xcodeproj/xcshareddata/xcschemes/ci.MAPS.ME.xcscheme @@ -1,6 +1,6 @@ ; + bool HasOptions(MapOptions mask, MapOptions options); MapOptions IntersectOptions(MapOptions lhs, MapOptions rhs); diff --git a/platform/country_file.cpp b/platform/country_file.cpp index f2de49ba75..f013ba92b8 100644 --- a/platform/country_file.cpp +++ b/platform/country_file.cpp @@ -35,13 +35,13 @@ CountryFile::CountryFile(string const & name) : m_name(name), m_mapSize(0), m_ro string const & CountryFile::GetName() const { return m_name; } -void CountryFile::SetRemoteSizes(uint32_t mapSize, uint32_t routingSize) +void CountryFile::SetRemoteSizes(TMwmSize mapSize, TMwmSize routingSize) { m_mapSize = mapSize; m_routingSize = routingSize; } -uint32_t CountryFile::GetRemoteSize(MapOptions filesMask) const +TMwmSize CountryFile::GetRemoteSize(MapOptions filesMask) const { uint32_t size = 0; if (HasOptions(filesMask, MapOptions::Map)) diff --git a/platform/country_file.hpp b/platform/country_file.hpp index eb5c622cff..06a3286155 100644 --- a/platform/country_file.hpp +++ b/platform/country_file.hpp @@ -20,8 +20,8 @@ public: string const & GetName() const; /// \note Remote size is size of mwm in bytes. This mwm contains routing and map sections. - void SetRemoteSizes(uint32_t mapSize, uint32_t routingSize); - uint32_t GetRemoteSize(MapOptions file) const; + void SetRemoteSizes(TMwmSize mapSize, TMwmSize routingSize); + TMwmSize GetRemoteSize(MapOptions file) const; inline bool operator<(const CountryFile & rhs) const { return m_name < rhs.m_name; } inline bool operator==(const CountryFile & rhs) const { return m_name == rhs.m_name; } @@ -32,8 +32,8 @@ private: /// Base name (without any extensions) of the file. Same as id of country/region. string m_name; - uint32_t m_mapSize; - uint32_t m_routingSize; + TMwmSize m_mapSize; + TMwmSize m_routingSize; }; /// \returns This method returns file name with extension. For example Abkhazia.mwm or diff --git a/qt/search_panel.cpp b/qt/search_panel.cpp index 2077a5b0ad..347c65c853 100644 --- a/qt/search_panel.cpp +++ b/qt/search_panel.cpp @@ -227,7 +227,7 @@ bool SearchPanel::TryMigrate(QString const & str) } }; - auto const progressChanged = [](storage::TCountryId const & id, storage::TLocalAndRemoteSize const & sz) + auto const progressChanged = [](storage::TCountryId const & id, storage::MapFilesDownloader::TProgress const & sz) { LOG(LINFO, (id, "downloading progress:", sz)); }; diff --git a/storage/storage.hpp b/storage/storage.hpp index 3f811be1a8..5f8c8bfe37 100644 --- a/storage/storage.hpp +++ b/storage/storage.hpp @@ -136,7 +136,7 @@ public: using TUpdateCallback = function; using TDeleteCallback = function; using TChangeCountryFunction = function; - using TProgressFunction = function; + using TProgressFunction = function; using TQueue = list; private: diff --git a/storage/storage_defines.hpp b/storage/storage_defines.hpp index 619ac120af..ee2c6361d6 100644 --- a/storage/storage_defines.hpp +++ b/storage/storage_defines.hpp @@ -63,10 +63,6 @@ namespace storage }; string DebugPrint(StatusAndError statusAndError); - using TMwmCounter = uint32_t; - using TMwmSize = uint64_t; - using TLocalAndRemoteSize = pair; - StatusAndError ParseStatus(Status innerStatus); } // namespace storage diff --git a/xcode/MapsMe/MapsMe.xcodeproj/project.pbxproj b/xcode/MapsMe/MapsMe.xcodeproj/project.pbxproj index 052410853b..1706e80a6a 100644 --- a/xcode/MapsMe/MapsMe.xcodeproj/project.pbxproj +++ b/xcode/MapsMe/MapsMe.xcodeproj/project.pbxproj @@ -13,7 +13,6 @@ 45B5B58D1CA4219C00D93E36 /* place_page_dialog.hpp in Sources */ = {isa = PBXBuildFile; fileRef = 45B5B5891CA4216B00D93E36 /* place_page_dialog.hpp */; }; 45B5B58F1CA4222300D93E36 /* countries-strings in Resources */ = {isa = PBXBuildFile; fileRef = 45B5B58E1CA4222300D93E36 /* countries-strings */; }; 45B5B5911CA4226800D93E36 /* editor.config in Resources */ = {isa = PBXBuildFile; fileRef = 45B5B5901CA4226800D93E36 /* editor.config */; }; - 45B5B5921CA4227F00D93E36 /* editor.config in CopyFiles */ = {isa = PBXBuildFile; fileRef = 45B5B5901CA4226800D93E36 /* editor.config */; }; 45B5B5981CA422C800D93E36 /* resources-6plus_clear in Resources */ = {isa = PBXBuildFile; fileRef = 45B5B5931CA422C800D93E36 /* resources-6plus_clear */; }; 45B5B5991CA422C800D93E36 /* resources-hdpi_clear in Resources */ = {isa = PBXBuildFile; fileRef = 45B5B5941CA422C800D93E36 /* resources-hdpi_clear */; }; 45B5B59A1CA422C800D93E36 /* resources-ldpi_clear in Resources */ = {isa = PBXBuildFile; fileRef = 45B5B5951CA422C800D93E36 /* resources-ldpi_clear */; }; @@ -161,7 +160,6 @@ dstPath = ""; dstSubfolderSpec = 7; files = ( - 45B5B5921CA4227F00D93E36 /* editor.config in CopyFiles */, 67A461A71C2172C400B18739 /* 07_roboto_medium.ttf in CopyFiles */, 6714E5E41BD13F67008AB603 /* drules_proto_clear.bin in CopyFiles */, 6714E5E61BD13F67008AB603 /* drules_proto_dark.bin in CopyFiles */, diff --git a/xcode/storage/storage.xcodeproj/project.pbxproj b/xcode/storage/storage.xcodeproj/project.pbxproj index c5e29a31cc..499474f640 100644 --- a/xcode/storage/storage.xcodeproj/project.pbxproj +++ b/xcode/storage/storage.xcodeproj/project.pbxproj @@ -62,6 +62,7 @@ 678CB3801CA5884800E9118D /* editor.config in Resources */ = {isa = PBXBuildFile; fileRef = 678CB37F1CA5881B00E9118D /* editor.config */; }; 67AF4A001BC579DD0048B1ED /* country_info_getter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 67AF49FE1BC579DD0048B1ED /* country_info_getter.cpp */; }; 67AF4A011BC579DD0048B1ED /* country_info_getter.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 67AF49FF1BC579DD0048B1ED /* country_info_getter.hpp */; }; + 67CCFA911CBD1628007FC750 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 67CCFA901CBD1628007FC750 /* Images.xcassets */; }; 67F90B6F1C6A277900CD458E /* testingmain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 67247FD71C60BA9900EDE56A /* testingmain.cpp */; }; 67F90B701C6A277900CD458E /* country_info_getter_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 67247FC31C60BA8A00EDE56A /* country_info_getter_test.cpp */; }; 67F90B711C6A277900CD458E /* fake_map_files_downloader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 67247FC41C60BA8A00EDE56A /* fake_map_files_downloader.cpp */; }; @@ -253,6 +254,7 @@ 678CB37F1CA5881B00E9118D /* editor.config */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = editor.config; sourceTree = ""; }; 67AF49FE1BC579DD0048B1ED /* country_info_getter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = country_info_getter.cpp; sourceTree = ""; }; 67AF49FF1BC579DD0048B1ED /* country_info_getter.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = country_info_getter.hpp; sourceTree = ""; }; + 67CCFA901CBD1628007FC750 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = ../../iphone/Maps/Images.xcassets; sourceTree = SOURCE_ROOT; }; 67F90B581C6A275B00CD458E /* storage_tests.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = storage_tests.app; sourceTree = BUILT_PRODUCTS_DIR; }; 67F90BB61C6A29F700CD458E /* storage_integration_tests.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = storage_integration_tests.app; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -363,6 +365,7 @@ 67247FCA1C60BA8A00EDE56A /* task_runner.hpp */, 67247FCB1C60BA8A00EDE56A /* test_map_files_downloader.cpp */, 67247FCC1C60BA8A00EDE56A /* test_map_files_downloader.hpp */, + 67CCFA901CBD1628007FC750 /* Images.xcassets */, ); name = storage_tests; path = ../../storage/storage_tests; @@ -639,6 +642,7 @@ 671182D31C7F0D5D00CB8177 /* WorldCoasts_obsolete.mwm in Resources */, 678338DF1C72460700FD6263 /* drules_proto_legacy.bin in Resources */, 678338E01C72460700FD6263 /* drules_proto-bw.bin in Resources */, + 67CCFA911CBD1628007FC750 /* Images.xcassets in Resources */, 678338DC1C72460700FD6263 /* countries.txt in Resources */, 678338D91C72460700FD6263 /* categories.txt in Resources */, 678338E21C72460700FD6263 /* patterns.txt in Resources */, @@ -849,7 +853,7 @@ 67F90B6D1C6A275B00CD458E /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DEBUG_INFORMATION_FORMAT = dwarf; GCC_NO_COMMON_BLOCKS = YES; @@ -858,7 +862,6 @@ "$(inherited)", ); INFOPLIST_FILE = "$(OMIM_ROOT)/iphone/Maps/MAPSME.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "mail.ru.storage-tests"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -871,13 +874,12 @@ 67F90B6E1C6A275B00CD458E /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_PREPROCESSOR_DEFINITIONS = "OMIM_UNIT_TEST_WITH_QT_EVENT_LOOP=1"; INFOPLIST_FILE = "$(OMIM_ROOT)/iphone/Maps/MAPSME.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "mail.ru.storage-tests"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -891,7 +893,7 @@ 67F90BCB1C6A29F700CD458E /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DEBUG_INFORMATION_FORMAT = dwarf; GCC_NO_COMMON_BLOCKS = YES; @@ -912,7 +914,7 @@ 67F90BCC1C6A29F700CD458E /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; GCC_NO_COMMON_BLOCKS = YES;