From 7e77aff8dfc2434846614f919cd4f8db1a2ca2f0 Mon Sep 17 00:00:00 2001 From: Mikhail Pozdnyakov Date: Mon, 13 May 2019 16:11:49 +0300 Subject: [core] Make FileSource API clearer --- include/mbgl/storage/file_source.hpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/include/mbgl/storage/file_source.hpp b/include/mbgl/storage/file_source.hpp index 868dbf7347..2270038c49 100644 --- a/include/mbgl/storage/file_source.hpp +++ b/include/mbgl/storage/file_source.hpp @@ -4,9 +4,7 @@ #include #include -#include #include -#include #include #include @@ -16,8 +14,10 @@ namespace mbgl { class ResourceOptions; class ResourceTransform; -class FileSource : private util::noncopyable { +class FileSource { public: + FileSource(const FileSource&) = delete; + FileSource& operator=(const FileSource&) = delete; virtual ~FileSource() = default; using Callback = std::function; @@ -37,12 +37,14 @@ public: return false; } - // Factory for creating a platform-specific file source. - static std::shared_ptr 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 getSharedFileSource(const ResourceOptions&); + +protected: + FileSource() = default; + // Factory for creating a platform-specific file source. + static std::shared_ptr createPlatformFileSource(const ResourceOptions&); }; } // namespace mbgl -- cgit v1.2.1