4jcraft/Minecraft.Client/Platform/Common/Network/SessionInfo.h
2026-03-30 02:17:54 -05:00

41 lines
1 KiB
C++

#pragma once
// A struct that we store in the QoS data when we are hosting the session. Max
// size 1020 bytes.
typedef struct _GameSessionData {
unsigned short netVersion; // 2 bytes
unsigned int m_uiGameHostSettings; // 4 bytes
unsigned int texturePackParentId; // 4 bytes
unsigned char subTexturePackId; // 1 byte
bool isReadyToJoin; // 1 byte
_GameSessionData() {
netVersion = 0;
m_uiGameHostSettings = 0;
texturePackParentId = 0;
subTexturePackId = 0;
}
} GameSessionData;
class FriendSessionInfo {
public:
SessionID sessionId;
wchar_t* displayLabel;
unsigned char displayLabelLength;
unsigned char displayLabelViewableStartIndex;
GameSessionData data;
bool hasPartyMember;
FriendSessionInfo() {
displayLabel = nullptr;
displayLabelLength = 0;
displayLabelViewableStartIndex = 0;
hasPartyMember = false;
}
~FriendSessionInfo() {
if (displayLabel != nullptr) delete displayLabel;
}
};