3 #import <GoogleCast/GCKDefines.h> 5 #import <Foundation/Foundation.h> 7 #import <GoogleCast/GCKNetworkAddress.h> 14 GCK_ASSUME_NONNULL_BEGIN
20 typedef NS_ENUM(NSInteger, GCKDeviceStatus) {
22 GCKDeviceStatusUnknown = -1,
24 GCKDeviceStatusIdle = 0,
26 GCKDeviceStatusBusy = 1,
33 typedef NS_ENUM(NSInteger, GCKDeviceCapability) {
35 GCKDeviceCapabilityVideoOut = 1 << 0,
37 GCKDeviceCapabilityVideoIn = 1 << 1,
39 GCKDeviceCapabilityAudioOut = 1 << 2,
41 GCKDeviceCapabilityAudioIn = 1 << 3,
43 GCKDeviceCapabilityMultizoneGroup = 1 << 5,
45 GCKDeviceCapabilityMasterOrFixedVolume = 1 << 11,
47 GCKDeviceCapabilityAttenuationOrFixedVolume = 1 << 12,
55 typedef NS_ENUM(NSInteger, GCKDeviceType) {
57 GCKDeviceTypeGeneric = 0,
63 GCKDeviceTypeSpeakerGroup,
67 GCKDeviceTypeNearbyUnpaired
74 GCK_EXTERN NSString *
const kGCKCastDeviceCategory;
82 @interface GCKDevice : NSObject <NSCopying, NSSecureCoding>
91 @property(nonatomic, copy, readonly)
92 NSString *ipAddress
GCK_DEPRECATED(
"Use networkAddress for both IPv4 and IPv6 support");
104 @property(nonatomic, copy, readonly) NSString *
deviceID;
107 @property(nonatomic, copy, readwrite, GCK_NULLABLE) NSString *
friendlyName;
110 @property(nonatomic, copy, readwrite, GCK_NULLABLE) NSString *
modelName;
113 @property(nonatomic, copy, readwrite, GCK_NULLABLE) NSArray<GCKImage *> *
icons;
116 @property(nonatomic, assign, readwrite) GCKDeviceStatus
status;
119 @property(nonatomic, copy, readwrite, GCK_NULLABLE) NSString *
statusText;
122 @property(nonatomic, copy, readwrite, GCK_NULLABLE) NSString *
deviceVersion;
132 @property(nonatomic, assign, readonly) GCKDeviceType
type;
138 @property(nonatomic, copy, readonly) NSString *
category;
144 @property(nonatomic, copy, readonly) NSString *
uniqueID;
151 - (BOOL)isSameDeviceAs:(const
GCKDevice *)other;
158 - (BOOL)hasCapabilities:(NSInteger)deviceCapabilities;
169 - (void)setAttribute:(NSObject<NSSecureCoding> *)attribute forKey:(NSString *)key;
178 - (NSObject<NSSecureCoding> * GCK_NULLABLE_TYPE)attributeForKey:(NSString *)key;
186 - (void)removeAttributeForKey:(NSString *)key;
196 + (NSString *)deviceCategoryForDeviceUniqueID:(NSString *)deviceUniqueID;
200 GCK_ASSUME_NONNULL_END
NSArray< GCKImage * > * icons
An array of GCKImage objects containing icons for the device.
Definition: GCKDevice.h:113
GCKDeviceType type
The device type.
Definition: GCKDevice.h:132
An object representing a receiver device.
Definition: GCKDevice.h:82
instancetype NS_UNAVAILABLE()
NSString * uniqueID
A globally unique ID for this device.
Definition: GCKDevice.h:144
NSString * modelName
The device's model name.
Definition: GCKDevice.h:110
NSString * category
The device category, a string that uniquely identifies the type of device.
Definition: GCKDevice.h:138
An object that represents a network IP address.
Definition: GCKNetworkAddress.h:34
NSString * friendlyName
The device's friendly name.
Definition: GCKDevice.h:107
BOOL isOnLocalNetwork
YES if this device is on the local network.
Definition: GCKDevice.h:125
NSString * deviceID
A unique identifier for the device.
Definition: GCKDevice.h:104
A class that represents an image that is located on a web server.
Definition: GCKImage.h:14
NSString * deviceVersion
The device's protocol version.
Definition: GCKDevice.h:122
GCKNetworkAddress * networkAddress
The device's IP address.
Definition: GCKDevice.h:98
GCKDeviceStatus status
The device's status at the time that it was most recently scanned.
Definition: GCKDevice.h:116
NSString *ipAddress GCK_DEPRECATED("Use networkAddress for both IPv4 and IPv6 support")
uint16_t servicePort
The device's service port.
Definition: GCKDevice.h:101
void removeAllAttributes()
Removes all attributes from the object.
NSString * statusText
The status text reported by the currently running receiver application, if any.
Definition: GCKDevice.h:119