GCKDevice クラス
    
    
      
    
    
      
      コレクションでコンテンツを整理
    
    
      
      必要に応じて、コンテンツの保存と分類を行います。
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
    
NSObject、<NSCopying>、<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 |  | 
      
 
デバイスの一意の ID からデバイス カテゴリを抽出します。
 
 
デバイスの IP アドレス。
ネットワーク リクエストを行うときに使用します。
- 開始:
- 4.2 
 
 
  
  | 
        
          | - (NSString*) friendlyName |  | readwritenonatomiccopy | 
 
デバイスのわかりやすい名前です。
これは「リビングルーム」など、ユーザーが割り当て可能な名前です。
 
 
  
  | 
        
          | - (GCKDeviceStatus) status |  | readwritenonatomicassign | 
 
 
現在実行中の受信アプリケーションによって報告されるステータス テキスト(存在する場合)。
 
 
  
  | 
        
          | - (NSString*) deviceVersion |  | readwritenonatomiccopy | 
 
 
  
  | 
        
          | - (BOOL) isOnLocalNetwork |  | readnonatomicassign | 
 
このデバイスがローカル ネットワーク上にある場合は YES。
 
 
 
  
  
  
 
  
    
    
    
  
  
  特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
  最終更新日 2025-07-25 UTC。
  
  
  
    
      [null,null,["最終更新日 2025-07-25 UTC。"],[],["The GCKDevice class represents a receiver device, inheriting from NSObject. Key actions include: checking if a device is the same as another (`isSameDeviceAs:`), verifying device capabilities (`hasCapabilities:`), setting, retrieving, and removing attributes (`setAttribute:forKey:`, `attributeForKey:`, `removeAttributeForKey:`, `removeAllAttributes`), and extracting device category from a unique ID (`deviceCategoryForDeviceUniqueID:`). The class also exposes properties like `ipAddress`, `networkAddress`, `servicePort`, `deviceID`, `friendlyName`, `modelName`, `icons`, `status`, `statusText`, `deviceVersion`, `isOnLocalNetwork`, `type`, `category`, and `uniqueID` for device identification and management.\n"]]