GCKDeviceProvider.h
1 // Copyright 2015 Google Inc.
2 
3 #import <GoogleCast/GCKDefines.h>
4 #import <GoogleCast/GCKDevice.h>
5 #import <GoogleCast/GCKSession.h>
6 #import <GoogleCast/GCKSessionOptions.h>
7 
8 #import <Foundation/Foundation.h>
9 
10 GCK_ASSUME_NONNULL_BEGIN
11 
21 GCK_EXPORT
22 @interface GCKDeviceProvider : NSObject
23 
27 @property(nonatomic, copy, readonly) NSString *deviceCategory;
28 
35 @property(nonatomic, assign, readwrite) BOOL passiveScan;
36 
38 @property(nonatomic, copy, readonly) NSArray<GCKDevice *> *devices;
39 
46 - (instancetype)initWithDeviceCategory:(NSString *)deviceCategory;
47 
58 - (void)startDiscovery;
59 
63 - (void)stopDiscovery;
64 
75 - (GCKSession *)createSessionForDevice:(GCKDevice *)device
76  sessionID:(NSString *GCK_NULLABLE_TYPE)sessionID
77  sessionOptions:(GCKSessionOptions *GCK_NULLABLE_TYPE)sessionOptions;
78 
87 - (GCKSession *)createSessionForDevice:(GCKDevice *)device
88  sessionID:(NSString *GCK_NULLABLE_TYPE)sessionID
89  GCK_DEPRECATED("Use createSessionForDevice:sessionID:sessionOptions:");
90 
91 @end
92 
93 GCK_ASSUME_NONNULL_END
An object representing a receiver device.
Definition: GCKDevice.h:82
An abstract base class representing a session with a receiver device.
Definition: GCKSession.h:30
void startDiscovery()
Starts a new discovery scan.
An abstract base class for performing device discovery and session construction.
Definition: GCKDeviceProvider.h:22
NSString * deviceCategory
A string that uniquely identifies the type of device that will be discovered by this provider...
Definition: GCKDeviceProvider.h:27
void stopDiscovery()
Stops the discovery scan.
BOOL passiveScan
Whether the scan should be a passive scan.
Definition: GCKDeviceProvider.h:35
NSArray< GCKDevice * > * devices
The array of discovered devices.
Definition: GCKDeviceProvider.h:38