<GCKSessionManagerListener> Protocol

<GCKSessionManagerListener> Protocol Reference

Overview

The GCKSessionManager listener protocol.

The protocol's methods are all optional. All of the notification methods come in two varieties: one that is invoked for any session type, and one that is invoked specifically for Cast sessions.

Listeners are invoked in the order that they were registered. GCKSessionManagerListener instances which are registered by components of the framework itself (such as GCKUIMediaController), will always be invoked after those that are registered by the application for the callbacks sessionManager:willStartSession: (GCKSessionManagerListener-p), sessionManager:willStartCastSession: (GCKSessionManagerListener-p), sessionManager:willResumeSession: (GCKSessionManagerListener-p), and sessionManager:willResumeCastSession: (GCKSessionManagerListener-p); and before those that are registered by the application for all of the remaining callbacks.

Since
3.0

Inherits <NSObjectNSObject>.

Instance Method Summary

(void) - sessionManager:willStartSession:
 Called when a session is about to be started. More...
 
(void) - sessionManager:didStartSession:
 Called when a session has been successfully started. More...
 
(void) - sessionManager:willStartCastSession:
 Called when a Cast session is about to be started. More...
 
(void) - sessionManager:didStartCastSession:
 Called when a Cast session has been successfully started. More...
 
(void) - sessionManager:willEndSession:
 Called when a session is about to be ended, either by request or due to an error. More...
 
(void) - sessionManager:didEndSession:withError:
 Called when a session has ended, either by request or due to an error. More...
 
(void) - sessionManager:willEndCastSession:
 Called when a Cast session is about to be ended, either by request or due to an error. More...
 
(void) - sessionManager:didEndCastSession:withError:
 Called when a Cast session has ended, either by request or due to an error. More...
 
(void) - sessionManager:didFailToStartSession:withError:
 Called when a session has failed to start. More...
 
(void) - sessionManager:didFailToStartCastSession:withError:
 Called when a Cast session has failed to start. More...
 
(void) - sessionManager:didSuspendSession:withReason:
 Called when a session has been suspended. More...
 
(void) - sessionManager:didSuspendCastSession:withReason:
 Called when a Cast session has been suspended. More...
 
(void) - sessionManager:willResumeSession:
 Called when a session is about to be resumed. More...
 
(void) - sessionManager:didResumeSession:
 Called when a session has been successfully resumed. More...
 
(void) - sessionManager:willResumeCastSession:
 Called when a Cast session is about to be resumed. More...
 
(void) - sessionManager:didResumeCastSession:
 Called when a Cast session has been successfully resumed. More...
 
(void) - sessionManager:session:didUpdateDevice:
 Called when the device associated with this session has changed in some way (for example, the friendly name has changed). More...
 
(void) - sessionManager:session:didReceiveDeviceVolume:muted:
 Called when updated device volume and mute state for a session have been received. More...
 
(void) - sessionManager:castSession:didReceiveDeviceVolume:muted:
 Called when updated device volume and mute state for a Cast session have been received. More...
 
(void) - sessionManager:session:didReceiveDeviceStatus:
 Called when updated device status for a session has been received. More...
 
(void) - sessionManager:castSession:didReceiveDeviceStatus:
 Called when updated device status for a Cast session has been received. More...
 
(void) - sessionManager:didUpdateDefaultSessionOptionsForDeviceCategory:
 Called when the default session options have been changed for a given device category. More...
 

Method Detail

- (void) sessionManager: (GCKSessionManager *)  sessionManager
willStartSession: (GCKSession *)  session 
optional

Called when a session is about to be started.

Parameters
sessionManagerThe session manager.
sessionThe session.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
didStartSession: (GCKSession *)  session 
optional

Called when a session has been successfully started.

Parameters
sessionManagerThe session manager.
sessionThe session.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
willStartCastSession: (GCKCastSession *)  session 
optional

Called when a Cast session is about to be started.

Parameters
sessionManagerThe session manager.
sessionThe session.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
didStartCastSession: (GCKCastSession *)  session 
optional

Called when a Cast session has been successfully started.

Parameters
sessionManagerThe session manager.
sessionThe Cast session.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
willEndSession: (GCKSession *)  session 
optional

Called when a session is about to be ended, either by request or due to an error.

Parameters
sessionManagerThe session manager.
sessionThe session.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
didEndSession: (GCKSession *)  session
withError: (nullable NSError *)  error 
optional

Called when a session has ended, either by request or due to an error.

Parameters
sessionManagerThe session manager.
sessionThe session.
errorThe error, if any; otherwise nil.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
willEndCastSession: (GCKCastSession *)  session 
optional

Called when a Cast session is about to be ended, either by request or due to an error.

Parameters
sessionManagerThe session manager.
sessionThe session.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
didEndCastSession: (GCKCastSession *)  session
withError: (nullable NSError *)  error 
optional

Called when a Cast session has ended, either by request or due to an error.

Parameters
sessionManagerThe session manager.
sessionThe Cast session.
errorThe error, if any; otherwise nil.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
didFailToStartSession: (GCKSession *)  session
withError: (NSError *)  error 
optional

Called when a session has failed to start.

Parameters
sessionManagerThe session manager.
sessionThe session.
errorThe error.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
didFailToStartCastSession: (GCKCastSession *)  session
withError: (NSError *)  error 
optional

Called when a Cast session has failed to start.

Parameters
sessionManagerThe session manager.
sessionThe Cast session.
errorThe error.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
didSuspendSession: (GCKSession *)  session
withReason: (GCKConnectionSuspendReason reason 
optional

Called when a session has been suspended.

Parameters
sessionManagerThe session manager.
sessionThe session.
reasonThe reason for the suspension.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
didSuspendCastSession: (GCKCastSession *)  session
withReason: (GCKConnectionSuspendReason reason 
optional

Called when a Cast session has been suspended.

Parameters
sessionManagerThe session manager.
sessionThe Cast session.
reasonThe reason for the suspension.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
willResumeSession: (GCKSession *)  session 
optional

Called when a session is about to be resumed.

Parameters
sessionManagerThe session manager.
sessionThe session.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
didResumeSession: (GCKSession *)  session 
optional

Called when a session has been successfully resumed.

Parameters
sessionManagerThe session manager.
sessionThe session.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
willResumeCastSession: (GCKCastSession *)  session 
optional

Called when a Cast session is about to be resumed.

Parameters
sessionManagerThe session manager.
sessionThe session.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
didResumeCastSession: (GCKCastSession *)  session 
optional

Called when a Cast session has been successfully resumed.

Parameters
sessionManagerThe session manager.
sessionThe Cast session.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
session: (GCKSession *)  session
didUpdateDevice: (GCKDevice *)  device 
optional

Called when the device associated with this session has changed in some way (for example, the friendly name has changed).

Parameters
sessionManagerThe session manager.
sessionThe Cast session.
deviceThe updated device object.
Since
3.2
- (void) sessionManager: (GCKSessionManager *)  sessionManager
session: (GCKSession *)  session
didReceiveDeviceVolume: (float)  volume
muted: (BOOL)  muted 
optional

Called when updated device volume and mute state for a session have been received.

Parameters
sessionManagerThe session manager.
sessionThe session.
volumeThe current volume, in the range [0.0, 1.0].
mutedThe current mute state.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
castSession: (GCKCastSession *)  session
didReceiveDeviceVolume: (float)  volume
muted: (BOOL)  muted 
optional

Called when updated device volume and mute state for a Cast session have been received.

Parameters
sessionManagerThe session manager.
sessionThe Cast session.
volumeThe current volume, in the range [0.0, 1.0].
mutedThe current mute state.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
session: (GCKSession *)  session
didReceiveDeviceStatus: (nullable NSString *)  statusText 
optional

Called when updated device status for a session has been received.

Parameters
sessionManagerThe session manager.
sessionThe session.
statusTextThe new device status text.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
castSession: (GCKCastSession *)  session
didReceiveDeviceStatus: (nullable NSString *)  statusText 
optional

Called when updated device status for a Cast session has been received.

Parameters
sessionManagerThe session manager.
sessionThe Cast session.
statusTextThe new device status text.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
didUpdateDefaultSessionOptionsForDeviceCategory: (NSString *)  category 
optional

Called when the default session options have been changed for a given device category.

Parameters
sessionManagerThe session manager.
categoryThe device category.
Since
4.0