react-native-nitro-geolocation 1.2.3 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/NitroGeolocation.kt +10 -10
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/NitroGeolocationCompat.kt +4 -4
- package/ios/NitroGeolocation.swift +17 -11
- package/ios/NitroGeolocationCompat.swift +6 -4
- package/nitrogen/generated/android/c++/JAccuracyAuthorization.hpp +1 -1
- package/nitrogen/generated/android/c++/JAndroidAccuracyPreset.hpp +1 -1
- package/nitrogen/generated/android/c++/JAndroidGranularity.hpp +1 -1
- package/nitrogen/generated/android/c++/JAuthorizationLevel.hpp +1 -1
- package/nitrogen/generated/android/c++/JAuthorizationLevelInternal.hpp +1 -1
- package/nitrogen/generated/android/c++/JCompatGeolocationConfigurationInternal.hpp +1 -1
- package/nitrogen/generated/android/c++/JCompatGeolocationError.hpp +1 -1
- package/nitrogen/generated/android/c++/JCompatGeolocationOptions.hpp +1 -1
- package/nitrogen/generated/android/c++/JCompatGeolocationResponse.hpp +1 -1
- package/nitrogen/generated/android/c++/JFunc_void.hpp +2 -2
- package/nitrogen/generated/android/c++/JFunc_void_AccuracyAuthorization.hpp +2 -2
- package/nitrogen/generated/android/c++/JFunc_void_CompatGeolocationError.hpp +2 -2
- package/nitrogen/generated/android/c++/JFunc_void_CompatGeolocationResponse.hpp +2 -2
- package/nitrogen/generated/android/c++/JFunc_void_GeolocationResponse.hpp +2 -2
- package/nitrogen/generated/android/c++/JFunc_void_Heading.hpp +2 -2
- package/nitrogen/generated/android/c++/JFunc_void_LocationError.hpp +2 -2
- package/nitrogen/generated/android/c++/JFunc_void_LocationProviderStatus.hpp +2 -2
- package/nitrogen/generated/android/c++/JFunc_void_PermissionStatus.hpp +2 -2
- package/nitrogen/generated/android/c++/JFunc_void_std__vector_GeocodedLocation_.hpp +16 -16
- package/nitrogen/generated/android/c++/JFunc_void_std__vector_ReverseGeocodedAddress_.hpp +16 -16
- package/nitrogen/generated/android/c++/JGeocodedLocation.hpp +1 -1
- package/nitrogen/generated/android/c++/JGeocodingCoordinates.hpp +1 -1
- package/nitrogen/generated/android/c++/JGeolocationConfiguration.hpp +1 -1
- package/nitrogen/generated/android/c++/JGeolocationCoordinates.hpp +1 -1
- package/nitrogen/generated/android/c++/JGeolocationResponse.hpp +1 -1
- package/nitrogen/generated/android/c++/JHeading.hpp +1 -1
- package/nitrogen/generated/android/c++/JHeadingOptions.hpp +1 -1
- package/nitrogen/generated/android/c++/JHybridNitroGeolocationCompatSpec.cpp +6 -6
- package/nitrogen/generated/android/c++/JHybridNitroGeolocationCompatSpec.hpp +4 -4
- package/nitrogen/generated/android/c++/JHybridNitroGeolocationSpec.cpp +15 -15
- package/nitrogen/generated/android/c++/JHybridNitroGeolocationSpec.hpp +7 -7
- package/nitrogen/generated/android/c++/JIOSAccuracyPreset.hpp +1 -1
- package/nitrogen/generated/android/c++/JIOSActivityType.hpp +1 -1
- package/nitrogen/generated/android/c++/JLocationAccuracyOptions.hpp +1 -1
- package/nitrogen/generated/android/c++/JLocationAvailability.hpp +1 -1
- package/nitrogen/generated/android/c++/JLocationError.hpp +1 -1
- package/nitrogen/generated/android/c++/JLocationProvider.hpp +1 -1
- package/nitrogen/generated/android/c++/JLocationProviderInternal.hpp +1 -1
- package/nitrogen/generated/android/c++/JLocationProviderStatus.hpp +1 -1
- package/nitrogen/generated/android/c++/JLocationProviderUsed.hpp +1 -1
- package/nitrogen/generated/android/c++/JLocationRequestOptions.hpp +1 -1
- package/nitrogen/generated/android/c++/JLocationSettingsOptions.hpp +1 -1
- package/nitrogen/generated/android/c++/JNullableDouble.hpp +3 -3
- package/nitrogen/generated/android/c++/JPermissionStatus.hpp +1 -1
- package/nitrogen/generated/android/c++/JReverseGeocodedAddress.hpp +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/CompatGeolocationConfigurationInternal.kt +19 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/CompatGeolocationError.kt +21 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/CompatGeolocationOptions.kt +33 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/CompatGeolocationResponse.kt +15 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeocodedLocation.kt +17 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeocodingCoordinates.kt +15 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeolocationConfiguration.kt +19 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeolocationCoordinates.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeolocationResponse.kt +19 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Heading.kt +19 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/HeadingOptions.kt +13 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/HybridNitroGeolocationCompatSpec.kt +6 -6
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/HybridNitroGeolocationSpec.kt +15 -15
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/LocationAccuracyOptions.kt +15 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/LocationAvailability.kt +15 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/LocationError.kt +15 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/LocationProviderStatus.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/LocationRequestOptions.kt +43 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/LocationSettingsOptions.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/NullableDouble.kt +16 -7
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/ReverseGeocodedAddress.kt +25 -0
- package/nitrogen/generated/android/nitrogeolocationOnLoad.cpp +4 -4
- package/nitrogen/generated/ios/NitroGeolocation+autolinking.rb +2 -0
- package/nitrogen/generated/ios/NitroGeolocation-Swift-Cxx-Bridge.hpp +0 -72
- package/nitrogen/generated/ios/c++/HybridNitroGeolocationCompatSpecSwift.hpp +4 -4
- package/nitrogen/generated/ios/c++/HybridNitroGeolocationSpecSwift.hpp +10 -10
- package/nitrogen/generated/ios/swift/HybridNitroGeolocationCompatSpec.swift +2 -2
- package/nitrogen/generated/ios/swift/HybridNitroGeolocationCompatSpec_cxx.swift +6 -6
- package/nitrogen/generated/ios/swift/HybridNitroGeolocationSpec.swift +5 -5
- package/nitrogen/generated/ios/swift/HybridNitroGeolocationSpec_cxx.swift +15 -15
- package/nitrogen/generated/ios/swift/NullableDouble.swift +12 -0
- package/nitrogen/generated/shared/c++/HybridNitroGeolocationCompatSpec.hpp +2 -2
- package/nitrogen/generated/shared/c++/HybridNitroGeolocationSpec.hpp +5 -5
- package/package.json +2 -1
- package/src/NitroGeolocation.nitro.ts +10 -10
- package/src/NitroGeolocationCompat.nitro.ts +4 -4
- package/src/api/getCurrentPosition.ts +5 -1
- package/src/api/getLastKnownPosition.ts +5 -1
- package/src/api/requestLocationSettings.ts +2 -2
- package/src/api/watchHeading.ts +5 -1
- package/src/api/watchPosition.ts +5 -1
- package/src/compat/getCurrentPosition.ts +2 -2
- package/src/compat/watchPosition.ts +2 -2
- package/src/publicTypes.ts +7 -16
|
@@ -307,8 +307,8 @@ class NitroGeolocation(
|
|
|
307
307
|
|
|
308
308
|
override fun requestLocationSettings(
|
|
309
309
|
success: (LocationProviderStatus) -> Unit,
|
|
310
|
-
|
|
311
|
-
|
|
310
|
+
options: LocationSettingsOptions,
|
|
311
|
+
error: ((LocationError) -> Unit)?
|
|
312
312
|
) {
|
|
313
313
|
locationSettings.requestLocationSettings(success, error, options)
|
|
314
314
|
}
|
|
@@ -339,8 +339,8 @@ class NitroGeolocation(
|
|
|
339
339
|
|
|
340
340
|
override fun getCurrentPosition(
|
|
341
341
|
success: (GeolocationResponse) -> Unit,
|
|
342
|
-
|
|
343
|
-
|
|
342
|
+
options: LocationRequestOptions,
|
|
343
|
+
error: ((LocationError) -> Unit)?
|
|
344
344
|
): Unit {
|
|
345
345
|
// Check permission
|
|
346
346
|
if (!hasLocationPermission()) {
|
|
@@ -395,8 +395,8 @@ class NitroGeolocation(
|
|
|
395
395
|
|
|
396
396
|
override fun getLastKnownPosition(
|
|
397
397
|
success: (GeolocationResponse) -> Unit,
|
|
398
|
-
|
|
399
|
-
|
|
398
|
+
options: LocationRequestOptions,
|
|
399
|
+
error: ((LocationError) -> Unit)?
|
|
400
400
|
) {
|
|
401
401
|
if (!hasLocationPermission()) {
|
|
402
402
|
error?.invoke(createLocationError(
|
|
@@ -500,8 +500,8 @@ class NitroGeolocation(
|
|
|
500
500
|
|
|
501
501
|
override fun watchPosition(
|
|
502
502
|
success: (GeolocationResponse) -> Unit,
|
|
503
|
-
|
|
504
|
-
|
|
503
|
+
options: LocationRequestOptions,
|
|
504
|
+
error: ((LocationError) -> Unit)?
|
|
505
505
|
): String {
|
|
506
506
|
val token = UUID.randomUUID().toString()
|
|
507
507
|
val parsedOptions = ParsedOptions.parse(options)
|
|
@@ -559,8 +559,8 @@ class NitroGeolocation(
|
|
|
559
559
|
|
|
560
560
|
override fun watchHeading(
|
|
561
561
|
success: (Heading) -> Unit,
|
|
562
|
-
|
|
563
|
-
|
|
562
|
+
options: HeadingOptions,
|
|
563
|
+
error: ((LocationError) -> Unit)?
|
|
564
564
|
): String {
|
|
565
565
|
if (!hasLocationPermission()) {
|
|
566
566
|
val token = UUID.randomUUID().toString()
|
|
@@ -48,16 +48,16 @@ class NitroGeolocationCompat(
|
|
|
48
48
|
|
|
49
49
|
override fun getCurrentPosition(
|
|
50
50
|
success: (position: CompatGeolocationResponse) -> Unit,
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
options: CompatGeolocationOptions,
|
|
52
|
+
error: ((error: CompatGeolocationError) -> Unit)?
|
|
53
53
|
) {
|
|
54
54
|
GetCurrentPosition(reactContext).execute(success, error, options)
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
override fun watchPosition(
|
|
58
58
|
success: (position: CompatGeolocationResponse) -> Unit,
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
options: CompatGeolocationOptions,
|
|
60
|
+
error: ((error: CompatGeolocationError) -> Unit)?
|
|
61
61
|
): Double {
|
|
62
62
|
return watchPositionHandler.watch(success, error, options).toDouble()
|
|
63
63
|
}
|
|
@@ -148,9 +148,15 @@ class NitroGeolocation: HybridNitroGeolocationSpec {
|
|
|
148
148
|
private struct ParsedHeadingOptions {
|
|
149
149
|
let headingFilter: CLLocationDegrees
|
|
150
150
|
|
|
151
|
+
// Apple's documented `CLLocationManager.headingFilter` default is 1°.
|
|
152
|
+
// Defaulting to `0` here propagates through `mergeHeadingFilter` into
|
|
153
|
+
// `kCLHeadingFilterNone` (-1), which fires the delegate on every
|
|
154
|
+
// CLHeading tick (sub-degree firehose for stationary users). 1° matches
|
|
155
|
+
// CL's documented behavior and lets the delegate fire only on
|
|
156
|
+
// perceptible changes.
|
|
151
157
|
static func parse(from options: HeadingOptions?) -> ParsedHeadingOptions {
|
|
152
158
|
return ParsedHeadingOptions(
|
|
153
|
-
headingFilter: options?.headingFilter ??
|
|
159
|
+
headingFilter: options?.headingFilter ?? 1
|
|
154
160
|
)
|
|
155
161
|
}
|
|
156
162
|
}
|
|
@@ -300,8 +306,8 @@ class NitroGeolocation: HybridNitroGeolocationSpec {
|
|
|
300
306
|
|
|
301
307
|
func requestLocationSettings(
|
|
302
308
|
success: @escaping (LocationProviderStatus) -> Void,
|
|
303
|
-
|
|
304
|
-
|
|
309
|
+
options: LocationSettingsOptions,
|
|
310
|
+
error: ((LocationError) -> Void)?
|
|
305
311
|
) throws -> Void {
|
|
306
312
|
success(createLocationProviderStatus())
|
|
307
313
|
}
|
|
@@ -359,8 +365,8 @@ class NitroGeolocation: HybridNitroGeolocationSpec {
|
|
|
359
365
|
|
|
360
366
|
func getCurrentPosition(
|
|
361
367
|
success: @escaping (GeolocationResponse) -> Void,
|
|
362
|
-
|
|
363
|
-
|
|
368
|
+
options: LocationRequestOptions,
|
|
369
|
+
error: ((LocationError) -> Void)?
|
|
364
370
|
) throws -> Void {
|
|
365
371
|
// Check permission
|
|
366
372
|
let status = CLLocationManager.authorizationStatus()
|
|
@@ -425,8 +431,8 @@ class NitroGeolocation: HybridNitroGeolocationSpec {
|
|
|
425
431
|
|
|
426
432
|
func getLastKnownPosition(
|
|
427
433
|
success: @escaping (GeolocationResponse) -> Void,
|
|
428
|
-
|
|
429
|
-
|
|
434
|
+
options: LocationRequestOptions,
|
|
435
|
+
error: ((LocationError) -> Void)?
|
|
430
436
|
) throws -> Void {
|
|
431
437
|
let status = CLLocationManager.authorizationStatus()
|
|
432
438
|
if status == .denied || status == .restricted {
|
|
@@ -585,8 +591,8 @@ class NitroGeolocation: HybridNitroGeolocationSpec {
|
|
|
585
591
|
|
|
586
592
|
func watchHeading(
|
|
587
593
|
success: @escaping (Heading) -> Void,
|
|
588
|
-
|
|
589
|
-
|
|
594
|
+
options: HeadingOptions,
|
|
595
|
+
error: ((LocationError) -> Void)?
|
|
590
596
|
) throws -> String {
|
|
591
597
|
let token = UUID().uuidString
|
|
592
598
|
let parsedOptions = ParsedHeadingOptions.parse(from: options)
|
|
@@ -624,8 +630,8 @@ class NitroGeolocation: HybridNitroGeolocationSpec {
|
|
|
624
630
|
|
|
625
631
|
func watchPosition(
|
|
626
632
|
success: @escaping (GeolocationResponse) -> Void,
|
|
627
|
-
|
|
628
|
-
|
|
633
|
+
options: LocationRequestOptions,
|
|
634
|
+
error: ((LocationError) -> Void)?
|
|
629
635
|
) -> String {
|
|
630
636
|
let token = UUID().uuidString
|
|
631
637
|
let parsedOptions = ParsedOptions.parse(from: options)
|
|
@@ -35,8 +35,9 @@ class NitroGeolocationCompat: HybridNitroGeolocationCompatSpec {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
public func getCurrentPosition(
|
|
38
|
-
success: @escaping (CompatGeolocationResponse) -> Void,
|
|
39
|
-
options: CompatGeolocationOptions
|
|
38
|
+
success: @escaping (CompatGeolocationResponse) -> Void,
|
|
39
|
+
options: CompatGeolocationOptions,
|
|
40
|
+
error: ((CompatGeolocationError) -> Void)?
|
|
40
41
|
) throws {
|
|
41
42
|
// Fast path: check cached location immediately (no dispatch overhead!)
|
|
42
43
|
let parsedOptions = LocationManager.ParsedOptions.parse(from: options)
|
|
@@ -52,8 +53,9 @@ class NitroGeolocationCompat: HybridNitroGeolocationCompatSpec {
|
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
public func watchPosition(
|
|
55
|
-
success: @escaping (CompatGeolocationResponse) -> Void,
|
|
56
|
-
options: CompatGeolocationOptions
|
|
56
|
+
success: @escaping (CompatGeolocationResponse) -> Void,
|
|
57
|
+
options: CompatGeolocationOptions,
|
|
58
|
+
error: ((CompatGeolocationError) -> Void)?
|
|
57
59
|
) throws -> Double {
|
|
58
60
|
return locationManager.watchPosition(success: success, error: error, options: options)
|
|
59
61
|
}
|
|
@@ -19,7 +19,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
19
19
|
*/
|
|
20
20
|
struct JAccuracyAuthorization final: public jni::JavaClass<JAccuracyAuthorization> {
|
|
21
21
|
public:
|
|
22
|
-
static auto
|
|
22
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/AccuracyAuthorization;";
|
|
23
23
|
|
|
24
24
|
public:
|
|
25
25
|
/**
|
|
@@ -19,7 +19,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
19
19
|
*/
|
|
20
20
|
struct JAndroidAccuracyPreset final: public jni::JavaClass<JAndroidAccuracyPreset> {
|
|
21
21
|
public:
|
|
22
|
-
static auto
|
|
22
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/AndroidAccuracyPreset;";
|
|
23
23
|
|
|
24
24
|
public:
|
|
25
25
|
/**
|
|
@@ -19,7 +19,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
19
19
|
*/
|
|
20
20
|
struct JAndroidGranularity final: public jni::JavaClass<JAndroidGranularity> {
|
|
21
21
|
public:
|
|
22
|
-
static auto
|
|
22
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/AndroidGranularity;";
|
|
23
23
|
|
|
24
24
|
public:
|
|
25
25
|
/**
|
|
@@ -19,7 +19,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
19
19
|
*/
|
|
20
20
|
struct JAuthorizationLevel final: public jni::JavaClass<JAuthorizationLevel> {
|
|
21
21
|
public:
|
|
22
|
-
static auto
|
|
22
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/AuthorizationLevel;";
|
|
23
23
|
|
|
24
24
|
public:
|
|
25
25
|
/**
|
|
@@ -19,7 +19,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
19
19
|
*/
|
|
20
20
|
struct JAuthorizationLevelInternal final: public jni::JavaClass<JAuthorizationLevelInternal> {
|
|
21
21
|
public:
|
|
22
|
-
static auto
|
|
22
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/AuthorizationLevelInternal;";
|
|
23
23
|
|
|
24
24
|
public:
|
|
25
25
|
/**
|
|
@@ -25,7 +25,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
25
25
|
*/
|
|
26
26
|
struct JCompatGeolocationConfigurationInternal final: public jni::JavaClass<JCompatGeolocationConfigurationInternal> {
|
|
27
27
|
public:
|
|
28
|
-
static auto
|
|
28
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/CompatGeolocationConfigurationInternal;";
|
|
29
29
|
|
|
30
30
|
public:
|
|
31
31
|
/**
|
|
@@ -21,7 +21,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
21
21
|
*/
|
|
22
22
|
struct JCompatGeolocationError final: public jni::JavaClass<JCompatGeolocationError> {
|
|
23
23
|
public:
|
|
24
|
-
static auto
|
|
24
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/CompatGeolocationError;";
|
|
25
25
|
|
|
26
26
|
public:
|
|
27
27
|
/**
|
|
@@ -29,7 +29,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
29
29
|
*/
|
|
30
30
|
struct JCompatGeolocationOptions final: public jni::JavaClass<JCompatGeolocationOptions> {
|
|
31
31
|
public:
|
|
32
|
-
static auto
|
|
32
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/CompatGeolocationOptions;";
|
|
33
33
|
|
|
34
34
|
public:
|
|
35
35
|
/**
|
|
@@ -27,7 +27,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
27
27
|
*/
|
|
28
28
|
struct JCompatGeolocationResponse final: public jni::JavaClass<JCompatGeolocationResponse> {
|
|
29
29
|
public:
|
|
30
|
-
static auto
|
|
30
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/CompatGeolocationResponse;";
|
|
31
31
|
|
|
32
32
|
public:
|
|
33
33
|
/**
|
|
@@ -23,7 +23,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
23
23
|
*/
|
|
24
24
|
struct JFunc_void: public jni::JavaClass<JFunc_void> {
|
|
25
25
|
public:
|
|
26
|
-
static auto
|
|
26
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/Func_void;";
|
|
27
27
|
|
|
28
28
|
public:
|
|
29
29
|
/**
|
|
@@ -59,7 +59,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
public:
|
|
62
|
-
static auto
|
|
62
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/Func_void_cxx;";
|
|
63
63
|
static void registerNatives() {
|
|
64
64
|
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_cxx::invoke_cxx)});
|
|
65
65
|
}
|
|
@@ -25,7 +25,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
25
25
|
*/
|
|
26
26
|
struct JFunc_void_AccuracyAuthorization: public jni::JavaClass<JFunc_void_AccuracyAuthorization> {
|
|
27
27
|
public:
|
|
28
|
-
static auto
|
|
28
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/Func_void_AccuracyAuthorization;";
|
|
29
29
|
|
|
30
30
|
public:
|
|
31
31
|
/**
|
|
@@ -61,7 +61,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
public:
|
|
64
|
-
static auto
|
|
64
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/Func_void_AccuracyAuthorization_cxx;";
|
|
65
65
|
static void registerNatives() {
|
|
66
66
|
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_AccuracyAuthorization_cxx::invoke_cxx)});
|
|
67
67
|
}
|
|
@@ -26,7 +26,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
26
26
|
*/
|
|
27
27
|
struct JFunc_void_CompatGeolocationError: public jni::JavaClass<JFunc_void_CompatGeolocationError> {
|
|
28
28
|
public:
|
|
29
|
-
static auto
|
|
29
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/Func_void_CompatGeolocationError;";
|
|
30
30
|
|
|
31
31
|
public:
|
|
32
32
|
/**
|
|
@@ -62,7 +62,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
public:
|
|
65
|
-
static auto
|
|
65
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/Func_void_CompatGeolocationError_cxx;";
|
|
66
66
|
static void registerNatives() {
|
|
67
67
|
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_CompatGeolocationError_cxx::invoke_cxx)});
|
|
68
68
|
}
|
|
@@ -32,7 +32,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
32
32
|
*/
|
|
33
33
|
struct JFunc_void_CompatGeolocationResponse: public jni::JavaClass<JFunc_void_CompatGeolocationResponse> {
|
|
34
34
|
public:
|
|
35
|
-
static auto
|
|
35
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/Func_void_CompatGeolocationResponse;";
|
|
36
36
|
|
|
37
37
|
public:
|
|
38
38
|
/**
|
|
@@ -68,7 +68,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
public:
|
|
71
|
-
static auto
|
|
71
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/Func_void_CompatGeolocationResponse_cxx;";
|
|
72
72
|
static void registerNatives() {
|
|
73
73
|
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_CompatGeolocationResponse_cxx::invoke_cxx)});
|
|
74
74
|
}
|
|
@@ -34,7 +34,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
34
34
|
*/
|
|
35
35
|
struct JFunc_void_GeolocationResponse: public jni::JavaClass<JFunc_void_GeolocationResponse> {
|
|
36
36
|
public:
|
|
37
|
-
static auto
|
|
37
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/Func_void_GeolocationResponse;";
|
|
38
38
|
|
|
39
39
|
public:
|
|
40
40
|
/**
|
|
@@ -70,7 +70,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
public:
|
|
73
|
-
static auto
|
|
73
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/Func_void_GeolocationResponse_cxx;";
|
|
74
74
|
static void registerNatives() {
|
|
75
75
|
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_GeolocationResponse_cxx::invoke_cxx)});
|
|
76
76
|
}
|
|
@@ -26,7 +26,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
26
26
|
*/
|
|
27
27
|
struct JFunc_void_Heading: public jni::JavaClass<JFunc_void_Heading> {
|
|
28
28
|
public:
|
|
29
|
-
static auto
|
|
29
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/Func_void_Heading;";
|
|
30
30
|
|
|
31
31
|
public:
|
|
32
32
|
/**
|
|
@@ -62,7 +62,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
public:
|
|
65
|
-
static auto
|
|
65
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/Func_void_Heading_cxx;";
|
|
66
66
|
static void registerNatives() {
|
|
67
67
|
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_Heading_cxx::invoke_cxx)});
|
|
68
68
|
}
|
|
@@ -26,7 +26,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
26
26
|
*/
|
|
27
27
|
struct JFunc_void_LocationError: public jni::JavaClass<JFunc_void_LocationError> {
|
|
28
28
|
public:
|
|
29
|
-
static auto
|
|
29
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/Func_void_LocationError;";
|
|
30
30
|
|
|
31
31
|
public:
|
|
32
32
|
/**
|
|
@@ -62,7 +62,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
public:
|
|
65
|
-
static auto
|
|
65
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/Func_void_LocationError_cxx;";
|
|
66
66
|
static void registerNatives() {
|
|
67
67
|
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_LocationError_cxx::invoke_cxx)});
|
|
68
68
|
}
|
|
@@ -26,7 +26,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
26
26
|
*/
|
|
27
27
|
struct JFunc_void_LocationProviderStatus: public jni::JavaClass<JFunc_void_LocationProviderStatus> {
|
|
28
28
|
public:
|
|
29
|
-
static auto
|
|
29
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/Func_void_LocationProviderStatus;";
|
|
30
30
|
|
|
31
31
|
public:
|
|
32
32
|
/**
|
|
@@ -62,7 +62,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
public:
|
|
65
|
-
static auto
|
|
65
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/Func_void_LocationProviderStatus_cxx;";
|
|
66
66
|
static void registerNatives() {
|
|
67
67
|
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_LocationProviderStatus_cxx::invoke_cxx)});
|
|
68
68
|
}
|
|
@@ -25,7 +25,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
25
25
|
*/
|
|
26
26
|
struct JFunc_void_PermissionStatus: public jni::JavaClass<JFunc_void_PermissionStatus> {
|
|
27
27
|
public:
|
|
28
|
-
static auto
|
|
28
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/Func_void_PermissionStatus;";
|
|
29
29
|
|
|
30
30
|
public:
|
|
31
31
|
/**
|
|
@@ -61,7 +61,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
public:
|
|
64
|
-
static auto
|
|
64
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/Func_void_PermissionStatus_cxx;";
|
|
65
65
|
static void registerNatives() {
|
|
66
66
|
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_PermissionStatus_cxx::invoke_cxx)});
|
|
67
67
|
}
|
|
@@ -27,7 +27,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
27
27
|
*/
|
|
28
28
|
struct JFunc_void_std__vector_GeocodedLocation_: public jni::JavaClass<JFunc_void_std__vector_GeocodedLocation_> {
|
|
29
29
|
public:
|
|
30
|
-
static auto
|
|
30
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/Func_void_std__vector_GeocodedLocation_;";
|
|
31
31
|
|
|
32
32
|
public:
|
|
33
33
|
/**
|
|
@@ -35,16 +35,16 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
35
35
|
*/
|
|
36
36
|
void invoke(const std::vector<GeocodedLocation>& locations) const {
|
|
37
37
|
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JArrayClass<JGeocodedLocation>> /* locations */)>("invoke");
|
|
38
|
-
method(self(), [&]() {
|
|
39
|
-
size_t __size =
|
|
38
|
+
method(self(), [&](auto&& __input) {
|
|
39
|
+
size_t __size = __input.size();
|
|
40
40
|
jni::local_ref<jni::JArrayClass<JGeocodedLocation>> __array = jni::JArrayClass<JGeocodedLocation>::newArray(__size);
|
|
41
41
|
for (size_t __i = 0; __i < __size; __i++) {
|
|
42
|
-
const auto& __element =
|
|
42
|
+
const auto& __element = __input[__i];
|
|
43
43
|
auto __elementJni = JGeocodedLocation::fromCpp(__element);
|
|
44
44
|
__array->setElement(__i, *__elementJni);
|
|
45
45
|
}
|
|
46
46
|
return __array;
|
|
47
|
-
}());
|
|
47
|
+
}(locations));
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
|
|
@@ -62,16 +62,16 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
62
62
|
* Invokes the C++ `std::function<...>` this `JFunc_void_std__vector_GeocodedLocation__cxx` instance holds.
|
|
63
63
|
*/
|
|
64
64
|
void invoke_cxx(jni::alias_ref<jni::JArrayClass<JGeocodedLocation>> locations) {
|
|
65
|
-
_func([&]() {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
65
|
+
_func([&](auto&& __input) {
|
|
66
|
+
size_t __size = __input->size();
|
|
67
|
+
std::vector<GeocodedLocation> __vector;
|
|
68
|
+
__vector.reserve(__size);
|
|
69
|
+
for (size_t __i = 0; __i < __size; __i++) {
|
|
70
|
+
auto __element = __input->getElement(__i);
|
|
71
|
+
__vector.push_back(__element->toCpp());
|
|
72
|
+
}
|
|
73
|
+
return __vector;
|
|
74
|
+
}(locations));
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
public:
|
|
@@ -81,7 +81,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
public:
|
|
84
|
-
static auto
|
|
84
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/Func_void_std__vector_GeocodedLocation__cxx;";
|
|
85
85
|
static void registerNatives() {
|
|
86
86
|
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_std__vector_GeocodedLocation__cxx::invoke_cxx)});
|
|
87
87
|
}
|
|
@@ -28,7 +28,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
28
28
|
*/
|
|
29
29
|
struct JFunc_void_std__vector_ReverseGeocodedAddress_: public jni::JavaClass<JFunc_void_std__vector_ReverseGeocodedAddress_> {
|
|
30
30
|
public:
|
|
31
|
-
static auto
|
|
31
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/Func_void_std__vector_ReverseGeocodedAddress_;";
|
|
32
32
|
|
|
33
33
|
public:
|
|
34
34
|
/**
|
|
@@ -36,16 +36,16 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
36
36
|
*/
|
|
37
37
|
void invoke(const std::vector<ReverseGeocodedAddress>& addresses) const {
|
|
38
38
|
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JArrayClass<JReverseGeocodedAddress>> /* addresses */)>("invoke");
|
|
39
|
-
method(self(), [&]() {
|
|
40
|
-
size_t __size =
|
|
39
|
+
method(self(), [&](auto&& __input) {
|
|
40
|
+
size_t __size = __input.size();
|
|
41
41
|
jni::local_ref<jni::JArrayClass<JReverseGeocodedAddress>> __array = jni::JArrayClass<JReverseGeocodedAddress>::newArray(__size);
|
|
42
42
|
for (size_t __i = 0; __i < __size; __i++) {
|
|
43
|
-
const auto& __element =
|
|
43
|
+
const auto& __element = __input[__i];
|
|
44
44
|
auto __elementJni = JReverseGeocodedAddress::fromCpp(__element);
|
|
45
45
|
__array->setElement(__i, *__elementJni);
|
|
46
46
|
}
|
|
47
47
|
return __array;
|
|
48
|
-
}());
|
|
48
|
+
}(addresses));
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
51
|
|
|
@@ -63,16 +63,16 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
63
63
|
* Invokes the C++ `std::function<...>` this `JFunc_void_std__vector_ReverseGeocodedAddress__cxx` instance holds.
|
|
64
64
|
*/
|
|
65
65
|
void invoke_cxx(jni::alias_ref<jni::JArrayClass<JReverseGeocodedAddress>> addresses) {
|
|
66
|
-
_func([&]() {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
66
|
+
_func([&](auto&& __input) {
|
|
67
|
+
size_t __size = __input->size();
|
|
68
|
+
std::vector<ReverseGeocodedAddress> __vector;
|
|
69
|
+
__vector.reserve(__size);
|
|
70
|
+
for (size_t __i = 0; __i < __size; __i++) {
|
|
71
|
+
auto __element = __input->getElement(__i);
|
|
72
|
+
__vector.push_back(__element->toCpp());
|
|
73
|
+
}
|
|
74
|
+
return __vector;
|
|
75
|
+
}(addresses));
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
public:
|
|
@@ -82,7 +82,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
public:
|
|
85
|
-
static auto
|
|
85
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/Func_void_std__vector_ReverseGeocodedAddress__cxx;";
|
|
86
86
|
static void registerNatives() {
|
|
87
87
|
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_std__vector_ReverseGeocodedAddress__cxx::invoke_cxx)});
|
|
88
88
|
}
|
|
@@ -21,7 +21,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
21
21
|
*/
|
|
22
22
|
struct JGeocodedLocation final: public jni::JavaClass<JGeocodedLocation> {
|
|
23
23
|
public:
|
|
24
|
-
static auto
|
|
24
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/GeocodedLocation;";
|
|
25
25
|
|
|
26
26
|
public:
|
|
27
27
|
/**
|
|
@@ -21,7 +21,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
21
21
|
*/
|
|
22
22
|
struct JGeocodingCoordinates final: public jni::JavaClass<JGeocodingCoordinates> {
|
|
23
23
|
public:
|
|
24
|
-
static auto
|
|
24
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/GeocodingCoordinates;";
|
|
25
25
|
|
|
26
26
|
public:
|
|
27
27
|
/**
|
|
@@ -25,7 +25,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
25
25
|
*/
|
|
26
26
|
struct JGeolocationConfiguration final: public jni::JavaClass<JGeolocationConfiguration> {
|
|
27
27
|
public:
|
|
28
|
-
static auto
|
|
28
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/GeolocationConfiguration;";
|
|
29
29
|
|
|
30
30
|
public:
|
|
31
31
|
/**
|
|
@@ -25,7 +25,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
25
25
|
*/
|
|
26
26
|
struct JGeolocationCoordinates final: public jni::JavaClass<JGeolocationCoordinates> {
|
|
27
27
|
public:
|
|
28
|
-
static auto
|
|
28
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/GeolocationCoordinates;";
|
|
29
29
|
|
|
30
30
|
public:
|
|
31
31
|
/**
|
|
@@ -29,7 +29,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
29
29
|
*/
|
|
30
30
|
struct JGeolocationResponse final: public jni::JavaClass<JGeolocationResponse> {
|
|
31
31
|
public:
|
|
32
|
-
static auto
|
|
32
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/GeolocationResponse;";
|
|
33
33
|
|
|
34
34
|
public:
|
|
35
35
|
/**
|
|
@@ -21,7 +21,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
21
21
|
*/
|
|
22
22
|
struct JHeading final: public jni::JavaClass<JHeading> {
|
|
23
23
|
public:
|
|
24
|
-
static auto
|
|
24
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/Heading;";
|
|
25
25
|
|
|
26
26
|
public:
|
|
27
27
|
/**
|
|
@@ -21,7 +21,7 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
21
21
|
*/
|
|
22
22
|
struct JHeadingOptions final: public jni::JavaClass<JHeadingOptions> {
|
|
23
23
|
public:
|
|
24
|
-
static auto
|
|
24
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/HeadingOptions;";
|
|
25
25
|
|
|
26
26
|
public:
|
|
27
27
|
/**
|