2016-11-25 07:00:48 -05:00
|
|
|
namespace Components
|
|
|
|
{
|
|
|
|
class Party : public Component
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Party();
|
2016-08-15 10:40:30 -04:00
|
|
|
~Party();
|
|
|
|
|
2016-11-25 07:00:48 -05:00
|
|
|
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
|
|
|
|
const char* getName() { return "Party"; };
|
|
|
|
#endif
|
|
|
|
|
|
|
|
static Network::Address Target();
|
|
|
|
static void Connect(Network::Address target);
|
|
|
|
static const char* GetLobbyInfo(SteamID lobby, std::string key);
|
|
|
|
static void RemoveLobby(SteamID lobby);
|
|
|
|
|
|
|
|
static bool PlaylistAwaiting();
|
|
|
|
static void PlaylistContinue();
|
|
|
|
static void PlaylistError(std::string error);
|
|
|
|
|
|
|
|
static void ConnectError(std::string message);
|
|
|
|
|
2016-11-27 08:30:21 -05:00
|
|
|
static std::string GetMotd();
|
|
|
|
|
2016-11-25 07:00:48 -05:00
|
|
|
private:
|
|
|
|
class JoinContainer
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Network::Address target;
|
|
|
|
std::string challenge;
|
2016-11-27 08:30:21 -05:00
|
|
|
std::string motd;
|
2016-11-25 07:00:48 -05:00
|
|
|
DWORD joinTime;
|
|
|
|
bool valid;
|
|
|
|
int matchType;
|
|
|
|
|
|
|
|
Utils::InfoString info;
|
|
|
|
|
|
|
|
// Party-specific stuff
|
|
|
|
DWORD requestTime;
|
2016-11-27 08:30:21 -05:00
|
|
|
bool awaitingPlaylist;
|
2016-11-25 07:00:48 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
static JoinContainer Container;
|
|
|
|
static std::map<uint64_t, Network::Address> LobbyMap;
|
|
|
|
|
|
|
|
static SteamID GenerateLobbyId();
|
|
|
|
|
|
|
|
static Game::dvar_t* RegisterMinPlayers(const char* name, int value, int min, int max, Game::dvar_flag flag, const char* description);
|
|
|
|
|
|
|
|
static DWORD UIDvarIntStub(char* dvar);
|
|
|
|
};
|
|
|
|
}
|