mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-04-04 14:56:24 +00:00
Added HTTP logic and login
This commit is contained in:
17
include/Http.h
Normal file
17
include/Http.h
Normal file
@@ -0,0 +1,17 @@
|
||||
///
|
||||
/// Created by Anonymous275 on 1/17/22
|
||||
/// Copyright (c) 2021-present Anonymous275 read the LICENSE file for more info.
|
||||
///
|
||||
|
||||
#pragma once
|
||||
#include <string>
|
||||
|
||||
class HTTP {
|
||||
public:
|
||||
static bool Download(const std::string &IP, const std::string &Path);
|
||||
static std::string Post(const std::string& IP, const std::string& Fields);
|
||||
static std::string Get(const std::string &IP);
|
||||
static bool ProgressBar(size_t c, size_t t);
|
||||
public:
|
||||
static bool isDownload;
|
||||
};
|
||||
@@ -7,16 +7,25 @@
|
||||
#include <string>
|
||||
|
||||
class Launcher {
|
||||
public:
|
||||
public: //constructors
|
||||
Launcher(int argc, char* argv[]);
|
||||
const std::string& getFullVersion(){return FullVersion;}
|
||||
const std::string& getWorkingDir(){return DirPath;}
|
||||
const std::string& getVersion(){return Version;}
|
||||
public: //available functions
|
||||
std::string Login(const std::string& fields);
|
||||
void checkLocalKey();
|
||||
void loadConfig();
|
||||
void launchGame();
|
||||
private:
|
||||
public: //Getters
|
||||
const std::string& getFullVersion();
|
||||
const std::string& getWorkingDir();
|
||||
const std::string& getUserRole();
|
||||
const std::string& getVersion();
|
||||
private: //functions
|
||||
void WindowsInit();
|
||||
private:
|
||||
private: //variables
|
||||
std::string DirPath;
|
||||
std::string UserRole;
|
||||
std::string PublicKey;
|
||||
bool LoginAuth = false;
|
||||
std::string Version{"3.0"};
|
||||
std::string FullVersion{Version + ".0"};
|
||||
};
|
||||
|
||||
1
include/cpp-httplib
Submodule
1
include/cpp-httplib
Submodule
Submodule include/cpp-httplib added at 33f53aa458
Reference in New Issue
Block a user