mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-24 15:33:37 +00:00
47 lines
1.6 KiB
C++
47 lines
1.6 KiB
C++
#pragma once
|
|
|
|
#include "NetworkPlayerInterface.h"
|
|
|
|
// This is an implementation of the INetworkPlayer interface for the supported
|
|
// QNet-backed path. It
|
|
// effectively wraps the IQNetPlayer class in a non-platform-specific way. It is
|
|
// managed by PlatformNetworkManagerStub.
|
|
|
|
class NetworkPlayerQNet : public INetworkPlayer {
|
|
public:
|
|
// Common player interface
|
|
NetworkPlayerQNet(IQNetPlayer* qnetPlayer);
|
|
virtual unsigned char GetSmallId();
|
|
virtual void SendData(INetworkPlayer* player, const void* pvData,
|
|
int dataSize, bool lowPriority, bool ack);
|
|
virtual bool IsSameSystem(INetworkPlayer* player);
|
|
virtual int GetOutstandingAckCount();
|
|
virtual int GetSendQueueSizeBytes(INetworkPlayer* player, bool lowPriority);
|
|
virtual int GetSendQueueSizeMessages(INetworkPlayer* player,
|
|
bool lowPriority);
|
|
virtual int GetCurrentRtt();
|
|
virtual bool IsHost();
|
|
virtual bool IsGuest();
|
|
virtual bool IsLocal();
|
|
virtual int GetSessionIndex();
|
|
virtual bool IsTalking();
|
|
virtual bool IsMutedByLocalUser(int userIndex);
|
|
virtual bool HasVoice();
|
|
virtual bool HasCamera();
|
|
virtual int GetUserIndex();
|
|
virtual void SetSocket(Socket* pSocket);
|
|
virtual Socket* GetSocket();
|
|
virtual const wchar_t* GetOnlineName();
|
|
virtual std::wstring GetDisplayName();
|
|
virtual PlayerUID GetUID();
|
|
virtual void SentChunkPacket();
|
|
virtual int GetTimeSinceLastChunkPacket_ms();
|
|
|
|
IQNetPlayer* GetQNetPlayer();
|
|
|
|
private:
|
|
IQNetPlayer* m_qnetPlayer;
|
|
Socket* m_pSocket;
|
|
int64_t m_lastChunkPacketTime;
|
|
};
|