aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/masterserver.h
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDLL/masterserver.h')
-rw-r--r--NorthstarDLL/masterserver.h33
1 files changed, 12 insertions, 21 deletions
diff --git a/NorthstarDLL/masterserver.h b/NorthstarDLL/masterserver.h
index 3d5f716c..5a4e2a91 100644
--- a/NorthstarDLL/masterserver.h
+++ b/NorthstarDLL/masterserver.h
@@ -1,8 +1,13 @@
#pragma once
#include "convar.h"
+#include "serverpresence.h"
#include <winsock2.h>
#include <string>
#include <cstring>
+
+extern ConVar* Cvar_ns_masterserver_hostname;
+extern ConVar* Cvar_ns_curl_log_enable;
+
struct RemoteModInfo
{
public:
@@ -82,8 +87,6 @@ class MasterServerManager
char m_sOwnClientAuthToken[33];
std::string m_sOwnModInfoJson;
- std::string m_sUnicodeServerName; // Unicode unescaped version of Cvar_ns_auth_servername for support in cjk characters
- std::string m_sUnicodeServerDesc; // Unicode unescaped version of Cvar_ns_auth_serverdesc for support in cjk characters
bool m_bOriginAuthWithMasterServerDone = false;
bool m_bOriginAuthWithMasterServerInProgress = false;
@@ -97,8 +100,7 @@ class MasterServerManager
bool m_bNewgameAfterSelfAuth = false;
bool m_bScriptAuthenticatingWithGameServer = false;
bool m_bSuccessfullyAuthenticatedWithGameServer = false;
-
- std::string s_authfail_reason {};
+ std::string m_sAuthFailureReason {};
bool m_bHasPendingConnectionInfo = false;
RemoteServerConnectionInfo m_pendingConnectionInfo;
@@ -108,28 +110,17 @@ class MasterServerManager
bool m_bHasMainMenuPromoData = false;
MainMenuPromoData m_sMainMenuPromoData;
- private:
- void SetCommonHttpClientOptions(CURL* curl);
-
public:
MasterServerManager();
+
void ClearServerList();
void RequestServerList();
void RequestMainMenuPromos();
- void AuthenticateOriginWithMasterServer(char* uid, char* originToken);
- void AuthenticateWithOwnServer(char* uid, char* playerToken);
- void AuthenticateWithServer(char* uid, char* playerToken, char* serverId, char* password);
- void
- AddSelfToServerList(int port, int authPort, char* name, char* description, char* map, char* playlist, int maxPlayers, char* password);
- void UpdateServerMapAndPlaylist(char* map, char* playlist, int playerCount);
- void UpdateServerPlayerCount(int playerCount);
- void WritePlayerPersistentData(char* playerId, char* pdata, size_t pdataSize);
- void RemoveSelfFromServerList();
+ void AuthenticateOriginWithMasterServer(const char* uid, const char* originToken);
+ void AuthenticateWithOwnServer(const char* uid, const char* playerToken);
+ void AuthenticateWithServer(const char* uid, const char* playerToken, const char* serverId, const char* password);
+ void WritePlayerPersistentData(const char* playerId, const char* pdata, size_t pdataSize);
};
-std::string unescape_unicode(const std::string& str);
-void UpdateServerInfoFromUnicodeToUTF8();
-void InitialiseSharedMasterServer(HMODULE baseAddress);
-extern MasterServerManager* g_MasterServerManager;
+extern MasterServerManager* g_pMasterServerManager;
extern ConVar* Cvar_ns_masterserver_hostname;
-extern ConVar* Cvar_ns_server_password;