MapsIndoors iOS SDK V3
Loading...
Searching...
No Matches
MPDataSetCacheManager.h
Go to the documentation of this file.
1//
2// MPDataSetManager.h
3// MapsIndoors
4//
5// Created by Daniel Nielsen on 31/01/2020.
6// Copyright © 2020 MapsPeople A/S. All rights reserved.
7//
8
9#import <Foundation/Foundation.h>
10#import "MPDataSetEnums.h"
11
12
13NS_ASSUME_NONNULL_BEGIN
14
15
16@class MPDataSetCache;
18@protocol MPDataSetCacheManagerDelegate;
19@protocol MPDataSetCacheManagerSizeDelegate;
20
21
25@interface MPDataSetCacheManager : NSObject
26
30+ (instancetype) new NS_UNAVAILABLE;
31
35- (instancetype) init NS_UNAVAILABLE;
36
40@property (nonatomic, nullable, weak) id<MPDataSetCacheManagerDelegate> delegate;
41
45@property (nonatomic, strong, readonly) NSArray<MPDataSetCache*>* managedDataSets;
46
50@property (nonatomic, readonly) BOOL isSyncing;
51
58- (nullable MPDataSetCache*) addDataSet:(NSString*)dataSetId;
59
67- (nullable MPDataSetCache*) addDataSet:(NSString*)dataSetId cachingScope: (MPDataSetCacheScope) scope;
68
76- (BOOL) removeDataSet:(MPDataSetCache*)dataSet;
77
83- (nullable MPDataSetCache*) dataSetWithId:(NSString*)dataSetId;
84
90
98- (BOOL) setCachingStrategy:(MPDataSetCachingStrategy) strategy cacheItem: (MPDataSetCacheItem*)cacheItem;
99
107- (BOOL) setCachingScope:(MPDataSetCacheScope)scope cacheItem: (MPDataSetCacheItem*)cacheItem;
108
112- (void) synchronizeContent;
113
119- (void) synchronizeCacheItems:(NSArray<MPDataSetCacheItem*>*)items;
120
124- (void) cancelSynchronization;
125
130- (void) cancelSynchronizationOfCacheItems:(NSArray<MPDataSetCacheItem*>*)items;
131
132
138- (void) fetchSyncSizesForDataSetCaches:(NSArray<MPDataSetCache*>*)dataSetCaches delegate:(id<MPDataSetCacheManagerSizeDelegate>)delegate;
139
140@end
141
142NS_ASSUME_NONNULL_END
MPDataSetCachingStrategy
Definition MPDataSetEnums.h:39
MPDataSetCacheScope
Definition MPDataSetEnums.h:15
Definition MPDataSetCache.h:20
Definition MPDataSetCacheItem.h:20
Definition MPDataSetCacheManager.h:26
nullable MPDataSetCache * dataSetForCurrentMapsIndoorsAPIKey()
id< MPDataSetCacheManagerDelegate > delegate
Definition MPDataSetCacheManager.h:40
NSArray< MPDataSetCache * > * managedDataSets
Definition MPDataSetCacheManager.h:45
instancetype NS_UNAVAILABLE()
BOOL isSyncing
Definition MPDataSetCacheManager.h:50