3 #import <GoogleCast/GCKDefines.h> 5 #import <Foundation/Foundation.h> 9 GCK_ASSUME_NONNULL_BEGIN
11 GCK_EXTERN NSString *
const kGCKKeyHasDiscoveredDevices;
13 typedef NS_ENUM(NSInteger, GCKDiscoveryState) {
14 GCKDiscoveryStateStopped = 0,
15 GCKDiscoveryStateRunning = 1
18 @protocol GCKDiscoveryManagerListener;
70 @property(nonatomic, assign, readonly) NSUInteger
deviceCount;
82 - (void)addListener:(
id<GCKDiscoveryManagerListener>)listener;
89 - (void)removeListener:(
id<GCKDiscoveryManagerListener>)listener;
104 - (BOOL)isDiscoveryActiveForDeviceCategory:(NSString *)deviceCategory;
109 - (
GCKDevice *)deviceAtIndex:(NSUInteger)index;
117 - (
GCKDevice *GCK_NULLABLE_TYPE)deviceWithUniqueID:(NSString *)uniqueID;
133 - (void)findDeviceWithUniqueID:(NSString *)uniqueID
134 timeout:(NSTimeInterval)timeout
135 completion:(
void (^)(
GCKDevice *))completion;
151 @protocol GCKDiscoveryManagerListener <NSObject>
158 - (void)didStartDiscoveryForDeviceCategory:(NSString *)deviceCategory;
163 - (void)willUpdateDeviceList;
168 - (void)didUpdateDeviceList;
176 - (void)didInsertDevice:(
GCKDevice *)device atIndex:(NSUInteger)index;
184 - (void)didUpdateDevice:(
GCKDevice *)device atIndex:(NSUInteger)index;
193 - (void)didUpdateDevice:(
GCKDevice *)device
194 atIndex:(NSUInteger)index
195 andMoveToIndex:(NSUInteger)newIndex;
203 - (void)didRemoveDeviceAtIndex:(NSUInteger)index;
215 - (void)didRemoveDevice:(
GCKDevice *)device atIndex:(NSUInteger)index;
219 GCK_ASSUME_NONNULL_END
instancetype NS_UNAVAILABLE()
Default initializer is not available.
An object representing a receiver device.
Definition: GCKDevice.h:82
NSUInteger deviceCount
The number of devices that are currently discovered.
Definition: GCKDiscoveryManager.h:70
BOOL discoveryActive
A flag indicating whether discovery is active or not.
Definition: GCKDiscoveryManager.h:65
GCKDiscoveryState discoveryState
The current discovery state.
Definition: GCKDiscoveryManager.h:46
void cancelFindOperation()
Cancels any in-progress find operation started by findDeviceWithUniqueID:timeout:completion:.
void startDiscovery()
Starts the discovery process.
void stopDiscovery()
Stops the discovery process.
A class that manages the device discovery process.
Definition: GCKDiscoveryManager.h:41
BOOL passiveScan
A flag indicating whether discovery should employ a "passive" scan.
Definition: GCKDiscoveryManager.h:58
BOOL hasDiscoveredDevices
A flag indicating whether any devices have been discovered by any of the discovery providers managed ...
Definition: GCKDiscoveryManager.h:52