// This is the lowest level class for handling the concept of a player on Sony platforms. This is managed by SQRNetworkManager. The game shouldn't directly communicate
// with this class, as it is wrapped by NetworkPlayerSony which is an implementation of a platform-independent interface INetworkPlayer.
classSQRNetworkPlayer
{
#ifdef __ORBIS__
friendclassSQRNetworkManager_Orbis;
friendclassSonyVoiceChat_Orbis;
#elif defined __PS3__
friendclassSQRNetworkManager_PS3;
#else // __PSVITA__
friendclassSQRNetworkManager_Vita;
friendclassSQRNetworkManager_AdHoc_Vita;
friendclassSonyVoiceChat_Vita;
#endif
friendclassSQRNetworkManager;
friendclassNetworkPlayerSony;
friendclassCPlatformNetworkManagerSony;
intGetSmallId();
wchar_t*GetName();
boolIsRemote();
boolIsHost();
boolIsLocal();
intGetLocalPlayerIndex();
boolIsSameSystem(SQRNetworkPlayer*other);
uintptr_tGetCustomDataValue();
voidSetCustomDataValue(uintptr_tdata);
boolHasVoice();
boolIsTalking();
boolIsMutedByLocalUser(intuserIndex);
staticconstintSNP_FLAG_CONNECTION_COMPLETE=1;// This player has a fully connected Rudp or other local link established (to a remote player if this is on the host, to the host if this is a client) - or isn't expected to have one
staticconstintSNP_FLAG_SMALLID_ALLOCATED=2;// This player has a small id allocated
staticconstintSNP_FLAG_SMALLID_CONFIRMED=4;// This player's small id has been confirmed as received by the client (only relevant for players using network communications, others set at the same time as allocating)
staticconstintSNP_FLAG_READY_MASK=7;// Mask indicated all bits which must be set in the flags for this player to be considered "ready"
staticconstintSNP_MAX_PAYLOAD=1346;// This is the default RUDP payload size - if we want to change this we'll need to use cellRudpSetOption to set something else & adjust segment size
typedefenum
{
SNP_TYPE_HOST,// This player represents the host
SNP_TYPE_LOCAL,// On host - this player is a local player that needs communicated with specially not using rudp. On clients - this is a local player, where m_rudpCtx is the context used to communicate from this player to/from the host
SNP_TYPE_REMOTE,// On host - this player's m_rupdCtx can be used to communicate from between the host and this player. On clients - this is a remote player that cannot be communicated with
voidInitialDataReceived(InitSendData*ISD);// Only for remote players as viewed from the host, this is set when the host has received confirmation that the client has received the small id for this player, ie it is now safe to send data to