GCKDevice Class
An object representing a receiver device.
Inherits NSObject, <NSCopying>, and <NSCoding>.
- (BOOL) isSameDeviceAs: |
|
(const GCKDevice *) |
other |
|
Tests if this device refers to the same physical device as another.
Returns YES
if both GCKDevice objects have the same category, device ID, IP address, service port, and protocol version.
- (BOOL) hasCapabilities: |
|
(NSInteger) |
deviceCapabilities |
|
Returns YES
if the device supports the given capabilities.
- Parameters
-
- (void) setAttribute: |
|
(NSObject< NSCoding > *) |
attribute |
forKey: |
|
(NSString *) |
key |
|
|
| |
Sets an arbitrary attribute in the object.
May be used by custom device providers to store device-specific information for non-Cast devices.
- Parameters
-
attribute | The attribute value, which must be key-value coding compliant, and cannot be nil . |
key | The key that identifies the attribute. The key is an arbitrary string. It cannot be nil . |
- (NSObject<NSCoding> * __nullable) attributeForKey: |
|
(NSString *) |
key |
|
Looks up an attribute in the object.
- Parameters
-
key | The key that identifies the attribute. The key is an arbitrary string. It cannot be nil . |
- Returns
- The value of the attribute, or
nil
if no such attribute exists.
- (void) removeAttributeForKey: |
|
(NSString *) |
key |
|
Removes an attribute from the object.
- Parameters
-
key | The key that identifies the attribute. The key is an arbitrary string. It cannot be nil . |
- (void) removeAllAttributes |
|
|
|
Removes all attributes from the object.
The device's IPv4 address, in dot-notation.
Used when making network requests.
The device's service port.
A unique identifier for the device.
- (NSString*) friendlyName |
|
readwritenonatomiccopy |
The device's friendly name.
This is a user-assignable name such as "Living Room".
- (NSString*) manufacturer |
|
readwritenonatomiccopy |
The device's manufacturer name.
- Deprecated:
- Use the modelName or custom attributes instead.
An array of GCKImage objects containing icons for the device.
The device's status at the time that it was most recently scanned.
The status text reported by the currently running receiver application, if any.
- (NSString*) deviceVersion |
|
readwritenonatomiccopy |
The device's protocol version.
- (BOOL) isOnLocalNetwork |
|
readnonatomicassign |
YES if this device is on the local network.
The device type.
- Since
- 3.3
The device category, a string that uniquely identifies the type of device.
Cast devices have a category of kGCKCastDeviceCategory.
A globally unique ID for this device.
This is a concatenation of the category and deviceID properties.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[[["The `GCKDevice` class represents a Cast receiver device, providing properties for device identification, status, and capabilities."],["It offers methods to check device capabilities, compare devices, and manage custom attributes."],["Device properties include IP address, service port, device ID, friendly name, model name, icons, status, and more."],["Developers can use instance methods to interact with device attributes, determine if two devices are the same, and check for specific capabilities."],["The class inherits from `NSObject`, `NSCopying`, and `NSCoding`, allowing for object manipulation and persistence."]]],[]]