PropertyControllerInterface
public protocol PropertyControllerInterface
Manager to provide information and services related to Properties
-
Get property information for the propertyId provided
Declaration
Swift
func getInfo(propertyId: Int) -> PropertyInfo?
Parameters
propertyId
An identifier for the property
-
Get a hashmap of property infos available
Declaration
Swift
func getInfos() -> [Int : PropertyInfo]
Return Value
A hash of propertyId: PropertyInfo
-
Get a list of property infos available
Declaration
Swift
func getAll() -> [PropertyInfo]
Return Value
A hash of propertyId: PropertyInfo
-
Get a list of property ids available
Declaration
Swift
func getAllIds() -> [Int]
Return Value
An array of propertyIds matching propertyinfos
-
Download and cache property data
Declaration
Swift
func downloadAndCache(propertyId: Int, callback: (MNPropertyData?) -> Void)
Parameters
propertyId
An identifier for the property
callback
Callback method with the downloaded and cached data from when function completes
-
Get propertyIds of cached properties
Declaration
Swift
func getCachedIds() -> Set<Int>
Return Value
Unique set of propertyIds for cached items
-
Get cached property matching propertyId provided
Declaration
Swift
func getCached(propertyId: Int) -> MNPropertyData?
Parameters
propertyId
An identifier for the property
Return Value
Property data from cache for that propertyId
-
Get the number of cached properties
Declaration
Swift
func getNumCached() -> Int
Return Value
Number of properties currently being cached
-
Remove property data from the database.
Declaration
Swift
func delete(propertyId: Int, listener: PropertyActionCompleteListener)
Parameters
propertyId
The property Id for the property to remove.
listener
An observer to be notified when deletion is complete
-
Remove property data from the cache.
Declaration
Swift
func unload(propertyId: Int, listener: PropertyActionCompleteListener)
Parameters
propertyId
The property Id for the property to remove.
listener
An observer to be notified when deletion is complete
-
Start download of property map data.
Declaration
Swift
func startDownload(propertyId: Int, propertyDownloadListener listener: PropertyDownloadListener)
Parameters
propertyId
The property Id for the property to download.
listener
An observer to be notified of download progress
-
Get the current status of property download
Declaration
Swift
func getDownloadStatus(propertyId: Int) -> DownloadStatus
Parameters
propertyId
The property Id for the property to check the status of.
Return Value
The download status
-
Set property as selected
Declaration
Swift
func setSelected(propertyId: Int)
Parameters
propertyId
The property Id for the property to be marked as selected
Return Value
The download status
-
Set property as selected
Declaration
Swift
func getSelected() -> Int
Parameters
propertyId
The property Id for the property to be marked as selected
Return Value
The download status
-
Get the list of search entities for a property
Declaration
Swift
func getSearchEntities(propertyId: Int) -> [ISearchable]
Parameters
propertyId
The property Id for the property
Return Value
The list of search entities in property
-
Get entity for the property. It tries to fetch the entity at building level or at property level.
Declaration
Swift
func getEntity(propertyId: Int, buildingId: Int, entityId: Int) -> MNSearchEntity?
Parameters
propertyId
The property Id for the property
buildingId
The building Id for the building
entityId
The entity Id for the entity
Return Value
The entity in property
-
Call this function to perform search of an entity inside a property
Declaration
Swift
func findEntityByName(name: String, propertyId: Int) -> [ISearchable]
Parameters
name
The name of the entity to search for
propertyId
An identifier for the property
Return Value
A list of searchables matching the name
-
Call this function to fetch the list of categories for a property
Declaration
Swift
func getCategories(propertyId: Int, callback: @escaping ((PoiCategoriesResult?) -> Void))
Parameters
propertyId
An identifier for the property
Return Value
A list of categories under the property
-
Call this function to search for points of interest based on the filter provided
Declaration
Swift
func searchPOIs(filter: PoiFilter, propertyId: Int, completion: @escaping (([ISearchable]) -> Void))
Parameters
propertyId
An identifier for the property
filter
One or more filters to apply while searching for points of interest
completion
A closure to be called upon completion of the search with matching ISearchable objects
-
Call this function to add listener for the additional resources to be downloaded for property
Declaration
Swift
func addListener(listener: PropertyCompletionListener)
Parameters
listener
A listener object
-
Call this function to remove listener for the additional resources to be downloaded for property
Declaration
Swift
func removeListener(listener: PropertyCompletionListener)
Parameters
listener
A listener object
-
Adds a listener to be notified about property auto-download events.
Declaration
Swift
func addPropertyDownloadListener(listener: PropertyAutoDownloadListener)
Parameters
listener
An object conforming to the
PropertyAutoDownloadListener
protocol that will be notified of property auto-download activities. -
Removes a previously added listener that was notified about property auto-download events.
Declaration
Swift
func removePropertyDownloadListener(listener: PropertyAutoDownloadListener)
Parameters
listener
An object conforming to the
PropertyAutoDownloadListener
protocol that should no longer receive notifications about auto-downloads.