- added logic for ftp file transfers to look for 7z archives for tilesets and download and extract on the client side if the 7z archive exists on the server

This commit is contained in:
Mark Vejvoda
2011-03-09 18:35:19 +00:00
parent 3aa8f765f6
commit 817d8cfea8
6 changed files with 123 additions and 28 deletions

View File

@@ -166,6 +166,9 @@ inline string trim (const string & s, const string & t = SPACES) {
return trim_left (trim_right (d, t), t) ;
} // end of trim
string getFullFileArchiveExtractCommand(string fileArchiveExtractCommand,
string fileArchiveExtractCommandParameters, string outputpath, string archivename);
bool executeShellCommand(string cmd);
class ValueCheckerVault {

View File

@@ -72,13 +72,23 @@ protected:
FTP_Client_ResultType getMapFromServer(string mapFileName, string ftpUser, string ftpUserPassword);
void getTilesetFromServer(string tileSetName);
FTP_Client_ResultType getTilesetFromServer(string tileSetName, string tileSetNameSubfolder, string ftpUser, string ftpUserPassword);
FTP_Client_ResultType getTilesetFromServer(string tileSetName, string tileSetNameSubfolder, string ftpUser, string ftpUserPassword, bool findArchive);
Mutex mutexProgressMutex;
string fileArchiveExtension;
string fileArchiveExtractCommand;
string fileArchiveExtractCommandParameters;
public:
FTPClientThread(int portNumber,string serverUrl, std::pair<string,string> mapsPath, std::pair<string,string> tilesetsPath, FTPClientCallbackInterface *pCBObject);
FTPClientThread(int portNumber,string serverUrl,
std::pair<string,string> mapsPath,
std::pair<string,string> tilesetsPath,
FTPClientCallbackInterface *pCBObject,
string fileArchiveExtension,
string fileArchiveExtractCommand,
string fileArchiveExtractCommandParameters);
virtual void execute();
virtual void signalQuit();
virtual bool shutdownAndWait();