<GPGRealTimeRoomDelegate> Protocol Reference

<GPGRealTimeRoomDelegate> Protocol Reference

Overview

The delegate used for receiving room updates and changes.

Public Member Functions

(void) - didAcceptRealTimeInviteForRoom:
 Called after the user has chosen to accept a real-time invitation using the notification actions introduced in iOS 8.
(void) - didDeclineRealTimeInviteForRoom:
 Called after the user has chosen to decline a real-time invitation using the notification actions introduced in iOS 8.
(void) - didReceiveRealTimeInviteForRoom:
 Called when a real-time invite is received.
(void) - room:didChangeStatus:
 Called when the room changes state.
(void) - room:didChangeConnectedSet:
 Called when the client has entered or left the connected set.
(void) - room:participant:didChangeStatus:
 Called when a participant's status changes, including the status of the local participant.
(void) - room:didReceiveData:fromParticipant:dataMode:
 Called when the room receives new data.
(void) - room:didSendReliableId:results:
 Called with the result when a reliable message is sent to another peer.
(void) - room:didFailWithError:
 Called when a room operation has failed with an error.

Member Function Documentation

- (void) didAcceptRealTimeInviteForRoom: (GPGRealTimeRoomData *)  roomData [optional]

Called after the user has chosen to accept a real-time invitation using the notification actions introduced in iOS 8.

Parameters:
roomDataThe GPGRealTimeRoomData instance holding data from an invite.
- (void) didDeclineRealTimeInviteForRoom: (GPGRealTimeRoomData *)  roomData [optional]

Called after the user has chosen to decline a real-time invitation using the notification actions introduced in iOS 8.

Parameters:
roomDataThe GPGRealTimeRoomData instance holding data from an invite.
- (void) didReceiveRealTimeInviteForRoom: (GPGRealTimeRoomData *)  roomData [optional]

Called when a real-time invite is received.

Parameters:
roomDataThe GPGRealTimeRoomData instance holding data from an invite.
- (void) room: (GPGRealTimeRoom *)  room
didChangeStatus: (GPGRealTimeRoomStatus)  status 
[optional]

Called when the room changes state.

Parameters:
roomThe room that changed.
statusThe room's current status.
- (void) room: (GPGRealTimeRoom *)  room
didChangeConnectedSet: (BOOL)  connected 
[optional]

Called when the client has entered or left the connected set.

Parameters:
roomThe room that changed.
connectedWhether the client is in the connected set.
- (void) room: (GPGRealTimeRoom *)  room
participant: (GPGRealTimeParticipant *)  participant
didChangeStatus: (GPGRealTimeParticipantStatus)  status 
[optional]

Called when a participant's status changes, including the status of the local participant.

Parameters:
roomThe room the participant is in.
participantThe participant whose status changed.
statusThe new participant status.
- (void) room: (GPGRealTimeRoom *)  room
didReceiveData: (NSData *)  data
fromParticipant: (GPGRealTimeParticipant *)  participant
dataMode: (GPGRealTimeDataMode)  dataMode 
[optional]

Called when the room receives new data.

Be careful to ensure cross-platform endianness.

Parameters:
roomThe room that received new data.
dataThe raw data received.
participantThe participant who sent the data.
dataModeThe mode used to send the data.
- (void) room: (GPGRealTimeRoom *)  room
didSendReliableId: (int)  reliableId
results: (NSArray *)  results 
[optional]

Called with the result when a reliable message is sent to another peer.

Parameters:
roomThe room that the recipients are a part of.
reliableIdThe id of the reliable packet sent.
resultsAn array of GPGRealTimeReliableMessageResult containing the results for the send to each recipient.
- (void) room: (GPGRealTimeRoom *)  room
didFailWithError: (NSError *)  error 
[optional]

Called when a room operation has failed with an error.

If this is called, the room is likely disconnected or disconnecting.

Parameters:
roomThe room that had the error
errorThe error that was found for the room.

Оставить отзыв о...

Текущей странице
Play Games Services for iOS
Play Games Services for iOS