Inherits from NSObject
Declared in MSFKDeviceScanner.h
MSFKDeviceScanner.m

Overview

A class that (asynchronously) scans for available devices and sends corresponding notifications to its listener(s). This class is implicitly a singleton; since it does a network scan, it isn’t useful to have more than one instance of it in use.

@ingroup Discovery

Properties

devices

The array of discovered devices.

@property (nonatomic, copy) NSArray *devices

Discussion

The array of discovered devices.

Declared In

MSFKDeviceScanner.h

hasDiscoveredDevices

Whether the current/latest scan has discovered any devices.

@property (nonatomic) BOOL hasDiscoveredDevices

Discussion

Whether the current/latest scan has discovered any devices.

Declared In

MSFKDeviceScanner.h

scanning

Whether a scan is currently in progress.

@property (nonatomic) BOOL scanning

Discussion

Whether a scan is currently in progress.

Declared In

MSFKDeviceScanner.h

Instance Methods

addListener:

Adds a listener for receiving notifications.

- (void)addListener:(id<MSFKDeviceScannerListener>)listener

Parameters

listener

The listener to add.

Discussion

Adds a listener for receiving notifications.

Declared In

MSFKDeviceScanner.h

init

Designated initializer. Constructs a new MSFKDeviceScanner.

- (id)init

Discussion

Designated initializer. Constructs a new MSFKDeviceScanner.

Declared In

MSFKDeviceScanner.h

removeListener:

Removes a listener that was previously added with @link #addListener: @endlink.

- (void)removeListener:(id<MSFKDeviceScannerListener>)listener

Parameters

listener

The listener to remove.

Discussion

Removes a listener that was previously added with @link #addListener: @endlink.

Declared In

MSFKDeviceScanner.h

startScan

Starts a new device scan. The scan must eventually be stopped by calling @link #stopScan @endlink.

- (void)startScan

Discussion

Starts a new device scan. The scan must eventually be stopped by calling @link #stopScan @endlink.

Declared In

MSFKDeviceScanner.h

stopScan

Stops any in-progress device scan. This method must be called at some point after @link #startScan @endlink was called and before this object is released by its owner.

- (void)stopScan

Discussion

Stops any in-progress device scan. This method must be called at some point after @link #startScan @endlink was called and before this object is released by its owner.

Declared In

MSFKDeviceScanner.h