The GCKDeviceManager delegate protocol.
Unless indicated otherwise, the caller should not release the delegating GCKDeviceManager object from within a delegate method.
Inherits <NSObjectNSObject>.
Called when a connection has been established to the device.
- Parameters
-
deviceManager | The device manager. |
- (void) deviceManager: |
|
(GCKDeviceManager *) |
deviceManager |
didFailToConnectWithError: |
|
(NSError *) |
error |
|
|
| |
|
optional |
Called when the connection to the device has failed.
It is safe to release the GCKDeviceManager object from within this callback.
- Parameters
-
deviceManager | The device manager. |
error | The error that caused the connection to fail. |
- (void) deviceManager: |
|
(GCKDeviceManager *) |
deviceManager |
didDisconnectWithError: |
|
(NSError *__nullable) |
error |
|
|
| |
|
optional |
Called when the connection to the device has been terminated.
It is safe to release the GCKDeviceManager object from within this callback.
- Parameters
-
deviceManager | The device manager. |
error | The error that caused the disconnection; nil if there was no error (for example, an intentional disconnect). |
Called when the connection to the device has been suspended, possibly temporarily.
When a connection is suspended, the device manager will automatically attempt to re-establish the connection at the appropriate time. The calling application should not attempt to force a reconnect itself.
- Parameters
-
deviceManager | The device manager. |
reason | The reason for the suspension. |
- (void) deviceManagerDidResumeConnection: |
|
(GCKDeviceManager *) |
deviceManager |
rejoinedApplication: |
|
(BOOL) |
rejoinedApplication |
|
|
| |
|
optional |
Called when a previously suspended device connection has been re-established.
- Parameters
-
deviceManager | The device manager. |
rejoinedApplication | If a connection had been established to a receiver application at the time of the suspension, this flag indicates whether that application has been successfully re-joined. This value would be NO if, for example, the application was terminated during the time that the device manager was attempting to re-establish its connection to the device. |
- (void) deviceManager: |
|
(GCKDeviceManager *) |
deviceManager |
didConnectToCastApplication: |
|
(GCKApplicationMetadata *) |
applicationMetadata |
sessionID: |
|
(NSString *) |
sessionID |
launchedApplication: |
|
(BOOL) |
launchedApplication |
|
|
| |
|
optional |
Called when an application has been launched or joined.
- Parameters
-
deviceManager | The device manager. |
applicationMetadata | Metadata about the application. |
sessionID | The current application session ID that is active on the receiver. |
launchedApplication | YES if the application was launched as part of the connection, or NO if the application was already running and was joined. |
- (void) deviceManager: |
|
(GCKDeviceManager *) |
deviceManager |
didFailToConnectToApplicationWithError: |
|
(NSError *) |
error |
|
|
| |
|
optional |
Called when connecting to an application fails.
- Parameters
-
deviceManager | The device manager. |
error | The error that caused the failure. |
- (void) deviceManager: |
|
(GCKDeviceManager *) |
deviceManager |
didDisconnectFromApplicationWithError: |
|
(NSError *__nullable) |
error |
|
|
| |
|
optional |
Called when disconnected from the current application.
- Parameters
-
deviceManager | The device manager. |
error | The error that caused the disconnect, or nil if this was a normal disconnect. |
Called when a stop application request has completed successfully.
- Parameters
-
deviceManager | The device manager. |
- (void) deviceManager: |
|
(GCKDeviceManager *) |
deviceManager |
didFailToStopApplicationWithError: |
|
(NSError *) |
error |
|
|
| |
|
optional |
Called when a stop application request fails.
- Parameters
-
deviceManager | The device manager. |
error | The error that caused the failure. |
Called whenever the application metadata for the currently running application has changed.
- Parameters
-
deviceManager | The device manager. |
metadata | The application metadata. May be nil if no application is currently running. |
- (void) deviceManager: |
|
(GCKDeviceManager *) |
deviceManager |
didReceiveApplicationStatusText: |
|
(NSString *__nullable) |
applicationStatusText |
|
|
| |
|
optional |
Called whenever the currently running application status text has changed.
- Parameters
-
deviceManager | The device manager. |
applicationStatusText | The application status text. May be nil if no application is currently running or if the application did not report any status text. |
- (void) deviceManager: |
|
(GCKDeviceManager *) |
deviceManager |
volumeDidChangeToLevel: |
|
(float) |
volumeLevel |
isMuted: |
|
(BOOL) |
isMuted |
|
|
| |
|
optional |
Called whenever the volume changes.
- Parameters
-
deviceManager | The device manager. |
volumeLevel | The current device volume level. |
isMuted | The current device mute state. |
Called whenever the active input status changes.
- Parameters
-
deviceManager | The device manager. |
activeInputStatus | The active input status. |
Called whenever the standby status changes.
- Parameters
-
deviceManager | The device manager. |
standbyStatus | The standby status. |
- (void) deviceManager: |
|
(GCKDeviceManager *) |
deviceManager |
request: |
|
(NSInteger) |
requestID |
didFailWithError: |
|
(NSError *) |
error |
|
|
| |
|
optional |
Called when an asynchronous operation has failed.
- Parameters
-
deviceManager | The device manager. |
requestID | The ID of the request that failed. |
error | The error. |
Called when a guest mode connection has been established to the device.
- Parameters
-
deviceManager | The device manager. |
guestModeDevice | The device object for the concrete guest mode device. |