summaryrefslogtreecommitdiff
path: root/platform/android/src/storage/default_file_source_peer.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/src/storage/default_file_source_peer.hpp')
-rw-r--r--platform/android/src/storage/default_file_source_peer.hpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/platform/android/src/storage/default_file_source_peer.hpp b/platform/android/src/storage/default_file_source_peer.hpp
new file mode 100644
index 0000000000..c0f60447b3
--- /dev/null
+++ b/platform/android/src/storage/default_file_source_peer.hpp
@@ -0,0 +1,40 @@
+#pragma once
+
+#include <jni/jni.hpp>
+
+#include <memory>
+
+namespace mbgl {
+
+class DefaultFileSource;
+
+namespace android {
+
+class DefaultFileSourcePeer {
+public:
+ static constexpr auto Name() { return "com/mapbox/mapboxsdk/storage/DefaultFileSource"; }
+ static jni::Class<DefaultFileSourcePeer> javaClass;
+ static void registerNative(jni::JNIEnv&);
+
+ DefaultFileSourcePeer(jni::JNIEnv&,
+ jni::String cachePath,
+ jni::String assetRoot,
+ jni::jlong maximumCacheSize);
+ ~DefaultFileSourcePeer();
+
+ void setAPIBaseURL(jni::JNIEnv&, jni::String);
+ jni::String getAPIBaseURL(jni::JNIEnv&);
+
+ void setAccessToken(jni::JNIEnv&, jni::String);
+ jni::String getAccessToken(jni::JNIEnv&);
+
+ DefaultFileSource& getFileSource() {
+ return *native;
+ }
+
+private:
+ const std::unique_ptr<DefaultFileSource> native;
+};
+
+} // namespace android
+} // namespace mbgl