summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLeith Bade <leith@mapbox.com>2014-12-06 00:50:23 +1100
committerLeith Bade <leith@mapbox.com>2014-12-06 00:50:23 +1100
commit93ab4036e995f4b894783689cea1f2f97ef9b70b (patch)
tree92bf2ef475d24d0f66f433094ae2b5cacbde7ac5 /include
parentde9eb00276684a10f49a1c490f55266b80238155 (diff)
downloadqtlocation-mapboxgl-93ab4036e995f4b894783689cea1f2f97ef9b70b.tar.gz
Fix commit
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/android/native_map_view.hpp6
-rw-r--r--include/mbgl/storage/asset_request.hpp27
-rw-r--r--include/mbgl/storage/asset_request_baton.hpp6
-rw-r--r--include/mbgl/storage/caching_http_file_source.hpp3
4 files changed, 12 insertions, 30 deletions
diff --git a/include/mbgl/android/native_map_view.hpp b/include/mbgl/android/native_map_view.hpp
index 2ca9484967..9ebf69e3a8 100644
--- a/include/mbgl/android/native_map_view.hpp
+++ b/include/mbgl/android/native_map_view.hpp
@@ -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();
diff --git a/include/mbgl/storage/asset_request.hpp b/include/mbgl/storage/asset_request.hpp
deleted file mode 100644
index 3114d41ad2..0000000000
--- a/include/mbgl/storage/asset_request.hpp
+++ /dev/null
@@ -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
diff --git a/include/mbgl/storage/asset_request_baton.hpp b/include/mbgl/storage/asset_request_baton.hpp
index 8506dc9b60..2cbb6c51c0 100644
--- a/include/mbgl/storage/asset_request_baton.hpp
+++ b/include/mbgl/storage/asset_request_baton.hpp
@@ -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:
diff --git a/include/mbgl/storage/caching_http_file_source.hpp b/include/mbgl/storage/caching_http_file_source.hpp
index 66e3335f23..655afa6396 100644
--- a/include/mbgl/storage/caching_http_file_source.hpp
+++ b/include/mbgl/storage/caching_http_file_source.hpp
@@ -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);