summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--platform/default/asset_request_fs.cpp6
-rw-r--r--platform/default/asset_request_zip.cpp6
-rw-r--r--src/mbgl/storage/asset_context_base.hpp (renamed from src/mbgl/storage/asset_context.hpp)14
-rw-r--r--src/mbgl/storage/default_file_source.cpp4
-rw-r--r--src/mbgl/storage/default_file_source_impl.hpp4
5 files changed, 17 insertions, 17 deletions
diff --git a/platform/default/asset_request_fs.cpp b/platform/default/asset_request_fs.cpp
index f5f0b2a0df..4511cf882a 100644
--- a/platform/default/asset_request_fs.cpp
+++ b/platform/default/asset_request_fs.cpp
@@ -1,4 +1,4 @@
-#include <mbgl/storage/asset_context.hpp>
+#include <mbgl/storage/asset_context_base.hpp>
#include <mbgl/storage/resource.hpp>
#include <mbgl/storage/response.hpp>
#include <mbgl/util/util.hpp>
@@ -36,7 +36,7 @@ public:
std::unique_ptr<Response> response;
};
-class AssetFSContext : public AssetContext {
+class AssetFSContext : public AssetContextBase {
RequestBase* createRequest(const Resource& resource,
RequestBase::Callback callback,
uv_loop_t* loop,
@@ -206,7 +206,7 @@ void AssetRequest::cancel() {
uv_cancel((uv_req_t *)&req);
}
-std::unique_ptr<AssetContext> AssetContext::createContext(uv_loop_t*) {
+std::unique_ptr<AssetContextBase> AssetContextBase::createContext(uv_loop_t*) {
return std::make_unique<AssetFSContext>();
}
diff --git a/platform/default/asset_request_zip.cpp b/platform/default/asset_request_zip.cpp
index aa22ca18d7..13c7df4cc8 100644
--- a/platform/default/asset_request_zip.cpp
+++ b/platform/default/asset_request_zip.cpp
@@ -1,4 +1,4 @@
-#include <mbgl/storage/asset_context.hpp>
+#include <mbgl/storage/asset_context_base.hpp>
#include <mbgl/android/jni.hpp>
#include <mbgl/storage/resource.hpp>
#include <mbgl/storage/response.hpp>
@@ -15,7 +15,7 @@
namespace mbgl {
-class AssetZipContext : public AssetContext {
+class AssetZipContext : public AssetContextBase {
public:
explicit AssetZipContext(uv_loop_t *loop);
~AssetZipContext();
@@ -259,7 +259,7 @@ void AssetRequest::cancel() {
cancelled = true;
}
-std::unique_ptr<AssetContext> AssetContext::createContext(uv_loop_t* loop) {
+std::unique_ptr<AssetContextBase> AssetContextBase::createContext(uv_loop_t* loop) {
return std::make_unique<AssetZipContext>(loop);
}
diff --git a/src/mbgl/storage/asset_context.hpp b/src/mbgl/storage/asset_context_base.hpp
index 44ebdba4ff..cd7d9ff4a1 100644
--- a/src/mbgl/storage/asset_context.hpp
+++ b/src/mbgl/storage/asset_context_base.hpp
@@ -1,5 +1,5 @@
-#ifndef MBGL_STORAGE_DEFAULT_ASSET_CONTEXT
-#define MBGL_STORAGE_DEFAULT_ASSET_CONTEXT
+#ifndef MBGL_STORAGE_ASSET_CONTEXT_BASE
+#define MBGL_STORAGE_ASSET_CONTEXT_BASE
#include <mbgl/storage/request_base.hpp>
@@ -7,17 +7,17 @@ typedef struct uv_loop_s uv_loop_t;
namespace mbgl {
-class AssetContext {
+class AssetContextBase {
public:
- static std::unique_ptr<AssetContext> createContext(uv_loop_t*);
+ static std::unique_ptr<AssetContextBase> createContext(uv_loop_t*);
- virtual ~AssetContext() = default;
+ virtual ~AssetContextBase() = default;
virtual RequestBase* createRequest(const Resource&,
RequestBase::Callback,
uv_loop_t*,
const std::string& assetRoot) = 0;
};
-}
+} // namespace mbgl
-#endif
+#endif // MBGL_STORAGE_ASSET_CONTEXT_BASE
diff --git a/src/mbgl/storage/default_file_source.cpp b/src/mbgl/storage/default_file_source.cpp
index b3761cd5bd..12db28c981 100644
--- a/src/mbgl/storage/default_file_source.cpp
+++ b/src/mbgl/storage/default_file_source.cpp
@@ -1,6 +1,6 @@
#include <mbgl/storage/default_file_source_impl.hpp>
#include <mbgl/storage/request.hpp>
-#include <mbgl/storage/asset_context.hpp>
+#include <mbgl/storage/asset_context_base.hpp>
#include <mbgl/storage/http_context_base.hpp>
#include <mbgl/storage/response.hpp>
@@ -75,7 +75,7 @@ DefaultFileSource::Impl::Impl(FileCache* cache_, const std::string& root)
: loop(util::RunLoop::getLoop()),
cache(cache_),
assetRoot(root.empty() ? platform::assetRoot() : root),
- assetContext(AssetContext::createContext(loop)),
+ assetContext(AssetContextBase::createContext(loop)),
httpContext(HTTPContextBase::createContext(loop)) {
}
diff --git a/src/mbgl/storage/default_file_source_impl.hpp b/src/mbgl/storage/default_file_source_impl.hpp
index 6f3e10c557..bb28933798 100644
--- a/src/mbgl/storage/default_file_source_impl.hpp
+++ b/src/mbgl/storage/default_file_source_impl.hpp
@@ -2,7 +2,7 @@
#define MBGL_STORAGE_DEFAULT_DEFAULT_FILE_SOURCE_IMPL
#include <mbgl/storage/default_file_source.hpp>
-#include <mbgl/storage/asset_context.hpp>
+#include <mbgl/storage/asset_context_base.hpp>
#include <mbgl/storage/http_context_base.hpp>
#include <set>
@@ -47,7 +47,7 @@ private:
uv_loop_t* loop = nullptr;
FileCache* cache = nullptr;
const std::string assetRoot;
- std::unique_ptr<AssetContext> assetContext;
+ std::unique_ptr<AssetContextBase> assetContext;
std::unique_ptr<HTTPContextBase> httpContext;
};