GCKDevice クラス

GCKDevice クラス リファレンス

概要

受信デバイスを表すオブジェクト。

NSObject、<NSCopying>、<NSCoding> を継承します。

インスタンス メソッドの概要

(BOOL) - isSameDeviceAs:
 このデバイスが別のデバイスと同じ物理デバイスを参照しているかどうかをテストします。詳細...
 
(BOOL) - hasCapabilities:
 デバイスが指定された機能をサポートしている場合は YES を返します。詳細...
 
(void) - setAttribute:forKey:
 オブジェクトに任意の属性を設定します。詳細...
 
(NSObject< NSCoding > *__nullable) - attributeForKey:
 オブジェクト内の属性を検索します。詳細...
 
(void) - removeAttributeForKey:
 オブジェクトから属性を削除します。詳細...
 
(void) - removeAllAttributes
 オブジェクトからすべての属性を削除します。詳細...
 

プロパティの概要

NSString * ipAddress
 デバイスの IPv4 アドレス(ドット表記)。詳細...
 
uint16_t servicePort
 デバイスのサービスポート。詳細...
 
NSString * deviceID
 デバイスの一意の識別子。詳細...
 
NSString * friendlyName
 デバイスのわかりやすい名前。詳細...
 
NSString * manufacturer
 デバイスのメーカー名。詳細...
 
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: (NSInteger)  deviceCapabilities

デバイスが指定された機能をサポートしている場合は YES を返します。

Parameters
deviceCapabilitiesA bitwise-OR of one or more of the GCKDeviceCapability constants.
- (void) setAttribute: (NSObject< NSCoding > *)  attribute
forKey: (NSString *)  key 

オブジェクトに任意の属性を設定します。

カスタム デバイス プロバイダが、非 Cast デバイスのデバイス固有の情報を保存するために使用する場合があります。

Parameters
attributeThe attribute value, which must be key-value coding compliant, and cannot be nil.
keyThe key that identifies the attribute. The key is an arbitrary string. It cannot be nil.
- (NSObject<NSCoding> * __nullable) attributeForKey: (NSString *)  key

オブジェクト内の属性を検索します。

Parameters
keyThe key that identifies the attribute. The key is an arbitrary string. It cannot be nil.
戻り値
属性の値。そのような属性が存在しない場合は nil
- (void) removeAttributeForKey: (NSString *)  key

オブジェクトから属性を削除します。

Parameters
keyThe key that identifies the attribute. The key is an arbitrary string. It cannot be nil.
- (void) removeAllAttributes

オブジェクトからすべての属性を削除します。

プロパティの詳細

- (NSString*) ipAddress
readnonatomiccopy

デバイスの IPv4 アドレス(ドット表記)。

ネットワーク リクエストを行う際に使用されます。

- (uint16_t) servicePort
readnonatomicassign

デバイスのサービスポート。

- (NSString*) deviceID
readnonatomiccopy

デバイスの一意の識別子。

- (NSString*) friendlyName
readwritenonatomiccopy

デバイスのわかりやすい名前。

これは「リビングルーム」などのユーザーが割り当て可能な名前です。

- (NSString*) manufacturer
readwritenonatomiccopy

デバイスのメーカー名。

Deprecated:
代わりに modelName またはカスタム属性を使用してください。
- (NSString*) modelName
readwritenonatomiccopy

デバイスのモデル名。

- (NSArray<GCKImage *>*) icons
readwritenonatomiccopy

デバイスのアイコンを含む GCKImage オブジェクトの配列。

- (GCKDeviceStatus) status
readwritenonatomicassign

デバイスが最後にスキャンされたときのステータス。

- (NSString*) statusText
readwritenonatomiccopy

現在実行中のレシーバー アプリケーションによって報告されたステータス テキスト(ある場合)。

- (NSString*) deviceVersion
readwritenonatomiccopy

デバイスのプロトコル バージョン。

- (BOOL) isOnLocalNetwork
readnonatomicassign

このデバイスがローカル ネットワーク上にある場合は「はい」。

- (GCKDeviceType) type
readnonatomicassign

デバイスのタイプ。

発足
3.3
- (NSString*) category
readnonatomiccopy

デバイス カテゴリ。デバイスのタイプを一意に識別する文字列。

キャスト デバイスのカテゴリは kGCKCastDeviceCategory です。

- (NSString*) uniqueID
readnonatomiccopy

このデバイスのグローバルに一意の ID。

これは category プロパティと deviceID プロパティの連結です。