mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
* Updated r5net. Checking for version number now. * Added SQVM_Warning hook. * Adjusted IsFlagSet, will only mask off DEV_FLAGS in Release compile now. * Empty hostname cvars.
28 lines
683 B
C++
28 lines
683 B
C++
#pragma once
|
|
|
|
#include "serverlisting.h"
|
|
|
|
namespace R5Net
|
|
{
|
|
struct Config
|
|
{
|
|
std::string MOTD;
|
|
int SERVER_TTL;
|
|
int MIN_REQUIRED_VERSION;
|
|
};
|
|
class Client
|
|
{
|
|
httplib::Client m_HttpClient;
|
|
|
|
public:
|
|
Client(std::string serverString) : m_HttpClient(serverString.c_str())
|
|
{
|
|
m_HttpClient.set_connection_timeout(10);
|
|
}
|
|
|
|
std::vector<ServerListing> GetServersList(std::string& outMessage);
|
|
bool PostServerHost(std::string& outMessage, std::string& outToken, const ServerListing& serverListing);
|
|
bool GetServerByToken(ServerListing& outServer, std::string& outError, const std::string& token, const std::string& password = "");
|
|
std::string GetVersionString();
|
|
};
|
|
} |