GCKDevice 類別
繼承 NSObject、<NSclone> 和 <NSSecureCoding>。
- (BOOL) isSameDeviceAs: |
|
(const GCKDevice *) |
other |
|
測試這部裝置是否與其他實體裝置相同。
如果兩個 GCKDevice 物件有相同的類別、裝置 ID、IP 位址、服務通訊埠和通訊協定版本,則會傳回 YES
。
- (BOOL) hasCapabilities: |
|
(GCKDeviceCapabilities) |
deviceCapabilities |
|
如果裝置支援所有指定功能,則傳回 YES
。
- Parameters
-
deviceCapabilities | A bitwise-OR of one or more of the GCKDeviceCapabilities constants. |
- (void) setAttribute: |
|
(NSObject< NSSecureCoding > *) |
attribute |
forKey: |
|
(NSString *) |
key |
|
|
| |
在物件中設定任意屬性。
自訂裝置供應商可能會使用這項權限,儲存非投放裝置的裝置專屬資訊。
- 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 . |
- (nullable NSObject<NSSecureCoding> *) attributeForKey: |
|
(NSString *) |
key |
|
查詢物件中的屬性。
- Parameters
-
key | The key that identifies the attribute. The key is an arbitrary string. It cannot be nil . |
- 傳回
- 屬性值;如果沒有這類屬性,則為
nil
。
- (void) removeAttributeForKey: |
|
(NSString *) |
key |
|
從物件中移除屬性。
- Parameters
-
key | The key that identifies the attribute. The key is an arbitrary string. It cannot be nil . |
- (void) removeAllAttributes |
|
|
|
+ (NSString *) deviceCategoryForDeviceUniqueID: |
|
(NSString *) |
deviceUniqueID |
|
裝置的 IP 位址。
發出網路要求時使用。
- 開始時間
- 4.2
- (NSString*) friendlyName |
|
readwritenonatomiccopy |
裝置易記的名稱。
這是指使用者可指派的名稱,例如「客廳」。
- (GCKDeviceStatus) status |
|
readwritenonatomicassign |
目前執行中的接收器應用程式所回報的狀態文字 (如果有的話)。
- (NSString*) deviceVersion |
|
readwritenonatomiccopy |
- (BOOL) isOnLocalNetwork |
|
readnonatomicassign |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2023-12-02 (世界標準時間)。
[null,null,["上次更新時間:2023-12-02 (世界標準時間)。"],[[["The `GCKDevice` class represents a Cast receiver device on the network, providing information such as its name, IP address, capabilities, and status."],["It offers methods to check device capabilities, compare devices, and manage device-specific attributes."],["Developers can access properties like `friendlyName`, `modelName`, `deviceID`, and `icons` to identify and interact with the device."],["The `GCKDevice` class helps in discovering and managing Cast-enabled devices for seamless integration with Cast applications."],["It includes properties like `networkAddress`, `servicePort` and `deviceVersion` for handling network communication and device identification."]]],[]]