A class containing global objects and state for the framework. More...

#import <GCKCastContext.h>

+ Inheritance diagram for GCKCastContext:

Instance Methods

(void) - registerDeviceProvider:
 Registers a device provider, which adds support for a new type of (non-Cast) device. More...
 
(void) - unregisterDeviceProviderForCategory:
 Unregisters the device provider for a given device category. More...
 

Class Methods

(void) + setSharedInstanceWithOptions:
 Sets the shared instance, supplying a Cast options object. More...
 
(BOOL) + setSharedInstanceWithOptions:error:
 Sets the shared instance, supplying a Cast options object. More...
 
(instancetype) + sharedInstance
 Returns the singleton instance. More...
 
(BOOL) + isSharedInstanceInitialized
 Tests if the singleton instance has been initialized yet. More...
 

Public Attributes

GCK_ASSUME_NONNULL_BEGIN GCK_EXTERN NSString *const kGCKNotificationKeyCastState
 The userInfo key for the new Cast state in a Cast state change notification. More...
 
GCK_EXTERN NSString *const kGCKCastStateDidChangeNotification
 The name of the notification that will be published when the Cast state changes. More...
 

Properties

GCKCastState castState
 The current casting state for the application. More...
 
GCKDiscoveryManagerdiscoveryManager
 The discovery manager. More...
 
GCKSessionManagersessionManager
 The session manager. More...
 

Detailed Description

A class containing global objects and state for the framework.

The context must be initialized early in the application's lifecycle via a call to setSharedInstanceWithOptions: (GCKCastContext).

Since
3.0

Method Documentation

+ (BOOL) isSharedInstanceInitialized

Tests if the singleton instance has been initialized yet.

Since
3.5.4
- (void) registerDeviceProvider: (GCKDeviceProvider *)  deviceProvider

Registers a device provider, which adds support for a new type of (non-Cast) device.

Parameters
deviceProviderAn instance of a GCKDeviceProvider subclass for managing the devices.
+ (void) setSharedInstanceWithOptions: (GCKCastOptions *)  options

Sets the shared instance, supplying a Cast options object.

If the shared instance is already initialized, an exception will be thrown.

Parameters
optionsThe Cast options.
+ (BOOL) setSharedInstanceWithOptions: (GCKCastOptions *)  options
error: (GCKError *GCK_NULLABLE_TYPE *GCK_NULLABLE_TYPE)  error 

Sets the shared instance, supplying a Cast options object.

The call will fail if the context is already initialized. This method must be called on the main thread.

Parameters
optionsThe Cast options.
errorA pointer at which to store the error in case of a failure.
Returns
YES on success, NO on failure.
Since
4.0
+ (instancetype) sharedInstance

Returns the singleton instance.

If a shared instance has not yet been initialized, an exception will be thrown.

- (void) unregisterDeviceProviderForCategory: (NSString *)  category

Unregisters the device provider for a given device category.

Parameters
categoryA string that uniquely identifies the type of device.

Member Data Documentation

- (GCK_EXTERN NSString* const) kGCKCastStateDidChangeNotification

The name of the notification that will be published when the Cast state changes.

- (GCK_ASSUME_NONNULL_BEGIN GCK_EXTERN NSString* const) kGCKNotificationKeyCastState

The userInfo key for the new Cast state in a Cast state change notification.

Property Documentation

- (GCKCastState) castState
readnonatomicassign

The current casting state for the application.

Changes to this property can be monitored with KVO or by listening for kGCKCastStateDidChangeNotification notifications.

- (GCKDiscoveryManager*) discoveryManager
readnonatomicstrong

The discovery manager.

This object handles the discovery of receiver devices.

- (GCKSessionManager*) sessionManager
readnonatomicstrong

The session manager.

This object manages the interaction with receiver devices.


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