[ios] return the ElevationInfo for the current track recording

Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
This commit is contained in:
Kiryl Kaveryn
2025-01-09 14:19:42 +04:00
committed by Yannik Bloscheck
parent 48353637ac
commit 5d0b8f1c04
2 changed files with 9 additions and 0 deletions

View File

@@ -5,6 +5,7 @@
@class MWMMapSearchResult; @class MWMMapSearchResult;
@class TrackInfo; @class TrackInfo;
@class ElevationProfileData;
typedef NS_ENUM(NSUInteger, MWMZoomMode) { MWMZoomModeIn = 0, MWMZoomModeOut }; typedef NS_ENUM(NSUInteger, MWMZoomMode) { MWMZoomModeIn = 0, MWMZoomModeOut };
@@ -28,6 +29,9 @@ typedef void (^TrackRecordingUpdatedHandler)(TrackInfo * _Nonnull trackInfo);
+ (void)saveTrackRecordingWithName:(nullable NSString *)name; + (void)saveTrackRecordingWithName:(nullable NSString *)name;
+ (BOOL)isTrackRecordingEnabled; + (BOOL)isTrackRecordingEnabled;
+ (BOOL)isTrackRecordingEmpty; + (BOOL)isTrackRecordingEmpty;
/// Returns current track recording elevation info.
/// If the track recording is not in progress, returns empty ElevationProfileData.
+ (ElevationProfileData * _Nonnull)trackRecordingElevationInfo;
@end @end

View File

@@ -3,6 +3,7 @@
#import "ProductsConfiguration+Core.h" #import "ProductsConfiguration+Core.h"
#import "Product+Core.h" #import "Product+Core.h"
#import "TrackInfo+Core.h" #import "TrackInfo+Core.h"
#import "ElevationProfileData+Core.h"
#include "Framework.h" #include "Framework.h"
@@ -250,6 +251,10 @@ static Framework::ProductsPopupCloseReason ConvertProductPopupCloseReasonToCore(
return GetFramework().IsTrackRecordingEmpty(); return GetFramework().IsTrackRecordingEmpty();
} }
+ (ElevationProfileData * _Nonnull)trackRecordingElevationInfo {
return [[ElevationProfileData alloc] initWithElevationInfo:GetFramework().GetTrackRecordingCurrentElevationInfo()];
}
// MARK: - ProductsManager // MARK: - ProductsManager
+ (nullable ProductsConfiguration *)getProductsConfiguration { + (nullable ProductsConfiguration *)getProductsConfiguration {