react-native-nitro-geolocation 1.1.3 → 1.2.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.
Files changed (186) hide show
  1. package/README.md +316 -0
  2. package/android/build.gradle +6 -0
  3. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/AndroidAccuracy.kt +105 -0
  4. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/AndroidHeadingManager.kt +313 -0
  5. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/AndroidLocationSettings.kt +313 -0
  6. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/GetCurrentPosition.kt +46 -45
  7. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/LocationMetadata.kt +26 -0
  8. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/LocationValues.kt +31 -0
  9. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/NitroGeolocation.kt +1025 -140
  10. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/NitroGeolocationCompat.kt +11 -11
  11. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/RequestAuthorization.kt +6 -6
  12. package/android/src/main/java/com/margelo/nitro/nitrogeolocation/WatchPosition.kt +46 -45
  13. package/ios/CLLocation+GeolocationMetadata.swift +32 -0
  14. package/ios/LocationManager.swift +205 -51
  15. package/ios/NitroGeolocation.swift +949 -110
  16. package/ios/NitroGeolocationCompat.swift +7 -7
  17. package/nitrogen/generated/android/c++/JAccuracyAuthorization.hpp +61 -0
  18. package/nitrogen/generated/android/c++/JAndroidAccuracyPreset.hpp +64 -0
  19. package/nitrogen/generated/android/c++/JAndroidGranularity.hpp +61 -0
  20. package/nitrogen/generated/android/c++/{JRNConfigurationInternal.hpp → JCompatGeolocationConfigurationInternal.hpp} +10 -10
  21. package/nitrogen/generated/android/c++/{JGeolocationError.hpp → JCompatGeolocationError.hpp} +10 -10
  22. package/nitrogen/generated/android/c++/JCompatGeolocationOptions.hpp +105 -0
  23. package/nitrogen/generated/android/c++/JCompatGeolocationResponse.hpp +67 -0
  24. package/nitrogen/generated/android/c++/JFunc_void_AccuracyAuthorization.hpp +77 -0
  25. package/nitrogen/generated/android/c++/JFunc_void_CompatGeolocationError.hpp +78 -0
  26. package/nitrogen/generated/android/c++/JFunc_void_CompatGeolocationResponse.hpp +84 -0
  27. package/nitrogen/generated/android/c++/JFunc_void_GeolocationResponse.hpp +2 -0
  28. package/nitrogen/generated/android/c++/JFunc_void_Heading.hpp +78 -0
  29. package/nitrogen/generated/android/c++/JFunc_void_LocationProviderStatus.hpp +78 -0
  30. package/nitrogen/generated/android/c++/JFunc_void_PermissionStatus.hpp +77 -0
  31. package/nitrogen/generated/android/c++/JFunc_void_std__vector_GeocodedLocation_.hpp +97 -0
  32. package/nitrogen/generated/android/c++/JFunc_void_std__vector_ReverseGeocodedAddress_.hpp +98 -0
  33. package/nitrogen/generated/android/c++/JGeocodedLocation.hpp +65 -0
  34. package/nitrogen/generated/android/c++/JGeocodingCoordinates.hpp +61 -0
  35. package/nitrogen/generated/android/c++/{JModernGeolocationConfiguration.hpp → JGeolocationConfiguration.hpp} +10 -10
  36. package/nitrogen/generated/android/c++/JGeolocationResponse.hpp +13 -3
  37. package/nitrogen/generated/android/c++/JHeading.hpp +69 -0
  38. package/nitrogen/generated/android/c++/JHeadingOptions.hpp +57 -0
  39. package/nitrogen/generated/android/c++/JHybridNitroGeolocationCompatSpec.cpp +46 -30
  40. package/nitrogen/generated/android/c++/JHybridNitroGeolocationCompatSpec.hpp +4 -4
  41. package/nitrogen/generated/android/c++/JHybridNitroGeolocationSpec.cpp +169 -33
  42. package/nitrogen/generated/android/c++/JHybridNitroGeolocationSpec.hpp +14 -3
  43. package/nitrogen/generated/android/c++/JIOSAccuracyPreset.hpp +73 -0
  44. package/nitrogen/generated/android/c++/JIOSActivityType.hpp +67 -0
  45. package/nitrogen/generated/android/c++/JLocationAccuracyOptions.hpp +65 -0
  46. package/nitrogen/generated/android/c++/JLocationAvailability.hpp +62 -0
  47. package/nitrogen/generated/android/c++/JLocationProviderStatus.hpp +77 -0
  48. package/nitrogen/generated/android/c++/JLocationProviderUsed.hpp +67 -0
  49. package/nitrogen/generated/android/c++/JLocationRequestOptions.hpp +49 -3
  50. package/nitrogen/generated/android/c++/{JGeolocationOptions.hpp → JLocationSettingsOptions.hpp} +28 -22
  51. package/nitrogen/generated/android/c++/JReverseGeocodedAddress.hpp +82 -0
  52. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/AccuracyAuthorization.kt +24 -0
  53. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/AndroidAccuracyPreset.kt +25 -0
  54. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/AndroidGranularity.kt +24 -0
  55. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/{RNConfigurationInternal.kt → CompatGeolocationConfigurationInternal.kt} +5 -5
  56. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/{GeolocationError.kt → CompatGeolocationError.kt} +5 -5
  57. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/CompatGeolocationOptions.kt +68 -0
  58. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/CompatGeolocationResponse.kt +41 -0
  59. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Func_void_AccuracyAuthorization.kt +80 -0
  60. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/{Func_void_GeolocationError.kt → Func_void_CompatGeolocationError.kt} +9 -9
  61. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Func_void_CompatGeolocationResponse.kt +80 -0
  62. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Func_void_Heading.kt +80 -0
  63. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Func_void_LocationProviderStatus.kt +80 -0
  64. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Func_void_PermissionStatus.kt +80 -0
  65. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Func_void_std__vector_GeocodedLocation_.kt +80 -0
  66. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Func_void_std__vector_ReverseGeocodedAddress_.kt +80 -0
  67. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeocodedLocation.kt +44 -0
  68. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeocodingCoordinates.kt +41 -0
  69. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/{ModernGeolocationConfiguration.kt → GeolocationConfiguration.kt} +5 -5
  70. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeolocationResponse.kt +9 -3
  71. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Heading.kt +47 -0
  72. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/HeadingOptions.kt +38 -0
  73. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/HybridNitroGeolocationCompatSpec.kt +7 -7
  74. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/HybridNitroGeolocationSpec.kt +92 -3
  75. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/IOSAccuracyPreset.kt +28 -0
  76. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/IOSActivityType.kt +26 -0
  77. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/LocationAccuracyOptions.kt +41 -0
  78. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/LocationAvailability.kt +41 -0
  79. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/LocationProviderStatus.kt +53 -0
  80. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/LocationProviderUsed.kt +26 -0
  81. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/LocationRequestOptions.kt +30 -3
  82. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/{GeolocationOptions.kt → LocationSettingsOptions.kt} +11 -11
  83. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/ReverseGeocodedAddress.kt +56 -0
  84. package/nitrogen/generated/android/nitrogeolocationOnLoad.cpp +18 -4
  85. package/nitrogen/generated/ios/NitroGeolocation-Swift-Cxx-Bridge.cpp +76 -12
  86. package/nitrogen/generated/ios/NitroGeolocation-Swift-Cxx-Bridge.hpp +519 -77
  87. package/nitrogen/generated/ios/NitroGeolocation-Swift-Cxx-Umbrella.hpp +61 -12
  88. package/nitrogen/generated/ios/c++/HybridNitroGeolocationCompatSpecSwift.hpp +28 -16
  89. package/nitrogen/generated/ios/c++/HybridNitroGeolocationSpecSwift.hpp +131 -13
  90. package/nitrogen/generated/ios/swift/AccuracyAuthorization.swift +44 -0
  91. package/nitrogen/generated/ios/swift/AndroidAccuracyPreset.swift +48 -0
  92. package/nitrogen/generated/ios/swift/AndroidGranularity.swift +44 -0
  93. package/nitrogen/generated/ios/swift/{RNConfigurationInternal.swift → CompatGeolocationConfigurationInternal.swift} +5 -5
  94. package/nitrogen/generated/ios/swift/{GeolocationError.swift → CompatGeolocationError.swift} +5 -5
  95. package/nitrogen/generated/ios/swift/CompatGeolocationOptions.swift +208 -0
  96. package/nitrogen/generated/ios/swift/CompatGeolocationResponse.swift +34 -0
  97. package/nitrogen/generated/ios/swift/Func_void_AccuracyAuthorization.swift +46 -0
  98. package/nitrogen/generated/ios/swift/Func_void_CompatGeolocationError.swift +46 -0
  99. package/nitrogen/generated/ios/swift/Func_void_CompatGeolocationResponse.swift +46 -0
  100. package/nitrogen/generated/ios/swift/{Func_void_GeolocationError.swift → Func_void_Heading.swift} +11 -11
  101. package/nitrogen/generated/ios/swift/Func_void_LocationAvailability.swift +46 -0
  102. package/nitrogen/generated/ios/swift/Func_void_LocationProviderStatus.swift +46 -0
  103. package/nitrogen/generated/ios/swift/Func_void_bool.swift +46 -0
  104. package/nitrogen/generated/ios/swift/Func_void_std__vector_GeocodedLocation_.swift +46 -0
  105. package/nitrogen/generated/ios/swift/Func_void_std__vector_ReverseGeocodedAddress_.swift +46 -0
  106. package/nitrogen/generated/ios/swift/GeocodedLocation.swift +52 -0
  107. package/nitrogen/generated/ios/swift/GeocodingCoordinates.swift +34 -0
  108. package/nitrogen/generated/ios/swift/{ModernGeolocationConfiguration.swift → GeolocationConfiguration.swift} +5 -5
  109. package/nitrogen/generated/ios/swift/GeolocationResponse.swift +31 -2
  110. package/nitrogen/generated/ios/swift/Heading.swift +70 -0
  111. package/nitrogen/generated/ios/swift/HeadingOptions.swift +42 -0
  112. package/nitrogen/generated/ios/swift/HybridNitroGeolocationCompatSpec.swift +4 -4
  113. package/nitrogen/generated/ios/swift/HybridNitroGeolocationCompatSpec_cxx.swift +28 -28
  114. package/nitrogen/generated/ios/swift/HybridNitroGeolocationSpec.swift +14 -3
  115. package/nitrogen/generated/ios/swift/HybridNitroGeolocationSpec_cxx.swift +318 -15
  116. package/nitrogen/generated/ios/swift/IOSAccuracyPreset.swift +60 -0
  117. package/nitrogen/generated/ios/swift/IOSActivityType.swift +52 -0
  118. package/nitrogen/generated/ios/swift/LocationAccuracyOptions.swift +46 -0
  119. package/nitrogen/generated/ios/swift/LocationAvailability.swift +47 -0
  120. package/nitrogen/generated/ios/swift/LocationProviderStatus.swift +106 -0
  121. package/nitrogen/generated/ios/swift/LocationProviderUsed.swift +52 -0
  122. package/nitrogen/generated/ios/swift/LocationRequestOptions.swift +142 -1
  123. package/nitrogen/generated/ios/swift/{GeolocationOptions.swift → LocationSettingsOptions.swift} +39 -46
  124. package/nitrogen/generated/ios/swift/ReverseGeocodedAddress.swift +150 -0
  125. package/nitrogen/generated/shared/c++/AccuracyAuthorization.hpp +80 -0
  126. package/nitrogen/generated/shared/c++/AndroidAccuracyPreset.hpp +84 -0
  127. package/nitrogen/generated/shared/c++/AndroidGranularity.hpp +80 -0
  128. package/nitrogen/generated/shared/c++/{RNConfigurationInternal.hpp → CompatGeolocationConfigurationInternal.hpp} +11 -11
  129. package/nitrogen/generated/shared/c++/{GeolocationError.hpp → CompatGeolocationError.hpp} +11 -11
  130. package/nitrogen/generated/shared/c++/CompatGeolocationOptions.hpp +128 -0
  131. package/nitrogen/generated/shared/c++/CompatGeolocationResponse.hpp +88 -0
  132. package/nitrogen/generated/shared/c++/GeocodedLocation.hpp +91 -0
  133. package/nitrogen/generated/shared/c++/GeocodingCoordinates.hpp +87 -0
  134. package/nitrogen/generated/shared/c++/{ModernGeolocationConfiguration.hpp → GeolocationConfiguration.hpp} +11 -11
  135. package/nitrogen/generated/shared/c++/GeolocationResponse.hpp +14 -2
  136. package/nitrogen/generated/shared/c++/Heading.hpp +95 -0
  137. package/nitrogen/generated/shared/c++/HeadingOptions.hpp +83 -0
  138. package/nitrogen/generated/shared/c++/HybridNitroGeolocationCompatSpec.hpp +16 -16
  139. package/nitrogen/generated/shared/c++/HybridNitroGeolocationSpec.cpp +11 -0
  140. package/nitrogen/generated/shared/c++/HybridNitroGeolocationSpec.hpp +51 -12
  141. package/nitrogen/generated/shared/c++/IOSAccuracyPreset.hpp +96 -0
  142. package/nitrogen/generated/shared/c++/IOSActivityType.hpp +88 -0
  143. package/nitrogen/generated/shared/c++/LocationAccuracyOptions.hpp +92 -0
  144. package/nitrogen/generated/shared/c++/LocationAvailability.hpp +88 -0
  145. package/nitrogen/generated/shared/c++/LocationProviderStatus.hpp +103 -0
  146. package/nitrogen/generated/shared/c++/LocationProviderUsed.hpp +88 -0
  147. package/nitrogen/generated/shared/c++/LocationRequestOptions.hpp +47 -3
  148. package/nitrogen/generated/shared/c++/{GeolocationOptions.hpp → LocationSettingsOptions.hpp} +26 -24
  149. package/nitrogen/generated/shared/c++/ReverseGeocodedAddress.hpp +108 -0
  150. package/package.json +1 -1
  151. package/src/NitroGeolocation.nitro.ts +291 -17
  152. package/src/NitroGeolocationCompat.nitro.ts +12 -12
  153. package/src/api/geocode.ts +18 -0
  154. package/src/api/getAccuracyAuthorization.ts +12 -0
  155. package/src/api/getCurrentPosition.ts +5 -3
  156. package/src/api/getHeading.ts +13 -0
  157. package/src/api/getLastKnownPosition.ts +28 -0
  158. package/src/api/getLocationAvailability.ts +11 -0
  159. package/src/api/getProviderStatus.ts +16 -0
  160. package/src/api/hasServicesEnabled.ts +13 -0
  161. package/src/api/index.ts +11 -0
  162. package/src/api/requestLocationSettings.ts +29 -0
  163. package/src/api/requestPermission.ts +3 -1
  164. package/src/api/requestTemporaryFullAccuracy.ts +21 -0
  165. package/src/api/reverseGeocode.ts +23 -0
  166. package/src/api/setConfiguration.ts +8 -4
  167. package/src/api/watchHeading.ts +19 -0
  168. package/src/api/watchPosition.ts +2 -2
  169. package/src/compat/getCurrentPosition.ts +7 -7
  170. package/src/compat/index.tsx +5 -5
  171. package/src/compat/requestAuthorization.ts +2 -2
  172. package/src/compat/setRNConfiguration.ts +7 -5
  173. package/src/compat/watchPosition.ts +7 -7
  174. package/src/devtools/getCurrentPosition.ts +5 -3
  175. package/src/devtools/index.ts +1 -1
  176. package/src/devtools/watchPosition.ts +6 -7
  177. package/src/hooks/useWatchPosition.ts +2 -2
  178. package/src/index.tsx +35 -6
  179. package/src/publicTypes.ts +96 -0
  180. package/src/types.ts +113 -37
  181. package/src/utils/errors.test.ts +65 -0
  182. package/src/utils/errors.ts +45 -18
  183. package/src/utils/index.ts +2 -2
  184. package/src/utils/provider.test.ts +172 -1
  185. package/src/utils/provider.ts +50 -5
  186. package/nitrogen/generated/android/c++/JFunc_void_GeolocationError.hpp +0 -78
@@ -8,32 +8,62 @@
8
8
  #pragma once
9
9
 
10
10
  // Forward declarations of C++ defined types
11
+ // Forward declaration of `AccuracyAuthorization` to properly resolve imports.
12
+ namespace margelo::nitro::nitrogeolocation { enum class AccuracyAuthorization; }
13
+ // Forward declaration of `AndroidAccuracyPreset` to properly resolve imports.
14
+ namespace margelo::nitro::nitrogeolocation { enum class AndroidAccuracyPreset; }
15
+ // Forward declaration of `AndroidGranularity` to properly resolve imports.
16
+ namespace margelo::nitro::nitrogeolocation { enum class AndroidGranularity; }
11
17
  // Forward declaration of `AuthorizationLevelInternal` to properly resolve imports.
12
18
  namespace margelo::nitro::nitrogeolocation { enum class AuthorizationLevelInternal; }
13
19
  // Forward declaration of `AuthorizationLevel` to properly resolve imports.
14
20
  namespace margelo::nitro::nitrogeolocation { enum class AuthorizationLevel; }
21
+ // Forward declaration of `CompatGeolocationError` to properly resolve imports.
22
+ namespace margelo::nitro::nitrogeolocation { struct CompatGeolocationError; }
23
+ // Forward declaration of `CompatGeolocationOptions` to properly resolve imports.
24
+ namespace margelo::nitro::nitrogeolocation { struct CompatGeolocationOptions; }
25
+ // Forward declaration of `CompatGeolocationResponse` to properly resolve imports.
26
+ namespace margelo::nitro::nitrogeolocation { struct CompatGeolocationResponse; }
27
+ // Forward declaration of `GeocodedLocation` to properly resolve imports.
28
+ namespace margelo::nitro::nitrogeolocation { struct GeocodedLocation; }
15
29
  // Forward declaration of `GeolocationCoordinates` to properly resolve imports.
16
30
  namespace margelo::nitro::nitrogeolocation { struct GeolocationCoordinates; }
17
- // Forward declaration of `GeolocationError` to properly resolve imports.
18
- namespace margelo::nitro::nitrogeolocation { struct GeolocationError; }
19
- // Forward declaration of `GeolocationOptions` to properly resolve imports.
20
- namespace margelo::nitro::nitrogeolocation { struct GeolocationOptions; }
21
31
  // Forward declaration of `GeolocationResponse` to properly resolve imports.
22
32
  namespace margelo::nitro::nitrogeolocation { struct GeolocationResponse; }
33
+ // Forward declaration of `HeadingOptions` to properly resolve imports.
34
+ namespace margelo::nitro::nitrogeolocation { struct HeadingOptions; }
35
+ // Forward declaration of `Heading` to properly resolve imports.
36
+ namespace margelo::nitro::nitrogeolocation { struct Heading; }
23
37
  // Forward declaration of `HybridNitroGeolocationCompatSpec` to properly resolve imports.
24
38
  namespace margelo::nitro::nitrogeolocation { class HybridNitroGeolocationCompatSpec; }
25
39
  // Forward declaration of `HybridNitroGeolocationSpec` to properly resolve imports.
26
40
  namespace margelo::nitro::nitrogeolocation { class HybridNitroGeolocationSpec; }
41
+ // Forward declaration of `IOSAccuracyPreset` to properly resolve imports.
42
+ namespace margelo::nitro::nitrogeolocation { enum class IOSAccuracyPreset; }
43
+ // Forward declaration of `IOSActivityType` to properly resolve imports.
44
+ namespace margelo::nitro::nitrogeolocation { enum class IOSActivityType; }
45
+ // Forward declaration of `LocationAccuracyOptions` to properly resolve imports.
46
+ namespace margelo::nitro::nitrogeolocation { struct LocationAccuracyOptions; }
47
+ // Forward declaration of `LocationAvailability` to properly resolve imports.
48
+ namespace margelo::nitro::nitrogeolocation { struct LocationAvailability; }
27
49
  // Forward declaration of `LocationError` to properly resolve imports.
28
50
  namespace margelo::nitro::nitrogeolocation { struct LocationError; }
29
51
  // Forward declaration of `LocationProviderInternal` to properly resolve imports.
30
52
  namespace margelo::nitro::nitrogeolocation { enum class LocationProviderInternal; }
53
+ // Forward declaration of `LocationProviderStatus` to properly resolve imports.
54
+ namespace margelo::nitro::nitrogeolocation { struct LocationProviderStatus; }
55
+ // Forward declaration of `LocationProviderUsed` to properly resolve imports.
56
+ namespace margelo::nitro::nitrogeolocation { enum class LocationProviderUsed; }
31
57
  // Forward declaration of `LocationProvider` to properly resolve imports.
32
58
  namespace margelo::nitro::nitrogeolocation { enum class LocationProvider; }
33
59
  // Forward declaration of `LocationRequestOptions` to properly resolve imports.
34
60
  namespace margelo::nitro::nitrogeolocation { struct LocationRequestOptions; }
61
+ // Forward declaration of `LocationSettingsOptions` to properly resolve imports.
62
+ namespace margelo::nitro::nitrogeolocation { struct LocationSettingsOptions; }
35
63
  // Forward declaration of `PermissionStatus` to properly resolve imports.
36
64
  namespace margelo::nitro::nitrogeolocation { enum class PermissionStatus; }
65
+ // Forward declaration of `ReverseGeocodedAddress` to properly resolve imports.
66
+ namespace margelo::nitro::nitrogeolocation { struct ReverseGeocodedAddress; }
37
67
 
38
68
  // Forward declarations of Swift defined types
39
69
  // Forward declaration of `HybridNitroGeolocationCompatSpec_cxx` to properly resolve imports.
@@ -42,19 +72,34 @@ namespace NitroGeolocation { class HybridNitroGeolocationCompatSpec_cxx; }
42
72
  namespace NitroGeolocation { class HybridNitroGeolocationSpec_cxx; }
43
73
 
44
74
  // Include C++ defined types
75
+ #include "AccuracyAuthorization.hpp"
76
+ #include "AndroidAccuracyPreset.hpp"
77
+ #include "AndroidGranularity.hpp"
45
78
  #include "AuthorizationLevel.hpp"
46
79
  #include "AuthorizationLevelInternal.hpp"
80
+ #include "CompatGeolocationError.hpp"
81
+ #include "CompatGeolocationOptions.hpp"
82
+ #include "CompatGeolocationResponse.hpp"
83
+ #include "GeocodedLocation.hpp"
47
84
  #include "GeolocationCoordinates.hpp"
48
- #include "GeolocationError.hpp"
49
- #include "GeolocationOptions.hpp"
50
85
  #include "GeolocationResponse.hpp"
86
+ #include "Heading.hpp"
87
+ #include "HeadingOptions.hpp"
51
88
  #include "HybridNitroGeolocationCompatSpec.hpp"
52
89
  #include "HybridNitroGeolocationSpec.hpp"
90
+ #include "IOSAccuracyPreset.hpp"
91
+ #include "IOSActivityType.hpp"
92
+ #include "LocationAccuracyOptions.hpp"
93
+ #include "LocationAvailability.hpp"
53
94
  #include "LocationError.hpp"
54
95
  #include "LocationProvider.hpp"
55
96
  #include "LocationProviderInternal.hpp"
97
+ #include "LocationProviderStatus.hpp"
98
+ #include "LocationProviderUsed.hpp"
56
99
  #include "LocationRequestOptions.hpp"
100
+ #include "LocationSettingsOptions.hpp"
57
101
  #include "PermissionStatus.hpp"
102
+ #include "ReverseGeocodedAddress.hpp"
58
103
  #include <NitroModules/Null.hpp>
59
104
  #include <NitroModules/Promise.hpp>
60
105
  #include <NitroModules/PromiseHolder.hpp>
@@ -65,6 +110,7 @@ namespace NitroGeolocation { class HybridNitroGeolocationSpec_cxx; }
65
110
  #include <optional>
66
111
  #include <string>
67
112
  #include <variant>
113
+ #include <vector>
68
114
 
69
115
  /**
70
116
  * Contains specialized versions of C++ templated types so they can be accessed from Swift,
@@ -173,6 +219,269 @@ namespace margelo::nitro::nitrogeolocation::bridge::swift {
173
219
  return Func_void_std__exception_ptr_Wrapper(std::move(value));
174
220
  }
175
221
 
222
+ // pragma MARK: std::function<void(const LocationError& /* error */)>
223
+ /**
224
+ * Specialized version of `std::function<void(const LocationError&)>`.
225
+ */
226
+ using Func_void_LocationError = std::function<void(const LocationError& /* error */)>;
227
+ /**
228
+ * Wrapper class for a `std::function<void(const LocationError& / * error * /)>`, this can be used from Swift.
229
+ */
230
+ class Func_void_LocationError_Wrapper final {
231
+ public:
232
+ explicit Func_void_LocationError_Wrapper(std::function<void(const LocationError& /* error */)>&& func): _function(std::make_unique<std::function<void(const LocationError& /* error */)>>(std::move(func))) {}
233
+ inline void call(LocationError error) const noexcept {
234
+ _function->operator()(error);
235
+ }
236
+ private:
237
+ std::unique_ptr<std::function<void(const LocationError& /* error */)>> _function;
238
+ } SWIFT_NONCOPYABLE;
239
+ Func_void_LocationError create_Func_void_LocationError(void* NON_NULL swiftClosureWrapper) noexcept;
240
+ inline Func_void_LocationError_Wrapper wrap_Func_void_LocationError(Func_void_LocationError value) noexcept {
241
+ return Func_void_LocationError_Wrapper(std::move(value));
242
+ }
243
+
244
+ // pragma MARK: std::optional<std::function<void(const LocationError& /* error */)>>
245
+ /**
246
+ * Specialized version of `std::optional<std::function<void(const LocationError& / * error * /)>>`.
247
+ */
248
+ using std__optional_std__function_void_const_LocationError_____error______ = std::optional<std::function<void(const LocationError& /* error */)>>;
249
+ inline std::optional<std::function<void(const LocationError& /* error */)>> create_std__optional_std__function_void_const_LocationError_____error______(const std::function<void(const LocationError& /* error */)>& value) noexcept {
250
+ return std::optional<std::function<void(const LocationError& /* error */)>>(value);
251
+ }
252
+ inline bool has_value_std__optional_std__function_void_const_LocationError_____error______(const std::optional<std::function<void(const LocationError& /* error */)>>& optional) noexcept {
253
+ return optional.has_value();
254
+ }
255
+ 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 {
256
+ return optional.value();
257
+ }
258
+
259
+ // pragma MARK: std::shared_ptr<Promise<bool>>
260
+ /**
261
+ * Specialized version of `std::shared_ptr<Promise<bool>>`.
262
+ */
263
+ using std__shared_ptr_Promise_bool__ = std::shared_ptr<Promise<bool>>;
264
+ inline std::shared_ptr<Promise<bool>> create_std__shared_ptr_Promise_bool__() noexcept {
265
+ return Promise<bool>::create();
266
+ }
267
+ inline PromiseHolder<bool> wrap_std__shared_ptr_Promise_bool__(std::shared_ptr<Promise<bool>> promise) noexcept {
268
+ return PromiseHolder<bool>(std::move(promise));
269
+ }
270
+
271
+ // pragma MARK: std::function<void(bool /* result */)>
272
+ /**
273
+ * Specialized version of `std::function<void(bool)>`.
274
+ */
275
+ using Func_void_bool = std::function<void(bool /* result */)>;
276
+ /**
277
+ * Wrapper class for a `std::function<void(bool / * result * /)>`, this can be used from Swift.
278
+ */
279
+ class Func_void_bool_Wrapper final {
280
+ public:
281
+ explicit Func_void_bool_Wrapper(std::function<void(bool /* result */)>&& func): _function(std::make_unique<std::function<void(bool /* result */)>>(std::move(func))) {}
282
+ inline void call(bool result) const noexcept {
283
+ _function->operator()(result);
284
+ }
285
+ private:
286
+ std::unique_ptr<std::function<void(bool /* result */)>> _function;
287
+ } SWIFT_NONCOPYABLE;
288
+ Func_void_bool create_Func_void_bool(void* NON_NULL swiftClosureWrapper) noexcept;
289
+ inline Func_void_bool_Wrapper wrap_Func_void_bool(Func_void_bool value) noexcept {
290
+ return Func_void_bool_Wrapper(std::move(value));
291
+ }
292
+
293
+ // pragma MARK: std::shared_ptr<Promise<LocationProviderStatus>>
294
+ /**
295
+ * Specialized version of `std::shared_ptr<Promise<LocationProviderStatus>>`.
296
+ */
297
+ using std__shared_ptr_Promise_LocationProviderStatus__ = std::shared_ptr<Promise<LocationProviderStatus>>;
298
+ inline std::shared_ptr<Promise<LocationProviderStatus>> create_std__shared_ptr_Promise_LocationProviderStatus__() noexcept {
299
+ return Promise<LocationProviderStatus>::create();
300
+ }
301
+ inline PromiseHolder<LocationProviderStatus> wrap_std__shared_ptr_Promise_LocationProviderStatus__(std::shared_ptr<Promise<LocationProviderStatus>> promise) noexcept {
302
+ return PromiseHolder<LocationProviderStatus>(std::move(promise));
303
+ }
304
+
305
+ // pragma MARK: std::function<void(const LocationProviderStatus& /* result */)>
306
+ /**
307
+ * Specialized version of `std::function<void(const LocationProviderStatus&)>`.
308
+ */
309
+ using Func_void_LocationProviderStatus = std::function<void(const LocationProviderStatus& /* result */)>;
310
+ /**
311
+ * Wrapper class for a `std::function<void(const LocationProviderStatus& / * result * /)>`, this can be used from Swift.
312
+ */
313
+ class Func_void_LocationProviderStatus_Wrapper final {
314
+ public:
315
+ explicit Func_void_LocationProviderStatus_Wrapper(std::function<void(const LocationProviderStatus& /* result */)>&& func): _function(std::make_unique<std::function<void(const LocationProviderStatus& /* result */)>>(std::move(func))) {}
316
+ inline void call(LocationProviderStatus result) const noexcept {
317
+ _function->operator()(result);
318
+ }
319
+ private:
320
+ std::unique_ptr<std::function<void(const LocationProviderStatus& /* result */)>> _function;
321
+ } SWIFT_NONCOPYABLE;
322
+ Func_void_LocationProviderStatus create_Func_void_LocationProviderStatus(void* NON_NULL swiftClosureWrapper) noexcept;
323
+ inline Func_void_LocationProviderStatus_Wrapper wrap_Func_void_LocationProviderStatus(Func_void_LocationProviderStatus value) noexcept {
324
+ return Func_void_LocationProviderStatus_Wrapper(std::move(value));
325
+ }
326
+
327
+ // pragma MARK: std::optional<std::string>
328
+ /**
329
+ * Specialized version of `std::optional<std::string>`.
330
+ */
331
+ using std__optional_std__string_ = std::optional<std::string>;
332
+ inline std::optional<std::string> create_std__optional_std__string_(const std::string& value) noexcept {
333
+ return std::optional<std::string>(value);
334
+ }
335
+ inline bool has_value_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
336
+ return optional.has_value();
337
+ }
338
+ inline std::string get_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
339
+ return optional.value();
340
+ }
341
+
342
+ // pragma MARK: std::shared_ptr<Promise<LocationAvailability>>
343
+ /**
344
+ * Specialized version of `std::shared_ptr<Promise<LocationAvailability>>`.
345
+ */
346
+ using std__shared_ptr_Promise_LocationAvailability__ = std::shared_ptr<Promise<LocationAvailability>>;
347
+ inline std::shared_ptr<Promise<LocationAvailability>> create_std__shared_ptr_Promise_LocationAvailability__() noexcept {
348
+ return Promise<LocationAvailability>::create();
349
+ }
350
+ inline PromiseHolder<LocationAvailability> wrap_std__shared_ptr_Promise_LocationAvailability__(std::shared_ptr<Promise<LocationAvailability>> promise) noexcept {
351
+ return PromiseHolder<LocationAvailability>(std::move(promise));
352
+ }
353
+
354
+ // pragma MARK: std::function<void(const LocationAvailability& /* result */)>
355
+ /**
356
+ * Specialized version of `std::function<void(const LocationAvailability&)>`.
357
+ */
358
+ using Func_void_LocationAvailability = std::function<void(const LocationAvailability& /* result */)>;
359
+ /**
360
+ * Wrapper class for a `std::function<void(const LocationAvailability& / * result * /)>`, this can be used from Swift.
361
+ */
362
+ class Func_void_LocationAvailability_Wrapper final {
363
+ public:
364
+ explicit Func_void_LocationAvailability_Wrapper(std::function<void(const LocationAvailability& /* result */)>&& func): _function(std::make_unique<std::function<void(const LocationAvailability& /* result */)>>(std::move(func))) {}
365
+ inline void call(LocationAvailability result) const noexcept {
366
+ _function->operator()(result);
367
+ }
368
+ private:
369
+ std::unique_ptr<std::function<void(const LocationAvailability& /* result */)>> _function;
370
+ } SWIFT_NONCOPYABLE;
371
+ Func_void_LocationAvailability create_Func_void_LocationAvailability(void* NON_NULL swiftClosureWrapper) noexcept;
372
+ inline Func_void_LocationAvailability_Wrapper wrap_Func_void_LocationAvailability(Func_void_LocationAvailability value) noexcept {
373
+ return Func_void_LocationAvailability_Wrapper(std::move(value));
374
+ }
375
+
376
+ // pragma MARK: std::optional<AndroidAccuracyPreset>
377
+ /**
378
+ * Specialized version of `std::optional<AndroidAccuracyPreset>`.
379
+ */
380
+ using std__optional_AndroidAccuracyPreset_ = std::optional<AndroidAccuracyPreset>;
381
+ inline std::optional<AndroidAccuracyPreset> create_std__optional_AndroidAccuracyPreset_(const AndroidAccuracyPreset& value) noexcept {
382
+ return std::optional<AndroidAccuracyPreset>(value);
383
+ }
384
+ inline bool has_value_std__optional_AndroidAccuracyPreset_(const std::optional<AndroidAccuracyPreset>& optional) noexcept {
385
+ return optional.has_value();
386
+ }
387
+ inline AndroidAccuracyPreset get_std__optional_AndroidAccuracyPreset_(const std::optional<AndroidAccuracyPreset>& optional) noexcept {
388
+ return optional.value();
389
+ }
390
+
391
+ // pragma MARK: std::optional<IOSAccuracyPreset>
392
+ /**
393
+ * Specialized version of `std::optional<IOSAccuracyPreset>`.
394
+ */
395
+ using std__optional_IOSAccuracyPreset_ = std::optional<IOSAccuracyPreset>;
396
+ inline std::optional<IOSAccuracyPreset> create_std__optional_IOSAccuracyPreset_(const IOSAccuracyPreset& value) noexcept {
397
+ return std::optional<IOSAccuracyPreset>(value);
398
+ }
399
+ inline bool has_value_std__optional_IOSAccuracyPreset_(const std::optional<IOSAccuracyPreset>& optional) noexcept {
400
+ return optional.has_value();
401
+ }
402
+ inline IOSAccuracyPreset get_std__optional_IOSAccuracyPreset_(const std::optional<IOSAccuracyPreset>& optional) noexcept {
403
+ return optional.value();
404
+ }
405
+
406
+ // pragma MARK: std::optional<LocationAccuracyOptions>
407
+ /**
408
+ * Specialized version of `std::optional<LocationAccuracyOptions>`.
409
+ */
410
+ using std__optional_LocationAccuracyOptions_ = std::optional<LocationAccuracyOptions>;
411
+ inline std::optional<LocationAccuracyOptions> create_std__optional_LocationAccuracyOptions_(const LocationAccuracyOptions& value) noexcept {
412
+ return std::optional<LocationAccuracyOptions>(value);
413
+ }
414
+ inline bool has_value_std__optional_LocationAccuracyOptions_(const std::optional<LocationAccuracyOptions>& optional) noexcept {
415
+ return optional.has_value();
416
+ }
417
+ inline LocationAccuracyOptions get_std__optional_LocationAccuracyOptions_(const std::optional<LocationAccuracyOptions>& optional) noexcept {
418
+ return optional.value();
419
+ }
420
+
421
+ // pragma MARK: std::optional<double>
422
+ /**
423
+ * Specialized version of `std::optional<double>`.
424
+ */
425
+ using std__optional_double_ = std::optional<double>;
426
+ inline std::optional<double> create_std__optional_double_(const double& value) noexcept {
427
+ return std::optional<double>(value);
428
+ }
429
+ inline bool has_value_std__optional_double_(const std::optional<double>& optional) noexcept {
430
+ return optional.has_value();
431
+ }
432
+ inline double get_std__optional_double_(const std::optional<double>& optional) noexcept {
433
+ return optional.value();
434
+ }
435
+
436
+ // pragma MARK: std::optional<LocationSettingsOptions>
437
+ /**
438
+ * Specialized version of `std::optional<LocationSettingsOptions>`.
439
+ */
440
+ using std__optional_LocationSettingsOptions_ = std::optional<LocationSettingsOptions>;
441
+ inline std::optional<LocationSettingsOptions> create_std__optional_LocationSettingsOptions_(const LocationSettingsOptions& value) noexcept {
442
+ return std::optional<LocationSettingsOptions>(value);
443
+ }
444
+ inline bool has_value_std__optional_LocationSettingsOptions_(const std::optional<LocationSettingsOptions>& optional) noexcept {
445
+ return optional.has_value();
446
+ }
447
+ inline LocationSettingsOptions get_std__optional_LocationSettingsOptions_(const std::optional<LocationSettingsOptions>& optional) noexcept {
448
+ return optional.value();
449
+ }
450
+
451
+ // pragma MARK: std::shared_ptr<Promise<AccuracyAuthorization>>
452
+ /**
453
+ * Specialized version of `std::shared_ptr<Promise<AccuracyAuthorization>>`.
454
+ */
455
+ using std__shared_ptr_Promise_AccuracyAuthorization__ = std::shared_ptr<Promise<AccuracyAuthorization>>;
456
+ inline std::shared_ptr<Promise<AccuracyAuthorization>> create_std__shared_ptr_Promise_AccuracyAuthorization__() noexcept {
457
+ return Promise<AccuracyAuthorization>::create();
458
+ }
459
+ inline PromiseHolder<AccuracyAuthorization> wrap_std__shared_ptr_Promise_AccuracyAuthorization__(std::shared_ptr<Promise<AccuracyAuthorization>> promise) noexcept {
460
+ return PromiseHolder<AccuracyAuthorization>(std::move(promise));
461
+ }
462
+
463
+ // pragma MARK: std::function<void(AccuracyAuthorization /* result */)>
464
+ /**
465
+ * Specialized version of `std::function<void(AccuracyAuthorization)>`.
466
+ */
467
+ using Func_void_AccuracyAuthorization = std::function<void(AccuracyAuthorization /* result */)>;
468
+ /**
469
+ * Wrapper class for a `std::function<void(AccuracyAuthorization / * result * /)>`, this can be used from Swift.
470
+ */
471
+ class Func_void_AccuracyAuthorization_Wrapper final {
472
+ public:
473
+ explicit Func_void_AccuracyAuthorization_Wrapper(std::function<void(AccuracyAuthorization /* result */)>&& func): _function(std::make_unique<std::function<void(AccuracyAuthorization /* result */)>>(std::move(func))) {}
474
+ inline void call(int result) const noexcept {
475
+ _function->operator()(static_cast<AccuracyAuthorization>(result));
476
+ }
477
+ private:
478
+ std::unique_ptr<std::function<void(AccuracyAuthorization /* result */)>> _function;
479
+ } SWIFT_NONCOPYABLE;
480
+ Func_void_AccuracyAuthorization create_Func_void_AccuracyAuthorization(void* NON_NULL swiftClosureWrapper) noexcept;
481
+ inline Func_void_AccuracyAuthorization_Wrapper wrap_Func_void_AccuracyAuthorization(Func_void_AccuracyAuthorization value) noexcept {
482
+ return Func_void_AccuracyAuthorization_Wrapper(std::move(value));
483
+ }
484
+
176
485
  // pragma MARK: std::variant<nitro::NullType, double>
177
486
  /**
178
487
  * Wrapper struct for `std::variant<nitro::NullType, double>`.
@@ -217,52 +526,70 @@ namespace margelo::nitro::nitrogeolocation::bridge::swift {
217
526
  return optional.value();
218
527
  }
219
528
 
220
- // pragma MARK: std::shared_ptr<Promise<GeolocationResponse>>
529
+ // pragma MARK: std::optional<LocationProviderUsed>
221
530
  /**
222
- * Specialized version of `std::shared_ptr<Promise<GeolocationResponse>>`.
531
+ * Specialized version of `std::optional<LocationProviderUsed>`.
223
532
  */
224
- using std__shared_ptr_Promise_GeolocationResponse__ = std::shared_ptr<Promise<GeolocationResponse>>;
225
- inline std::shared_ptr<Promise<GeolocationResponse>> create_std__shared_ptr_Promise_GeolocationResponse__() noexcept {
226
- return Promise<GeolocationResponse>::create();
533
+ using std__optional_LocationProviderUsed_ = std::optional<LocationProviderUsed>;
534
+ inline std::optional<LocationProviderUsed> create_std__optional_LocationProviderUsed_(const LocationProviderUsed& value) noexcept {
535
+ return std::optional<LocationProviderUsed>(value);
536
+ }
537
+ inline bool has_value_std__optional_LocationProviderUsed_(const std::optional<LocationProviderUsed>& optional) noexcept {
538
+ return optional.has_value();
227
539
  }
228
- inline PromiseHolder<GeolocationResponse> wrap_std__shared_ptr_Promise_GeolocationResponse__(std::shared_ptr<Promise<GeolocationResponse>> promise) noexcept {
229
- return PromiseHolder<GeolocationResponse>(std::move(promise));
540
+ inline LocationProviderUsed get_std__optional_LocationProviderUsed_(const std::optional<LocationProviderUsed>& optional) noexcept {
541
+ return optional.value();
230
542
  }
231
543
 
232
- // pragma MARK: std::function<void(const GeolocationResponse& /* result */)>
544
+ // pragma MARK: std::function<void(const GeolocationResponse& /* position */)>
233
545
  /**
234
546
  * Specialized version of `std::function<void(const GeolocationResponse&)>`.
235
547
  */
236
- using Func_void_GeolocationResponse = std::function<void(const GeolocationResponse& /* result */)>;
548
+ using Func_void_GeolocationResponse = std::function<void(const GeolocationResponse& /* position */)>;
237
549
  /**
238
- * Wrapper class for a `std::function<void(const GeolocationResponse& / * result * /)>`, this can be used from Swift.
550
+ * Wrapper class for a `std::function<void(const GeolocationResponse& / * position * /)>`, this can be used from Swift.
239
551
  */
240
552
  class Func_void_GeolocationResponse_Wrapper final {
241
553
  public:
242
- explicit Func_void_GeolocationResponse_Wrapper(std::function<void(const GeolocationResponse& /* result */)>&& func): _function(std::make_unique<std::function<void(const GeolocationResponse& /* result */)>>(std::move(func))) {}
243
- inline void call(GeolocationResponse result) const noexcept {
244
- _function->operator()(result);
554
+ explicit Func_void_GeolocationResponse_Wrapper(std::function<void(const GeolocationResponse& /* position */)>&& func): _function(std::make_unique<std::function<void(const GeolocationResponse& /* position */)>>(std::move(func))) {}
555
+ inline void call(GeolocationResponse position) const noexcept {
556
+ _function->operator()(position);
245
557
  }
246
558
  private:
247
- std::unique_ptr<std::function<void(const GeolocationResponse& /* result */)>> _function;
559
+ std::unique_ptr<std::function<void(const GeolocationResponse& /* position */)>> _function;
248
560
  } SWIFT_NONCOPYABLE;
249
561
  Func_void_GeolocationResponse create_Func_void_GeolocationResponse(void* NON_NULL swiftClosureWrapper) noexcept;
250
562
  inline Func_void_GeolocationResponse_Wrapper wrap_Func_void_GeolocationResponse(Func_void_GeolocationResponse value) noexcept {
251
563
  return Func_void_GeolocationResponse_Wrapper(std::move(value));
252
564
  }
253
565
 
254
- // pragma MARK: std::optional<double>
566
+ // pragma MARK: std::optional<AndroidGranularity>
255
567
  /**
256
- * Specialized version of `std::optional<double>`.
568
+ * Specialized version of `std::optional<AndroidGranularity>`.
257
569
  */
258
- using std__optional_double_ = std::optional<double>;
259
- inline std::optional<double> create_std__optional_double_(const double& value) noexcept {
260
- return std::optional<double>(value);
570
+ using std__optional_AndroidGranularity_ = std::optional<AndroidGranularity>;
571
+ inline std::optional<AndroidGranularity> create_std__optional_AndroidGranularity_(const AndroidGranularity& value) noexcept {
572
+ return std::optional<AndroidGranularity>(value);
261
573
  }
262
- inline bool has_value_std__optional_double_(const std::optional<double>& optional) noexcept {
574
+ inline bool has_value_std__optional_AndroidGranularity_(const std::optional<AndroidGranularity>& optional) noexcept {
263
575
  return optional.has_value();
264
576
  }
265
- inline double get_std__optional_double_(const std::optional<double>& optional) noexcept {
577
+ inline AndroidGranularity get_std__optional_AndroidGranularity_(const std::optional<AndroidGranularity>& optional) noexcept {
578
+ return optional.value();
579
+ }
580
+
581
+ // pragma MARK: std::optional<IOSActivityType>
582
+ /**
583
+ * Specialized version of `std::optional<IOSActivityType>`.
584
+ */
585
+ using std__optional_IOSActivityType_ = std::optional<IOSActivityType>;
586
+ inline std::optional<IOSActivityType> create_std__optional_IOSActivityType_(const IOSActivityType& value) noexcept {
587
+ return std::optional<IOSActivityType>(value);
588
+ }
589
+ inline bool has_value_std__optional_IOSActivityType_(const std::optional<IOSActivityType>& optional) noexcept {
590
+ return optional.has_value();
591
+ }
592
+ inline IOSActivityType get_std__optional_IOSActivityType_(const std::optional<IOSActivityType>& optional) noexcept {
266
593
  return optional.value();
267
594
  }
268
595
 
@@ -281,40 +608,106 @@ namespace margelo::nitro::nitrogeolocation::bridge::swift {
281
608
  return optional.value();
282
609
  }
283
610
 
284
- // pragma MARK: std::function<void(const LocationError& /* error */)>
611
+ // pragma MARK: std::vector<GeocodedLocation>
285
612
  /**
286
- * Specialized version of `std::function<void(const LocationError&)>`.
613
+ * Specialized version of `std::vector<GeocodedLocation>`.
287
614
  */
288
- using Func_void_LocationError = std::function<void(const LocationError& /* error */)>;
615
+ using std__vector_GeocodedLocation_ = std::vector<GeocodedLocation>;
616
+ inline std::vector<GeocodedLocation> create_std__vector_GeocodedLocation_(size_t size) noexcept {
617
+ std::vector<GeocodedLocation> vector;
618
+ vector.reserve(size);
619
+ return vector;
620
+ }
621
+
622
+ // pragma MARK: std::function<void(const std::vector<GeocodedLocation>& /* locations */)>
289
623
  /**
290
- * Wrapper class for a `std::function<void(const LocationError& / * error * /)>`, this can be used from Swift.
624
+ * Specialized version of `std::function<void(const std::vector<GeocodedLocation>&)>`.
291
625
  */
292
- class Func_void_LocationError_Wrapper final {
626
+ using Func_void_std__vector_GeocodedLocation_ = std::function<void(const std::vector<GeocodedLocation>& /* locations */)>;
627
+ /**
628
+ * Wrapper class for a `std::function<void(const std::vector<GeocodedLocation>& / * locations * /)>`, this can be used from Swift.
629
+ */
630
+ class Func_void_std__vector_GeocodedLocation__Wrapper final {
293
631
  public:
294
- explicit Func_void_LocationError_Wrapper(std::function<void(const LocationError& /* error */)>&& func): _function(std::make_unique<std::function<void(const LocationError& /* error */)>>(std::move(func))) {}
295
- inline void call(LocationError error) const noexcept {
296
- _function->operator()(error);
632
+ explicit Func_void_std__vector_GeocodedLocation__Wrapper(std::function<void(const std::vector<GeocodedLocation>& /* locations */)>&& func): _function(std::make_unique<std::function<void(const std::vector<GeocodedLocation>& /* locations */)>>(std::move(func))) {}
633
+ inline void call(std::vector<GeocodedLocation> locations) const noexcept {
634
+ _function->operator()(locations);
297
635
  }
298
636
  private:
299
- std::unique_ptr<std::function<void(const LocationError& /* error */)>> _function;
637
+ std::unique_ptr<std::function<void(const std::vector<GeocodedLocation>& /* locations */)>> _function;
300
638
  } SWIFT_NONCOPYABLE;
301
- Func_void_LocationError create_Func_void_LocationError(void* NON_NULL swiftClosureWrapper) noexcept;
302
- inline Func_void_LocationError_Wrapper wrap_Func_void_LocationError(Func_void_LocationError value) noexcept {
303
- return Func_void_LocationError_Wrapper(std::move(value));
639
+ Func_void_std__vector_GeocodedLocation_ create_Func_void_std__vector_GeocodedLocation_(void* NON_NULL swiftClosureWrapper) noexcept;
640
+ inline Func_void_std__vector_GeocodedLocation__Wrapper wrap_Func_void_std__vector_GeocodedLocation_(Func_void_std__vector_GeocodedLocation_ value) noexcept {
641
+ return Func_void_std__vector_GeocodedLocation__Wrapper(std::move(value));
304
642
  }
305
643
 
306
- // pragma MARK: std::optional<std::function<void(const LocationError& /* error */)>>
644
+ // pragma MARK: std::vector<ReverseGeocodedAddress>
307
645
  /**
308
- * Specialized version of `std::optional<std::function<void(const LocationError& / * error * /)>>`.
646
+ * Specialized version of `std::vector<ReverseGeocodedAddress>`.
309
647
  */
310
- using std__optional_std__function_void_const_LocationError_____error______ = std::optional<std::function<void(const LocationError& /* error */)>>;
311
- inline std::optional<std::function<void(const LocationError& /* error */)>> create_std__optional_std__function_void_const_LocationError_____error______(const std::function<void(const LocationError& /* error */)>& value) noexcept {
312
- return std::optional<std::function<void(const LocationError& /* error */)>>(value);
648
+ using std__vector_ReverseGeocodedAddress_ = std::vector<ReverseGeocodedAddress>;
649
+ inline std::vector<ReverseGeocodedAddress> create_std__vector_ReverseGeocodedAddress_(size_t size) noexcept {
650
+ std::vector<ReverseGeocodedAddress> vector;
651
+ vector.reserve(size);
652
+ return vector;
313
653
  }
314
- inline bool has_value_std__optional_std__function_void_const_LocationError_____error______(const std::optional<std::function<void(const LocationError& /* error */)>>& optional) noexcept {
654
+
655
+ // pragma MARK: std::function<void(const std::vector<ReverseGeocodedAddress>& /* addresses */)>
656
+ /**
657
+ * Specialized version of `std::function<void(const std::vector<ReverseGeocodedAddress>&)>`.
658
+ */
659
+ using Func_void_std__vector_ReverseGeocodedAddress_ = std::function<void(const std::vector<ReverseGeocodedAddress>& /* addresses */)>;
660
+ /**
661
+ * Wrapper class for a `std::function<void(const std::vector<ReverseGeocodedAddress>& / * addresses * /)>`, this can be used from Swift.
662
+ */
663
+ class Func_void_std__vector_ReverseGeocodedAddress__Wrapper final {
664
+ public:
665
+ explicit Func_void_std__vector_ReverseGeocodedAddress__Wrapper(std::function<void(const std::vector<ReverseGeocodedAddress>& /* addresses */)>&& func): _function(std::make_unique<std::function<void(const std::vector<ReverseGeocodedAddress>& /* addresses */)>>(std::move(func))) {}
666
+ inline void call(std::vector<ReverseGeocodedAddress> addresses) const noexcept {
667
+ _function->operator()(addresses);
668
+ }
669
+ private:
670
+ std::unique_ptr<std::function<void(const std::vector<ReverseGeocodedAddress>& /* addresses */)>> _function;
671
+ } SWIFT_NONCOPYABLE;
672
+ Func_void_std__vector_ReverseGeocodedAddress_ create_Func_void_std__vector_ReverseGeocodedAddress_(void* NON_NULL swiftClosureWrapper) noexcept;
673
+ inline Func_void_std__vector_ReverseGeocodedAddress__Wrapper wrap_Func_void_std__vector_ReverseGeocodedAddress_(Func_void_std__vector_ReverseGeocodedAddress_ value) noexcept {
674
+ return Func_void_std__vector_ReverseGeocodedAddress__Wrapper(std::move(value));
675
+ }
676
+
677
+ // pragma MARK: std::function<void(const Heading& /* heading */)>
678
+ /**
679
+ * Specialized version of `std::function<void(const Heading&)>`.
680
+ */
681
+ using Func_void_Heading = std::function<void(const Heading& /* heading */)>;
682
+ /**
683
+ * Wrapper class for a `std::function<void(const Heading& / * heading * /)>`, this can be used from Swift.
684
+ */
685
+ class Func_void_Heading_Wrapper final {
686
+ public:
687
+ explicit Func_void_Heading_Wrapper(std::function<void(const Heading& /* heading */)>&& func): _function(std::make_unique<std::function<void(const Heading& /* heading */)>>(std::move(func))) {}
688
+ inline void call(Heading heading) const noexcept {
689
+ _function->operator()(heading);
690
+ }
691
+ private:
692
+ std::unique_ptr<std::function<void(const Heading& /* heading */)>> _function;
693
+ } SWIFT_NONCOPYABLE;
694
+ Func_void_Heading create_Func_void_Heading(void* NON_NULL swiftClosureWrapper) noexcept;
695
+ inline Func_void_Heading_Wrapper wrap_Func_void_Heading(Func_void_Heading value) noexcept {
696
+ return Func_void_Heading_Wrapper(std::move(value));
697
+ }
698
+
699
+ // pragma MARK: std::optional<HeadingOptions>
700
+ /**
701
+ * Specialized version of `std::optional<HeadingOptions>`.
702
+ */
703
+ using std__optional_HeadingOptions_ = std::optional<HeadingOptions>;
704
+ inline std::optional<HeadingOptions> create_std__optional_HeadingOptions_(const HeadingOptions& value) noexcept {
705
+ return std::optional<HeadingOptions>(value);
706
+ }
707
+ inline bool has_value_std__optional_HeadingOptions_(const std::optional<HeadingOptions>& optional) noexcept {
315
708
  return optional.has_value();
316
709
  }
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 {
710
+ inline HeadingOptions get_std__optional_HeadingOptions_(const std::optional<HeadingOptions>& optional) noexcept {
318
711
  return optional.value();
319
712
  }
320
713
 
@@ -348,13 +741,40 @@ namespace margelo::nitro::nitrogeolocation::bridge::swift {
348
741
  return Result<std::shared_ptr<Promise<PermissionStatus>>>::withError(error);
349
742
  }
350
743
 
351
- // pragma MARK: Result<std::shared_ptr<Promise<GeolocationResponse>>>
352
- using Result_std__shared_ptr_Promise_GeolocationResponse___ = Result<std::shared_ptr<Promise<GeolocationResponse>>>;
353
- inline Result_std__shared_ptr_Promise_GeolocationResponse___ create_Result_std__shared_ptr_Promise_GeolocationResponse___(const std::shared_ptr<Promise<GeolocationResponse>>& value) noexcept {
354
- return Result<std::shared_ptr<Promise<GeolocationResponse>>>::withValue(value);
744
+ // pragma MARK: Result<std::shared_ptr<Promise<bool>>>
745
+ using Result_std__shared_ptr_Promise_bool___ = Result<std::shared_ptr<Promise<bool>>>;
746
+ inline Result_std__shared_ptr_Promise_bool___ create_Result_std__shared_ptr_Promise_bool___(const std::shared_ptr<Promise<bool>>& value) noexcept {
747
+ return Result<std::shared_ptr<Promise<bool>>>::withValue(value);
748
+ }
749
+ inline Result_std__shared_ptr_Promise_bool___ create_Result_std__shared_ptr_Promise_bool___(const std::exception_ptr& error) noexcept {
750
+ return Result<std::shared_ptr<Promise<bool>>>::withError(error);
751
+ }
752
+
753
+ // pragma MARK: Result<std::shared_ptr<Promise<LocationProviderStatus>>>
754
+ using Result_std__shared_ptr_Promise_LocationProviderStatus___ = Result<std::shared_ptr<Promise<LocationProviderStatus>>>;
755
+ inline Result_std__shared_ptr_Promise_LocationProviderStatus___ create_Result_std__shared_ptr_Promise_LocationProviderStatus___(const std::shared_ptr<Promise<LocationProviderStatus>>& value) noexcept {
756
+ return Result<std::shared_ptr<Promise<LocationProviderStatus>>>::withValue(value);
757
+ }
758
+ inline Result_std__shared_ptr_Promise_LocationProviderStatus___ create_Result_std__shared_ptr_Promise_LocationProviderStatus___(const std::exception_ptr& error) noexcept {
759
+ return Result<std::shared_ptr<Promise<LocationProviderStatus>>>::withError(error);
760
+ }
761
+
762
+ // pragma MARK: Result<std::shared_ptr<Promise<LocationAvailability>>>
763
+ using Result_std__shared_ptr_Promise_LocationAvailability___ = Result<std::shared_ptr<Promise<LocationAvailability>>>;
764
+ inline Result_std__shared_ptr_Promise_LocationAvailability___ create_Result_std__shared_ptr_Promise_LocationAvailability___(const std::shared_ptr<Promise<LocationAvailability>>& value) noexcept {
765
+ return Result<std::shared_ptr<Promise<LocationAvailability>>>::withValue(value);
766
+ }
767
+ inline Result_std__shared_ptr_Promise_LocationAvailability___ create_Result_std__shared_ptr_Promise_LocationAvailability___(const std::exception_ptr& error) noexcept {
768
+ return Result<std::shared_ptr<Promise<LocationAvailability>>>::withError(error);
769
+ }
770
+
771
+ // pragma MARK: Result<std::shared_ptr<Promise<AccuracyAuthorization>>>
772
+ using Result_std__shared_ptr_Promise_AccuracyAuthorization___ = Result<std::shared_ptr<Promise<AccuracyAuthorization>>>;
773
+ inline Result_std__shared_ptr_Promise_AccuracyAuthorization___ create_Result_std__shared_ptr_Promise_AccuracyAuthorization___(const std::shared_ptr<Promise<AccuracyAuthorization>>& value) noexcept {
774
+ return Result<std::shared_ptr<Promise<AccuracyAuthorization>>>::withValue(value);
355
775
  }
356
- inline Result_std__shared_ptr_Promise_GeolocationResponse___ create_Result_std__shared_ptr_Promise_GeolocationResponse___(const std::exception_ptr& error) noexcept {
357
- return Result<std::shared_ptr<Promise<GeolocationResponse>>>::withError(error);
776
+ inline Result_std__shared_ptr_Promise_AccuracyAuthorization___ create_Result_std__shared_ptr_Promise_AccuracyAuthorization___(const std::exception_ptr& error) noexcept {
777
+ return Result<std::shared_ptr<Promise<AccuracyAuthorization>>>::withError(error);
358
778
  }
359
779
 
360
780
  // pragma MARK: Result<std::string>
@@ -433,55 +853,77 @@ namespace margelo::nitro::nitrogeolocation::bridge::swift {
433
853
  return optional.value();
434
854
  }
435
855
 
436
- // pragma MARK: std::function<void(const GeolocationError& /* error */)>
856
+ // pragma MARK: std::function<void(const CompatGeolocationError& /* error */)>
437
857
  /**
438
- * Specialized version of `std::function<void(const GeolocationError&)>`.
858
+ * Specialized version of `std::function<void(const CompatGeolocationError&)>`.
439
859
  */
440
- using Func_void_GeolocationError = std::function<void(const GeolocationError& /* error */)>;
860
+ using Func_void_CompatGeolocationError = std::function<void(const CompatGeolocationError& /* error */)>;
441
861
  /**
442
- * Wrapper class for a `std::function<void(const GeolocationError& / * error * /)>`, this can be used from Swift.
862
+ * Wrapper class for a `std::function<void(const CompatGeolocationError& / * error * /)>`, this can be used from Swift.
443
863
  */
444
- class Func_void_GeolocationError_Wrapper final {
864
+ class Func_void_CompatGeolocationError_Wrapper final {
445
865
  public:
446
- explicit Func_void_GeolocationError_Wrapper(std::function<void(const GeolocationError& /* error */)>&& func): _function(std::make_unique<std::function<void(const GeolocationError& /* error */)>>(std::move(func))) {}
447
- inline void call(GeolocationError error) const noexcept {
866
+ explicit Func_void_CompatGeolocationError_Wrapper(std::function<void(const CompatGeolocationError& /* error */)>&& func): _function(std::make_unique<std::function<void(const CompatGeolocationError& /* error */)>>(std::move(func))) {}
867
+ inline void call(CompatGeolocationError error) const noexcept {
448
868
  _function->operator()(error);
449
869
  }
450
870
  private:
451
- std::unique_ptr<std::function<void(const GeolocationError& /* error */)>> _function;
871
+ std::unique_ptr<std::function<void(const CompatGeolocationError& /* error */)>> _function;
452
872
  } SWIFT_NONCOPYABLE;
453
- Func_void_GeolocationError create_Func_void_GeolocationError(void* NON_NULL swiftClosureWrapper) noexcept;
454
- inline Func_void_GeolocationError_Wrapper wrap_Func_void_GeolocationError(Func_void_GeolocationError value) noexcept {
455
- return Func_void_GeolocationError_Wrapper(std::move(value));
873
+ Func_void_CompatGeolocationError create_Func_void_CompatGeolocationError(void* NON_NULL swiftClosureWrapper) noexcept;
874
+ inline Func_void_CompatGeolocationError_Wrapper wrap_Func_void_CompatGeolocationError(Func_void_CompatGeolocationError value) noexcept {
875
+ return Func_void_CompatGeolocationError_Wrapper(std::move(value));
456
876
  }
457
877
 
458
- // pragma MARK: std::optional<std::function<void(const GeolocationError& /* error */)>>
878
+ // pragma MARK: std::optional<std::function<void(const CompatGeolocationError& /* error */)>>
459
879
  /**
460
- * Specialized version of `std::optional<std::function<void(const GeolocationError& / * error * /)>>`.
880
+ * Specialized version of `std::optional<std::function<void(const CompatGeolocationError& / * error * /)>>`.
461
881
  */
462
- using std__optional_std__function_void_const_GeolocationError_____error______ = std::optional<std::function<void(const GeolocationError& /* error */)>>;
463
- inline std::optional<std::function<void(const GeolocationError& /* error */)>> create_std__optional_std__function_void_const_GeolocationError_____error______(const std::function<void(const GeolocationError& /* error */)>& value) noexcept {
464
- return std::optional<std::function<void(const GeolocationError& /* error */)>>(value);
882
+ using std__optional_std__function_void_const_CompatGeolocationError_____error______ = std::optional<std::function<void(const CompatGeolocationError& /* error */)>>;
883
+ inline std::optional<std::function<void(const CompatGeolocationError& /* error */)>> create_std__optional_std__function_void_const_CompatGeolocationError_____error______(const std::function<void(const CompatGeolocationError& /* error */)>& value) noexcept {
884
+ return std::optional<std::function<void(const CompatGeolocationError& /* error */)>>(value);
465
885
  }
466
- inline bool has_value_std__optional_std__function_void_const_GeolocationError_____error______(const std::optional<std::function<void(const GeolocationError& /* error */)>>& optional) noexcept {
886
+ inline bool has_value_std__optional_std__function_void_const_CompatGeolocationError_____error______(const std::optional<std::function<void(const CompatGeolocationError& /* error */)>>& optional) noexcept {
467
887
  return optional.has_value();
468
888
  }
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 {
889
+ inline std::function<void(const CompatGeolocationError& /* error */)> get_std__optional_std__function_void_const_CompatGeolocationError_____error______(const std::optional<std::function<void(const CompatGeolocationError& /* error */)>>& optional) noexcept {
470
890
  return optional.value();
471
891
  }
472
892
 
473
- // pragma MARK: std::optional<GeolocationOptions>
893
+ // pragma MARK: std::function<void(const CompatGeolocationResponse& /* position */)>
894
+ /**
895
+ * Specialized version of `std::function<void(const CompatGeolocationResponse&)>`.
896
+ */
897
+ using Func_void_CompatGeolocationResponse = std::function<void(const CompatGeolocationResponse& /* position */)>;
898
+ /**
899
+ * Wrapper class for a `std::function<void(const CompatGeolocationResponse& / * position * /)>`, this can be used from Swift.
900
+ */
901
+ class Func_void_CompatGeolocationResponse_Wrapper final {
902
+ public:
903
+ explicit Func_void_CompatGeolocationResponse_Wrapper(std::function<void(const CompatGeolocationResponse& /* position */)>&& func): _function(std::make_unique<std::function<void(const CompatGeolocationResponse& /* position */)>>(std::move(func))) {}
904
+ inline void call(CompatGeolocationResponse position) const noexcept {
905
+ _function->operator()(position);
906
+ }
907
+ private:
908
+ std::unique_ptr<std::function<void(const CompatGeolocationResponse& /* position */)>> _function;
909
+ } SWIFT_NONCOPYABLE;
910
+ Func_void_CompatGeolocationResponse create_Func_void_CompatGeolocationResponse(void* NON_NULL swiftClosureWrapper) noexcept;
911
+ inline Func_void_CompatGeolocationResponse_Wrapper wrap_Func_void_CompatGeolocationResponse(Func_void_CompatGeolocationResponse value) noexcept {
912
+ return Func_void_CompatGeolocationResponse_Wrapper(std::move(value));
913
+ }
914
+
915
+ // pragma MARK: std::optional<CompatGeolocationOptions>
474
916
  /**
475
- * Specialized version of `std::optional<GeolocationOptions>`.
917
+ * Specialized version of `std::optional<CompatGeolocationOptions>`.
476
918
  */
477
- using std__optional_GeolocationOptions_ = std::optional<GeolocationOptions>;
478
- inline std::optional<GeolocationOptions> create_std__optional_GeolocationOptions_(const GeolocationOptions& value) noexcept {
479
- return std::optional<GeolocationOptions>(value);
919
+ using std__optional_CompatGeolocationOptions_ = std::optional<CompatGeolocationOptions>;
920
+ inline std::optional<CompatGeolocationOptions> create_std__optional_CompatGeolocationOptions_(const CompatGeolocationOptions& value) noexcept {
921
+ return std::optional<CompatGeolocationOptions>(value);
480
922
  }
481
- inline bool has_value_std__optional_GeolocationOptions_(const std::optional<GeolocationOptions>& optional) noexcept {
923
+ inline bool has_value_std__optional_CompatGeolocationOptions_(const std::optional<CompatGeolocationOptions>& optional) noexcept {
482
924
  return optional.has_value();
483
925
  }
484
- inline GeolocationOptions get_std__optional_GeolocationOptions_(const std::optional<GeolocationOptions>& optional) noexcept {
926
+ inline CompatGeolocationOptions get_std__optional_CompatGeolocationOptions_(const std::optional<CompatGeolocationOptions>& optional) noexcept {
485
927
  return optional.value();
486
928
  }
487
929