GCKCastContext.h
1 // Copyright 2015 Google Inc.
2 
3 #import <GoogleCast/GCKCommon.h>
4 #import <GoogleCast/GCKDefines.h>
5 
6 #import <Foundation/Foundation.h>
7 
8 @class GCKCastOptions;
10 @class GCKDeviceProvider;
11 @class GCKError;
12 @class GCKMediaRequestItem;
13 @class GCKSessionManager;
14 
19 GCK_ASSUME_NONNULL_BEGIN
20 
26 GCK_EXTERN NSString *const kGCKNotificationKeyCastState;
27 
33 GCK_EXTERN NSString *const kGCKCastStateDidChangeNotification;
34 
41 GCK_EXPORT
42 @interface GCKCastContext : NSObject
43 
48 @property(nonatomic, assign, readonly) GCKCastState castState;
49 
53 @property(nonatomic, strong, readonly) GCKDiscoveryManager *discoveryManager;
54 
58 @property(nonatomic, strong, readonly) GCKSessionManager *sessionManager;
59 
66 + (void)setSharedInstanceWithOptions:(GCKCastOptions *)options;
67 
77 + (BOOL)setSharedInstanceWithOptions:(GCKCastOptions *)options
78  error:(GCKError *GCK_NULLABLE_TYPE *GCK_NULLABLE_TYPE)error;
79 
84 + (instancetype)sharedInstance;
85 
92 
98 - (void)registerDeviceProvider:(GCKDeviceProvider *)deviceProvider;
99 
105 - (void)unregisterDeviceProviderForCategory:(NSString *)category;
106 
107 @end
108 
109 GCK_ASSUME_NONNULL_END
A subclass of NSError for framework errors.
Definition: GCKError.h:366
GCKSessionManager * sessionManager
The session manager.
Definition: GCKCastContext.h:58
GCKDiscoveryManager * discoveryManager
The discovery manager.
Definition: GCKCastContext.h:53
Options that affect the discovery of Cast devices and the behavior of Cast sessions.
Definition: GCKCastOptions.h:19
An abstract base class for performing device discovery and session construction.
Definition: GCKDeviceProvider.h:22
instancetype sharedInstance()
Returns the singleton instance.
BOOL isSharedInstanceInitialized()
Tests if the singleton instance has been initialized yet.
A class representing a request item sent to Cast receivers.
Definition: GCKMediaRequestItem.h:50
A class that manages the device discovery process.
Definition: GCKDiscoveryManager.h:41
A class containing global objects and state for the framework.
Definition: GCKCastContext.h:42
GCKCastState castState
The current casting state for the application.
Definition: GCKCastContext.h:48
A class that manages sessions.
Definition: GCKSessionManager.h:45
GCK_ASSUME_NONNULL_BEGIN GCK_EXTERN NSString *const kGCKNotificationKeyCastState
The userInfo key for the new Cast state in a Cast state change notification.
Definition: GCKCastContext.h:26
GCK_EXTERN NSString *const kGCKCastStateDidChangeNotification
The name of the notification that will be published when the Cast state changes.
Definition: GCKCastContext.h:33