Delegate through which a SharePlayManager reports discovery, connection, data-transfer, and gameplay-result events.
More...
#include <SharePlayManager.h>
Delegate through which a SharePlayManager reports discovery, connection, data-transfer, and gameplay-result events.
◆ sharePlayManager:disconnectClient:
| - (void) sharePlayManager: |
|
(SharePlayManager *) | manager |
| disconnectClient: |
|
(MCPeerID *) | peer |
|
optionalrequired |
The host lost its client, or gave up clock synchronisation.
- Parameters
-
| manager | The reporting manager. |
| peer | The peer that dropped. |
◆ sharePlayManager:findHostID:
| - (void) sharePlayManager: |
|
(SharePlayManager *) | manager |
| findHostID: |
|
(MCPeerID *) | hostID |
|
optionalrequired |
A candidate host was discovered while browsing.
- Parameters
-
| manager | The reporting manager. |
| hostID | The discovered host's peer identifier. |
◆ sharePlayManager:lostHostID:
| - (void) sharePlayManager: |
|
(SharePlayManager *) | manager |
| lostHostID: |
|
(MCPeerID *) | hostID |
|
optionalrequired |
A previously discovered host is no longer reachable.
- Parameters
-
| manager | The reporting manager. |
| hostID | The lost host's peer identifier. |
◆ sharePlayManager:musicDataReceived:
| - (BOOL) sharePlayManager: |
|
(SharePlayManager *) | manager |
| musicDataReceived: |
|
(NSData *) | musicData |
|
optionalrequired |
The client received the music data payload.
- Parameters
-
| manager | The reporting manager. |
| musicData | The received music data. |
- Returns
- Whether loading of the received data succeeded.
◆ sharePlayManager:receiveExistMusicData:
| - (void) sharePlayManager: |
|
(SharePlayManager *) | manager |
| receiveExistMusicData: |
|
(BOOL) | exist |
|
optionalrequired |
The host learned whether the client already has the music data.
- Parameters
-
| manager | The reporting manager. |
| exist | Whether the client reported it already has the data. |
◆ sharePlayManager:receiveFinalScore:bonus:fullCombo:
| - (void) sharePlayManager: |
|
(SharePlayManager *) | manager |
| receiveFinalScore: |
|
(int) | score |
| bonus: |
|
(int) | bonus |
| fullCombo: |
|
(BOOL) | fullCombo |
|
optionalrequired |
The peer's end-of-play result arrived.
- Parameters
-
| manager | The reporting manager. |
| score | The peer's final score. |
| bonus | The peer's end-of-play bonus. |
| fullCombo | Whether the peer achieved a full combo. |
◆ sharePlayManager:receiveMusicInfo:
| - (BOOL) sharePlayManager: |
|
(SharePlayManager *) | manager |
| receiveMusicInfo: |
|
(NSDictionary *) | musicInfo |
|
optionalrequired |
The client received the song's metadata and is asked whether it accepts it.
- Parameters
-
| manager | The reporting manager. |
| musicInfo | The song's metadata dictionary. |
- Returns
- Whether the client already possesses the music data.
◆ sharePlayManager:receiveProgress:
| - (void) sharePlayManager: |
|
(SharePlayManager *) | manager |
| receiveProgress: |
|
(float) | progress |
|
optional |
Reports the progress of the incoming music-data stream as a fraction in 0..1.
- Parameters
-
| manager | The reporting manager. |
| progress | The received fraction, clamped to 1.0. |
◆ sharePlayManager:receiveScore:
| - (void) sharePlayManager: |
|
(SharePlayManager *) | manager |
| receiveScore: |
|
(int) | score |
|
optionalrequired |
A mid-play score update arrived from the peer.
- Parameters
-
| manager | The reporting manager. |
| score | The peer's score. |
◆ sharePlayManager:startMusicTime:
| - (void) sharePlayManager: |
|
(SharePlayManager *) | manager |
| startMusicTime: |
|
(float) | time |
|
optionalrequired |
Requests that play begin after the given number of seconds, clock-corrected per side.
- Parameters
-
| manager | The reporting manager. |
| time | Seconds from now until play should start. |
◆ sharePlayManagerAllClientLoaded:
Both sides finished loading the chart.
- Parameters
-
| manager | The reporting manager. |
◆ sharePlayManagerAllClientReady:
Both sides signalled they are ready to load the chart.
- Parameters
-
| manager | The reporting manager. |
◆ sharePlayManagerConnectClient:
The clock handshake settled and the client connection is confirmed on the host.
- Parameters
-
| manager | The reporting manager. |
◆ sharePlayManagerConnectHost:
The client established a connection to the host.
- Parameters
-
| manager | The reporting manager. |
◆ sharePlayManagerDisconnect:
The client accepted a role change back to the ready-to-invite state after a drop.
- Parameters
-
| manager | The reporting manager. |
◆ sharePlayManagerHostSelectStart:
The host chose the song and requested the shared play to begin.
- Parameters
-
| manager | The reporting manager. |
◆ sharePlayManagerSuccessSendMusicData:
The music data was delivered to the client successfully.
- Parameters
-
| manager | The reporting manager. |
The documentation for this protocol was generated from the following file: