MapsIndoors iOS SDK V3
Loading...
Searching...
No Matches
Instance Methods | Class Methods | Properties | List of all members
MPDataSetCacheManager Class Reference

#include <MPDataSetCacheManager.h>

Inheritance diagram for MPDataSetCacheManager:

Instance Methods

(instancetype) - NS_UNAVAILABLE
 
(nullable MPDataSetCache *) - addDataSet:
 
(nullable MPDataSetCache *) - addDataSet:cachingScope:
 
(BOOL) - removeDataSet:
 
(nullable MPDataSetCache *) - dataSetWithId:
 
(nullable MPDataSetCache *) - dataSetForCurrentMapsIndoorsAPIKey
 
(BOOL) - setCachingStrategy:cacheItem:
 
(BOOL) - setCachingScope:cacheItem:
 
(void) - synchronizeContent
 
(void) - synchronizeCacheItems:
 
(void) - cancelSynchronization
 
(void) - cancelSynchronizationOfCacheItems:
 
(void) - fetchSyncSizesForDataSetCaches:delegate:
 

Class Methods

(instancetype) + NS_UNAVAILABLE
 

Properties

id< MPDataSetCacheManagerDelegatedelegate
 
NSArray< MPDataSetCache * > * managedDataSets
 
BOOL isSyncing
 

Detailed Description

Data set manager class.

Method Documentation

◆ addDataSet:

- (nullable MPDataSetCache *) addDataSet: (NSString *) dataSetId

Add data set to the list of managed data sets.

Parameters
dataSetIdData set id of the data set that should be added.
Returns
The cache object if data set was successfully added as a result of this call, if the dataset already existed this method returns nil.

◆ addDataSet:cachingScope:

- (nullable MPDataSetCache *) addDataSet: (NSString *) dataSetId
cachingScope: (MPDataSetCacheScope) scope 

Add data set to the list of managed data sets.

Parameters
dataSetIdData set id of the data set that should be added.
scopeCaching scope for this dataset.
Returns
The cache object if data set was successfully added as a result of this call, if the dataset already existed this method returns nil.

◆ cancelSynchronization

- (void) cancelSynchronization

Cancel any running synchronization of data sets.

◆ cancelSynchronizationOfCacheItems:

- (void) cancelSynchronizationOfCacheItems: (NSArray< MPDataSetCacheItem * > *) items

Cancel synchronization of data for the given cache items.

Parameters
itemsCacheItems to cancel sync of.

◆ dataSetForCurrentMapsIndoorsAPIKey

- (nullable MPDataSetCache *) dataSetForCurrentMapsIndoorsAPIKey

Get the dataset-object for the current MapsIndoors API key / solution

Returns
MPDataSetCache*

◆ dataSetWithId:

- (nullable MPDataSetCache *) dataSetWithId: (NSString *) dataSetId

Get the dataset-object for the given dataSetId.

Parameters
dataSetIddataSetId to find corresponding MPDataSetCache object for.
Returns
MPDataSetCache* or nil

◆ fetchSyncSizesForDataSetCaches:delegate:

- (void) fetchSyncSizesForDataSetCaches: (NSArray< MPDataSetCache * > *) dataSetCaches
delegate: (id< MPDataSetCacheManagerSizeDelegate >) delegate 

Determine synchronization sizes for the given set of MPDataSetCaches.

Parameters
dataSetCachesMPDataSetCaches to determine sync sizes for.
delegatecallback/progress receiver

◆ NS_UNAVAILABLE [1/2]

+ (instancetype) NS_UNAVAILABLE

Construction not allowed - use MapsIndoors.dataSetCacheManager to access the cache manager.

◆ NS_UNAVAILABLE [2/2]

- (instancetype) NS_UNAVAILABLE

Construction not allowed - use MapsIndoors.dataSetCacheManager to access the cache manager.

◆ removeDataSet:

- (BOOL) removeDataSet: (MPDataSetCache *) dataSet

Remove data set from the list of managed data sets. This will remove any cached content for that data set as well. If the dataset to be removed is the current MapsIndoors dataset, it is not removed at this time, but scheduled for deletion at a later time.

Parameters
dataSetData set that should be removed.
Returns
YES if data set was successfully removed, else NO.

◆ setCachingScope:cacheItem:

- (BOOL) setCachingScope: (MPDataSetCacheScope) scope
cacheItem: (MPDataSetCacheItem *) cacheItem 

Set a caching scope for given cache item.

Parameters
scopeCaching scope.
cacheItemCache item.
Returns
YES if strategy is changed for this item, else NO.

◆ setCachingStrategy:cacheItem:

- (BOOL) setCachingStrategy: (MPDataSetCachingStrategy) strategy
cacheItem: (MPDataSetCacheItem *) cacheItem 

Set a caching strategy for given cache item.

Parameters
strategyCaching strategy.
cacheItemCache item.
Returns
YES if strategy is set for this item, else NO.

◆ synchronizeCacheItems:

- (void) synchronizeCacheItems: (NSArray< MPDataSetCacheItem * > *) items

Fetch and update content for given cache items. The delegate object receives the completion event.

Parameters
itemsThe cache items to perform a synchronisation for.

◆ synchronizeContent

- (void) synchronizeContent

Fetch and update content for all managed data sets. The delegate object receives the completion event.

Property Documentation

◆ delegate

- (id<MPDataSetCacheManagerDelegate>) delegate
readwritenonatomicweak

Data set manager delegate.

◆ isSyncing

- (BOOL) isSyncing
readnonatomicassign

Synchronization state of manager. If true, the manager is currently synchronising.

◆ managedDataSets

- (NSArray<MPDataSetCache*>*) managedDataSets
readnonatomicstrong

List of managed data sets.