GCKCastSession.h
1 // Copyright 2015 Google Inc.
2 
3 #import <GoogleCast/GCKSession.h>
4 #import <GoogleCast/GCKSessionOptions.h>
5 
6 #import <Foundation/Foundation.h>
7 
9 @class GCKCastChannel;
10 @class GCKCastOptions;
11 @class GCKDevice;
12 @class GCKMultizoneDevice;
13 @class GCKMultizoneStatus;
14 @class GCKRequest;
15 @protocol GCKCastDeviceStatusListener;
16 
17 GCK_ASSUME_NONNULL_BEGIN
18 
27 GCK_EXPORT
29 
33 @property(nonatomic, assign, readonly) GCKActiveInputStatus activeInputStatus;
34 
38 @property(nonatomic, assign, readonly) GCKStandbyStatus standbyStatus;
39 
44 @property(nonatomic, copy, readonly, GCK_NULLABLE) GCKApplicationMetadata *applicationMetadata;
45 
56 - (instancetype)initWithDevice:(GCKDevice *)device
57  sessionID:(NSString *GCK_NULLABLE_TYPE)sessionID
58  sessionOptions:(GCKSessionOptions *GCK_NULLABLE_TYPE)sessionOptions
59  castOptions:(GCKCastOptions *)castOptions;
60 
69 - (BOOL)addChannel:(GCKCastChannel *)channel;
70 
77 - (BOOL)removeChannel:(GCKCastChannel *)channel;
78 
84 - (void)addDeviceStatusListener:(id<GCKCastDeviceStatusListener>)listener;
85 
91 - (void)removeDeviceStatusListener:(id<GCKCastDeviceStatusListener>)listener;
92 
100 - (GCKRequest *)setDeviceVolume:(float)volume forMultizoneDevice:(GCKMultizoneDevice *)device;
101 
109 - (GCKRequest *)setDeviceMuted:(BOOL)muted forMultizoneDevice:(GCKMultizoneDevice *)device;
110 
120 
121 @end
122 
128 @protocol GCKCastDeviceStatusListener <NSObject>
129 
130 @optional
131 
138 - (void)castSession:(GCKCastSession *)castSession
139  didReceiveActiveInputStatus:(GCKActiveInputStatus)activeInputStatus;
140 
147 - (void)castSession:(GCKCastSession *)castSession
148  didReceiveStandbyStatus:(GCKStandbyStatus)standbyStatus;
149 
156 - (void)castSession:(GCKCastSession *)castSession
157  didReceiveMultizoneStatus:(GCKMultizoneStatus *)multizoneStatus;
158 
165 - (void)castSession:(GCKCastSession *)castSession
166  didAddMultizoneDevice:(GCKMultizoneDevice *)device;
167 
174 - (void)castSession:(GCKCastSession *)castSession
175  didUpdateMultizoneDevice:(GCKMultizoneDevice *)device;
176 
183 - (void)castSession:(GCKCastSession *)castSession
184  didRemoveMultizoneDeviceWithID:(NSString *)deviceID;
185 
186 @end
187 
188 GCK_ASSUME_NONNULL_END
An object representing a receiver device.
Definition: GCKDevice.h:82
GCKRequest * requestMultizoneStatus()
Request multizone status from a multizone group.
GCKActiveInputStatus activeInputStatus
The device&#39;s current "active input" status.
Definition: GCKCastSession.h:33
The status of a multizone group.
Definition: GCKMultizoneStatus.h:17
An object for tracking an asynchronous request.
Definition: GCKRequest.h:35
An abstract base class representing a session with a receiver device.
Definition: GCKSession.h:30
Options that affect the discovery of Cast devices and the behavior of Cast sessions.
Definition: GCKCastOptions.h:19
GCKStandbyStatus standbyStatus
The device&#39;s current "standby" status.
Definition: GCKCastSession.h:38
A class that manages a Cast session with a receiver device.
Definition: GCKCastSession.h:28
A member device of a multizone group.
Definition: GCKMultizoneDevice.h:15
GCKApplicationMetadata * applicationMetadata
The metadata for the receiver application that is currently running on the receiver device...
Definition: GCKCastSession.h:44
A virtual communication channel for exchanging messages between a Cast sender and a Cast receiver...
Definition: GCKCastChannel.h:25
Information about a receiver application.
Definition: GCKApplicationMetadata.h:16