סוג מכשיר GCKDevice
אובייקט שמייצג מכשיר המקבל.
ירש את NSObject, <NS Copy> ו-<NSSecureCoding>.
- (BOOL) isSameDeviceAs: |
|
(const GCKDevice *) |
other |
|
הפונקציה בודקת אם המכשיר הזה מתייחס לאותו מכשיר פיזי כמו מכשיר אחר.
הפונקציה מחזירה את הערך YES
אם לשני האובייקטים GCKDevice יש אותה קטגוריה, מזהה מכשיר, כתובת IP, יציאת שירות וגרסת פרוטוקול.
- (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 |
|
|
| |
מגדיר מאפיין שרירותי באובייקט.
ייתכן שספקי מכשירים מותאמים אישית ישתמשו בה כדי לאחסן מידע ספציפי למכשיר עבור מכשירים שאינם מסוג 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 . |
- (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 |
|
משלים את קטגוריית המכשיר ממזהה ייחודי של מכשיר.
כתובת ה-IP של המכשיר.
משמש לשליחת בקשות רשת.
- מאז
- 4.2
- (NSString*) friendlyName |
|
readwritenonatomiccopy |
השם ידידותי של המכשיר.
זה שם שהמשתמש יכול להקצות, כמו "Living Room".
מערך של GCKImage אובייקטים שמכילים סמלים למכשיר.
- (GCKDeviceStatus) status |
|
readwritenonatomicassign |
סטטוס המכשיר בזמן הסריקה האחרונה.
טקסט הסטטוס המדווח על ידי אפליקציית המקבל שפועלת כרגע, אם יש כזו.
- (NSString*) deviceVersion |
|
readwritenonatomiccopy |
גרסת הפרוטוקול של המכשיר.
- (BOOL) isOnLocalNetwork |
|
readnonatomicassign |
כן אם המכשיר הזה מחובר לרשת המקומית.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2023-12-02 (שעון UTC).
[null,null,["עדכון אחרון: 2023-12-02 (שעון UTC)."],[[["The `GCKDevice` class represents a Cast receiver device on the network, providing information such as its name, IP address, capabilities, and status."],["It offers methods to check device capabilities, compare devices, and manage device-specific attributes."],["Developers can access properties like `friendlyName`, `modelName`, `deviceID`, and `icons` to identify and interact with the device."],["The `GCKDevice` class helps in discovering and managing Cast-enabled devices for seamless integration with Cast applications."],["It includes properties like `networkAddress`, `servicePort` and `deviceVersion` for handling network communication and device identification."]]],["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"]]