mirror of
https://github.com/glest/glest-source.git
synced 2025-08-08 17:36:30 +02:00
- Added libcurl to mega-glest for mu;ti-purpose / multi-platform http and ftp requests
(for linux requires the following new dependency: sudo apt-get install libcurl4-dev)
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
#include "thread.h"
|
||||
#include <curl/curl.h>
|
||||
|
||||
using std::string;
|
||||
using namespace Shared::Platform;
|
||||
@@ -28,6 +29,11 @@ class SystemFlags
|
||||
{
|
||||
public:
|
||||
|
||||
struct httpMemoryStruct {
|
||||
char *memory;
|
||||
size_t size;
|
||||
};
|
||||
|
||||
enum DebugType {
|
||||
debugSystem,
|
||||
debugNetwork,
|
||||
@@ -100,11 +106,15 @@ protected:
|
||||
|
||||
public:
|
||||
|
||||
static CURL *curl_handle;
|
||||
|
||||
SystemFlags();
|
||||
~SystemFlags();
|
||||
|
||||
static void init();
|
||||
static SystemFlagsType & getSystemSettingType(DebugType type) { return debugLogFileList[type]; }
|
||||
static size_t httpWriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data);
|
||||
static std::string getHTTP(std::string URL);
|
||||
|
||||
// Let the macro call into this when require.. NEVER call it automatically.
|
||||
static void handleDebug(DebugType type, const char *fmt, ...);
|
||||
|
Reference in New Issue
Block a user