總覽
代表接收器裝置的物件。
繼承 NSObject、<NSclone> 和 <NSSecureCoding>。
執行個體方法摘要 | |
(instancetype) | - init |
(BOOL) | - isSameDeviceAs: |
測試這部裝置是否與其他實體裝置相同。更多... | |
(BOOL) | - hasCapabilities: |
如果裝置支援所有指定功能,則傳回 YES 。更多... | |
(void) | - setAttribute:forKey: |
在物件中設定任意屬性。更多... | |
(nullable NSObject < NSSecureCoding > *) | - attributeForKey: |
查詢物件中的屬性。更多... | |
(void) | - removeAttributeForKey: |
從物件中移除屬性。更多... | |
(void) | - removeAllAttributes |
移除物件中的所有屬性。更多... | |
類別方法摘要 | |
(NSString *) | + deviceCategoryForDeviceUniqueID: |
從裝置專屬 ID 擷取裝置類別。更多... | |
資源摘要 | |
NSString * | ipAddress |
GCKNetworkAddress * | networkAddress |
裝置的 IP 位址。更多... | |
uint16_t | servicePort |
裝置的服務通訊埠。更多... | |
NSString * | deviceID |
裝置的專屬 ID。更多... | |
NSString * | friendlyName |
裝置易記的名稱。更多... | |
NSString * | modelName |
裝置的型號名稱。更多... | |
NSArray< GCKImage * > * | icons |
GCKImage 物件陣列,包含裝置圖示。更多... | |
GCKDeviceStatus | status |
裝置最近一次掃描時的狀態。更多... | |
NSString * | statusText |
目前執行中的接收器應用程式所回報的狀態文字 (如果有的話)。更多... | |
NSString * | deviceVersion |
裝置的通訊協定版本。更多... | |
BOOL | isOnLocalNetwork |
如果這部裝置連上區域網路,則為「是」。更多... | |
GCKDeviceType | type |
裝置類型。更多... | |
NSString * | category |
裝置類別,這是專門用於識別裝置類型的字串。更多... | |
NSString * | uniqueID |
這部裝置的全域專屬 ID。更多... | |
方法詳細資料
- (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 |
從裝置專屬 ID 擷取裝置類別。
資源詳情
|
readnonatomiccopy |
- Deprecated:
- 使用 networkAddress 裝置的 IPv4 位址,並以點號標記法表示。發出網路要求時使用。對使用 IPv6 位址建立的 GCKDevice 物件而言,這個值會是空字串。
|
readnonatomiccopy |
裝置的 IP 位址。
發出網路要求時使用。
- 開始時間
- 4.2
|
readnonatomicassign |
裝置的服務通訊埠。
|
readnonatomiccopy |
裝置的專屬 ID。
|
readwritenonatomiccopy |
裝置易記的名稱。
這是指使用者可指派的名稱,例如「客廳」。
|
readwritenonatomiccopy |
裝置的型號名稱。
|
readwritenonatomicassign |
裝置最近一次掃描時的狀態。
|
readwritenonatomiccopy |
目前執行中的接收器應用程式所回報的狀態文字 (如果有的話)。
|
readwritenonatomiccopy |
裝置的通訊協定版本。
|
readnonatomicassign |
如果這部裝置連上區域網路,則為「是」。
|
readnonatomicassign |
裝置類型。
- 開始時間
- 3.3
|
readnonatomiccopy |
裝置類別,這是專門用於識別裝置類型的字串。
投放裝置具有「kGCKCastDeviceCategory」類別。