โปรโตคอล <GCKDeviceManagerDelegate>

การอ้างอิงโปรโตคอล <GCKDeviceManagerDelegate>

ภาพรวม

GCKDeviceManager โปรโตคอลการมอบสิทธิ์

เว้นแต่จะระบุไว้เป็นอย่างอื่น ผู้เรียกใช้ไม่ควรปล่อยออบเจ็กต์ GCKDeviceManager ที่มอบสิทธิ์จากภายในเมธอดที่มอบสิทธิ์

สืบทอด <NSObjectNSObject>

สรุปวิธีการของอินสแตนซ์

(void) - deviceManagerDidConnect:
 เรียกใช้เมื่อมีการสร้างการเชื่อมต่อกับอุปกรณ์ เพิ่มเติม...
 
(void) - deviceManager:didFailToConnectWithError:
 เรียกใช้เมื่อเชื่อมต่อกับอุปกรณ์ไม่สำเร็จ เพิ่มเติม...
 
(void) - deviceManager:didDisconnectWithError:
 เรียกใช้เมื่อการเชื่อมต่อกับอุปกรณ์สิ้นสุดลง เพิ่มเติม...
 
(void) - deviceManager:didSuspendConnectionWithReason:
 เรียกใช้เมื่อระบบระงับการเชื่อมต่อกับอุปกรณ์ ซึ่งอาจเป็นการระงับชั่วคราว เพิ่มเติม...
 
(void) - deviceManagerDidResumeConnection:rejoinedApplication:
 เรียกใช้เมื่อมีการสร้างการเชื่อมต่ออุปกรณ์ที่ถูกระงับก่อนหน้านี้อีกครั้ง เพิ่มเติม...
 
(void) - deviceManager:didConnectToCastApplication:sessionID:launchedApplication:
 เรียกใช้เมื่อเปิดตัวหรือเข้าร่วมแอปพลิเคชัน เพิ่มเติม...
 
(void) - deviceManager:didFailToConnectToApplicationWithError:
 เรียกใช้เมื่อเชื่อมต่อกับแอปพลิเคชันไม่สำเร็จ เพิ่มเติม...
 
(void) - deviceManager:didDisconnectFromApplicationWithError:
 เรียกใช้เมื่อยกเลิกการเชื่อมต่อจากแอปพลิเคชันปัจจุบัน เพิ่มเติม...
 
(void) - deviceManagerDidStopApplication:
 เรียกใช้เมื่อคำขอหยุดแอปพลิเคชันเสร็จสมบูรณ์แล้ว เพิ่มเติม...
 
(void) - deviceManager:didFailToStopApplicationWithError:
 เรียกใช้เมื่อคำขอหยุดแอปพลิเคชันล้มเหลว เพิ่มเติม...
 
(void) - deviceManager:didReceiveApplicationMetadata:
 เรียกใช้เมื่อใดก็ตามที่ข้อมูลเมตาของแอปพลิเคชันสำหรับแอปพลิเคชันที่กำลังทำงานอยู่มีการเปลี่ยนแปลง เพิ่มเติม...
 
(void) - deviceManager:didReceiveApplicationStatusText:
 เรียกใช้เมื่อใดก็ตามที่ข้อความสถานะของแอปพลิเคชันที่กำลังทำงานอยู่มีการเปลี่ยนแปลง เพิ่มเติม...
 
(void) - deviceManager:volumeDidChangeToLevel:isMuted:
 เรียกใช้ทุกครั้งที่ระดับเสียงเปลี่ยนแปลง เพิ่มเติม...
 
(void) - deviceManager:didReceiveActiveInputStatus:
 เรียกใช้เมื่อใดก็ตามที่สถานะอินพุตที่ใช้งานอยู่มีการเปลี่ยนแปลง เพิ่มเติม...
 
(void) - deviceManager:didReceiveStandbyStatus:
 เรียกใช้เมื่อใดก็ตามที่สถานะสแตนด์บายเปลี่ยนแปลง เพิ่มเติม...
 
(void) - deviceManager:request:didFailWithError:
 เรียกใช้เมื่อการดำเนินการแบบไม่พร้อมกันล้มเหลว เพิ่มเติม...
 
(void) - deviceManagerDidPair:withGuestModeDevice:
 เรียกใช้เมื่อมีการสร้างการเชื่อมต่อโหมดผู้มาเยือนกับอุปกรณ์ เพิ่มเติม...
 

รายละเอียดวิธีการ

- (void) deviceManagerDidConnect: (GCKDeviceManager *)  deviceManager
optional

เรียกใช้เมื่อมีการสร้างการเชื่อมต่อกับอุปกรณ์

Parameters
deviceManagerThe device manager.
- (void) deviceManager: (GCKDeviceManager *)  deviceManager
didFailToConnectWithError: (NSError *)  error 
optional

เรียกใช้เมื่อเชื่อมต่อกับอุปกรณ์ไม่สำเร็จ

คุณสามารถปล่อยออบเจ็กต์ GCKDeviceManager จากภายในโค้ดเรียกกลับนี้ได้อย่างปลอดภัย

Parameters
deviceManagerThe device manager.
errorThe error that caused the connection to fail.
- (void) deviceManager: (GCKDeviceManager *)  deviceManager
didDisconnectWithError: (NSError *__nullable)  error 
optional

เรียกใช้เมื่อการเชื่อมต่อกับอุปกรณ์สิ้นสุดลง

คุณสามารถปล่อยออบเจ็กต์ GCKDeviceManager จากภายในโค้ดเรียกกลับนี้ได้อย่างปลอดภัย

Parameters
deviceManagerThe device manager.
errorThe error that caused the disconnection; nil if there was no error (for example, an intentional disconnect).
- (void) deviceManager: (GCKDeviceManager *)  deviceManager
didSuspendConnectionWithReason: (GCKConnectionSuspendReason reason 
optional

เรียกใช้เมื่อระบบระงับการเชื่อมต่อกับอุปกรณ์ ซึ่งอาจเป็นการระงับชั่วคราว

เมื่อระบบระงับการเชื่อมต่อ ตัวจัดการอุปกรณ์จะพยายามสร้างการเชื่อมต่อใหม่โดยอัตโนมัติในเวลาที่เหมาะสม แอปพลิเคชันการโทรไม่ควรพยายามบังคับให้เชื่อมต่อใหม่ด้วยตัวเอง

Parameters
deviceManagerThe device manager.
reasonThe reason for the suspension.
- (void) deviceManagerDidResumeConnection: (GCKDeviceManager *)  deviceManager
rejoinedApplication: (BOOL)  rejoinedApplication 
optional

เรียกใช้เมื่อมีการสร้างการเชื่อมต่ออุปกรณ์ที่ถูกระงับก่อนหน้านี้อีกครั้ง

Parameters
deviceManagerThe device manager.
rejoinedApplicationIf a connection had been established to a receiver application at the time of the suspension, this flag indicates whether that application has been successfully re-joined. This value would be NO if, for example, the application was terminated during the time that the device manager was attempting to re-establish its connection to the device.
- (void) deviceManager: (GCKDeviceManager *)  deviceManager
didConnectToCastApplication: (GCKApplicationMetadata *)  applicationMetadata
sessionID: (NSString *)  sessionID
launchedApplication: (BOOL)  launchedApplication 
optional

เรียกใช้เมื่อเปิดตัวหรือเข้าร่วมแอปพลิเคชัน

Parameters
deviceManagerThe device manager.
applicationMetadataMetadata about the application.
sessionIDThe current application session ID that is active on the receiver.
launchedApplicationYES if the application was launched as part of the connection, or NO if the application was already running and was joined.
- (void) deviceManager: (GCKDeviceManager *)  deviceManager
didFailToConnectToApplicationWithError: (NSError *)  error 
optional

เรียกใช้เมื่อเชื่อมต่อกับแอปพลิเคชันไม่สำเร็จ

Parameters
deviceManagerThe device manager.
errorThe error that caused the failure.
- (void) deviceManager: (GCKDeviceManager *)  deviceManager
didDisconnectFromApplicationWithError: (NSError *__nullable)  error 
optional

เรียกใช้เมื่อยกเลิกการเชื่อมต่อจากแอปพลิเคชันปัจจุบัน

Parameters
deviceManagerThe device manager.
errorThe error that caused the disconnect, or nil if this was a normal disconnect.
- (void) deviceManagerDidStopApplication: (GCKDeviceManager *)  deviceManager
optional

เรียกใช้เมื่อคำขอหยุดแอปพลิเคชันเสร็จสมบูรณ์แล้ว

Parameters
deviceManagerThe device manager.
- (void) deviceManager: (GCKDeviceManager *)  deviceManager
didFailToStopApplicationWithError: (NSError *)  error 
optional

เรียกใช้เมื่อคำขอหยุดแอปพลิเคชันล้มเหลว

Parameters
deviceManagerThe device manager.
errorThe error that caused the failure.
- (void) deviceManager: (GCKDeviceManager *)  deviceManager
didReceiveApplicationMetadata: (GCKApplicationMetadata *__nullable)  metadata 
optional

เรียกใช้เมื่อใดก็ตามที่ข้อมูลเมตาของแอปพลิเคชันสำหรับแอปพลิเคชันที่กำลังทำงานอยู่มีการเปลี่ยนแปลง

Parameters
deviceManagerThe device manager.
metadataThe application metadata. May be nil if no application is currently running.
- (void) deviceManager: (GCKDeviceManager *)  deviceManager
didReceiveApplicationStatusText: (NSString *__nullable)  applicationStatusText 
optional

เรียกใช้เมื่อใดก็ตามที่ข้อความสถานะของแอปพลิเคชันที่กำลังทำงานอยู่มีการเปลี่ยนแปลง

Parameters
deviceManagerThe device manager.
applicationStatusTextThe application status text. May be nil if no application is currently running or if the application did not report any status text.
- (void) deviceManager: (GCKDeviceManager *)  deviceManager
volumeDidChangeToLevel: (float)  volumeLevel
isMuted: (BOOL)  isMuted 
optional

เรียกใช้ทุกครั้งที่ระดับเสียงเปลี่ยนแปลง

Parameters
deviceManagerThe device manager.
volumeLevelThe current device volume level.
isMutedThe current device mute state.
- (void) deviceManager: (GCKDeviceManager *)  deviceManager
didReceiveActiveInputStatus: (GCKActiveInputStatus activeInputStatus 
optional

เรียกใช้เมื่อใดก็ตามที่สถานะอินพุตที่ใช้งานอยู่มีการเปลี่ยนแปลง

Parameters
deviceManagerThe device manager.
activeInputStatusThe active input status.
- (void) deviceManager: (GCKDeviceManager *)  deviceManager
didReceiveStandbyStatus: (GCKStandbyStatus standbyStatus 
optional

เรียกใช้เมื่อใดก็ตามที่สถานะสแตนด์บายเปลี่ยนแปลง

Parameters
deviceManagerThe device manager.
standbyStatusThe standby status.
- (void) deviceManager: (GCKDeviceManager *)  deviceManager
request: (NSInteger)  requestID
didFailWithError: (NSError *)  error 
optional

เรียกใช้เมื่อการดำเนินการแบบไม่พร้อมกันล้มเหลว

Parameters
deviceManagerThe device manager.
requestIDThe ID of the request that failed.
errorThe error.
- (void) deviceManagerDidPair: (GCKDeviceManager *)  deviceManager
withGuestModeDevice: (GCKDevice *)  guestModeDevice 
optional

เรียกใช้เมื่อมีการสร้างการเชื่อมต่อโหมดผู้มาเยือนกับอุปกรณ์

Parameters
deviceManagerThe device manager.
guestModeDeviceThe device object for the concrete guest mode device.