diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2018-08-22 12:27:43 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2018-09-07 09:44:12 -0700 |
commit | 79bf0e8af6bf9ec829a352d56b8e70ccc8f4fa41 (patch) | |
tree | 2b646523d45f0fa9917612ed80de12bbd35d5b1e /platform/android/src/style/sources/geojson_source.hpp | |
parent | 5911e3b13f2f2b6741e26db3e41513ed21cc95b4 (diff) | |
download | qtlocation-mapboxgl-79bf0e8af6bf9ec829a352d56b8e70ccc8f4fa41.tar.gz |
[android] jni.hpp 4.0.0
Diffstat (limited to 'platform/android/src/style/sources/geojson_source.hpp')
-rw-r--r-- | platform/android/src/style/sources/geojson_source.hpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/platform/android/src/style/sources/geojson_source.hpp b/platform/android/src/style/sources/geojson_source.hpp index eb28e2470b..20e8b6873b 100644 --- a/platform/android/src/style/sources/geojson_source.hpp +++ b/platform/android/src/style/sources/geojson_source.hpp @@ -16,7 +16,7 @@ struct FeatureConverter { void convertJson(std::shared_ptr<std::string>, ActorRef<Callback>); template <class JNIType> - void convertObject(jni::Object<JNIType>, ActorRef<Callback>); + void convertObject(std::shared_ptr<jni::Global<jni::Object<JNIType>, jni::EnvAttachingDeleter>>, ActorRef<Callback>); }; struct Update { @@ -30,34 +30,35 @@ struct Update { class GeoJSONSource : public Source { public: + using SuperTag = Source; static constexpr auto Name() { return "com/mapbox/mapboxsdk/style/sources/GeoJsonSource"; }; static void registerNative(jni::JNIEnv&); - GeoJSONSource(jni::JNIEnv&, jni::String, jni::Object<>); + GeoJSONSource(jni::JNIEnv&, const jni::String&, const jni::Object<>&); GeoJSONSource(jni::JNIEnv&, mbgl::style::Source&, AndroidRendererFrontend&); ~GeoJSONSource(); private: - void setGeoJSONString(jni::JNIEnv&, jni::String); - void setFeatureCollection(jni::JNIEnv&, jni::Object<geojson::FeatureCollection>); - void setFeature(jni::JNIEnv&, jni::Object<geojson::Feature>); - void setGeometry(jni::JNIEnv&, jni::Object<geojson::Geometry>); - void setURL(jni::JNIEnv&, jni::String); + void setGeoJSONString(jni::JNIEnv&, const jni::String&); + void setFeatureCollection(jni::JNIEnv&, const jni::Object<geojson::FeatureCollection>&); + void setFeature(jni::JNIEnv&, const jni::Object<geojson::Feature>&); + void setGeometry(jni::JNIEnv&, const jni::Object<geojson::Geometry>&); + void setURL(jni::JNIEnv&, const jni::String&); - jni::Array<jni::Object<geojson::Feature>> querySourceFeatures(jni::JNIEnv&, - jni::Array<jni::Object<>>); + jni::Local<jni::Array<jni::Object<geojson::Feature>>> querySourceFeatures(jni::JNIEnv&, + const jni::Array<jni::Object<>>&); - jni::String getURL(jni::JNIEnv&); + jni::Local<jni::String> getURL(jni::JNIEnv&); - jni::Object<Source> createJavaPeer(jni::JNIEnv&); + jni::Local<jni::Object<Source>> createJavaPeer(jni::JNIEnv&); std::unique_ptr<Update> awaitingUpdate; std::unique_ptr<Update> update; std::shared_ptr<ThreadPool> threadPool; std::unique_ptr<Actor<FeatureConverter>> converter; template <class JNIType> - void setCollectionAsync(jni::JNIEnv&, jni::Object<JNIType>); + void setCollectionAsync(jni::JNIEnv&, const jni::Object<JNIType>&); void setAsync(Update::Converter); |