summaryrefslogtreecommitdiff
path: root/include/mbgl/storage/file_source.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mbgl/storage/file_source.hpp')
-rw-r--r--include/mbgl/storage/file_source.hpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/mbgl/storage/file_source.hpp b/include/mbgl/storage/file_source.hpp
index 0709a1c245..868dbf7347 100644
--- a/include/mbgl/storage/file_source.hpp
+++ b/include/mbgl/storage/file_source.hpp
@@ -1,16 +1,21 @@
#pragma once
+#include <mbgl/actor/actor_ref.hpp>
#include <mbgl/storage/response.hpp>
#include <mbgl/storage/resource.hpp>
#include <mbgl/util/noncopyable.hpp>
#include <mbgl/util/async_request.hpp>
+#include <mbgl/util/optional.hpp>
#include <functional>
#include <memory>
namespace mbgl {
+class ResourceOptions;
+class ResourceTransform;
+
class FileSource : private util::noncopyable {
public:
virtual ~FileSource() = default;
@@ -31,6 +36,13 @@ public:
virtual bool supportsCacheOnlyRequests() const {
return false;
}
+
+ // Factory for creating a platform-specific file source.
+ static std::shared_ptr<FileSource> createPlatformFileSource(const ResourceOptions&);
+
+ // Singleton for obtaining the shared platform-specific file source. A single instance of a file source is provided
+ // for each unique combination of a Mapbox API base URL, access token, cache path and platform context.
+ static std::shared_ptr<FileSource> getSharedFileSource(const ResourceOptions&);
};
} // namespace mbgl