GCKMultizoneDevice 类
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
继承自 NSObject、<NSCopying> 和 <NSSecureCoding>。
- (instancetype) initWithJSONObject: |
|
(id) |
JSONObject |
|
- (instancetype) initWithDeviceID: |
|
(NSString *) |
deviceID |
friendlyName: |
|
(NSString *) |
friendlyName |
capabilities: |
|
(NSInteger) |
capabilities |
volumeLevel: |
|
(float) |
volume |
muted: |
|
(BOOL) |
muted |
|
|
| |
指定初始化程序。
- Parameters
-
deviceID | The unique device ID. |
friendlyName | The device's friendly name. |
capabilities | The device capabilities. |
volume | The device volume level. |
muted | Whether the device is muted. |
- (NSString*) friendlyName |
|
readnonatomiccopy |
- (NSInteger) capabilities |
|
readwritenonatomicassign |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003e\u003ccode\u003eGCKMultizoneDevice\u003c/code\u003e represents a device within a multizone group, providing information about its status and capabilities.\u003c/p\u003e\n"],["\u003cp\u003eIt includes properties like \u003ccode\u003edeviceID\u003c/code\u003e, \u003ccode\u003efriendlyName\u003c/code\u003e, \u003ccode\u003ecapabilities\u003c/code\u003e, \u003ccode\u003evolumeLevel\u003c/code\u003e, and \u003ccode\u003emuted\u003c/code\u003e to describe the device.\u003c/p\u003e\n"],["\u003cp\u003eThis class offers methods for initialization using JSON data or specific device attributes.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use this class to manage and control individual devices within a multizone setup.\u003c/p\u003e\n"],["\u003cp\u003eIt inherits from \u003ccode\u003eNSObject\u003c/code\u003e, \u003ccode\u003eNSCopying\u003c/code\u003e, and \u003ccode\u003eNSSecureCoding\u003c/code\u003e for object management and data persistence.\u003c/p\u003e\n"]]],["The GCKMultizoneDevice class represents a device in a multizone group. It can be initialized with JSON data or specific parameters: `deviceID`, `friendlyName`, `capabilities`, `volumeLevel`, and `muted`. The class stores the device's unique ID, its user-friendly name, its capabilities, the current volume level, and whether it's muted. It also inherits `NSObject`, `NSCopying`, and `NSSecureCoding` and is a member of a multizone group.\n"],null,["# GCKMultizoneDevice Class\n\n[Instance Methods](#pub-methods) \\| [Properties](#properties) \nGCKMultizoneDevice Class Reference \n\nOverview\n--------\n\nA member device of a multizone group.\n\nSince\n: 3.1\n\nInherits NSObject, \\\u003cNSCopying\\\u003e, and \\\u003cNSSecureCoding\\\u003e.\n\n|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Instance Method Summary ----------------------- ||\n| (instancetype) | - [initWithJSONObject:](/cast/v3/reference/ios/interface_g_c_k_multizone_device#ae69009999fe65bc4d5e33619d69d2117) |\n| | Initializes the object with the given JSON data. [More...](#ae69009999fe65bc4d5e33619d69d2117) |\n| ||\n| (instancetype) | - [initWithDeviceID:friendlyName:capabilities:volumeLevel:muted:](/cast/v3/reference/ios/interface_g_c_k_multizone_device#a9f512579b6e5ab76ea448b3de13d5fe6) |\n| | Designated initializer. [More...](#a9f512579b6e5ab76ea448b3de13d5fe6) |\n| ||\n\n|-------------|-----------------------------------------------------------------------------------------------------------|\n| Property Summary ---------------- ||\n| NSString \\* | [deviceID](/cast/v3/reference/ios/interface_g_c_k_multizone_device#ae808646da6b04089c3e648ca4d5ddade) |\n| | The unique device ID. [More...](#ae808646da6b04089c3e648ca4d5ddade) |\n| ||\n| NSString \\* | [friendlyName](/cast/v3/reference/ios/interface_g_c_k_multizone_device#a1e69ef49bf9c4b8b35f32a1264ad0ee4) |\n| | The device's friendly name. [More...](#a1e69ef49bf9c4b8b35f32a1264ad0ee4) |\n| ||\n| NSInteger | [capabilities](/cast/v3/reference/ios/interface_g_c_k_multizone_device#a3001d2a962c04cf67a4b454c9484d3e2) |\n| | The device capabilities. [More...](#a3001d2a962c04cf67a4b454c9484d3e2) |\n| ||\n| float | [volumeLevel](/cast/v3/reference/ios/interface_g_c_k_multizone_device#a464741c5f74dbaf3ffc3e410a2542a85) |\n| | The device volume level. [More...](#a464741c5f74dbaf3ffc3e410a2542a85) |\n| ||\n| BOOL | [muted](/cast/v3/reference/ios/interface_g_c_k_multizone_device#ab728b3ef12cc69e5efc4a6f99d906a47) |\n| | Whether the device is muted. [More...](#ab728b3ef12cc69e5efc4a6f99d906a47) |\n| ||\n\nMethod Detail\n-------------\n\n|--------------------------------------|---|------|--------------|---|\n| - (instancetype) initWithJSONObject: | | (id) | *JSONObject* | |\n\nInitializes the object with the given JSON data. \n\n|------------------------------------|---|---------------|----------------|\n| - (instancetype) initWithDeviceID: | | (NSString \\*) | *deviceID* |\n| friendlyName: | | (NSString \\*) | *friendlyName* |\n| capabilities: | | (NSInteger) | *capabilities* |\n| volumeLevel: | | (float) | *volume* |\n| muted: | | (BOOL) | *muted* |\n| | | | |\n\nDesignated initializer.\n\nParameters\n:\n\n |--------------|------------------------------|\n | deviceID | The unique device ID. |\n | friendlyName | The device's friendly name. |\n | capabilities | The device capabilities. |\n | volume | The device volume level. |\n | muted | Whether the device is muted. |\n\n\nProperty Detail\n---------------\n\n|---------------------------------------------------------|-------------------|\n| |-------------------------| | - (NSString\\*) deviceID | | readnonatomiccopy |\n\nThe unique device ID. \n\n|-----------------------------------------------------------------|-------------------|\n| |-----------------------------| | - (NSString\\*) friendlyName | | readnonatomiccopy |\n\nThe device's friendly name. \n\n|---------------------------------------------------------------|--------------------------|\n| |----------------------------| | - (NSInteger) capabilities | | readwritenonatomicassign |\n\nThe device capabilities. \n\n|-----------------------------------------------------|--------------------------|\n| |-----------------------| | - (float) volumeLevel | | readwritenonatomicassign |\n\nThe device volume level. \n\n|---------------------------------------|--------------------------|\n| |----------------| | - (BOOL) muted | | readwritenonatomicassign |\n\nWhether the device is muted."]]