GCKDevice 類別
沿用 NSObject、<NSCopy> 和 <NSCoding> 的 NSObject。
- (BOOL) isSameDeviceAs: |
|
(const GCKDevice *) |
other |
|
測試這部裝置是否參照了實體裝置。
如果兩個 GCKDevice 物件具有相同的類別、裝置 ID、IP 位址、服務通訊埠和通訊協定版本,則會傳回 YES
。
- (BOOL) hasCapabilities: |
|
(NSInteger) |
deviceCapabilities |
|
如果裝置支援指定功能,則傳回 YES
。
- Parameters
-
- (void) setAttribute: |
|
(NSObject< NSCoding > *) |
attribute |
forKey: |
|
(NSString *) |
key |
|
|
| |
設定物件中的任意屬性。
可供自訂裝置供應商用於儲存非 Cast 裝置的專屬資訊。
- 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 |
|
查詢物件的屬性。
- 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 |
|
|
|
裝置的 IPv4 位址 (採用點標記法)。
用於發出網路要求。
- (NSString*) friendlyName |
|
readwritenonatomiccopy |
- (NSString*) manufacturer |
|
readwritenonatomiccopy |
目前執行中的接收器應用程式回報的狀態文字 (如果有的話)。
- (NSString*) deviceVersion |
|
readwritenonatomiccopy |
- (BOOL) isOnLocalNetwork |
|
readnonatomicassign |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2022-12-06 (世界標準時間)。
[null,null,["上次更新時間:2022-12-06 (世界標準時間)。"],[[["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."]]],[]]