diff options
| author | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
|---|---|---|
| committer | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
| commit | b691c43c44ff180d10e7d4a9afc83b98551ff586 (patch) | |
| tree | 3e9849222cbc6ba49f2f1fc6e5fe7179632c7390 /Minecraft.Client/Common/Network/NetworkPlayerInterface.h | |
| parent | def8cb415354ac390b7e89052a50605285f1aca9 (diff) | |
Initial commit
Diffstat (limited to 'Minecraft.Client/Common/Network/NetworkPlayerInterface.h')
| -rw-r--r-- | Minecraft.Client/Common/Network/NetworkPlayerInterface.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Minecraft.Client/Common/Network/NetworkPlayerInterface.h b/Minecraft.Client/Common/Network/NetworkPlayerInterface.h new file mode 100644 index 00000000..501b08ff --- /dev/null +++ b/Minecraft.Client/Common/Network/NetworkPlayerInterface.h @@ -0,0 +1,31 @@ +#pragma once + +class Socket; + +// This is the platform independent interface for dealing with players within a network game. This should be used directly by game code (and GameNetworkManager) rather than the platform-specific implementations. + +class INetworkPlayer +{ +public: + virtual ~INetworkPlayer() {} + virtual unsigned char GetSmallId() = 0; + virtual void SendData(INetworkPlayer *player, const void *pvData, int dataSize, bool lowPriority) = 0; + virtual bool IsSameSystem(INetworkPlayer *player) = 0; + virtual int GetSendQueueSizeBytes( INetworkPlayer *player, bool lowPriority ) = 0; + virtual int GetSendQueueSizeMessages( INetworkPlayer *player, bool lowPriority ) = 0; + virtual int GetCurrentRtt() = 0; + virtual bool IsHost() = 0; + virtual bool IsGuest() = 0; + virtual bool IsLocal() = 0; + virtual int GetSessionIndex() = 0; + virtual bool IsTalking() = 0; + virtual bool IsMutedByLocalUser(int userIndex) = 0; + virtual bool HasVoice() = 0; + virtual bool HasCamera() = 0; + virtual int GetUserIndex() = 0; + virtual void SetSocket(Socket *pSocket) = 0; + virtual Socket *GetSocket() = 0; + virtual const wchar_t *GetOnlineName() = 0; + virtual wstring GetDisplayName() = 0; + virtual PlayerUID GetUID() = 0; +}; |
