blob: 54897ac6c9a19456f6a0b7c498a251826934633d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#pragma once
#include <mbgl/style/style.hpp>
#include <jni/jni.hpp>
namespace mbgl {
namespace android {
/**
* Peer class for the Android Style holder.
*/
class Style {
public:
// TODO move to style package
static constexpr auto Name() { return "com/mapbox/mapboxsdk/maps/Style"; };
Style(jni::JNIEnv&, mbgl::style::Style&);
~Style();
static jni::Class<Style> javaClass;
// TODO add methods
static void registerNative(jni::JNIEnv&);
jni::Object<Style> createJavaPeer(jni::JNIEnv&);
jni::String getJSON(jni::JNIEnv&);
private:
// Raw pointer that is valid at all times.
mbgl::style::Style& style;
// Set when the source is added to a map.
jni::UniqueObject<Style> javaPeer;
};
}
}
|