2017-01-20 08:36:52 -05:00
|
|
|
#pragma once
|
|
|
|
|
2016-11-21 04:50:55 -05:00
|
|
|
namespace Utils
|
|
|
|
{
|
|
|
|
class Cache
|
|
|
|
{
|
|
|
|
public:
|
2016-11-25 08:16:07 -05:00
|
|
|
static std::string GetStaticUrl(std::string path);
|
2016-11-21 14:49:33 -05:00
|
|
|
static std::string GetFile(std::string path, int timeout = 5000, std::string useragent = "IW4x");
|
2016-11-21 04:50:55 -05:00
|
|
|
|
2016-11-21 05:09:42 -05:00
|
|
|
private:
|
|
|
|
static std::mutex CacheMutex;
|
2016-11-21 14:49:33 -05:00
|
|
|
static const char* Urls[];
|
|
|
|
static std::string ValidUrl;
|
|
|
|
static std::string GetUrl(std::string url, std::string path);
|
2016-11-21 04:50:55 -05:00
|
|
|
};
|
|
|
|
}
|