Giao thức <GCKDeviceManagerDelegate>

Tài liệu tham khảo về giao thức <GCKDeviceManagerDelegate>

Tổng quan

Giao thức uỷ quyền GCKDeviceManager.

Trừ phi có quy định khác, phương thức gọi không được giải phóng đối tượng GCKDeviceManager uỷ quyền trong một phương thức uỷ quyền.

Kế thừa <NSObjectNSObject>.

Tóm tắt phương thức của thực thể

(void) - deviceManagerDidConnect:
 Được gọi khi một kết nối đã được thiết lập với thiết bị. Tuỳ chọn khác...
 
(void) - deviceManager:didFailToConnectWithError:
 Được gọi khi kết nối với thiết bị không thành công. Tuỳ chọn khác...
 
(void) - deviceManager:didDisconnectWithError:
 Được gọi khi kết nối với thiết bị đã bị chấm dứt. Tuỳ chọn khác...
 
(void) - deviceManager:didSuspendConnectionWithReason:
 Được gọi khi kết nối với thiết bị bị tạm ngưng, có thể là tạm thời. Tuỳ chọn khác...
 
(void) - deviceManagerDidResumeConnection:rejoinedApplication:
 Được gọi khi một kết nối thiết bị đã bị tạm ngưng trước đó được thiết lập lại. Tuỳ chọn khác...
 
(void) - deviceManager:didConnectToCastApplication:sessionID:launchedApplication:
 Được gọi khi một ứng dụng đã được khởi chạy hoặc tham gia. Tuỳ chọn khác...
 
(void) - deviceManager:didFailToConnectToApplicationWithError:
 Được gọi khi không kết nối được với một ứng dụng. Tuỳ chọn khác...
 
(void) - deviceManager:didDisconnectFromApplicationWithError:
 Được gọi khi ngắt kết nối khỏi ứng dụng hiện tại. Tuỳ chọn khác...
 
(void) - deviceManagerDidStopApplication:
 Được gọi khi yêu cầu dừng ứng dụng đã hoàn tất thành công. Tuỳ chọn khác...
 
(void) - deviceManager:didFailToStopApplicationWithError:
 Được gọi khi yêu cầu dừng ứng dụng không thành công. Tuỳ chọn khác...
 
(void) - deviceManager:didReceiveApplicationMetadata:
 Được gọi bất cứ khi nào siêu dữ liệu ứng dụng cho ứng dụng hiện đang chạy thay đổi. Tuỳ chọn khác...
 
(void) - deviceManager:didReceiveApplicationStatusText:
 Được gọi bất cứ khi nào văn bản trạng thái của ứng dụng đang chạy thay đổi. Tuỳ chọn khác...
 
(void) - deviceManager:volumeDidChangeToLevel:isMuted:
 Được gọi bất cứ khi nào âm lượng thay đổi. Tuỳ chọn khác...
 
(void) - deviceManager:didReceiveActiveInputStatus:
 Được gọi bất cứ khi nào trạng thái đầu vào đang hoạt động thay đổi. Tuỳ chọn khác...
 
(void) - deviceManager:didReceiveStandbyStatus:
 Được gọi bất cứ khi nào trạng thái chờ thay đổi. Tuỳ chọn khác...
 
(void) - deviceManager:request:didFailWithError:
 Được gọi khi một thao tác không đồng bộ không thành công. Tuỳ chọn khác...
 
(void) - deviceManagerDidPair:withGuestModeDevice:
 Được gọi khi một kết nối ở chế độ khách đã được thiết lập với thiết bị. Tuỳ chọn khác...
 

Thông tin chi tiết về phương thức

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

Được gọi khi một kết nối đã được thiết lập với thiết bị.

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

Được gọi khi kết nối với thiết bị không thành công.

Bạn có thể yên tâm giải phóng đối tượng GCKDeviceManager trong lệnh gọi lại này.

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

Được gọi khi kết nối với thiết bị đã bị chấm dứt.

Bạn có thể yên tâm giải phóng đối tượng GCKDeviceManager trong lệnh gọi lại này.

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

Được gọi khi kết nối với thiết bị bị tạm ngưng, có thể là tạm thời.

Khi một kết nối bị tạm ngưng, trình quản lý thiết bị sẽ tự động tìm cách thiết lập lại kết nối vào thời điểm thích hợp. Ứng dụng gọi điện không được tìm cách tự động kết nối lại.

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

Được gọi khi một kết nối thiết bị đã bị tạm ngưng trước đó được thiết lập lại.

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

Được gọi khi một ứng dụng đã được khởi chạy hoặc tham gia.

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

Được gọi khi không kết nối được với một ứng dụng.

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

Được gọi khi ngắt kết nối khỏi ứng dụng hiện tại.

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

Được gọi khi yêu cầu dừng ứng dụng đã hoàn tất thành công.

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

Được gọi khi yêu cầu dừng ứng dụng không thành công.

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

Được gọi bất cứ khi nào siêu dữ liệu ứng dụng cho ứng dụng hiện đang chạy thay đổi.

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

Được gọi bất cứ khi nào văn bản trạng thái của ứng dụng đang chạy thay đổi.

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

Được gọi bất cứ khi nào âm lượng thay đổi.

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

Được gọi bất cứ khi nào trạng thái đầu vào đang hoạt động thay đổi.

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

Được gọi bất cứ khi nào trạng thái chờ thay đổi.

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

Được gọi khi một thao tác không đồng bộ không thành công.

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

Được gọi khi một kết nối ở chế độ khách đã được thiết lập với thiết bị.

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