GCKDevice 类
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
继承 NSObject、<NSDuplicate> 和 <NSCoding>。
- (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 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2022-12-06。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"没有我需要的信息"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"太复杂/步骤太多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"内容需要更新"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/代码问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]