react-native-nitro-geolocation 1.0.0 → 1.1.0
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/cpp/cpp-adapter.cpp +4 -1
- package/nitrogen/generated/android/c++/JAuthorizationLevel.hpp +1 -1
- package/nitrogen/generated/android/c++/JAuthorizationLevelInternal.hpp +1 -1
- package/nitrogen/generated/android/c++/JFunc_void.hpp +1 -1
- package/nitrogen/generated/android/c++/JFunc_void_GeolocationError.hpp +1 -1
- package/nitrogen/generated/android/c++/JFunc_void_GeolocationResponse.hpp +1 -1
- package/nitrogen/generated/android/c++/JFunc_void_LocationError.hpp +1 -1
- package/nitrogen/generated/android/c++/JGeolocationCoordinates.hpp +1 -1
- package/nitrogen/generated/android/c++/JGeolocationError.hpp +1 -1
- package/nitrogen/generated/android/c++/JGeolocationOptions.hpp +1 -1
- package/nitrogen/generated/android/c++/JGeolocationResponse.hpp +1 -1
- package/nitrogen/generated/android/c++/JHybridNitroGeolocationCompatSpec.cpp +26 -25
- package/nitrogen/generated/android/c++/JHybridNitroGeolocationCompatSpec.hpp +20 -22
- package/nitrogen/generated/android/c++/JHybridNitroGeolocationSpec.cpp +27 -26
- package/nitrogen/generated/android/c++/JHybridNitroGeolocationSpec.hpp +20 -22
- 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++/JLocationRequestOptions.hpp +1 -1
- package/nitrogen/generated/android/c++/JModernGeolocationConfiguration.hpp +1 -1
- package/nitrogen/generated/android/c++/JNullableDouble.cpp +1 -1
- package/nitrogen/generated/android/c++/JNullableDouble.hpp +1 -1
- package/nitrogen/generated/android/c++/JPermissionStatus.hpp +1 -1
- package/nitrogen/generated/android/c++/JRNConfigurationInternal.hpp +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/AuthorizationLevel.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/AuthorizationLevelInternal.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Func_void.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Func_void_GeolocationError.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Func_void_GeolocationResponse.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Func_void_LocationError.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeolocationCoordinates.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeolocationError.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeolocationOptions.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeolocationResponse.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/HybridNitroGeolocationCompatSpec.kt +16 -19
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/HybridNitroGeolocationSpec.kt +16 -19
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/LocationError.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/LocationProvider.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/LocationProviderInternal.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/LocationRequestOptions.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/ModernGeolocationConfiguration.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/NullableDouble.kt +1 -7
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/PermissionStatus.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/RNConfigurationInternal.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/nitrogeolocationOnLoad.kt +1 -1
- package/nitrogen/generated/android/nitrogeolocation+autolinking.cmake +1 -1
- package/nitrogen/generated/android/nitrogeolocation+autolinking.gradle +1 -1
- package/nitrogen/generated/android/nitrogeolocationOnLoad.cpp +46 -30
- package/nitrogen/generated/android/nitrogeolocationOnLoad.hpp +14 -5
- package/nitrogen/generated/ios/NitroGeolocation+autolinking.rb +1 -1
- package/nitrogen/generated/ios/NitroGeolocation-Swift-Cxx-Bridge.cpp +1 -1
- package/nitrogen/generated/ios/NitroGeolocation-Swift-Cxx-Bridge.hpp +13 -13
- package/nitrogen/generated/ios/NitroGeolocation-Swift-Cxx-Umbrella.hpp +1 -1
- package/nitrogen/generated/ios/NitroGeolocationAutolinking.mm +1 -1
- package/nitrogen/generated/ios/NitroGeolocationAutolinking.swift +13 -15
- package/nitrogen/generated/ios/c++/HybridNitroGeolocationCompatSpecSwift.cpp +1 -1
- package/nitrogen/generated/ios/c++/HybridNitroGeolocationCompatSpecSwift.hpp +7 -1
- package/nitrogen/generated/ios/c++/HybridNitroGeolocationSpecSwift.cpp +1 -1
- package/nitrogen/generated/ios/c++/HybridNitroGeolocationSpecSwift.hpp +7 -1
- package/nitrogen/generated/ios/swift/AuthorizationLevel.swift +1 -1
- package/nitrogen/generated/ios/swift/AuthorizationLevelInternal.swift +1 -1
- package/nitrogen/generated/ios/swift/Func_void.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_GeolocationError.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_GeolocationResponse.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_LocationError.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_PermissionStatus.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +1 -2
- package/nitrogen/generated/ios/swift/GeolocationCoordinates.swift +1 -2
- package/nitrogen/generated/ios/swift/GeolocationError.swift +1 -2
- package/nitrogen/generated/ios/swift/GeolocationOptions.swift +41 -7
- package/nitrogen/generated/ios/swift/GeolocationResponse.swift +1 -2
- package/nitrogen/generated/ios/swift/HybridNitroGeolocationCompatSpec.swift +3 -4
- package/nitrogen/generated/ios/swift/HybridNitroGeolocationCompatSpec_cxx.swift +9 -2
- package/nitrogen/generated/ios/swift/HybridNitroGeolocationSpec.swift +3 -4
- package/nitrogen/generated/ios/swift/HybridNitroGeolocationSpec_cxx.swift +9 -2
- package/nitrogen/generated/ios/swift/LocationError.swift +1 -2
- package/nitrogen/generated/ios/swift/LocationProvider.swift +1 -1
- package/nitrogen/generated/ios/swift/LocationProviderInternal.swift +1 -1
- package/nitrogen/generated/ios/swift/LocationRequestOptions.swift +41 -7
- package/nitrogen/generated/ios/swift/ModernGeolocationConfiguration.swift +1 -2
- package/nitrogen/generated/ios/swift/NullableDouble.swift +1 -1
- package/nitrogen/generated/ios/swift/PermissionStatus.swift +1 -1
- package/nitrogen/generated/ios/swift/RNConfigurationInternal.swift +1 -2
- package/nitrogen/generated/shared/c++/AuthorizationLevel.hpp +1 -1
- package/nitrogen/generated/shared/c++/AuthorizationLevelInternal.hpp +1 -1
- package/nitrogen/generated/shared/c++/GeolocationCoordinates.hpp +1 -1
- package/nitrogen/generated/shared/c++/GeolocationError.hpp +1 -1
- package/nitrogen/generated/shared/c++/GeolocationOptions.hpp +1 -1
- package/nitrogen/generated/shared/c++/GeolocationResponse.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridNitroGeolocationCompatSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridNitroGeolocationCompatSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridNitroGeolocationSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridNitroGeolocationSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/LocationError.hpp +1 -1
- package/nitrogen/generated/shared/c++/LocationProvider.hpp +1 -1
- package/nitrogen/generated/shared/c++/LocationProviderInternal.hpp +1 -1
- package/nitrogen/generated/shared/c++/LocationRequestOptions.hpp +1 -1
- package/nitrogen/generated/shared/c++/ModernGeolocationConfiguration.hpp +1 -1
- package/nitrogen/generated/shared/c++/PermissionStatus.hpp +1 -1
- package/nitrogen/generated/shared/c++/RNConfigurationInternal.hpp +1 -1
- package/package.json +7 -4
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// GeolocationCoordinates.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.nitrogeolocation
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeolocationError.kt
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// GeolocationError.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.nitrogeolocation
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeolocationOptions.kt
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// GeolocationOptions.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.nitrogeolocation
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeolocationResponse.kt
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// GeolocationResponse.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.nitrogeolocation
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridNitroGeolocationCompatSpec.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.nitrogeolocation
|
|
@@ -24,23 +24,6 @@ import com.margelo.nitro.core.HybridObject
|
|
|
24
24
|
"LocalVariableName", "PropertyName", "PrivatePropertyName", "FunctionName"
|
|
25
25
|
)
|
|
26
26
|
abstract class HybridNitroGeolocationCompatSpec: HybridObject() {
|
|
27
|
-
@DoNotStrip
|
|
28
|
-
private var mHybridData: HybridData = initHybrid()
|
|
29
|
-
|
|
30
|
-
init {
|
|
31
|
-
super.updateNative(mHybridData)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
override fun updateNative(hybridData: HybridData) {
|
|
35
|
-
mHybridData = hybridData
|
|
36
|
-
super.updateNative(hybridData)
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// Default implementation of `HybridObject.toString()`
|
|
40
|
-
override fun toString(): String {
|
|
41
|
-
return "[HybridObject NitroGeolocationCompat]"
|
|
42
|
-
}
|
|
43
|
-
|
|
44
27
|
// Properties
|
|
45
28
|
|
|
46
29
|
|
|
@@ -84,7 +67,21 @@ abstract class HybridNitroGeolocationCompatSpec: HybridObject() {
|
|
|
84
67
|
@Keep
|
|
85
68
|
abstract fun stopObserving(): Unit
|
|
86
69
|
|
|
87
|
-
|
|
70
|
+
// Default implementation of `HybridObject.toString()`
|
|
71
|
+
override fun toString(): String {
|
|
72
|
+
return "[HybridObject NitroGeolocationCompat]"
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// C++ backing class
|
|
76
|
+
@DoNotStrip
|
|
77
|
+
@Keep
|
|
78
|
+
protected open class CxxPart(javaPart: HybridNitroGeolocationCompatSpec): HybridObject.CxxPart(javaPart) {
|
|
79
|
+
// C++ JHybridNitroGeolocationCompatSpec::CxxPart::initHybrid(...)
|
|
80
|
+
external override fun initHybrid(): HybridData
|
|
81
|
+
}
|
|
82
|
+
override fun createCxxPart(): CxxPart {
|
|
83
|
+
return CxxPart(this)
|
|
84
|
+
}
|
|
88
85
|
|
|
89
86
|
companion object {
|
|
90
87
|
protected const val TAG = "HybridNitroGeolocationCompatSpec"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridNitroGeolocationSpec.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.nitrogeolocation
|
|
@@ -25,23 +25,6 @@ import com.margelo.nitro.core.HybridObject
|
|
|
25
25
|
"LocalVariableName", "PropertyName", "PrivatePropertyName", "FunctionName"
|
|
26
26
|
)
|
|
27
27
|
abstract class HybridNitroGeolocationSpec: HybridObject() {
|
|
28
|
-
@DoNotStrip
|
|
29
|
-
private var mHybridData: HybridData = initHybrid()
|
|
30
|
-
|
|
31
|
-
init {
|
|
32
|
-
super.updateNative(mHybridData)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
override fun updateNative(hybridData: HybridData) {
|
|
36
|
-
mHybridData = hybridData
|
|
37
|
-
super.updateNative(hybridData)
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// Default implementation of `HybridObject.toString()`
|
|
41
|
-
override fun toString(): String {
|
|
42
|
-
return "[HybridObject NitroGeolocation]"
|
|
43
|
-
}
|
|
44
|
-
|
|
45
28
|
// Properties
|
|
46
29
|
|
|
47
30
|
|
|
@@ -79,7 +62,21 @@ abstract class HybridNitroGeolocationSpec: HybridObject() {
|
|
|
79
62
|
@Keep
|
|
80
63
|
abstract fun stopObserving(): Unit
|
|
81
64
|
|
|
82
|
-
|
|
65
|
+
// Default implementation of `HybridObject.toString()`
|
|
66
|
+
override fun toString(): String {
|
|
67
|
+
return "[HybridObject NitroGeolocation]"
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// C++ backing class
|
|
71
|
+
@DoNotStrip
|
|
72
|
+
@Keep
|
|
73
|
+
protected open class CxxPart(javaPart: HybridNitroGeolocationSpec): HybridObject.CxxPart(javaPart) {
|
|
74
|
+
// C++ JHybridNitroGeolocationSpec::CxxPart::initHybrid(...)
|
|
75
|
+
external override fun initHybrid(): HybridData
|
|
76
|
+
}
|
|
77
|
+
override fun createCxxPart(): CxxPart {
|
|
78
|
+
return CxxPart(this)
|
|
79
|
+
}
|
|
83
80
|
|
|
84
81
|
companion object {
|
|
85
82
|
protected const val TAG = "HybridNitroGeolocationSpec"
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/LocationError.kt
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// LocationError.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.nitrogeolocation
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/LocationProvider.kt
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// LocationProvider.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.nitrogeolocation
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// LocationProviderInternal.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.nitrogeolocation
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// LocationRequestOptions.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.nitrogeolocation
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// ModernGeolocationConfiguration.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.nitrogeolocation
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/NullableDouble.kt
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// NullableDouble.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.nitrogeolocation
|
|
@@ -21,12 +21,6 @@ sealed class NullableDouble {
|
|
|
21
21
|
@DoNotStrip
|
|
22
22
|
data class Second(@DoNotStrip val value: Double): NullableDouble()
|
|
23
23
|
|
|
24
|
-
@Deprecated("getAs() is not type-safe. Use fold/asFirstOrNull/asSecondOrNull instead.", level = DeprecationLevel.ERROR)
|
|
25
|
-
inline fun <reified T> getAs(): T? = when (this) {
|
|
26
|
-
is First -> value as? T
|
|
27
|
-
is Second -> value as? T
|
|
28
|
-
}
|
|
29
|
-
|
|
30
24
|
val isFirst: Boolean
|
|
31
25
|
get() = this is First
|
|
32
26
|
val isSecond: Boolean
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/PermissionStatus.kt
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// PermissionStatus.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.nitrogeolocation
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// RNConfigurationInternal.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.nitrogeolocation
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// nitrogeolocationOnLoad.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.nitrogeolocation
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# nitrogeolocation+autolinking.cmake
|
|
3
3
|
# This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
# https://github.com/mrousavy/nitro
|
|
5
|
-
# Copyright ©
|
|
5
|
+
# Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
#
|
|
7
7
|
|
|
8
8
|
# This is a CMake file that adds all files generated by Nitrogen
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// nitrogeolocation+autolinking.gradle
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
/// This is a Gradle file that adds all files generated by Nitrogen
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// nitrogeolocationOnLoad.cpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#ifndef BUILDING_NITROGEOLOCATION_WITH_GENERATED_CMAKE_PROJECT
|
|
@@ -26,37 +26,53 @@
|
|
|
26
26
|
namespace margelo::nitro::nitrogeolocation {
|
|
27
27
|
|
|
28
28
|
int initialize(JavaVM* vm) {
|
|
29
|
+
return facebook::jni::initialize(vm, []() {
|
|
30
|
+
::margelo::nitro::nitrogeolocation::registerAllNatives();
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
struct JHybridNitroGeolocationSpecImpl: public jni::JavaClass<JHybridNitroGeolocationSpecImpl, JHybridNitroGeolocationSpec::JavaPart> {
|
|
35
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/NitroGeolocation;";
|
|
36
|
+
static std::shared_ptr<JHybridNitroGeolocationSpec> create() {
|
|
37
|
+
static auto constructorFn = javaClassStatic()->getConstructor<JHybridNitroGeolocationSpecImpl::javaobject()>();
|
|
38
|
+
jni::local_ref<JHybridNitroGeolocationSpec::JavaPart> javaPart = javaClassStatic()->newObject(constructorFn);
|
|
39
|
+
return javaPart->getJHybridNitroGeolocationSpec();
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
struct JHybridNitroGeolocationCompatSpecImpl: public jni::JavaClass<JHybridNitroGeolocationCompatSpecImpl, JHybridNitroGeolocationCompatSpec::JavaPart> {
|
|
43
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/nitrogeolocation/NitroGeolocationCompat;";
|
|
44
|
+
static std::shared_ptr<JHybridNitroGeolocationCompatSpec> create() {
|
|
45
|
+
static auto constructorFn = javaClassStatic()->getConstructor<JHybridNitroGeolocationCompatSpecImpl::javaobject()>();
|
|
46
|
+
jni::local_ref<JHybridNitroGeolocationCompatSpec::JavaPart> javaPart = javaClassStatic()->newObject(constructorFn);
|
|
47
|
+
return javaPart->getJHybridNitroGeolocationCompatSpec();
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
void registerAllNatives() {
|
|
29
52
|
using namespace margelo::nitro;
|
|
30
53
|
using namespace margelo::nitro::nitrogeolocation;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
[]() -> std::shared_ptr<HybridObject> {
|
|
54
|
-
static DefaultConstructableObject<JHybridNitroGeolocationCompatSpec::javaobject> object("com/margelo/nitro/nitrogeolocation/NitroGeolocationCompat");
|
|
55
|
-
auto instance = object.create();
|
|
56
|
-
return instance->cthis()->shared();
|
|
57
|
-
}
|
|
58
|
-
);
|
|
59
|
-
});
|
|
54
|
+
|
|
55
|
+
// Register native JNI methods
|
|
56
|
+
margelo::nitro::nitrogeolocation::JHybridNitroGeolocationSpec::CxxPart::registerNatives();
|
|
57
|
+
margelo::nitro::nitrogeolocation::JFunc_void_GeolocationResponse_cxx::registerNatives();
|
|
58
|
+
margelo::nitro::nitrogeolocation::JFunc_void_LocationError_cxx::registerNatives();
|
|
59
|
+
margelo::nitro::nitrogeolocation::JHybridNitroGeolocationCompatSpec::CxxPart::registerNatives();
|
|
60
|
+
margelo::nitro::nitrogeolocation::JFunc_void_cxx::registerNatives();
|
|
61
|
+
margelo::nitro::nitrogeolocation::JFunc_void_GeolocationError_cxx::registerNatives();
|
|
62
|
+
|
|
63
|
+
// Register Nitro Hybrid Objects
|
|
64
|
+
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
65
|
+
"NitroGeolocation",
|
|
66
|
+
[]() -> std::shared_ptr<HybridObject> {
|
|
67
|
+
return JHybridNitroGeolocationSpecImpl::create();
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
71
|
+
"NitroGeolocationCompat",
|
|
72
|
+
[]() -> std::shared_ptr<HybridObject> {
|
|
73
|
+
return JHybridNitroGeolocationCompatSpecImpl::create();
|
|
74
|
+
}
|
|
75
|
+
);
|
|
60
76
|
}
|
|
61
77
|
|
|
62
78
|
} // namespace margelo::nitro::nitrogeolocation
|
|
@@ -2,24 +2,33 @@
|
|
|
2
2
|
/// nitrogeolocationOnLoad.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#include <jni.h>
|
|
9
|
+
#include <functional>
|
|
9
10
|
#include <NitroModules/NitroDefines.hpp>
|
|
10
11
|
|
|
11
12
|
namespace margelo::nitro::nitrogeolocation {
|
|
12
13
|
|
|
14
|
+
[[deprecated("Use registerNatives() instead.")]]
|
|
15
|
+
int initialize(JavaVM* vm);
|
|
16
|
+
|
|
13
17
|
/**
|
|
14
|
-
*
|
|
15
|
-
* Call this in your `JNI_OnLoad` function (probably inside `cpp-adapter.cpp`)
|
|
18
|
+
* Register the native (C++) part of nitrogeolocation, and autolinks all Hybrid Objects.
|
|
19
|
+
* Call this in your `JNI_OnLoad` function (probably inside `cpp-adapter.cpp`),
|
|
20
|
+
* inside a `facebook::jni::initialize(vm, ...)` call.
|
|
16
21
|
* Example:
|
|
17
22
|
* ```cpp (cpp-adapter.cpp)
|
|
18
23
|
* JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void*) {
|
|
19
|
-
* return
|
|
24
|
+
* return facebook::jni::initialize(vm, []() {
|
|
25
|
+
* // register all nitrogeolocation HybridObjects
|
|
26
|
+
* margelo::nitro::nitrogeolocation::registerNatives();
|
|
27
|
+
* // any other custom registrations go here.
|
|
28
|
+
* });
|
|
20
29
|
* }
|
|
21
30
|
* ```
|
|
22
31
|
*/
|
|
23
|
-
|
|
32
|
+
void registerAllNatives();
|
|
24
33
|
|
|
25
34
|
} // namespace margelo::nitro::nitrogeolocation
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# NitroGeolocation+autolinking.rb
|
|
3
3
|
# This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
# https://github.com/mrousavy/nitro
|
|
5
|
-
# Copyright ©
|
|
5
|
+
# Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
#
|
|
7
7
|
|
|
8
8
|
# This is a Ruby script that adds all files generated by Nitrogen
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// NitroGeolocation-Swift-Cxx-Bridge.cpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#include "NitroGeolocation-Swift-Cxx-Bridge.hpp"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// NitroGeolocation-Swift-Cxx-Bridge.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -84,7 +84,7 @@ namespace margelo::nitro::nitrogeolocation::bridge::swift {
|
|
|
84
84
|
return optional.has_value();
|
|
85
85
|
}
|
|
86
86
|
inline bool get_std__optional_bool_(const std::optional<bool>& optional) noexcept {
|
|
87
|
-
return
|
|
87
|
+
return optional.value();
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
// pragma MARK: std::optional<AuthorizationLevel>
|
|
@@ -99,7 +99,7 @@ namespace margelo::nitro::nitrogeolocation::bridge::swift {
|
|
|
99
99
|
return optional.has_value();
|
|
100
100
|
}
|
|
101
101
|
inline AuthorizationLevel get_std__optional_AuthorizationLevel_(const std::optional<AuthorizationLevel>& optional) noexcept {
|
|
102
|
-
return
|
|
102
|
+
return optional.value();
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
// pragma MARK: std::optional<LocationProvider>
|
|
@@ -114,7 +114,7 @@ namespace margelo::nitro::nitrogeolocation::bridge::swift {
|
|
|
114
114
|
return optional.has_value();
|
|
115
115
|
}
|
|
116
116
|
inline LocationProvider get_std__optional_LocationProvider_(const std::optional<LocationProvider>& optional) noexcept {
|
|
117
|
-
return
|
|
117
|
+
return optional.value();
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
// pragma MARK: std::shared_ptr<Promise<PermissionStatus>>
|
|
@@ -214,7 +214,7 @@ namespace margelo::nitro::nitrogeolocation::bridge::swift {
|
|
|
214
214
|
return optional.has_value();
|
|
215
215
|
}
|
|
216
216
|
inline std::variant<nitro::NullType, double> get_std__optional_std__variant_nitro__NullType__double__(const std::optional<std::variant<nitro::NullType, double>>& optional) noexcept {
|
|
217
|
-
return
|
|
217
|
+
return optional.value();
|
|
218
218
|
}
|
|
219
219
|
|
|
220
220
|
// pragma MARK: std::shared_ptr<Promise<GeolocationResponse>>
|
|
@@ -263,7 +263,7 @@ namespace margelo::nitro::nitrogeolocation::bridge::swift {
|
|
|
263
263
|
return optional.has_value();
|
|
264
264
|
}
|
|
265
265
|
inline double get_std__optional_double_(const std::optional<double>& optional) noexcept {
|
|
266
|
-
return
|
|
266
|
+
return optional.value();
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
// pragma MARK: std::optional<LocationRequestOptions>
|
|
@@ -278,7 +278,7 @@ namespace margelo::nitro::nitrogeolocation::bridge::swift {
|
|
|
278
278
|
return optional.has_value();
|
|
279
279
|
}
|
|
280
280
|
inline LocationRequestOptions get_std__optional_LocationRequestOptions_(const std::optional<LocationRequestOptions>& optional) noexcept {
|
|
281
|
-
return
|
|
281
|
+
return optional.value();
|
|
282
282
|
}
|
|
283
283
|
|
|
284
284
|
// pragma MARK: std::function<void(const LocationError& /* error */)>
|
|
@@ -315,7 +315,7 @@ namespace margelo::nitro::nitrogeolocation::bridge::swift {
|
|
|
315
315
|
return optional.has_value();
|
|
316
316
|
}
|
|
317
317
|
inline std::function<void(const LocationError& /* error */)> get_std__optional_std__function_void_const_LocationError_____error______(const std::optional<std::function<void(const LocationError& /* error */)>>& optional) noexcept {
|
|
318
|
-
return
|
|
318
|
+
return optional.value();
|
|
319
319
|
}
|
|
320
320
|
|
|
321
321
|
// pragma MARK: std::shared_ptr<HybridNitroGeolocationSpec>
|
|
@@ -378,7 +378,7 @@ namespace margelo::nitro::nitrogeolocation::bridge::swift {
|
|
|
378
378
|
return optional.has_value();
|
|
379
379
|
}
|
|
380
380
|
inline AuthorizationLevelInternal get_std__optional_AuthorizationLevelInternal_(const std::optional<AuthorizationLevelInternal>& optional) noexcept {
|
|
381
|
-
return
|
|
381
|
+
return optional.value();
|
|
382
382
|
}
|
|
383
383
|
|
|
384
384
|
// pragma MARK: std::optional<LocationProviderInternal>
|
|
@@ -393,7 +393,7 @@ namespace margelo::nitro::nitrogeolocation::bridge::swift {
|
|
|
393
393
|
return optional.has_value();
|
|
394
394
|
}
|
|
395
395
|
inline LocationProviderInternal get_std__optional_LocationProviderInternal_(const std::optional<LocationProviderInternal>& optional) noexcept {
|
|
396
|
-
return
|
|
396
|
+
return optional.value();
|
|
397
397
|
}
|
|
398
398
|
|
|
399
399
|
// pragma MARK: std::function<void()>
|
|
@@ -430,7 +430,7 @@ namespace margelo::nitro::nitrogeolocation::bridge::swift {
|
|
|
430
430
|
return optional.has_value();
|
|
431
431
|
}
|
|
432
432
|
inline std::function<void()> get_std__optional_std__function_void____(const std::optional<std::function<void()>>& optional) noexcept {
|
|
433
|
-
return
|
|
433
|
+
return optional.value();
|
|
434
434
|
}
|
|
435
435
|
|
|
436
436
|
// pragma MARK: std::function<void(const GeolocationError& /* error */)>
|
|
@@ -467,7 +467,7 @@ namespace margelo::nitro::nitrogeolocation::bridge::swift {
|
|
|
467
467
|
return optional.has_value();
|
|
468
468
|
}
|
|
469
469
|
inline std::function<void(const GeolocationError& /* error */)> get_std__optional_std__function_void_const_GeolocationError_____error______(const std::optional<std::function<void(const GeolocationError& /* error */)>>& optional) noexcept {
|
|
470
|
-
return
|
|
470
|
+
return optional.value();
|
|
471
471
|
}
|
|
472
472
|
|
|
473
473
|
// pragma MARK: std::optional<GeolocationOptions>
|
|
@@ -482,7 +482,7 @@ namespace margelo::nitro::nitrogeolocation::bridge::swift {
|
|
|
482
482
|
return optional.has_value();
|
|
483
483
|
}
|
|
484
484
|
inline GeolocationOptions get_std__optional_GeolocationOptions_(const std::optional<GeolocationOptions>& optional) noexcept {
|
|
485
|
-
return
|
|
485
|
+
return optional.value();
|
|
486
486
|
}
|
|
487
487
|
|
|
488
488
|
// pragma MARK: std::shared_ptr<HybridNitroGeolocationCompatSpec>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// NitroGeolocationAutolinking.mm
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#import <Foundation/Foundation.h>
|
|
@@ -2,19 +2,16 @@
|
|
|
2
2
|
/// NitroGeolocationAutolinking.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
// TODO: Use empty enums once Swift supports exporting them as namespaces
|
|
11
|
+
// See: https://github.com/swiftlang/swift/pull/83616
|
|
8
12
|
public final class NitroGeolocationAutolinking {
|
|
9
13
|
public typealias bridge = margelo.nitro.nitrogeolocation.bridge.swift
|
|
10
14
|
|
|
11
|
-
/**
|
|
12
|
-
* Creates an instance of a Swift class that implements `HybridNitroGeolocationSpec`,
|
|
13
|
-
* and wraps it in a Swift class that can directly interop with C++ (`HybridNitroGeolocationSpec_cxx`)
|
|
14
|
-
*
|
|
15
|
-
* This is generated by Nitrogen and will initialize the class specified
|
|
16
|
-
* in the `"autolinking"` property of `nitro.json` (in this case, `NitroGeolocation`).
|
|
17
|
-
*/
|
|
18
15
|
public static func createNitroGeolocation() -> bridge.std__shared_ptr_HybridNitroGeolocationSpec_ {
|
|
19
16
|
let hybridObject = NitroGeolocation()
|
|
20
17
|
return { () -> bridge.std__shared_ptr_HybridNitroGeolocationSpec_ in
|
|
@@ -23,13 +20,10 @@ public final class NitroGeolocationAutolinking {
|
|
|
23
20
|
}()
|
|
24
21
|
}
|
|
25
22
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
* This is generated by Nitrogen and will initialize the class specified
|
|
31
|
-
* in the `"autolinking"` property of `nitro.json` (in this case, `NitroGeolocationCompat`).
|
|
32
|
-
*/
|
|
23
|
+
public static func isNitroGeolocationRecyclable() -> Bool {
|
|
24
|
+
return NitroGeolocation.self is any RecyclableView.Type
|
|
25
|
+
}
|
|
26
|
+
|
|
33
27
|
public static func createNitroGeolocationCompat() -> bridge.std__shared_ptr_HybridNitroGeolocationCompatSpec_ {
|
|
34
28
|
let hybridObject = NitroGeolocationCompat()
|
|
35
29
|
return { () -> bridge.std__shared_ptr_HybridNitroGeolocationCompatSpec_ in
|
|
@@ -37,4 +31,8 @@ public final class NitroGeolocationAutolinking {
|
|
|
37
31
|
return __cxxWrapped.getCxxPart()
|
|
38
32
|
}()
|
|
39
33
|
}
|
|
34
|
+
|
|
35
|
+
public static func isNitroGeolocationCompatRecyclable() -> Bool {
|
|
36
|
+
return NitroGeolocationCompat.self is any RecyclableView.Type
|
|
37
|
+
}
|
|
40
38
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridNitroGeolocationCompatSpecSwift.cpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#include "HybridNitroGeolocationCompatSpecSwift.hpp"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridNitroGeolocationCompatSpecSwift.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -71,6 +71,12 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
71
71
|
inline size_t getExternalMemorySize() noexcept override {
|
|
72
72
|
return _swiftPart.getMemorySize();
|
|
73
73
|
}
|
|
74
|
+
bool equals(const std::shared_ptr<HybridObject>& other) override {
|
|
75
|
+
if (auto otherCast = std::dynamic_pointer_cast<HybridNitroGeolocationCompatSpecSwift>(other)) {
|
|
76
|
+
return _swiftPart.equals(otherCast->_swiftPart);
|
|
77
|
+
}
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
74
80
|
void dispose() noexcept override {
|
|
75
81
|
_swiftPart.dispose();
|
|
76
82
|
}
|