Fix commit
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#include <mbgl/map/map.hpp>
|
||||
#include <mbgl/map/view.hpp>
|
||||
#include <mbgl/util/noncopyable.hpp>
|
||||
#include <mbgl/platform/default/caching_http_file_source.hpp>
|
||||
#include <mbgl/storage/caching_http_file_source.hpp>
|
||||
|
||||
#include <string>
|
||||
#include <jni.h>
|
||||
@@ -44,6 +44,10 @@ public:
|
||||
return map;
|
||||
}
|
||||
|
||||
mbgl::CachingHTTPFileSource& getFileSource() {
|
||||
return fileSource;
|
||||
}
|
||||
|
||||
bool initializeDisplay();
|
||||
void terminateDisplay();
|
||||
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
#ifndef MBGL_STORAGE_ASSET_REQUEST
|
||||
#define MBGL_STORAGE_ASSET_REQUEST
|
||||
|
||||
#include <mbgl/storage/base_request.hpp>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
typedef struct uv_loop_s uv_loop_t;
|
||||
|
||||
struct AssetRequestBaton;
|
||||
|
||||
class AssetRequest : public BaseRequest {
|
||||
public:
|
||||
AssetRequest(const std::string &path, uv_loop_t *loop);
|
||||
~AssetRequest();
|
||||
|
||||
void cancel();
|
||||
|
||||
private:
|
||||
AssetRequestBaton *ptr = nullptr;
|
||||
|
||||
friend struct AssetRequestBaton;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef MBGL_STORAGE_ASSET_REQUEST_BATON
|
||||
#define MBGL_STORAGE_ASSET_REQUEST_BATON
|
||||
|
||||
#include <mbgl/storage/asset_request.hpp>
|
||||
#include <mbgl/util/uv.hpp>
|
||||
#include <thread>
|
||||
|
||||
@@ -9,6 +8,8 @@
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
class AssetRequest;
|
||||
|
||||
struct AssetRequestBaton {
|
||||
AssetRequestBaton(AssetRequest *request_, const std::string &path, uv_loop_t *loop);
|
||||
|
||||
@@ -19,7 +20,8 @@ struct AssetRequestBaton {
|
||||
bool canceled = false;
|
||||
|
||||
void cancel();
|
||||
static void notify_error(AssetRequestBaton *ptr, const int code, const char *message);
|
||||
static void notifyError(AssetRequestBaton *ptr, const int code, const char *message);
|
||||
static void notifySuccess(AssetRequestBaton *ptr, const std::string body);
|
||||
static void cleanup(AssetRequestBaton *ptr);
|
||||
|
||||
// IMPLEMENT THIS PLATFORM SPECIFIC FUNCTION:
|
||||
|
||||
@@ -29,6 +29,9 @@ public:
|
||||
// Set the Mapbox API access token
|
||||
void setAccessToken(std::string);
|
||||
|
||||
// Get the Mapbox API access token
|
||||
std::string getAccessToken() const;
|
||||
|
||||
std::unique_ptr<Request> request(ResourceType type, const std::string &url);
|
||||
|
||||
void prepare(std::function<void()> fn);
|
||||
|
||||
Reference in New Issue
Block a user