use a file source object to abstract loading of resources
This commit is contained in:
@@ -65,6 +65,7 @@ public:
|
||||
void toggleClass(const std::string &name);
|
||||
const std::vector<std::string> &getAppliedClasses() const;
|
||||
void setDefaultTransitionDuration(uint64_t duration_milliseconds = 0);
|
||||
void setStyleURL(const std::string &url);
|
||||
void setStyleJSON(std::string newStyleJSON, const std::string &base = "");
|
||||
std::string getStyleJSON() const;
|
||||
void setAccessToken(std::string access_token);
|
||||
|
||||
@@ -12,7 +12,7 @@ class loop;
|
||||
namespace mbgl {
|
||||
|
||||
namespace platform {
|
||||
class Response;
|
||||
struct Response;
|
||||
}
|
||||
|
||||
enum class ResourceType : uint8_t {
|
||||
|
||||
@@ -16,9 +16,23 @@
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
namespace uv {
|
||||
|
||||
inline std::string cwd() {
|
||||
size_t max = 0;
|
||||
std::string dir;
|
||||
do {
|
||||
max += 256;
|
||||
dir.resize(max);
|
||||
uv_cwd(const_cast<char *>(dir.data()), &max);
|
||||
} while (max == dir.size());
|
||||
dir.resize(max);
|
||||
return dir;
|
||||
}
|
||||
|
||||
class loop {
|
||||
public:
|
||||
inline loop() {
|
||||
|
||||
Reference in New Issue
Block a user