GCKडिवाइस क्लास
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
रिसीवर डिवाइस को दिखाने वाला ऑब्जेक्ट.
NSObject, <NSकॉपी>, और <NSSecureCoding> को इनहेरिट करता है.
- (BOOL) isSameDeviceAs: |
|
(const GCKDevice *) |
other |
|
यह जांच की जाती है कि क्या यह डिवाइस एक ही डिवाइस को दूसरे डिवाइस के तौर पर इस्तेमाल करता है.
अगर दोनों GCKDevice ऑब्जेक्ट की कैटगरी, डिवाइस आईडी, आईपी पता, सर्विस पोर्ट, और प्रोटोकॉल वर्शन एक ही है, तो 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 |
|
डिवाइस के यूनीक आईडी से, डिवाइस की कैटगरी की जानकारी एक्सट्रैक्ट करता है.
- Deprecated:
- डॉट-नोटेशन में डिवाइस के आईपीवी4 पते का इस्तेमाल करें networkAddress. इसका इस्तेमाल नेटवर्क अनुरोध करते समय किया जाता है. यह आईपीवी6 पते से बनाए गए GCKDevice ऑब्जेक्ट के लिए एक खाली स्ट्रिंग होगी.
डिवाइस का आईपी पता.
इसका इस्तेमाल नेटवर्क अनुरोध करते समय किया जाता है.
- से
- 4.2
डिवाइस के लिए यूनीक आइडेंटिफ़ायर.
- (NSString*) friendlyName |
|
readwritenonatomiccopy |
डिवाइस का अनुकूल नाम.
यह उपयोगकर्ता की ओर से असाइन किया जाने वाला नाम है, जैसे कि "Living Room".
GCKImage ऑब्जेक्ट की कैटगरी, जिसमें डिवाइस के आइकॉन हैं.
- (GCKDeviceStatus) status |
|
readwritenonatomicassign |
डिवाइस की स्थिति, जब उसे सबसे हाल में स्कैन किया गया था.
अगर मौजूदा समय में चल रहे रिसीवर ऐप्लिकेशन की ओर से कोई स्टेटस टेक्स्ट रिपोर्ट किया गया हो, तो वह जानकारी.
- (NSString*) deviceVersion |
|
readwritenonatomiccopy |
डिवाइस का प्रोटोकॉल वर्शन.
- (BOOL) isOnLocalNetwork |
|
readnonatomicassign |
हां, अगर यह डिवाइस लोकल नेटवर्क पर है.
डिवाइस किस तरह का है.
- से
- 3.3
डिवाइस की कैटगरी, एक ऐसी स्ट्रिंग है जो डिवाइस के टाइप की खास तौर पर पहचान करती है.
कास्ट डिवाइसों की कैटगरी kGCKCastDeviceCategory होती है.
यह इस डिवाइस के लिए दुनिया भर में इस्तेमाल होने वाला यूनीक आईडी है.
यह category और deviceID प्रॉपर्टी को जोड़कर बनाया जाता है.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eThe \u003ccode\u003eGCKDevice\u003c/code\u003e class represents a Cast receiver device on the network, providing information such as its name, IP address, capabilities, and status.\u003c/p\u003e\n"],["\u003cp\u003eIt offers methods to check device capabilities, compare devices, and manage device-specific attributes.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can access properties like \u003ccode\u003efriendlyName\u003c/code\u003e, \u003ccode\u003emodelName\u003c/code\u003e, \u003ccode\u003edeviceID\u003c/code\u003e, and \u003ccode\u003eicons\u003c/code\u003e to identify and interact with the device.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGCKDevice\u003c/code\u003e class helps in discovering and managing Cast-enabled devices for seamless integration with Cast applications.\u003c/p\u003e\n"],["\u003cp\u003eIt includes properties like \u003ccode\u003enetworkAddress\u003c/code\u003e, \u003ccode\u003eservicePort\u003c/code\u003e and \u003ccode\u003edeviceVersion\u003c/code\u003e for handling network communication and device identification.\u003c/p\u003e\n"]]],["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"],null,[]]