react-native-nitro-background-geolocation 0.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/NitroBackgroundGeolocation.podspec +29 -0
- package/android/CMakeLists.txt +24 -0
- package/android/build.gradle +133 -0
- package/android/src/main/AndroidManifest.xml +65 -0
- package/android/src/main/cpp/cpp-adapter.cpp +11 -0
- package/android/src/main/java/com/margelo/nitro/nitrobackgroundgeolocation/ConfigMapper.kt +332 -0
- package/android/src/main/java/com/margelo/nitro/nitrobackgroundgeolocation/HeadlessTaskRegistry.kt +23 -0
- package/android/src/main/java/com/margelo/nitro/nitrobackgroundgeolocation/HeadlessTaskService.kt +66 -0
- package/android/src/main/java/com/margelo/nitro/nitrobackgroundgeolocation/NitroBackgroundGeolocation.kt +538 -0
- package/android/src/main/java/com/margelo/nitro/nitrobackgroundgeolocation/NitroBackgroundGeolocationPackage.kt +22 -0
- package/android/src/main/java/com/margelo/nitro/nitrobackgroundgeolocation/ReactNativeHeadlessTaskRunner.kt +62 -0
- package/android/src/main/java/com/marianhello/bgloc/BackgroundGeolocationFacade.java +542 -0
- package/android/src/main/java/com/marianhello/bgloc/BootCompletedReceiver.java +59 -0
- package/android/src/main/java/com/marianhello/bgloc/Config.java +652 -0
- package/android/src/main/java/com/marianhello/bgloc/ConnectivityListener.java +5 -0
- package/android/src/main/java/com/marianhello/bgloc/HttpPostService.java +168 -0
- package/android/src/main/java/com/marianhello/bgloc/LocationManager.java +138 -0
- package/android/src/main/java/com/marianhello/bgloc/PluginDelegate.java +19 -0
- package/android/src/main/java/com/marianhello/bgloc/PluginException.java +38 -0
- package/android/src/main/java/com/marianhello/bgloc/PostLocationTask.java +186 -0
- package/android/src/main/java/com/marianhello/bgloc/ResourceResolver.java +55 -0
- package/android/src/main/java/com/marianhello/bgloc/data/AbstractLocationTemplate.java +69 -0
- package/android/src/main/java/com/marianhello/bgloc/data/ArrayListLocationTemplate.java +88 -0
- package/android/src/main/java/com/marianhello/bgloc/data/BackgroundActivity.java +108 -0
- package/android/src/main/java/com/marianhello/bgloc/data/BackgroundLocation.java +994 -0
- package/android/src/main/java/com/marianhello/bgloc/data/ConfigurationDAO.java +13 -0
- package/android/src/main/java/com/marianhello/bgloc/data/DAOFactory.java +17 -0
- package/android/src/main/java/com/marianhello/bgloc/data/HashMapLocationTemplate.java +82 -0
- package/android/src/main/java/com/marianhello/bgloc/data/LocationDAO.java +22 -0
- package/android/src/main/java/com/marianhello/bgloc/data/LocationTemplate.java +12 -0
- package/android/src/main/java/com/marianhello/bgloc/data/LocationTemplateFactory.java +65 -0
- package/android/src/main/java/com/marianhello/bgloc/data/LocationTransform.java +19 -0
- package/android/src/main/java/com/marianhello/bgloc/data/provider/ContentProviderLocationDAO.java +395 -0
- package/android/src/main/java/com/marianhello/bgloc/data/provider/LocationContentProvider.java +321 -0
- package/android/src/main/java/com/marianhello/bgloc/data/sqlite/SQLiteConfigurationContract.java +76 -0
- package/android/src/main/java/com/marianhello/bgloc/data/sqlite/SQLiteConfigurationDAO.java +160 -0
- package/android/src/main/java/com/marianhello/bgloc/data/sqlite/SQLiteLocationContract.java +112 -0
- package/android/src/main/java/com/marianhello/bgloc/data/sqlite/SQLiteLocationDAO.java +506 -0
- package/android/src/main/java/com/marianhello/bgloc/data/sqlite/SQLiteOpenHelper.java +151 -0
- package/android/src/main/java/com/marianhello/bgloc/headless/AbstractTaskRunner.java +15 -0
- package/android/src/main/java/com/marianhello/bgloc/headless/ActivityTask.java +48 -0
- package/android/src/main/java/com/marianhello/bgloc/headless/JsCallback.java +10 -0
- package/android/src/main/java/com/marianhello/bgloc/headless/LocationTask.java +61 -0
- package/android/src/main/java/com/marianhello/bgloc/headless/StationaryTask.java +25 -0
- package/android/src/main/java/com/marianhello/bgloc/headless/Task.java +8 -0
- package/android/src/main/java/com/marianhello/bgloc/headless/TaskRunner.java +5 -0
- package/android/src/main/java/com/marianhello/bgloc/headless/TaskRunnerFactory.java +8 -0
- package/android/src/main/java/com/marianhello/bgloc/provider/AbstractLocationProvider.java +171 -0
- package/android/src/main/java/com/marianhello/bgloc/provider/ActivityRecognitionLocationProvider.java +280 -0
- package/android/src/main/java/com/marianhello/bgloc/provider/DistanceFilterLocationProvider.java +586 -0
- package/android/src/main/java/com/marianhello/bgloc/provider/LocationProvider.java +32 -0
- package/android/src/main/java/com/marianhello/bgloc/provider/LocationProviderFactory.java +47 -0
- package/android/src/main/java/com/marianhello/bgloc/provider/ProviderDelegate.java +12 -0
- package/android/src/main/java/com/marianhello/bgloc/provider/RawLocationProvider.java +142 -0
- package/android/src/main/java/com/marianhello/bgloc/service/LocationService.java +17 -0
- package/android/src/main/java/com/marianhello/bgloc/service/LocationServiceImpl.java +760 -0
- package/android/src/main/java/com/marianhello/bgloc/service/LocationServiceInfo.java +6 -0
- package/android/src/main/java/com/marianhello/bgloc/service/LocationServiceInfoImpl.java +41 -0
- package/android/src/main/java/com/marianhello/bgloc/service/LocationServiceIntentBuilder.java +203 -0
- package/android/src/main/java/com/marianhello/bgloc/service/LocationServiceProxy.java +140 -0
- package/android/src/main/java/com/marianhello/bgloc/sync/AccountHelper.java +39 -0
- package/android/src/main/java/com/marianhello/bgloc/sync/Authenticator.java +68 -0
- package/android/src/main/java/com/marianhello/bgloc/sync/AuthenticatorService.java +28 -0
- package/android/src/main/java/com/marianhello/bgloc/sync/BatchManager.java +246 -0
- package/android/src/main/java/com/marianhello/bgloc/sync/NotificationHelper.java +148 -0
- package/android/src/main/java/com/marianhello/bgloc/sync/SyncAdapter.java +233 -0
- package/android/src/main/java/com/marianhello/bgloc/sync/SyncService.java +68 -0
- package/android/src/main/java/com/marianhello/logging/DBLogReader.java +203 -0
- package/android/src/main/java/com/marianhello/logging/LogEntry.java +99 -0
- package/android/src/main/java/com/marianhello/logging/LoggerManager.java +70 -0
- package/android/src/main/java/com/marianhello/logging/UncaughtExceptionLogger.java +36 -0
- package/android/src/main/java/com/marianhello/utils/CloneHelper.java +22 -0
- package/android/src/main/java/com/marianhello/utils/Convert.java +56 -0
- package/android/src/main/java/com/marianhello/utils/TextUtils.java +72 -0
- package/android/src/main/java/com/marianhello/utils/ToneGenerator.java +68 -0
- package/android/src/main/java/org/apache/commons/io/Charsets.java +153 -0
- package/android/src/main/java/org/apache/commons/io/input/ReversedLinesFileReader.java +344 -0
- package/android/src/main/java/org/chromium/content/browser/ThreadUtils.java +134 -0
- package/android/src/main/java/ru/andremoniy/sqlbuilder/SqlExpression.java +398 -0
- package/android/src/main/java/ru/andremoniy/sqlbuilder/SqlSelectStatement.java +671 -0
- package/android/src/main/java/ru/andremoniy/sqlbuilder/SqlStatement.java +29 -0
- package/android/src/main/java/ru/andremoniy/utils/TextUtils.java +61 -0
- package/android/src/main/res/values/strings.xml +6 -0
- package/android/src/main/res/xml/authenticator.xml +7 -0
- package/android/src/main/res/xml/syncadapter.xml +9 -0
- package/app.plugin.js +64 -0
- package/ios/NitroBackgroundGeolocation.swift +719 -0
- package/ios/NitroBackgroundGeolocationBootstrap.m +98 -0
- package/ios/common/BackgroundGeolocation/CocoaLumberjack.h +1945 -0
- package/ios/common/BackgroundGeolocation/CocoaLumberjack.m +5255 -0
- package/ios/common/BackgroundGeolocation/FMDB.h +2357 -0
- package/ios/common/BackgroundGeolocation/FMDB.m +2672 -0
- package/ios/common/BackgroundGeolocation/FMDBLogger.h +42 -0
- package/ios/common/BackgroundGeolocation/FMDBLogger.m +264 -0
- package/ios/common/BackgroundGeolocation/INTULocationManager/INTUHeadingRequest.h +41 -0
- package/ios/common/BackgroundGeolocation/INTULocationManager/INTUHeadingRequest.m +68 -0
- package/ios/common/BackgroundGeolocation/INTULocationManager/INTULocationManager+Internal.h +33 -0
- package/ios/common/BackgroundGeolocation/INTULocationManager/INTULocationManager.h +178 -0
- package/ios/common/BackgroundGeolocation/INTULocationManager/INTULocationManager.m +1025 -0
- package/ios/common/BackgroundGeolocation/INTULocationManager/INTULocationRequest.h +103 -0
- package/ios/common/BackgroundGeolocation/INTULocationManager/INTULocationRequest.m +238 -0
- package/ios/common/BackgroundGeolocation/INTULocationManager/INTULocationRequestDefines.h +163 -0
- package/ios/common/BackgroundGeolocation/INTULocationManager/INTURequestIDGenerator.h +39 -0
- package/ios/common/BackgroundGeolocation/INTULocationManager/INTURequestIDGenerator.m +37 -0
- package/ios/common/BackgroundGeolocation/MAURAbstractLocationProvider.h +51 -0
- package/ios/common/BackgroundGeolocation/MAURAbstractLocationProvider.m +53 -0
- package/ios/common/BackgroundGeolocation/MAURActivity.h +23 -0
- package/ios/common/BackgroundGeolocation/MAURActivity.m +52 -0
- package/ios/common/BackgroundGeolocation/MAURActivityLocationProvider.h +18 -0
- package/ios/common/BackgroundGeolocation/MAURActivityLocationProvider.m +202 -0
- package/ios/common/BackgroundGeolocation/MAURBackgroundGeolocationFacade.h +62 -0
- package/ios/common/BackgroundGeolocation/MAURBackgroundGeolocationFacade.m +650 -0
- package/ios/common/BackgroundGeolocation/MAURBackgroundSync.h +34 -0
- package/ios/common/BackgroundGeolocation/MAURBackgroundSync.m +184 -0
- package/ios/common/BackgroundGeolocation/MAURBackgroundTaskManager.h +25 -0
- package/ios/common/BackgroundGeolocation/MAURBackgroundTaskManager.m +105 -0
- package/ios/common/BackgroundGeolocation/MAURConfig.h +74 -0
- package/ios/common/BackgroundGeolocation/MAURConfig.m +485 -0
- package/ios/common/BackgroundGeolocation/MAURConfigurationContract.h +49 -0
- package/ios/common/BackgroundGeolocation/MAURConfigurationContract.m +51 -0
- package/ios/common/BackgroundGeolocation/MAURDistanceFilterLocationProvider.h +20 -0
- package/ios/common/BackgroundGeolocation/MAURDistanceFilterLocationProvider.m +523 -0
- package/ios/common/BackgroundGeolocation/MAURGeolocationOpenHelper.h +17 -0
- package/ios/common/BackgroundGeolocation/MAURGeolocationOpenHelper.m +97 -0
- package/ios/common/BackgroundGeolocation/MAURLocation.h +59 -0
- package/ios/common/BackgroundGeolocation/MAURLocation.m +349 -0
- package/ios/common/BackgroundGeolocation/MAURLocationContract.h +34 -0
- package/ios/common/BackgroundGeolocation/MAURLocationContract.m +35 -0
- package/ios/common/BackgroundGeolocation/MAURLocationManager.h +53 -0
- package/ios/common/BackgroundGeolocation/MAURLocationManager.m +308 -0
- package/ios/common/BackgroundGeolocation/MAURLogReader.h +26 -0
- package/ios/common/BackgroundGeolocation/MAURLogReader.m +122 -0
- package/ios/common/BackgroundGeolocation/MAURLogging.h +19 -0
- package/ios/common/BackgroundGeolocation/MAURPostLocationTask.h +40 -0
- package/ios/common/BackgroundGeolocation/MAURPostLocationTask.m +218 -0
- package/ios/common/BackgroundGeolocation/MAURProviderDelegate.h +52 -0
- package/ios/common/BackgroundGeolocation/MAURRawLocationProvider.h +18 -0
- package/ios/common/BackgroundGeolocation/MAURRawLocationProvider.m +129 -0
- package/ios/common/BackgroundGeolocation/MAURSQLiteConfigurationDAO.h +26 -0
- package/ios/common/BackgroundGeolocation/MAURSQLiteConfigurationDAO.m +278 -0
- package/ios/common/BackgroundGeolocation/MAURSQLiteHelper.h +57 -0
- package/ios/common/BackgroundGeolocation/MAURSQLiteHelper.m +93 -0
- package/ios/common/BackgroundGeolocation/MAURSQLiteLocationDAO.h +38 -0
- package/ios/common/BackgroundGeolocation/MAURSQLiteLocationDAO.m +380 -0
- package/ios/common/BackgroundGeolocation/MAURSQLiteOpenHelper.h +32 -0
- package/ios/common/BackgroundGeolocation/MAURSQLiteOpenHelper.m +276 -0
- package/ios/common/BackgroundGeolocation/MAURUncaughtExceptionLogger.h +20 -0
- package/ios/common/BackgroundGeolocation/MAURUncaughtExceptionLogger.m +62 -0
- package/ios/common/BackgroundGeolocation/Reachability.h +102 -0
- package/ios/common/BackgroundGeolocation/Reachability.m +474 -0
- package/ios/common/BackgroundGeolocation/SOMotionDetector/SOLocationManager.h +80 -0
- package/ios/common/BackgroundGeolocation/SOMotionDetector/SOLocationManager.m +147 -0
- package/ios/common/BackgroundGeolocation/SOMotionDetector/SOMotionActivity.h +30 -0
- package/ios/common/BackgroundGeolocation/SOMotionDetector/SOMotionActivity.m +42 -0
- package/ios/common/BackgroundGeolocation/SOMotionDetector/SOMotionDetector.h +99 -0
- package/ios/common/BackgroundGeolocation/SOMotionDetector/SOMotionDetector.m +327 -0
- package/ios/common/BackgroundGeolocation/SOMotionDetector/SOStepDetector.h +44 -0
- package/ios/common/BackgroundGeolocation/SOMotionDetector/SOStepDetector.m +94 -0
- package/ios/common/BackgroundGeolocation/SQLQueryBuilder/ext/NSString+ZIMString.h +55 -0
- package/ios/common/BackgroundGeolocation/SQLQueryBuilder/ext/NSString+ZIMString.m +47 -0
- package/ios/common/BackgroundGeolocation/SQLQueryBuilder/sql/ZIMSqlDataManipulationCommand.h +27 -0
- package/ios/common/BackgroundGeolocation/SQLQueryBuilder/sql/ZIMSqlExpression.h +250 -0
- package/ios/common/BackgroundGeolocation/SQLQueryBuilder/sql/ZIMSqlExpression.m +259 -0
- package/ios/common/BackgroundGeolocation/SQLQueryBuilder/sql/ZIMSqlSelectStatement.h +360 -0
- package/ios/common/BackgroundGeolocation/SQLQueryBuilder/sql/ZIMSqlSelectStatement.m +427 -0
- package/ios/common/BackgroundGeolocation/SQLQueryBuilder/sql/ZIMSqlStatement.h +37 -0
- package/lib/module/NitroBackgroundGeolocation.nitro.js +172 -0
- package/lib/module/NitroBackgroundGeolocation.nitro.js.map +1 -0
- package/lib/module/headless.js +72 -0
- package/lib/module/headless.js.map +1 -0
- package/lib/module/index.js +60 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/NitroBackgroundGeolocation.nitro.d.ts +616 -0
- package/lib/typescript/src/NitroBackgroundGeolocation.nitro.d.ts.map +1 -0
- package/lib/typescript/src/headless.d.ts +40 -0
- package/lib/typescript/src/headless.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +8 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/nitro.json +23 -0
- package/nitrogen/generated/android/c++/JActivity.hpp +61 -0
- package/nitrogen/generated/android/c++/JAuthorizationStatus.hpp +61 -0
- package/nitrogen/generated/android/c++/JBackgroundGeolocationError.hpp +61 -0
- package/nitrogen/generated/android/c++/JConfigureOptions.hpp +179 -0
- package/nitrogen/generated/android/c++/JFunc_void.hpp +75 -0
- package/nitrogen/generated/android/c++/JFunc_void_Activity.hpp +78 -0
- package/nitrogen/generated/android/c++/JFunc_void_AuthorizationStatus.hpp +77 -0
- package/nitrogen/generated/android/c++/JFunc_void_BackgroundGeolocationError.hpp +78 -0
- package/nitrogen/generated/android/c++/JFunc_void_Location.hpp +78 -0
- package/nitrogen/generated/android/c++/JFunc_void_StationaryLocation.hpp +78 -0
- package/nitrogen/generated/android/c++/JHybridNitroBackgroundGeolocationSpec.cpp +530 -0
- package/nitrogen/generated/android/c++/JHybridNitroBackgroundGeolocationSpec.hpp +90 -0
- package/nitrogen/generated/android/c++/JLocation.hpp +105 -0
- package/nitrogen/generated/android/c++/JLocationAccuracy.hpp +64 -0
- package/nitrogen/generated/android/c++/JLocationOptions.hpp +65 -0
- package/nitrogen/generated/android/c++/JLocationProvider.hpp +61 -0
- package/nitrogen/generated/android/c++/JLogEntry.hpp +73 -0
- package/nitrogen/generated/android/c++/JNativeLogLevel.hpp +67 -0
- package/nitrogen/generated/android/c++/JServiceStatus.hpp +66 -0
- package/nitrogen/generated/android/c++/JStationaryLocation.hpp +109 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_AnyMap.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_AnyMap.hpp +71 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_Boolean.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_Boolean.hpp +69 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_Double.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_Double.hpp +69 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_LocationAccuracy.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_LocationAccuracy.hpp +71 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_LocationProvider.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_LocationProvider.hpp +71 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_Map_String__String_.cpp +33 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_Map_String__String_.hpp +77 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_String.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_String.hpp +70 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrobackgroundgeolocation/Activity.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrobackgroundgeolocation/AuthorizationStatus.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrobackgroundgeolocation/BackgroundGeolocationError.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrobackgroundgeolocation/ConfigureOptions.kt +182 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrobackgroundgeolocation/Func_void.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrobackgroundgeolocation/Func_void_Activity.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrobackgroundgeolocation/Func_void_AuthorizationStatus.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrobackgroundgeolocation/Func_void_BackgroundGeolocationError.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrobackgroundgeolocation/Func_void_Location.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrobackgroundgeolocation/Func_void_StationaryLocation.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrobackgroundgeolocation/HybridNitroBackgroundGeolocationSpec.kt +218 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrobackgroundgeolocation/Location.kt +111 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrobackgroundgeolocation/LocationAccuracy.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrobackgroundgeolocation/LocationOptions.kt +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrobackgroundgeolocation/LocationProvider.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrobackgroundgeolocation/LogEntry.kt +71 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrobackgroundgeolocation/NativeLogLevel.kt +26 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrobackgroundgeolocation/ServiceStatus.kt +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrobackgroundgeolocation/StationaryLocation.kt +116 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrobackgroundgeolocation/Variant_NullType_AnyMap.kt +63 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrobackgroundgeolocation/Variant_NullType_Boolean.kt +62 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrobackgroundgeolocation/Variant_NullType_Double.kt +62 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrobackgroundgeolocation/Variant_NullType_LocationAccuracy.kt +62 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrobackgroundgeolocation/Variant_NullType_LocationProvider.kt +62 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrobackgroundgeolocation/Variant_NullType_Map_String__String_.kt +62 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrobackgroundgeolocation/Variant_NullType_String.kt +62 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrobackgroundgeolocation/nitrobackgroundgeolocationOnLoad.kt +35 -0
- package/nitrogen/generated/android/nitrobackgroundgeolocation+autolinking.cmake +88 -0
- package/nitrogen/generated/android/nitrobackgroundgeolocation+autolinking.gradle +27 -0
- package/nitrogen/generated/android/nitrobackgroundgeolocationOnLoad.cpp +66 -0
- package/nitrogen/generated/android/nitrobackgroundgeolocationOnLoad.hpp +34 -0
- package/nitrogen/generated/ios/NitroBackgroundGeolocation+autolinking.rb +62 -0
- package/nitrogen/generated/ios/NitroBackgroundGeolocation-Swift-Cxx-Bridge.cpp +129 -0
- package/nitrogen/generated/ios/NitroBackgroundGeolocation-Swift-Cxx-Bridge.hpp +911 -0
- package/nitrogen/generated/ios/NitroBackgroundGeolocation-Swift-Cxx-Umbrella.hpp +88 -0
- package/nitrogen/generated/ios/NitroBackgroundGeolocationAutolinking.mm +33 -0
- package/nitrogen/generated/ios/NitroBackgroundGeolocationAutolinking.swift +26 -0
- package/nitrogen/generated/ios/c++/HybridNitroBackgroundGeolocationSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridNitroBackgroundGeolocationSpecSwift.hpp +335 -0
- package/nitrogen/generated/ios/swift/Activity.swift +34 -0
- package/nitrogen/generated/ios/swift/AuthorizationStatus.swift +44 -0
- package/nitrogen/generated/ios/swift/BackgroundGeolocationError.swift +34 -0
- package/nitrogen/generated/ios/swift/ConfigureOptions.swift +1037 -0
- package/nitrogen/generated/ios/swift/Func_void.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_Activity.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_AuthorizationStatus.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_BackgroundGeolocationError.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_ConfigureOptions.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_Location.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_ServiceStatus.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_StationaryLocation.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_StationaryLocation_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_Location_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_LogEntry_.swift +46 -0
- package/nitrogen/generated/ios/swift/HybridNitroBackgroundGeolocationSpec.swift +82 -0
- package/nitrogen/generated/ios/swift/HybridNitroBackgroundGeolocationSpec_cxx.swift +675 -0
- package/nitrogen/generated/ios/swift/Location.swift +89 -0
- package/nitrogen/generated/ios/swift/LocationAccuracy.swift +48 -0
- package/nitrogen/generated/ios/swift/LocationOptions.swift +78 -0
- package/nitrogen/generated/ios/swift/LocationProvider.swift +44 -0
- package/nitrogen/generated/ios/swift/LogEntry.swift +49 -0
- package/nitrogen/generated/ios/swift/NativeLogLevel.swift +52 -0
- package/nitrogen/generated/ios/swift/ServiceStatus.swift +39 -0
- package/nitrogen/generated/ios/swift/StationaryLocation.swift +94 -0
- package/nitrogen/generated/ios/swift/Variant_NullType_AnyMap.swift +30 -0
- package/nitrogen/generated/ios/swift/Variant_NullType_Bool.swift +30 -0
- package/nitrogen/generated/ios/swift/Variant_NullType_Dictionary_String__String_.swift +30 -0
- package/nitrogen/generated/ios/swift/Variant_NullType_Double.swift +30 -0
- package/nitrogen/generated/ios/swift/Variant_NullType_LocationAccuracy.swift +30 -0
- package/nitrogen/generated/ios/swift/Variant_NullType_LocationProvider.swift +30 -0
- package/nitrogen/generated/ios/swift/Variant_NullType_String.swift +30 -0
- package/nitrogen/generated/shared/c++/Activity.hpp +87 -0
- package/nitrogen/generated/shared/c++/AuthorizationStatus.hpp +63 -0
- package/nitrogen/generated/shared/c++/BackgroundGeolocationError.hpp +87 -0
- package/nitrogen/generated/shared/c++/ConfigureOptions.hpp +197 -0
- package/nitrogen/generated/shared/c++/HybridNitroBackgroundGeolocationSpec.cpp +48 -0
- package/nitrogen/generated/shared/c++/HybridNitroBackgroundGeolocationSpec.hpp +121 -0
- package/nitrogen/generated/shared/c++/Location.hpp +131 -0
- package/nitrogen/generated/shared/c++/LocationAccuracy.hpp +69 -0
- package/nitrogen/generated/shared/c++/LocationOptions.hpp +91 -0
- package/nitrogen/generated/shared/c++/LocationProvider.hpp +63 -0
- package/nitrogen/generated/shared/c++/LogEntry.hpp +99 -0
- package/nitrogen/generated/shared/c++/NativeLogLevel.hpp +65 -0
- package/nitrogen/generated/shared/c++/ServiceStatus.hpp +92 -0
- package/nitrogen/generated/shared/c++/StationaryLocation.hpp +135 -0
- package/package.json +112 -0
- package/react-native.config.js +10 -0
- package/src/NitroBackgroundGeolocation.nitro.ts +656 -0
- package/src/headless.ts +91 -0
- package/src/index.tsx +100 -0
package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrobackgroundgeolocation/LogEntry.kt
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// LogEntry.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.nitrobackgroundgeolocation
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
import java.util.Objects
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Represents the JavaScript object/struct "LogEntry".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class LogEntry(
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
val id: Double,
|
|
24
|
+
@DoNotStrip
|
|
25
|
+
@Keep
|
|
26
|
+
val timestamp: Double,
|
|
27
|
+
@DoNotStrip
|
|
28
|
+
@Keep
|
|
29
|
+
val level: String,
|
|
30
|
+
@DoNotStrip
|
|
31
|
+
@Keep
|
|
32
|
+
val message: String,
|
|
33
|
+
@DoNotStrip
|
|
34
|
+
@Keep
|
|
35
|
+
val stackTrace: String
|
|
36
|
+
) {
|
|
37
|
+
/* primary constructor */
|
|
38
|
+
|
|
39
|
+
override fun equals(other: Any?): Boolean {
|
|
40
|
+
if (this === other) return true
|
|
41
|
+
if (other !is LogEntry) return false
|
|
42
|
+
return Objects.deepEquals(this.id, other.id)
|
|
43
|
+
&& Objects.deepEquals(this.timestamp, other.timestamp)
|
|
44
|
+
&& Objects.deepEquals(this.level, other.level)
|
|
45
|
+
&& Objects.deepEquals(this.message, other.message)
|
|
46
|
+
&& Objects.deepEquals(this.stackTrace, other.stackTrace)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
override fun hashCode(): Int {
|
|
50
|
+
return arrayOf(
|
|
51
|
+
id,
|
|
52
|
+
timestamp,
|
|
53
|
+
level,
|
|
54
|
+
message,
|
|
55
|
+
stackTrace
|
|
56
|
+
).contentDeepHashCode()
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
companion object {
|
|
60
|
+
/**
|
|
61
|
+
* Constructor called from C++
|
|
62
|
+
*/
|
|
63
|
+
@DoNotStrip
|
|
64
|
+
@Keep
|
|
65
|
+
@Suppress("unused")
|
|
66
|
+
@JvmStatic
|
|
67
|
+
private fun fromCpp(id: Double, timestamp: Double, level: String, message: String, stackTrace: String): LogEntry {
|
|
68
|
+
return LogEntry(id, timestamp, level, message, stackTrace)
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NativeLogLevel.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.nitrobackgroundgeolocation
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Represents the JavaScript enum/union "NativeLogLevel".
|
|
15
|
+
*/
|
|
16
|
+
@DoNotStrip
|
|
17
|
+
@Keep
|
|
18
|
+
enum class NativeLogLevel(@DoNotStrip @Keep val value: Int) {
|
|
19
|
+
TRACEVALUE(0),
|
|
20
|
+
DEBUGVALUE(1),
|
|
21
|
+
INFOVALUE(2),
|
|
22
|
+
WARNVALUE(3),
|
|
23
|
+
ERRORVALUE(4);
|
|
24
|
+
|
|
25
|
+
companion object
|
|
26
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ServiceStatus.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.nitrobackgroundgeolocation
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
import java.util.Objects
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Represents the JavaScript object/struct "ServiceStatus".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class ServiceStatus(
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
val isRunning: Boolean,
|
|
24
|
+
@DoNotStrip
|
|
25
|
+
@Keep
|
|
26
|
+
val locationServicesEnabled: Boolean,
|
|
27
|
+
@DoNotStrip
|
|
28
|
+
@Keep
|
|
29
|
+
val authorization: AuthorizationStatus
|
|
30
|
+
) {
|
|
31
|
+
/* primary constructor */
|
|
32
|
+
|
|
33
|
+
override fun equals(other: Any?): Boolean {
|
|
34
|
+
if (this === other) return true
|
|
35
|
+
if (other !is ServiceStatus) return false
|
|
36
|
+
return Objects.deepEquals(this.isRunning, other.isRunning)
|
|
37
|
+
&& Objects.deepEquals(this.locationServicesEnabled, other.locationServicesEnabled)
|
|
38
|
+
&& Objects.deepEquals(this.authorization, other.authorization)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
override fun hashCode(): Int {
|
|
42
|
+
return arrayOf(
|
|
43
|
+
isRunning,
|
|
44
|
+
locationServicesEnabled,
|
|
45
|
+
authorization
|
|
46
|
+
).contentDeepHashCode()
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
companion object {
|
|
50
|
+
/**
|
|
51
|
+
* Constructor called from C++
|
|
52
|
+
*/
|
|
53
|
+
@DoNotStrip
|
|
54
|
+
@Keep
|
|
55
|
+
@Suppress("unused")
|
|
56
|
+
@JvmStatic
|
|
57
|
+
private fun fromCpp(isRunning: Boolean, locationServicesEnabled: Boolean, authorization: AuthorizationStatus): ServiceStatus {
|
|
58
|
+
return ServiceStatus(isRunning, locationServicesEnabled, authorization)
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// StationaryLocation.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.nitrobackgroundgeolocation
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
import java.util.Objects
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Represents the JavaScript object/struct "StationaryLocation".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class StationaryLocation(
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
val id: Double,
|
|
24
|
+
@DoNotStrip
|
|
25
|
+
@Keep
|
|
26
|
+
val provider: String,
|
|
27
|
+
@DoNotStrip
|
|
28
|
+
@Keep
|
|
29
|
+
val locationProvider: Double,
|
|
30
|
+
@DoNotStrip
|
|
31
|
+
@Keep
|
|
32
|
+
val time: Double,
|
|
33
|
+
@DoNotStrip
|
|
34
|
+
@Keep
|
|
35
|
+
val latitude: Double,
|
|
36
|
+
@DoNotStrip
|
|
37
|
+
@Keep
|
|
38
|
+
val longitude: Double,
|
|
39
|
+
@DoNotStrip
|
|
40
|
+
@Keep
|
|
41
|
+
val accuracy: Double,
|
|
42
|
+
@DoNotStrip
|
|
43
|
+
@Keep
|
|
44
|
+
val speed: Double,
|
|
45
|
+
@DoNotStrip
|
|
46
|
+
@Keep
|
|
47
|
+
val altitude: Double,
|
|
48
|
+
@DoNotStrip
|
|
49
|
+
@Keep
|
|
50
|
+
val altitudeAccuracy: Double,
|
|
51
|
+
@DoNotStrip
|
|
52
|
+
@Keep
|
|
53
|
+
val bearing: Double,
|
|
54
|
+
@DoNotStrip
|
|
55
|
+
@Keep
|
|
56
|
+
val isFromMockProvider: Boolean,
|
|
57
|
+
@DoNotStrip
|
|
58
|
+
@Keep
|
|
59
|
+
val mockLocationsEnabled: Boolean,
|
|
60
|
+
@DoNotStrip
|
|
61
|
+
@Keep
|
|
62
|
+
val radius: Double
|
|
63
|
+
) {
|
|
64
|
+
/* primary constructor */
|
|
65
|
+
|
|
66
|
+
override fun equals(other: Any?): Boolean {
|
|
67
|
+
if (this === other) return true
|
|
68
|
+
if (other !is StationaryLocation) return false
|
|
69
|
+
return Objects.deepEquals(this.id, other.id)
|
|
70
|
+
&& Objects.deepEquals(this.provider, other.provider)
|
|
71
|
+
&& Objects.deepEquals(this.locationProvider, other.locationProvider)
|
|
72
|
+
&& Objects.deepEquals(this.time, other.time)
|
|
73
|
+
&& Objects.deepEquals(this.latitude, other.latitude)
|
|
74
|
+
&& Objects.deepEquals(this.longitude, other.longitude)
|
|
75
|
+
&& Objects.deepEquals(this.accuracy, other.accuracy)
|
|
76
|
+
&& Objects.deepEquals(this.speed, other.speed)
|
|
77
|
+
&& Objects.deepEquals(this.altitude, other.altitude)
|
|
78
|
+
&& Objects.deepEquals(this.altitudeAccuracy, other.altitudeAccuracy)
|
|
79
|
+
&& Objects.deepEquals(this.bearing, other.bearing)
|
|
80
|
+
&& Objects.deepEquals(this.isFromMockProvider, other.isFromMockProvider)
|
|
81
|
+
&& Objects.deepEquals(this.mockLocationsEnabled, other.mockLocationsEnabled)
|
|
82
|
+
&& Objects.deepEquals(this.radius, other.radius)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
override fun hashCode(): Int {
|
|
86
|
+
return arrayOf(
|
|
87
|
+
id,
|
|
88
|
+
provider,
|
|
89
|
+
locationProvider,
|
|
90
|
+
time,
|
|
91
|
+
latitude,
|
|
92
|
+
longitude,
|
|
93
|
+
accuracy,
|
|
94
|
+
speed,
|
|
95
|
+
altitude,
|
|
96
|
+
altitudeAccuracy,
|
|
97
|
+
bearing,
|
|
98
|
+
isFromMockProvider,
|
|
99
|
+
mockLocationsEnabled,
|
|
100
|
+
radius
|
|
101
|
+
).contentDeepHashCode()
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
companion object {
|
|
105
|
+
/**
|
|
106
|
+
* Constructor called from C++
|
|
107
|
+
*/
|
|
108
|
+
@DoNotStrip
|
|
109
|
+
@Keep
|
|
110
|
+
@Suppress("unused")
|
|
111
|
+
@JvmStatic
|
|
112
|
+
private fun fromCpp(id: Double, provider: String, locationProvider: Double, time: Double, latitude: Double, longitude: Double, accuracy: Double, speed: Double, altitude: Double, altitudeAccuracy: Double, bearing: Double, isFromMockProvider: Boolean, mockLocationsEnabled: Boolean, radius: Double): StationaryLocation {
|
|
113
|
+
return StationaryLocation(id, provider, locationProvider, time, latitude, longitude, accuracy, speed, altitude, altitudeAccuracy, bearing, isFromMockProvider, mockLocationsEnabled, radius)
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Variant_NullType_AnyMap.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.nitrobackgroundgeolocation
|
|
9
|
+
|
|
10
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
11
|
+
import com.margelo.nitro.core.NullType
|
|
12
|
+
import com.margelo.nitro.core.AnyMap
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Represents the TypeScript variant "NullType | AnyMap".
|
|
16
|
+
*/
|
|
17
|
+
@Suppress("ClassName")
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
sealed class Variant_NullType_AnyMap {
|
|
20
|
+
@DoNotStrip
|
|
21
|
+
data class First(@DoNotStrip val value: NullType): Variant_NullType_AnyMap()
|
|
22
|
+
@DoNotStrip
|
|
23
|
+
data class Second(@DoNotStrip val value: AnyMap): Variant_NullType_AnyMap()
|
|
24
|
+
|
|
25
|
+
inline fun <reified T> asType(): T? {
|
|
26
|
+
return when (this) {
|
|
27
|
+
is First -> (value) as? T
|
|
28
|
+
is Second -> (value) as? T
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
inline fun <reified T> isType(): Boolean {
|
|
32
|
+
return asType<T>() != null
|
|
33
|
+
}
|
|
34
|
+
inline fun <R> match(first: (NullType) -> R, second: (AnyMap) -> R): R {
|
|
35
|
+
return when (this) {
|
|
36
|
+
is First -> first(value)
|
|
37
|
+
is Second -> second(value)
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
val isFirst: Boolean
|
|
42
|
+
get() = this is First
|
|
43
|
+
val isSecond: Boolean
|
|
44
|
+
get() = this is Second
|
|
45
|
+
|
|
46
|
+
fun asFirstOrNull(): NullType? {
|
|
47
|
+
val value = (this as? First)?.value ?: return null
|
|
48
|
+
return value
|
|
49
|
+
}
|
|
50
|
+
fun asSecondOrNull(): AnyMap? {
|
|
51
|
+
val value = (this as? Second)?.value ?: return null
|
|
52
|
+
return value
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
companion object {
|
|
56
|
+
@JvmStatic
|
|
57
|
+
@DoNotStrip
|
|
58
|
+
fun create(value: NullType): Variant_NullType_AnyMap = First(value)
|
|
59
|
+
@JvmStatic
|
|
60
|
+
@DoNotStrip
|
|
61
|
+
fun create(value: AnyMap): Variant_NullType_AnyMap = Second(value)
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Variant_NullType_Boolean.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.nitrobackgroundgeolocation
|
|
9
|
+
|
|
10
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
11
|
+
import com.margelo.nitro.core.NullType
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Represents the TypeScript variant "NullType | Boolean".
|
|
15
|
+
*/
|
|
16
|
+
@Suppress("ClassName")
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
sealed class Variant_NullType_Boolean {
|
|
19
|
+
@DoNotStrip
|
|
20
|
+
data class First(@DoNotStrip val value: NullType): Variant_NullType_Boolean()
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
data class Second(@DoNotStrip val value: Boolean): Variant_NullType_Boolean()
|
|
23
|
+
|
|
24
|
+
inline fun <reified T> asType(): T? {
|
|
25
|
+
return when (this) {
|
|
26
|
+
is First -> (value) as? T
|
|
27
|
+
is Second -> (value) as? T
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
inline fun <reified T> isType(): Boolean {
|
|
31
|
+
return asType<T>() != null
|
|
32
|
+
}
|
|
33
|
+
inline fun <R> match(first: (NullType) -> R, second: (Boolean) -> R): R {
|
|
34
|
+
return when (this) {
|
|
35
|
+
is First -> first(value)
|
|
36
|
+
is Second -> second(value)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
val isFirst: Boolean
|
|
41
|
+
get() = this is First
|
|
42
|
+
val isSecond: Boolean
|
|
43
|
+
get() = this is Second
|
|
44
|
+
|
|
45
|
+
fun asFirstOrNull(): NullType? {
|
|
46
|
+
val value = (this as? First)?.value ?: return null
|
|
47
|
+
return value
|
|
48
|
+
}
|
|
49
|
+
fun asSecondOrNull(): Boolean? {
|
|
50
|
+
val value = (this as? Second)?.value ?: return null
|
|
51
|
+
return value
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
companion object {
|
|
55
|
+
@JvmStatic
|
|
56
|
+
@DoNotStrip
|
|
57
|
+
fun create(value: NullType): Variant_NullType_Boolean = First(value)
|
|
58
|
+
@JvmStatic
|
|
59
|
+
@DoNotStrip
|
|
60
|
+
fun create(value: Boolean): Variant_NullType_Boolean = Second(value)
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Variant_NullType_Double.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.nitrobackgroundgeolocation
|
|
9
|
+
|
|
10
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
11
|
+
import com.margelo.nitro.core.NullType
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Represents the TypeScript variant "NullType | Double".
|
|
15
|
+
*/
|
|
16
|
+
@Suppress("ClassName")
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
sealed class Variant_NullType_Double {
|
|
19
|
+
@DoNotStrip
|
|
20
|
+
data class First(@DoNotStrip val value: NullType): Variant_NullType_Double()
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
data class Second(@DoNotStrip val value: Double): Variant_NullType_Double()
|
|
23
|
+
|
|
24
|
+
inline fun <reified T> asType(): T? {
|
|
25
|
+
return when (this) {
|
|
26
|
+
is First -> (value) as? T
|
|
27
|
+
is Second -> (value) as? T
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
inline fun <reified T> isType(): Boolean {
|
|
31
|
+
return asType<T>() != null
|
|
32
|
+
}
|
|
33
|
+
inline fun <R> match(first: (NullType) -> R, second: (Double) -> R): R {
|
|
34
|
+
return when (this) {
|
|
35
|
+
is First -> first(value)
|
|
36
|
+
is Second -> second(value)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
val isFirst: Boolean
|
|
41
|
+
get() = this is First
|
|
42
|
+
val isSecond: Boolean
|
|
43
|
+
get() = this is Second
|
|
44
|
+
|
|
45
|
+
fun asFirstOrNull(): NullType? {
|
|
46
|
+
val value = (this as? First)?.value ?: return null
|
|
47
|
+
return value
|
|
48
|
+
}
|
|
49
|
+
fun asSecondOrNull(): Double? {
|
|
50
|
+
val value = (this as? Second)?.value ?: return null
|
|
51
|
+
return value
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
companion object {
|
|
55
|
+
@JvmStatic
|
|
56
|
+
@DoNotStrip
|
|
57
|
+
fun create(value: NullType): Variant_NullType_Double = First(value)
|
|
58
|
+
@JvmStatic
|
|
59
|
+
@DoNotStrip
|
|
60
|
+
fun create(value: Double): Variant_NullType_Double = Second(value)
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Variant_NullType_LocationAccuracy.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.nitrobackgroundgeolocation
|
|
9
|
+
|
|
10
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
11
|
+
import com.margelo.nitro.core.NullType
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Represents the TypeScript variant "NullType | LocationAccuracy".
|
|
15
|
+
*/
|
|
16
|
+
@Suppress("ClassName")
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
sealed class Variant_NullType_LocationAccuracy {
|
|
19
|
+
@DoNotStrip
|
|
20
|
+
data class First(@DoNotStrip val value: NullType): Variant_NullType_LocationAccuracy()
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
data class Second(@DoNotStrip val value: LocationAccuracy): Variant_NullType_LocationAccuracy()
|
|
23
|
+
|
|
24
|
+
inline fun <reified T> asType(): T? {
|
|
25
|
+
return when (this) {
|
|
26
|
+
is First -> (value) as? T
|
|
27
|
+
is Second -> (value) as? T
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
inline fun <reified T> isType(): Boolean {
|
|
31
|
+
return asType<T>() != null
|
|
32
|
+
}
|
|
33
|
+
inline fun <R> match(first: (NullType) -> R, second: (LocationAccuracy) -> R): R {
|
|
34
|
+
return when (this) {
|
|
35
|
+
is First -> first(value)
|
|
36
|
+
is Second -> second(value)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
val isFirst: Boolean
|
|
41
|
+
get() = this is First
|
|
42
|
+
val isSecond: Boolean
|
|
43
|
+
get() = this is Second
|
|
44
|
+
|
|
45
|
+
fun asFirstOrNull(): NullType? {
|
|
46
|
+
val value = (this as? First)?.value ?: return null
|
|
47
|
+
return value
|
|
48
|
+
}
|
|
49
|
+
fun asSecondOrNull(): LocationAccuracy? {
|
|
50
|
+
val value = (this as? Second)?.value ?: return null
|
|
51
|
+
return value
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
companion object {
|
|
55
|
+
@JvmStatic
|
|
56
|
+
@DoNotStrip
|
|
57
|
+
fun create(value: NullType): Variant_NullType_LocationAccuracy = First(value)
|
|
58
|
+
@JvmStatic
|
|
59
|
+
@DoNotStrip
|
|
60
|
+
fun create(value: LocationAccuracy): Variant_NullType_LocationAccuracy = Second(value)
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Variant_NullType_LocationProvider.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.nitrobackgroundgeolocation
|
|
9
|
+
|
|
10
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
11
|
+
import com.margelo.nitro.core.NullType
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Represents the TypeScript variant "NullType | LocationProvider".
|
|
15
|
+
*/
|
|
16
|
+
@Suppress("ClassName")
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
sealed class Variant_NullType_LocationProvider {
|
|
19
|
+
@DoNotStrip
|
|
20
|
+
data class First(@DoNotStrip val value: NullType): Variant_NullType_LocationProvider()
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
data class Second(@DoNotStrip val value: LocationProvider): Variant_NullType_LocationProvider()
|
|
23
|
+
|
|
24
|
+
inline fun <reified T> asType(): T? {
|
|
25
|
+
return when (this) {
|
|
26
|
+
is First -> (value) as? T
|
|
27
|
+
is Second -> (value) as? T
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
inline fun <reified T> isType(): Boolean {
|
|
31
|
+
return asType<T>() != null
|
|
32
|
+
}
|
|
33
|
+
inline fun <R> match(first: (NullType) -> R, second: (LocationProvider) -> R): R {
|
|
34
|
+
return when (this) {
|
|
35
|
+
is First -> first(value)
|
|
36
|
+
is Second -> second(value)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
val isFirst: Boolean
|
|
41
|
+
get() = this is First
|
|
42
|
+
val isSecond: Boolean
|
|
43
|
+
get() = this is Second
|
|
44
|
+
|
|
45
|
+
fun asFirstOrNull(): NullType? {
|
|
46
|
+
val value = (this as? First)?.value ?: return null
|
|
47
|
+
return value
|
|
48
|
+
}
|
|
49
|
+
fun asSecondOrNull(): LocationProvider? {
|
|
50
|
+
val value = (this as? Second)?.value ?: return null
|
|
51
|
+
return value
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
companion object {
|
|
55
|
+
@JvmStatic
|
|
56
|
+
@DoNotStrip
|
|
57
|
+
fun create(value: NullType): Variant_NullType_LocationProvider = First(value)
|
|
58
|
+
@JvmStatic
|
|
59
|
+
@DoNotStrip
|
|
60
|
+
fun create(value: LocationProvider): Variant_NullType_LocationProvider = Second(value)
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Variant_NullType_Map_String__String_.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.nitrobackgroundgeolocation
|
|
9
|
+
|
|
10
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
11
|
+
import com.margelo.nitro.core.NullType
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Represents the TypeScript variant "NullType | Map<String, String>".
|
|
15
|
+
*/
|
|
16
|
+
@Suppress("ClassName")
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
sealed class Variant_NullType_Map_String__String_ {
|
|
19
|
+
@DoNotStrip
|
|
20
|
+
data class First(@DoNotStrip val value: NullType): Variant_NullType_Map_String__String_()
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
data class Second(@DoNotStrip val value: Map<String, String>): Variant_NullType_Map_String__String_()
|
|
23
|
+
|
|
24
|
+
inline fun <reified T> asType(): T? {
|
|
25
|
+
return when (this) {
|
|
26
|
+
is First -> (value) as? T
|
|
27
|
+
is Second -> (value) as? T
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
inline fun <reified T> isType(): Boolean {
|
|
31
|
+
return asType<T>() != null
|
|
32
|
+
}
|
|
33
|
+
inline fun <R> match(first: (NullType) -> R, second: (Map<String, String>) -> R): R {
|
|
34
|
+
return when (this) {
|
|
35
|
+
is First -> first(value)
|
|
36
|
+
is Second -> second(value)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
val isFirst: Boolean
|
|
41
|
+
get() = this is First
|
|
42
|
+
val isSecond: Boolean
|
|
43
|
+
get() = this is Second
|
|
44
|
+
|
|
45
|
+
fun asFirstOrNull(): NullType? {
|
|
46
|
+
val value = (this as? First)?.value ?: return null
|
|
47
|
+
return value
|
|
48
|
+
}
|
|
49
|
+
fun asSecondOrNull(): Map<String, String>? {
|
|
50
|
+
val value = (this as? Second)?.value ?: return null
|
|
51
|
+
return value
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
companion object {
|
|
55
|
+
@JvmStatic
|
|
56
|
+
@DoNotStrip
|
|
57
|
+
fun create(value: NullType): Variant_NullType_Map_String__String_ = First(value)
|
|
58
|
+
@JvmStatic
|
|
59
|
+
@DoNotStrip
|
|
60
|
+
fun create(value: Map<String, String>): Variant_NullType_Map_String__String_ = Second(value)
|
|
61
|
+
}
|
|
62
|
+
}
|