mirror of
https://github.com/glest/glest-source.git
synced 2025-08-12 11:24:00 +02:00
- added the first draft of joining games in progress
This commit is contained in:
@@ -40,8 +40,9 @@ enum FTP_Client_CallbackType {
|
||||
ftp_cct_Techtree = 2,
|
||||
ftp_cct_Scenario = 3,
|
||||
ftp_cct_File = 4,
|
||||
ftp_cct_DownloadProgress = 5,
|
||||
ftp_cct_ExtractProgress = 6
|
||||
ftp_cct_TempFile = 5,
|
||||
ftp_cct_DownloadProgress = 6,
|
||||
ftp_cct_ExtractProgress = 7
|
||||
};
|
||||
|
||||
class FTPClientCallbackInterface {
|
||||
@@ -72,6 +73,7 @@ protected:
|
||||
std::pair<string,string> tilesetsPath;
|
||||
std::pair<string,string> techtreesPath;
|
||||
std::pair<string,string> scenariosPath;
|
||||
string tempFilesPath;
|
||||
|
||||
Mutex mutexMapFileList;
|
||||
vector<pair<string,string> > mapFileList;
|
||||
@@ -88,6 +90,9 @@ protected:
|
||||
Mutex mutexFileList;
|
||||
vector<pair<string,string> > fileList;
|
||||
|
||||
Mutex mutexTempFileList;
|
||||
vector<pair<string,string> > tempFileList;
|
||||
|
||||
void getMapFromServer(pair<string,string> mapFilename);
|
||||
pair<FTP_Client_ResultType,string> getMapFromServer(pair<string,string> mapFileName, string ftpUser, string ftpUserPassword);
|
||||
|
||||
@@ -103,6 +108,9 @@ protected:
|
||||
void getFileFromServer(pair<string,string> fileName);
|
||||
pair<FTP_Client_ResultType,string> getFileInternalFromServer(pair<string,string> fileName);
|
||||
|
||||
void getTempFileFromServer(pair<string,string> fileName);
|
||||
pair<FTP_Client_ResultType,string> getTempFileInternalFromServer(pair<string,string> fileName);
|
||||
|
||||
Mutex mutexProgressMutex;
|
||||
|
||||
string fileArchiveExtension;
|
||||
@@ -130,7 +138,8 @@ public:
|
||||
string fileArchiveExtension,
|
||||
string fileArchiveExtractCommand,
|
||||
string fileArchiveExtractCommandParameters,
|
||||
int fileArchiveExtractCommandSuccessResult);
|
||||
int fileArchiveExtractCommandSuccessResult,
|
||||
string tempFilesPath);
|
||||
virtual void execute();
|
||||
virtual void signalQuit();
|
||||
virtual bool shutdownAndWait();
|
||||
@@ -140,6 +149,7 @@ public:
|
||||
void addTechtreeToRequests(string techtreeName,string URL="");
|
||||
void addScenarioToRequests(string fileName,string URL="");
|
||||
void addFileToRequests(string fileName,string URL="");
|
||||
void addTempFileToRequests(string fileName,string URL="");
|
||||
|
||||
FTPClientCallbackInterface * getCallBackObject();
|
||||
void setCallBackObject(FTPClientCallbackInterface *value);
|
||||
|
@@ -39,6 +39,7 @@ protected:
|
||||
std::pair<string,string> mapsPath;
|
||||
std::pair<string,string> tilesetsPath;
|
||||
std::pair<string,string> techtreesPath;
|
||||
string tempFilesPath;
|
||||
|
||||
int portNumber;
|
||||
int maxPlayers;
|
||||
@@ -54,7 +55,8 @@ public:
|
||||
std::pair<string,string> tilesetsPath, std::pair<string,string> techtreesPath,
|
||||
bool internetEnabledFlag,
|
||||
bool allowInternetTilesetFileTransfers, bool allowInternetTechtreeFileTransfers,
|
||||
int portNumber,int maxPlayers, FTPClientValidationInterface *ftpValidationIntf);
|
||||
int portNumber,int maxPlayers, FTPClientValidationInterface *ftpValidationIntf,
|
||||
string tempFilesPath);
|
||||
~FTPServerThread();
|
||||
virtual void execute();
|
||||
virtual void signalQuit();
|
||||
|
Reference in New Issue
Block a user