BuildingControllerInterface
public protocol BuildingControllerInterface
Manager to provide information and services related to Buildings
-
Get building information for the buildingId provided
Declaration
Swift
func getInfo(buildingId: Int) -> BuildingInfo?
Parameters
buildingId
An identifier for the building
-
Get cached building data matching the buildingId provided
Declaration
Swift
func getCached(buildingId: Int) -> MNBuildingData?
Parameters
buildingId
An identifier for the building
-
Returns cached building data if available, otherwise downloads and returns that data.
Declaration
Swift
func getBuildingData(buildingId: Int, callback: (MNBuildingData?) -> Void)
Parameters
buildingId
buildingId of the given building
callback
BuildingData cached or downloaded. May be
null
if download fails -
Download and cache building data
Declaration
Swift
func downloadAndCache(buildingId: Int, callback: (MNBuildingData?) -> Void)
Parameters
buildingId
An identifier for the building
callback
Callback method with the downloaded and cached data from when function completes