GlistEngine
Loading...
Searching...
No Matches
gHttpFile Class Reference

#include <gHttpFile.h>

Inheritance diagram for gHttpFile:
Collaboration diagram for gHttpFile:

Classes

struct  ProgressData
 

Public Member Functions

 gHttpFile ()
 
virtual ~gHttpFile ()
 
void load (std::string url)
 
std::string getUrl ()
 
void save (std::string filepath, bool isBinary=false)
 
std::string getHtml ()
 
int getStatusCode ()
 
double getProgressLength ()
 
double getFileLength ()
 
- Public Member Functions inherited from gObject
 gObject ()
 
void logi (std::string message)
 
void logd (std::string message)
 
void logw (std::string message)
 
void loge (std::string message)
 
void logi (std::string tag, std::string message)
 
void logd (std::string tag, std::string message)
 
void logw (std::string tag, std::string message)
 
void loge (std::string tag, std::string message)
 

Static Public Member Functions

static int progressCallback (ProgressData *p, double totaltodownload, double downloaded, double totaltoupload, double uploaded)
 
static size_t writeCallBack (char *contents, size_t size, size_t nmemb, void *userp)
 
- Static Public Member Functions inherited from gObject
static std::string gGetAppDir ()
 
static std::string gGetAssetsDir ()
 
static void gSetAssetsDir (std::string assetsDir)
 
static std::string gGetFilesDir ()
 
static std::string gGetImagesDir ()
 
static std::string gGetFontsDir ()
 
static std::string gGetModelsDir ()
 
static std::string gGetTexturesDir ()
 
static std::string gGetShadersDir ()
 
static std::string gGetSoundsDir ()
 
static std::string gGetDatabasesDir ()
 
static std::string gGetVideosDir ()
 
static void setCurrentResolution (int scalingNo, int currentResolutionNo)
 

Public Attributes

struct gHttpFile::ProgressData prog
 

Additional Inherited Members

- Static Public Attributes inherited from gObject
static const int LOGLEVEL_SILENT
 
static const int LOGLEVEL_DEBUG
 
static const int LOGLEVEL_INFO
 
static const int LOGLEVEL_WARNING
 
static const int LOGLEVEL_ERROR
 
- Static Protected Attributes inherited from gObject
static int renderpassnum
 
static int renderpassno
 
static int releasescaling
 
static int releaseresolution
 

Constructor & Destructor Documentation

◆ gHttpFile()

gHttpFile::gHttpFile ( )

◆ ~gHttpFile()

virtual gHttpFile::~gHttpFile ( )
virtual

Member Function Documentation

◆ getFileLength()

double gHttpFile::getFileLength ( )

◆ getHtml()

std::string gHttpFile::getHtml ( )

◆ getProgressLength()

double gHttpFile::getProgressLength ( )

◆ getStatusCode()

int gHttpFile::getStatusCode ( )
See also
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
Returns
HTTP Status code, returns -1 if requests isn't complete yet.

◆ getUrl()

std::string gHttpFile::getUrl ( )

◆ load()

void gHttpFile::load ( std::string  url)

◆ progressCallback()

static int gHttpFile::progressCallback ( ProgressData p,
double  totaltodownload,
double  downloaded,
double  totaltoupload,
double  uploaded 
)
static

◆ save()

void gHttpFile::save ( std::string  filepath,
bool  isBinary = false 
)

◆ writeCallBack()

static size_t gHttpFile::writeCallBack ( char *  contents,
size_t  size,
size_t  nmemb,
void *  userp 
)
static

Member Data Documentation

◆ prog

struct gHttpFile::ProgressData gHttpFile::prog

The documentation for this class was generated from the following file: