#pragma once #import "FGPrefix.h" // Khoá model của một địa điểm đã lưu / mục lịch sử. extern NSString *const FGItemName; extern NSString *const FGItemAddress; extern NSString *const FGItemLatitude; extern NSString *const FGItemLongitude; extern NSString *const FGItemAltitude; extern NSString *const FGItemDate; /// Lưu trữ tập trung (NSUserDefaults). Mọi thay đổi đều phát /// FGStoreDidChangeNotification để UI/engine cập nhật lại. @interface FGStore : NSObject // --- Trạng thái giả lập --- + (BOOL)isEnabled; + (void)setEnabled:(BOOL)enabled; + (BOOL)hasCoordinate; + (CLLocationCoordinate2D)coordinate; + (void)setCoordinate:(CLLocationCoordinate2D)coordinate; /// Ghi toạ độ không phát thông báo (dùng khi mô phỏng tuyến chạy liên tục). + (void)setCoordinate:(CLLocationCoordinate2D)coordinate silent:(BOOL)silent; /// Chế độ toạ độ xuất ra: 0 = WGS84 (mặc định), 1 = GCJ-02. + (NSInteger)coordMode; + (void)setCoordMode:(NSInteger)mode; /// Kiểu bản đồ: 0 = tiêu chuẩn, 1 = vệ tinh, 2 = lai. + (NSInteger)mapStyle; + (void)setMapStyle:(NSInteger)style; /// Tốc độ mô phỏng (km/h). + (double)walkSpeed; + (void)setWalkSpeed:(double)kmh; + (double)driveSpeed; + (void)setDriveSpeed:(double)kmh; + (BOOL)isAltitudeEnabled; + (void)setAltitudeEnabled:(BOOL)enabled; + (double)altitude; + (void)setAltitude:(double)altitude; + (BOOL)pushUpdatesEnabled; + (void)setPushUpdatesEnabled:(BOOL)enabled; // --- Giao diện --- + (BOOL)floatingButtonEnabled; + (void)setFloatingButtonEnabled:(BOOL)enabled; + (CGPoint)floatingButtonPosition; // toạ độ chuẩn hoá 0..1 + (void)setFloatingButtonPosition:(CGPoint)position; // --- Google Maps --- + (NSString *)googleAPIKey; + (void)setGoogleAPIKey:(NSString *)key; // --- Danh sách --- + (NSArray *)savedLocations; + (void)addSavedLocation:(NSDictionary *)item; + (void)removeSavedLocationAtIndex:(NSUInteger)index; + (void)updateSavedLocationAtIndex:(NSUInteger)index name:(NSString *)name; + (void)clearSavedLocations; + (NSArray *)historyItems; + (void)addHistoryItem:(NSDictionary *)item; + (void)removeHistoryItemAtIndex:(NSUInteger)index; + (void)clearHistory; + (void)resetEverything; @end