Loading...
Searching...
No Matches
<NCLocationListListener> Protocol Reference

Class provides a callback to be invoked when LocationListManager class downloads list of available locations from server. More...

#include <com/navigine/idl/objc/NCLocationListListener.h>

Inherits <NSObject>.

Instance Methods

(void) - onLocationListLoaded:
 Called when new list of available locations has been downloaded from server.
 
(void) - onLocationListFailed:
 Called if unable to download list of available locations.
 

Detailed Description

Class provides a callback to be invoked when LocationListManager class downloads list of available locations from server.

Referenced from LocationListManager.

Note
The callback is invoked in the UI thread.

Definition at line 20 of file NCLocationListListener.h.

Method Documentation

◆ onLocationListFailed:

- (void) onLocationListFailed: (nullable NSError *) error

Called if unable to download list of available locations.

Parameters
errorhandled error.

Swift code snippet:

func onLocationListFailed(_ error: Error) {
print("Location list failed")
example?.demonstrateErrorHandling(error)
}

Objective C code snippet:

- (void)onLocationListFailed:(NSError *)error {
NSLog(@"Location list failed");
[self.example demonstrateErrorHandling:error];
}

◆ onLocationListLoaded:

- (void) onLocationListLoaded: (nonnull NSDictionary< NSNumber *, NCLocationInfo * > *) locationInfos

Called when new list of available locations has been downloaded from server.

Parameters
locationInfosdictionary of LocationInfos which represents location id to location general info.

Swift code snippet:

func onLocationListLoaded(_ locationInfos: [Int: LocationInfo]) {
print("Location list loaded")
example?.demonstrateLocationList(locationInfos)
}

Objective C code snippet:

- (void)onLocationListLoaded:(NSDictionary<NSNumber *, NCLocationInfo *> *)locationInfos {
NSLog(@"Location list loaded");
[self.example demonstrateLocationList:locationInfos];
}

The documentation for this protocol was generated from the following file: