[android] Use new FileSourceManager interface
Use new interface for android jni adaptation classes.
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <mbgl/storage/default_file_source.hpp>
|
||||
#include <mbgl/storage/database_file_source.hpp>
|
||||
#include <mbgl/storage/online_file_source.hpp>
|
||||
#include <mbgl/storage/resource_options.hpp>
|
||||
#include <mbgl/storage/resource_transform.hpp>
|
||||
|
||||
#include "asset_manager.hpp"
|
||||
|
||||
@@ -10,13 +12,12 @@
|
||||
namespace mbgl {
|
||||
|
||||
template <typename T> class Actor;
|
||||
class ResourceTransform;
|
||||
using mbgl::PathChangeCallback;
|
||||
|
||||
namespace android {
|
||||
|
||||
/**
|
||||
* Peer class for the Android FileSource holder. Ensures that a single DefaultFileSource is used
|
||||
* Peer class for the Android FileSource holder. Ensures that a single core FileSource
|
||||
* of a ResourceLoader type is used.
|
||||
*/
|
||||
class FileSource {
|
||||
public:
|
||||
@@ -71,11 +72,12 @@ private:
|
||||
const std::string DATABASE_FILE = "/mbgl-offline.db";
|
||||
optional<int> activationCounter;
|
||||
mbgl::ResourceOptions resourceOptions;
|
||||
std::unique_ptr<Actor<ResourceTransform>> resourceTransform;
|
||||
std::unique_ptr<Actor<PathChangeCallback>> pathChangeCallback;
|
||||
std::shared_ptr<mbgl::DefaultFileSource> fileSource;
|
||||
std::unique_ptr<Actor<ResourceTransform::TransformCallback>> resourceTransform;
|
||||
std::function<void()> pathChangeCallback;
|
||||
std::shared_ptr<mbgl::DatabaseFileSource> databaseSource;
|
||||
std::shared_ptr<mbgl::OnlineFileSource> onlineSource;
|
||||
std::shared_ptr<mbgl::FileSource> resourceLoader;
|
||||
};
|
||||
|
||||
|
||||
} // namespace android
|
||||
} // namespace mbgl
|
||||
|
||||
Reference in New Issue
Block a user