Giao thức <GCKDeviceManagerDelegate>

Tham chiếu giao thức <GCKDeviceManagerDelegate>

Tổng quan

Giao thức uỷ quyền GCKDeviceManager.

Trừ khi có quy định khác, lệnh gọi không được ủy quyền đối tượng GCKDeviceManager uỷ quyền từ 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 thiết lập kết nối với thiết bị. Thêm...
 
(void) - deviceManager:didFailToConnectWithError:
 Được gọi khi không kết nối được với thiết bị. Thêm...
 
(void) - deviceManager:didDisconnectWithError:
 Được gọi khi kết nối với thiết bị đã chấm dứt. Thêm...
 
(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. Thêm...
 
(void) - deviceManagerDidResumeConnection:rejoinedApplication:
 Được gọi khi thiết lập lại kết nối thiết bị bị tạm ngưng trước đó. Thêm...
 
(void) - deviceManager:didConnectToCastApplication:sessionID:launchedApplication:
 Được gọi khi người dùng mở hoặc tham gia một ứng dụng. Thêm...
 
(void) - deviceManager:didFailToConnectToApplicationWithError:
 Được gọi khi không kết nối được với ứng dụng. Thêm...
 
(void) - deviceManager:didDisconnectFromApplicationWithError:
 Được gọi khi bị ngắt kết nối khỏi ứng dụng hiện tại. Thêm...
 
(void) - deviceManagerDidStopApplication:
 Được gọi khi yêu cầu đăng ký dừng đã hoàn tất thành công. Thêm...
 
(void) - deviceManager:didFailToStopApplicationWithError:
 Được gọi khi yêu cầu dừng ứng dụng không thành công. Thêm...
 
(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. Thêm...
 
(void) - deviceManager:didReceiveApplicationStatusText:
 Được gọi bất cứ khi nào văn bản trạng thái ứng dụng hiện đang chạy thay đổi. Thêm...
 
(void) - deviceManager:volumeDidChangeToLevel:isMuted:
 Được gọi bất cứ khi nào âm lượng thay đổi. Thêm...
 
(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. Thêm...
 
(void) - deviceManager:didReceiveStandbyStatus:
 Được gọi bất cứ khi nào trạng thái chờ thay đổi. Thêm...
 
(void) - deviceManager:request:didFailWithError:
 Được gọi khi thao tác không đồng bộ không thành công. Thêm...
 
(void) - deviceManagerDidPair:withGuestModeDevice:
 Được gọi khi thiết lập kết nối ở chế độ khách với thiết bị. Thêm...
 

Chi tiết phương thức

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

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

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

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

Bạn có thể giải phóng đối tượng GCKDeviceManager từ 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ị đã chấm dứt.

Bạn có thể giải phóng đối tượng GCKDeviceManager từ 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 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 không được cố gắng buộc 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 thiết lập lại kết nối thiết bị bị tạm ngưng trước đó.

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 người dùng mở hoặc tham gia một ứng dụng.

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 ứ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 bị 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 đăng ký 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 ứng dụng hiện đ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 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 thiết lập kết nối ở chế độ khách với thiết bị.

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