react-native-audio-browser 0.2.0-next.1 → 0.2.0-next.11
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/README.md +22 -18
- package/android/build.gradle +13 -10
- package/android/gradle.properties +2 -2
- package/android/src/main/AndroidManifest.xml +3 -1
- package/android/src/main/java/com/audiobrowser/AudioBrowser.kt +76 -21
- package/android/src/main/java/com/audiobrowser/AudioBrowserLifecycleModule.kt +38 -0
- package/android/src/main/java/com/audiobrowser/AudioBrowserPackage.kt +18 -2
- package/android/src/main/java/com/audiobrowser/ServiceBinding.kt +48 -0
- package/android/src/main/java/com/audiobrowser/browser/BrowserManager.kt +1 -2
- package/android/src/main/java/com/audiobrowser/browser/BrowserUrlResolution.kt +1 -2
- package/android/src/main/java/com/audiobrowser/browser/SectionScope.kt +6 -7
- package/android/src/main/java/com/audiobrowser/http/HttpClient.kt +20 -3
- package/android/src/main/java/com/audiobrowser/model/PlayerUpdateOptions.kt +11 -11
- package/android/src/main/java/com/audiobrowser/player/CapabilityControls.kt +111 -58
- package/android/src/main/java/com/audiobrowser/player/MediaSessionCallback.kt +9 -5
- package/android/src/main/java/com/audiobrowser/player/MediaSessionCommandManager.kt +218 -252
- package/android/src/main/java/com/audiobrowser/player/NowPlayingUpdater.kt +0 -1
- package/android/src/main/java/com/audiobrowser/player/PlaybackStateStore.kt +2 -4
- package/android/src/main/java/com/audiobrowser/player/Player.kt +30 -8
- package/android/src/main/java/com/audiobrowser/player/RetryLoadErrorHandlingPolicy.kt +2 -1
- package/android/src/main/java/com/audiobrowser/player/TransformingDataSource.kt +2 -1
- package/android/src/main/java/com/audiobrowser/tls/AiaCertChaser.kt +67 -11
- package/android/src/main/java/com/audiobrowser/tls/AiaChasingExtendedTrustManager.kt +168 -0
- package/android/src/main/java/com/audiobrowser/tls/AiaChasingTrustManager.kt +58 -14
- package/android/src/main/java/com/audiobrowser/tls/AiaTls.kt +35 -7
- package/android/src/main/java/com/audiobrowser/tls/CachingCertificateFetcher.kt +278 -59
- package/android/src/main/java/com/audiobrowser/util/ArtworkVariant.kt +7 -9
- package/android/src/main/java/com/audiobrowser/util/TrackFactory.kt +8 -7
- package/android/src/test/java/com/audiobrowser/ServiceBindingTest.kt +87 -0
- package/android/src/test/java/com/audiobrowser/TestFixtures.kt +52 -1
- package/android/src/test/java/com/audiobrowser/browser/BrowserManagerLayerResolutionTest.kt +6 -0
- package/android/src/test/java/com/audiobrowser/browser/BrowserManagerTest.kt +167 -8
- package/android/src/test/java/com/audiobrowser/browser/JsonArtworkTest.kt +2 -1
- package/android/src/test/java/com/audiobrowser/browser/SectionScopeTest.kt +2 -4
- package/android/src/test/java/com/audiobrowser/player/CapabilityControlsTest.kt +100 -56
- package/android/src/test/java/com/audiobrowser/player/MediaSessionSlotMappingTest.kt +45 -0
- package/android/src/test/java/com/audiobrowser/player/PlaybackErrorClassifierTest.kt +3 -4
- package/android/src/test/java/com/audiobrowser/player/RetryLoadErrorHandlingPolicyTest.kt +3 -3
- package/android/src/test/java/com/audiobrowser/tls/AiaCertChaserTest.kt +197 -7
- package/android/src/test/java/com/audiobrowser/tls/AiaChasingTrustManagerTest.kt +325 -4
- package/android/src/test/java/com/audiobrowser/tls/CachingCertificateFetcherCallSiteTest.kt +322 -0
- package/android/src/test/java/com/audiobrowser/tls/CachingCertificateFetcherTest.kt +83 -0
- package/ios/Browser/BrowserManager.swift +2 -27
- package/ios/Browser/SearchDrillIn.swift +1 -1
- package/ios/CarPlay/RNABMediaAddHandler.swift +6 -6
- package/ios/CarPlay/RNABMediaAffinityHandler.swift +2 -2
- package/ios/CarPlay/RNABMediaIntentHandler.swift +16 -16
- package/ios/HybridAudioBrowser.swift +87 -56
- package/ios/Model/NitroTypeStubs.swift +18 -2
- package/ios/Model/RemoteCommand.swift +18 -0
- package/ios/Model/TrackPlayerError.swift +2 -2
- package/ios/Option/SessionCategories.swift +3 -2
- package/ios/Player/MediaIntentCriteria.swift +4 -4
- package/ios/Player/MediaLoader.swift +3 -1
- package/ios/Player/PlaybackCoordinator.swift +4 -1
- package/ios/Player/PlaybackErrorHandler.swift +4 -4
- package/ios/Player/QueueManager.swift +10 -3
- package/ios/Player/RetryManager.swift +79 -18
- package/ios/Player/ShuffleOrder.swift +10 -0
- package/ios/Player/SleepTimerManager.swift +43 -15
- package/ios/RemoteCommand/RemoteCommandCallbacks.swift +47 -0
- package/ios/RemoteCommand/RemoteCommandController.swift +9 -6
- package/ios/Tests/LRUCacheTests.swift +111 -0
- package/ios/Tests/LoadSeekCoordinatorTests.swift +3 -1
- package/ios/Tests/MediaIntentCriteriaTests.swift +2 -2
- package/ios/Tests/MediaLoaderTests.swift +10 -13
- package/ios/Tests/PlaybackCoordinatorTests.swift +10 -7
- package/ios/Tests/PlaybackErrorHandlerTests.swift +3 -1
- package/ios/Tests/PlayerTimeObserverTests.swift +37 -0
- package/ios/Tests/QueueManagerTests.swift +50 -4
- package/ios/Tests/RemoteCommandControllerTests.swift +156 -0
- package/ios/Tests/RemoteCommandTests.swift +67 -0
- package/ios/Tests/RetryManagerTests.swift +89 -0
- package/ios/Tests/SectionScopeTests.swift +2 -2
- package/ios/Tests/SleepTimerManagerTests.swift +22 -19
- package/ios/Tests/Support/ManualSleepTimerScheduler.swift +47 -0
- package/ios/Tests/Support/TestTypes.swift +1 -1
- package/ios/Tests/TabBarEntriesTests.swift +7 -7
- package/ios/TrackPlayer.swift +6 -1
- package/ios/TrackPlayerCallbacks.swift +5 -38
- package/ios/Util/LRUCache.swift +4 -1
- package/lib/commonjs/AudioBrowser.js +0 -11
- package/lib/commonjs/AudioBrowser.js.map +1 -1
- package/lib/commonjs/CLAUDE.md +52 -0
- package/lib/commonjs/features/browser.js +1 -1
- package/lib/commonjs/features/browser.js.map +1 -1
- package/lib/commonjs/features/carConnection.js +1 -1
- package/lib/commonjs/features/equalizer.js +1 -1
- package/lib/commonjs/features/errors.js +3 -3
- package/lib/commonjs/features/favorites.js +1 -1
- package/lib/commonjs/features/gate.js +16 -1
- package/lib/commonjs/features/gate.js.map +1 -1
- package/lib/commonjs/features/metadata.js +20 -3
- package/lib/commonjs/features/metadata.js.map +1 -1
- package/lib/commonjs/features/network.js +1 -1
- package/lib/commonjs/features/nowPlaying.js +1 -1
- package/lib/commonjs/features/output.js +1 -1
- package/lib/commonjs/features/playback/playWhenReady.js +1 -1
- package/lib/commonjs/features/playback/playing.js +1 -1
- package/lib/commonjs/features/playback/progress.js +1 -1
- package/lib/commonjs/features/playback/state.js +1 -1
- package/lib/commonjs/features/playback/trackPlaybackTime.js +0 -6
- package/lib/commonjs/features/playback/trackPlaybackTime.js.map +1 -1
- package/lib/commonjs/features/playback/volume.js +1 -1
- package/lib/commonjs/features/player/options.js +48 -34
- package/lib/commonjs/features/player/options.js.map +1 -1
- package/lib/commonjs/features/player/setup.js +15 -8
- package/lib/commonjs/features/player/setup.js.map +1 -1
- package/lib/commonjs/features/player/validateOptions.js +21 -0
- package/lib/commonjs/features/player/validateOptions.js.map +1 -0
- package/lib/commonjs/features/queue/activeTrack.js +1 -1
- package/lib/commonjs/features/queue/queue.js +2 -2
- package/lib/commonjs/features/queue/repeatMode.js +1 -1
- package/lib/commonjs/features/queue/shuffle.js +1 -1
- package/lib/commonjs/features/remoteControls.js +13 -92
- package/lib/commonjs/features/remoteControls.js.map +1 -1
- package/lib/commonjs/features/sleepTimer.js +13 -1
- package/lib/commonjs/features/sleepTimer.js.map +1 -1
- package/lib/commonjs/test-utils/reactNativeStub.js +65 -0
- package/lib/commonjs/test-utils/reactNativeStub.js.map +1 -0
- package/lib/commonjs/utils/LazyNativeEmitter.js +8 -5
- package/lib/commonjs/utils/LazyNativeEmitter.js.map +1 -1
- package/lib/commonjs/web/NativeAudioBrowser.js +1 -1
- package/lib/commonjs/web/NativeAudioBrowser.js.map +1 -1
- package/lib/commonjs/web/browser/BrowserManager.js +1 -1
- package/lib/module/AudioBrowser.js +1 -1
- package/lib/module/AudioBrowser.js.map +1 -1
- package/lib/module/CLAUDE.md +52 -0
- package/lib/module/features/browser.js +1 -1
- package/lib/module/features/browser.js.map +1 -1
- package/lib/module/features/carConnection.js +1 -1
- package/lib/module/features/equalizer.js +1 -1
- package/lib/module/features/errors.js +3 -3
- package/lib/module/features/favorites.js +1 -1
- package/lib/module/features/gate.js +16 -1
- package/lib/module/features/gate.js.map +1 -1
- package/lib/module/features/metadata.js +20 -3
- package/lib/module/features/metadata.js.map +1 -1
- package/lib/module/features/network.js +1 -1
- package/lib/module/features/nowPlaying.js +1 -1
- package/lib/module/features/output.js +1 -1
- package/lib/module/features/playback/playWhenReady.js +1 -1
- package/lib/module/features/playback/playing.js +1 -1
- package/lib/module/features/playback/progress.js +1 -1
- package/lib/module/features/playback/state.js +1 -1
- package/lib/module/features/playback/trackPlaybackTime.js +0 -5
- package/lib/module/features/playback/trackPlaybackTime.js.map +1 -1
- package/lib/module/features/playback/volume.js +1 -1
- package/lib/module/features/player/options.js +47 -32
- package/lib/module/features/player/options.js.map +1 -1
- package/lib/module/features/player/setup.js +14 -7
- package/lib/module/features/player/setup.js.map +1 -1
- package/lib/module/features/player/validateOptions.js +17 -0
- package/lib/module/features/player/validateOptions.js.map +1 -0
- package/lib/module/features/queue/activeTrack.js +1 -1
- package/lib/module/features/queue/queue.js +2 -2
- package/lib/module/features/queue/repeatMode.js +1 -1
- package/lib/module/features/queue/shuffle.js +1 -1
- package/lib/module/features/remoteControls.js +13 -92
- package/lib/module/features/remoteControls.js.map +1 -1
- package/lib/module/features/sleepTimer.js +13 -1
- package/lib/module/features/sleepTimer.js.map +1 -1
- package/lib/module/test-utils/reactNativeStub.js +58 -0
- package/lib/module/test-utils/reactNativeStub.js.map +1 -0
- package/lib/module/utils/LazyNativeEmitter.js +8 -5
- package/lib/module/utils/LazyNativeEmitter.js.map +1 -1
- package/lib/module/web/NativeAudioBrowser.js +1 -1
- package/lib/module/web/NativeAudioBrowser.js.map +1 -1
- package/lib/module/web/browser/BrowserManager.js +1 -1
- package/lib/typescript/src/AudioBrowser.d.ts +0 -1
- package/lib/typescript/src/AudioBrowser.d.ts.map +1 -1
- package/lib/typescript/src/features/carConnection.d.ts +1 -1
- package/lib/typescript/src/features/equalizer.d.ts +1 -1
- package/lib/typescript/src/features/errors.d.ts +3 -3
- package/lib/typescript/src/features/favorites.d.ts +1 -1
- package/lib/typescript/src/features/gate.d.ts +18 -2
- package/lib/typescript/src/features/gate.d.ts.map +1 -1
- package/lib/typescript/src/features/metadata.d.ts +20 -3
- package/lib/typescript/src/features/metadata.d.ts.map +1 -1
- package/lib/typescript/src/features/network.d.ts +1 -1
- package/lib/typescript/src/features/nowPlaying.d.ts +1 -1
- package/lib/typescript/src/features/output.d.ts +1 -1
- package/lib/typescript/src/features/playback/playWhenReady.d.ts +1 -1
- package/lib/typescript/src/features/playback/playing.d.ts +1 -1
- package/lib/typescript/src/features/playback/progress.d.ts +1 -1
- package/lib/typescript/src/features/playback/state.d.ts +1 -1
- package/lib/typescript/src/features/playback/volume.d.ts +1 -1
- package/lib/typescript/src/features/player/options.d.ts +87 -37
- package/lib/typescript/src/features/player/options.d.ts.map +1 -1
- package/lib/typescript/src/features/player/setup.d.ts +14 -4
- package/lib/typescript/src/features/player/setup.d.ts.map +1 -1
- package/lib/typescript/src/features/player/validateOptions.d.ts +9 -0
- package/lib/typescript/src/features/player/validateOptions.d.ts.map +1 -0
- package/lib/typescript/src/features/queue/activeTrack.d.ts +1 -1
- package/lib/typescript/src/features/queue/queue.d.ts +2 -2
- package/lib/typescript/src/features/queue/repeatMode.d.ts +1 -1
- package/lib/typescript/src/features/queue/shuffle.d.ts +1 -1
- package/lib/typescript/src/features/remoteControls.d.ts +23 -22
- package/lib/typescript/src/features/remoteControls.d.ts.map +1 -1
- package/lib/typescript/src/features/sleepTimer.d.ts +1 -1
- package/lib/typescript/src/features/sleepTimer.d.ts.map +1 -1
- package/lib/typescript/src/test-utils/reactNativeStub.d.ts +36 -0
- package/lib/typescript/src/test-utils/reactNativeStub.d.ts.map +1 -0
- package/lib/typescript/src/utils/LazyNativeEmitter.d.ts +8 -4
- package/lib/typescript/src/utils/LazyNativeEmitter.d.ts.map +1 -1
- package/nitrogen/generated/android/AudioBrowser+autolinking.cmake +1 -1
- package/nitrogen/generated/android/c++/JAndroidOptions.hpp +10 -10
- package/nitrogen/generated/android/c++/JFunc_void_Options.hpp +5 -5
- package/nitrogen/generated/android/c++/JHybridAudioBrowserSpec.cpp +11 -11
- package/nitrogen/generated/android/c++/JHybridAudioBrowserSpec.hpp +1 -1
- package/nitrogen/generated/android/c++/JNativeSetupPlayerOptions.hpp +5 -5
- package/nitrogen/generated/android/c++/JNativeUpdateOptions.hpp +5 -5
- package/nitrogen/generated/android/c++/JNitroAndroidUpdateOptions.hpp +10 -10
- package/nitrogen/generated/android/c++/JOptions.hpp +5 -5
- package/nitrogen/generated/android/c++/{JNotificationButton.hpp → JRemoteButton.hpp} +19 -19
- package/nitrogen/generated/android/c++/JRemoteButtonLayout.hpp +86 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_RemoteButtonLayout.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_RemoteButtonLayout.hpp +75 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/AndroidOptions.kt +3 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/HybridAudioBrowserSpec.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/NitroAndroidUpdateOptions.kt +3 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/{NotificationButton.kt → RemoteButton.kt} +3 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/RemoteButtonLayout.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/{Variant_NullType_NotificationButtonLayout.kt → Variant_NullType_RemoteButtonLayout.kt} +9 -9
- package/nitrogen/generated/ios/AudioBrowser-Swift-Cxx-Bridge.hpp +36 -51
- package/nitrogen/generated/ios/AudioBrowser-Swift-Cxx-Umbrella.hpp +6 -6
- package/nitrogen/generated/ios/c++/HybridAudioBrowserSpecSwift.hpp +8 -8
- package/nitrogen/generated/ios/swift/AndroidOptions.swift +12 -12
- package/nitrogen/generated/ios/swift/HybridAudioBrowserSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridAudioBrowserSpec_cxx.swift +2 -2
- package/nitrogen/generated/ios/swift/NitroAndroidUpdateOptions.swift +12 -12
- package/nitrogen/generated/ios/swift/{NotificationButton.swift → RemoteButton.swift} +6 -6
- package/nitrogen/generated/ios/swift/RemoteButtonLayout.swift +57 -0
- package/nitrogen/generated/ios/swift/{Variant_NullType_NotificationButtonLayout.swift → Variant_NullType_RemoteButtonLayout.swift} +3 -3
- package/nitrogen/generated/shared/c++/AndroidOptions.hpp +8 -8
- package/nitrogen/generated/shared/c++/HybridAudioBrowserSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridAudioBrowserSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/NitroAndroidUpdateOptions.hpp +8 -8
- package/nitrogen/generated/shared/c++/{NotificationButton.hpp → RemoteButton.hpp} +19 -19
- package/nitrogen/generated/shared/c++/RemoteButtonLayout.hpp +94 -0
- package/package.json +12 -4
- package/src/AudioBrowser.ts +1 -1
- package/src/CLAUDE.md +52 -0
- package/src/features/battery.test.ts +79 -0
- package/src/features/browser.ts +1 -1
- package/src/features/carConnection.ts +1 -1
- package/src/features/equalizer.ts +1 -1
- package/src/features/errors.ts +3 -3
- package/src/features/favorites.ts +1 -1
- package/src/features/gate.ts +16 -1
- package/src/features/hook-wiring.test.ts +254 -0
- package/src/features/metadata.ts +20 -3
- package/src/features/network.ts +1 -1
- package/src/features/nowPlaying.ts +1 -1
- package/src/features/output.ts +1 -1
- package/src/features/playback/playWhenReady.ts +1 -1
- package/src/features/playback/playing.ts +1 -1
- package/src/features/playback/progress.test.ts +169 -0
- package/src/features/playback/progress.ts +1 -1
- package/src/features/playback/state.ts +1 -1
- package/src/features/playback/trackPlaybackTime.test.ts +16 -6
- package/src/features/playback/trackPlaybackTime.ts +0 -5
- package/src/features/playback/volume.ts +1 -1
- package/src/features/player/options.ts +99 -57
- package/src/features/player/setup.test.ts +12 -4
- package/src/features/player/setup.ts +19 -9
- package/src/features/player/validateOptions.ts +19 -0
- package/src/features/queue/activeTrack.ts +1 -1
- package/src/features/queue/queue.ts +2 -2
- package/src/features/queue/repeatMode.ts +1 -1
- package/src/features/queue/shuffle.ts +1 -1
- package/src/features/remoteControls.ts +13 -92
- package/src/features/sleepTimer.test.ts +172 -0
- package/src/features/sleepTimer.ts +9 -1
- package/src/nitro-stub-drift.test.ts +237 -0
- package/src/public-surface.test.ts +107 -0
- package/src/specs/audio-browser.nitro.ts +1 -1
- package/src/test-utils/reactNativeStub.ts +60 -0
- package/src/utils/LazyNativeEmitter.ts +9 -6
- package/src/utils/useDebug.test.ts +182 -0
- package/src/utils/useNativeUpdatedValue.test.ts +103 -0
- package/src/web/NativeAudioBrowser.ts +1 -1
- package/src/web/browser/BrowserManager.ts +1 -1
- package/ios/Model/MediaURL.swift +0 -67
- package/nitrogen/generated/android/c++/JNotificationButtonLayout.hpp +0 -94
- package/nitrogen/generated/android/c++/JVariant_NullType_NotificationButtonLayout.cpp +0 -26
- package/nitrogen/generated/android/c++/JVariant_NullType_NotificationButtonLayout.hpp +0 -75
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/NotificationButtonLayout.kt +0 -50
- package/nitrogen/generated/ios/swift/NotificationButtonLayout.swift +0 -92
- package/nitrogen/generated/shared/c++/NotificationButtonLayout.hpp +0 -102
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
#include "AppKilledPlaybackBehavior.hpp"
|
|
21
21
|
#include "JAppKilledPlaybackBehavior.hpp"
|
|
22
22
|
#include <NitroModules/Null.hpp>
|
|
23
|
-
#include "
|
|
23
|
+
#include "RemoteButtonLayout.hpp"
|
|
24
24
|
#include <variant>
|
|
25
|
-
#include "
|
|
25
|
+
#include "JVariant_NullType_RemoteButtonLayout.hpp"
|
|
26
26
|
#include <NitroModules/JNull.hpp>
|
|
27
|
-
#include "
|
|
28
|
-
#include "
|
|
29
|
-
#include "
|
|
27
|
+
#include "JRemoteButtonLayout.hpp"
|
|
28
|
+
#include "RemoteButton.hpp"
|
|
29
|
+
#include "JRemoteButton.hpp"
|
|
30
30
|
#include <vector>
|
|
31
31
|
#include "JVariant_NullType_Double.hpp"
|
|
32
32
|
#include "PlayerCapabilities.hpp"
|
|
@@ -127,10 +127,10 @@ namespace margelo::nitro::audiobrowser { struct Options; }
|
|
|
127
127
|
namespace margelo::nitro::audiobrowser { struct AndroidOptions; }
|
|
128
128
|
// Forward declaration of `AppKilledPlaybackBehavior` to properly resolve imports.
|
|
129
129
|
namespace margelo::nitro::audiobrowser { enum class AppKilledPlaybackBehavior; }
|
|
130
|
-
// Forward declaration of `
|
|
131
|
-
namespace margelo::nitro::audiobrowser { struct
|
|
132
|
-
// Forward declaration of `
|
|
133
|
-
namespace margelo::nitro::audiobrowser { enum class
|
|
130
|
+
// Forward declaration of `RemoteButtonLayout` to properly resolve imports.
|
|
131
|
+
namespace margelo::nitro::audiobrowser { struct RemoteButtonLayout; }
|
|
132
|
+
// Forward declaration of `RemoteButton` to properly resolve imports.
|
|
133
|
+
namespace margelo::nitro::audiobrowser { enum class RemoteButton; }
|
|
134
134
|
// Forward declaration of `PlayerCapabilities` to properly resolve imports.
|
|
135
135
|
namespace margelo::nitro::audiobrowser { struct PlayerCapabilities; }
|
|
136
136
|
// Forward declaration of `FavoriteConfig` to properly resolve imports.
|
|
@@ -370,11 +370,11 @@ namespace margelo::nitro::audiobrowser { struct RetryConfig; }
|
|
|
370
370
|
#include "JAndroidOptions.hpp"
|
|
371
371
|
#include "AppKilledPlaybackBehavior.hpp"
|
|
372
372
|
#include "JAppKilledPlaybackBehavior.hpp"
|
|
373
|
-
#include "
|
|
374
|
-
#include "
|
|
375
|
-
#include "
|
|
376
|
-
#include "
|
|
377
|
-
#include "
|
|
373
|
+
#include "RemoteButtonLayout.hpp"
|
|
374
|
+
#include "JVariant_NullType_RemoteButtonLayout.hpp"
|
|
375
|
+
#include "JRemoteButtonLayout.hpp"
|
|
376
|
+
#include "RemoteButton.hpp"
|
|
377
|
+
#include "JRemoteButton.hpp"
|
|
378
378
|
#include "JVariant_NullType_Double.hpp"
|
|
379
379
|
#include "PlayerCapabilities.hpp"
|
|
380
380
|
#include "JPlayerCapabilities.hpp"
|
|
@@ -1453,8 +1453,8 @@ namespace margelo::nitro::audiobrowser {
|
|
|
1453
1453
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JTrack> /* track */)>("navigateTrack");
|
|
1454
1454
|
method(_javaPart, JTrack::fromCpp(track));
|
|
1455
1455
|
}
|
|
1456
|
-
std::shared_ptr<Promise<std::vector<Track>>> JHybridAudioBrowserSpec::
|
|
1457
|
-
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JPromise::javaobject>(jni::alias_ref<jni::JString> /* query */)>("
|
|
1456
|
+
std::shared_ptr<Promise<std::vector<Track>>> JHybridAudioBrowserSpec::search(const std::string& query) {
|
|
1457
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JPromise::javaobject>(jni::alias_ref<jni::JString> /* query */)>("search");
|
|
1458
1458
|
auto __result = method(_javaPart, jni::make_jstring(query));
|
|
1459
1459
|
return [&]() {
|
|
1460
1460
|
auto __promise = Promise<std::vector<Track>>::create();
|
|
@@ -169,7 +169,7 @@ namespace margelo::nitro::audiobrowser {
|
|
|
169
169
|
// Methods
|
|
170
170
|
void navigatePath(const std::string& path) override;
|
|
171
171
|
void navigateTrack(const Track& track) override;
|
|
172
|
-
std::shared_ptr<Promise<std::vector<Track>>>
|
|
172
|
+
std::shared_ptr<Promise<std::vector<Track>>> search(const std::string& query) override;
|
|
173
173
|
std::optional<ResolvedTrack> getContent() override;
|
|
174
174
|
std::optional<NavigationError> getNavigationError() override;
|
|
175
175
|
std::optional<FormattedNavigationError> getFormattedNavigationError() override;
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
#include "JNativeUpdateOptions.hpp"
|
|
49
49
|
#include "JNitroAndroidUpdateOptions.hpp"
|
|
50
50
|
#include "JNitroIOSUpdateOptions.hpp"
|
|
51
|
-
#include "JNotificationButton.hpp"
|
|
52
|
-
#include "JNotificationButtonLayout.hpp"
|
|
53
51
|
#include "JNowPlayingUpdate.hpp"
|
|
54
52
|
#include "JPlaybackError.hpp"
|
|
55
53
|
#include "JPlaybackErrorKind.hpp"
|
|
56
54
|
#include "JPlayerCapabilities.hpp"
|
|
55
|
+
#include "JRemoteButton.hpp"
|
|
56
|
+
#include "JRemoteButtonLayout.hpp"
|
|
57
57
|
#include "JRepeatMode.hpp"
|
|
58
58
|
#include "JRetryConfig.hpp"
|
|
59
59
|
#include "JStallReason.hpp"
|
|
@@ -65,19 +65,19 @@
|
|
|
65
65
|
#include "JVariant_Boolean_FavoriteConfig.hpp"
|
|
66
66
|
#include "JVariant_Boolean_RetryConfig.hpp"
|
|
67
67
|
#include "JVariant_NullType_Double.hpp"
|
|
68
|
-
#include "
|
|
68
|
+
#include "JVariant_NullType_RemoteButtonLayout.hpp"
|
|
69
69
|
#include "JVariant_String_ArtworkVariants.hpp"
|
|
70
70
|
#include "NativeAndroidSetupOptions.hpp"
|
|
71
71
|
#include "NativeIOSSetupOptions.hpp"
|
|
72
72
|
#include "NativeUpdateOptions.hpp"
|
|
73
73
|
#include "NitroAndroidUpdateOptions.hpp"
|
|
74
74
|
#include "NitroIOSUpdateOptions.hpp"
|
|
75
|
-
#include "NotificationButton.hpp"
|
|
76
|
-
#include "NotificationButtonLayout.hpp"
|
|
77
75
|
#include "NowPlayingUpdate.hpp"
|
|
78
76
|
#include "PlaybackError.hpp"
|
|
79
77
|
#include "PlaybackErrorKind.hpp"
|
|
80
78
|
#include "PlayerCapabilities.hpp"
|
|
79
|
+
#include "RemoteButton.hpp"
|
|
80
|
+
#include "RemoteButtonLayout.hpp"
|
|
81
81
|
#include "RepeatMode.hpp"
|
|
82
82
|
#include "RetryConfig.hpp"
|
|
83
83
|
#include "StallReason.hpp"
|
|
@@ -20,17 +20,17 @@
|
|
|
20
20
|
#include "JFavoritesMatchMode.hpp"
|
|
21
21
|
#include "JNitroAndroidUpdateOptions.hpp"
|
|
22
22
|
#include "JNitroIOSUpdateOptions.hpp"
|
|
23
|
-
#include "JNotificationButton.hpp"
|
|
24
|
-
#include "JNotificationButtonLayout.hpp"
|
|
25
23
|
#include "JPlayerCapabilities.hpp"
|
|
24
|
+
#include "JRemoteButton.hpp"
|
|
25
|
+
#include "JRemoteButtonLayout.hpp"
|
|
26
26
|
#include "JVariant_Boolean_FavoriteConfig.hpp"
|
|
27
27
|
#include "JVariant_NullType_Double.hpp"
|
|
28
|
-
#include "
|
|
28
|
+
#include "JVariant_NullType_RemoteButtonLayout.hpp"
|
|
29
29
|
#include "NitroAndroidUpdateOptions.hpp"
|
|
30
30
|
#include "NitroIOSUpdateOptions.hpp"
|
|
31
|
-
#include "NotificationButton.hpp"
|
|
32
|
-
#include "NotificationButtonLayout.hpp"
|
|
33
31
|
#include "PlayerCapabilities.hpp"
|
|
32
|
+
#include "RemoteButton.hpp"
|
|
33
|
+
#include "RemoteButtonLayout.hpp"
|
|
34
34
|
#include <NitroModules/JNull.hpp>
|
|
35
35
|
#include <NitroModules/Null.hpp>
|
|
36
36
|
#include <optional>
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
|
|
13
13
|
#include "AppKilledPlaybackBehavior.hpp"
|
|
14
14
|
#include "JAppKilledPlaybackBehavior.hpp"
|
|
15
|
-
#include "
|
|
16
|
-
#include "
|
|
17
|
-
#include "
|
|
18
|
-
#include "
|
|
19
|
-
#include "
|
|
15
|
+
#include "JRemoteButton.hpp"
|
|
16
|
+
#include "JRemoteButtonLayout.hpp"
|
|
17
|
+
#include "JVariant_NullType_RemoteButtonLayout.hpp"
|
|
18
|
+
#include "RemoteButton.hpp"
|
|
19
|
+
#include "RemoteButtonLayout.hpp"
|
|
20
20
|
#include <NitroModules/JNull.hpp>
|
|
21
21
|
#include <NitroModules/Null.hpp>
|
|
22
22
|
#include <optional>
|
|
@@ -46,12 +46,12 @@ namespace margelo::nitro::audiobrowser {
|
|
|
46
46
|
jni::local_ref<JAppKilledPlaybackBehavior> appKilledPlaybackBehavior = this->getFieldValue(fieldAppKilledPlaybackBehavior);
|
|
47
47
|
static const auto fieldSkipSilence = clazz->getField<jni::JBoolean>("skipSilence");
|
|
48
48
|
jni::local_ref<jni::JBoolean> skipSilence = this->getFieldValue(fieldSkipSilence);
|
|
49
|
-
static const auto
|
|
50
|
-
jni::local_ref<
|
|
49
|
+
static const auto fieldRemoteButtonLayout = clazz->getField<JVariant_NullType_RemoteButtonLayout>("remoteButtonLayout");
|
|
50
|
+
jni::local_ref<JVariant_NullType_RemoteButtonLayout> remoteButtonLayout = this->getFieldValue(fieldRemoteButtonLayout);
|
|
51
51
|
return NitroAndroidUpdateOptions(
|
|
52
52
|
appKilledPlaybackBehavior != nullptr ? std::make_optional(appKilledPlaybackBehavior->toCpp()) : std::nullopt,
|
|
53
53
|
skipSilence != nullptr ? std::make_optional(static_cast<bool>(skipSilence->value())) : std::nullopt,
|
|
54
|
-
|
|
54
|
+
remoteButtonLayout != nullptr ? std::make_optional(remoteButtonLayout->toCpp()) : std::nullopt
|
|
55
55
|
);
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -61,14 +61,14 @@ namespace margelo::nitro::audiobrowser {
|
|
|
61
61
|
*/
|
|
62
62
|
[[maybe_unused]]
|
|
63
63
|
static jni::local_ref<JNitroAndroidUpdateOptions::javaobject> fromCpp(const NitroAndroidUpdateOptions& value) {
|
|
64
|
-
using JSignature = JNitroAndroidUpdateOptions(jni::alias_ref<JAppKilledPlaybackBehavior>, jni::alias_ref<jni::JBoolean>, jni::alias_ref<
|
|
64
|
+
using JSignature = JNitroAndroidUpdateOptions(jni::alias_ref<JAppKilledPlaybackBehavior>, jni::alias_ref<jni::JBoolean>, jni::alias_ref<JVariant_NullType_RemoteButtonLayout>);
|
|
65
65
|
static const auto clazz = javaClassStatic();
|
|
66
66
|
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
67
67
|
return create(
|
|
68
68
|
clazz,
|
|
69
69
|
value.appKilledPlaybackBehavior.has_value() ? JAppKilledPlaybackBehavior::fromCpp(value.appKilledPlaybackBehavior.value()) : nullptr,
|
|
70
70
|
value.skipSilence.has_value() ? jni::JBoolean::valueOf(value.skipSilence.value()) : nullptr,
|
|
71
|
-
value.
|
|
71
|
+
value.remoteButtonLayout.has_value() ? JVariant_NullType_RemoteButtonLayout::fromCpp(value.remoteButtonLayout.value()) : nullptr
|
|
72
72
|
);
|
|
73
73
|
}
|
|
74
74
|
};
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
#include "JFavoriteConfig.hpp"
|
|
23
23
|
#include "JFavoritesMatchMode.hpp"
|
|
24
24
|
#include "JIOSOptions.hpp"
|
|
25
|
-
#include "JNotificationButton.hpp"
|
|
26
|
-
#include "JNotificationButtonLayout.hpp"
|
|
27
25
|
#include "JPlayerCapabilities.hpp"
|
|
26
|
+
#include "JRemoteButton.hpp"
|
|
27
|
+
#include "JRemoteButtonLayout.hpp"
|
|
28
28
|
#include "JVariant_Boolean_FavoriteConfig.hpp"
|
|
29
29
|
#include "JVariant_NullType_Double.hpp"
|
|
30
|
-
#include "
|
|
31
|
-
#include "NotificationButton.hpp"
|
|
32
|
-
#include "NotificationButtonLayout.hpp"
|
|
30
|
+
#include "JVariant_NullType_RemoteButtonLayout.hpp"
|
|
33
31
|
#include "PlayerCapabilities.hpp"
|
|
32
|
+
#include "RemoteButton.hpp"
|
|
33
|
+
#include "RemoteButtonLayout.hpp"
|
|
34
34
|
#include <NitroModules/JNull.hpp>
|
|
35
35
|
#include <NitroModules/Null.hpp>
|
|
36
36
|
#include <optional>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///
|
|
2
|
-
///
|
|
2
|
+
/// JRemoteButton.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
5
|
/// Copyright © Marc Rousavy @ Margelo
|
|
@@ -8,30 +8,30 @@
|
|
|
8
8
|
#pragma once
|
|
9
9
|
|
|
10
10
|
#include <fbjni/fbjni.h>
|
|
11
|
-
#include "
|
|
11
|
+
#include "RemoteButton.hpp"
|
|
12
12
|
|
|
13
13
|
namespace margelo::nitro::audiobrowser {
|
|
14
14
|
|
|
15
15
|
using namespace facebook;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* The C++ JNI bridge between the C++ enum "
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "RemoteButton" and the the Kotlin enum "RemoteButton".
|
|
19
19
|
*/
|
|
20
|
-
struct
|
|
20
|
+
struct JRemoteButton final: public jni::JavaClass<JRemoteButton> {
|
|
21
21
|
public:
|
|
22
|
-
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/audiobrowser/
|
|
22
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/audiobrowser/RemoteButton;";
|
|
23
23
|
|
|
24
24
|
public:
|
|
25
25
|
/**
|
|
26
|
-
* Convert this Java/Kotlin-based enum to the C++ enum
|
|
26
|
+
* Convert this Java/Kotlin-based enum to the C++ enum RemoteButton.
|
|
27
27
|
*/
|
|
28
28
|
[[maybe_unused]]
|
|
29
29
|
[[nodiscard]]
|
|
30
|
-
|
|
30
|
+
RemoteButton toCpp() const {
|
|
31
31
|
static const auto clazz = javaClassStatic();
|
|
32
32
|
static const auto fieldOrdinal = clazz->getField<int>("value");
|
|
33
33
|
int ordinal = this->getFieldValue(fieldOrdinal);
|
|
34
|
-
return static_cast<
|
|
34
|
+
return static_cast<RemoteButton>(ordinal);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
public:
|
|
@@ -39,23 +39,23 @@ namespace margelo::nitro::audiobrowser {
|
|
|
39
39
|
* Create a Java/Kotlin-based enum with the given C++ enum's value.
|
|
40
40
|
*/
|
|
41
41
|
[[maybe_unused]]
|
|
42
|
-
static jni::alias_ref<
|
|
42
|
+
static jni::alias_ref<JRemoteButton> fromCpp(RemoteButton value) {
|
|
43
43
|
static const auto clazz = javaClassStatic();
|
|
44
44
|
switch (value) {
|
|
45
|
-
case
|
|
46
|
-
static const auto fieldSKIP_TO_PREVIOUS = clazz->getStaticField<
|
|
45
|
+
case RemoteButton::SKIP_TO_PREVIOUS:
|
|
46
|
+
static const auto fieldSKIP_TO_PREVIOUS = clazz->getStaticField<JRemoteButton>("SKIP_TO_PREVIOUS");
|
|
47
47
|
return clazz->getStaticFieldValue(fieldSKIP_TO_PREVIOUS);
|
|
48
|
-
case
|
|
49
|
-
static const auto fieldSKIP_TO_NEXT = clazz->getStaticField<
|
|
48
|
+
case RemoteButton::SKIP_TO_NEXT:
|
|
49
|
+
static const auto fieldSKIP_TO_NEXT = clazz->getStaticField<JRemoteButton>("SKIP_TO_NEXT");
|
|
50
50
|
return clazz->getStaticFieldValue(fieldSKIP_TO_NEXT);
|
|
51
|
-
case
|
|
52
|
-
static const auto fieldJUMP_BACKWARD = clazz->getStaticField<
|
|
51
|
+
case RemoteButton::JUMP_BACKWARD:
|
|
52
|
+
static const auto fieldJUMP_BACKWARD = clazz->getStaticField<JRemoteButton>("JUMP_BACKWARD");
|
|
53
53
|
return clazz->getStaticFieldValue(fieldJUMP_BACKWARD);
|
|
54
|
-
case
|
|
55
|
-
static const auto fieldJUMP_FORWARD = clazz->getStaticField<
|
|
54
|
+
case RemoteButton::JUMP_FORWARD:
|
|
55
|
+
static const auto fieldJUMP_FORWARD = clazz->getStaticField<JRemoteButton>("JUMP_FORWARD");
|
|
56
56
|
return clazz->getStaticFieldValue(fieldJUMP_FORWARD);
|
|
57
|
-
case
|
|
58
|
-
static const auto fieldFAVORITE = clazz->getStaticField<
|
|
57
|
+
case RemoteButton::FAVORITE:
|
|
58
|
+
static const auto fieldFAVORITE = clazz->getStaticField<JRemoteButton>("FAVORITE");
|
|
59
59
|
return clazz->getStaticFieldValue(fieldFAVORITE);
|
|
60
60
|
default:
|
|
61
61
|
std::string stringValue = std::to_string(static_cast<int>(value));
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRemoteButtonLayout.hpp
|
|
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
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "RemoteButtonLayout.hpp"
|
|
12
|
+
|
|
13
|
+
#include "JRemoteButton.hpp"
|
|
14
|
+
#include "RemoteButton.hpp"
|
|
15
|
+
#include <optional>
|
|
16
|
+
#include <vector>
|
|
17
|
+
|
|
18
|
+
namespace margelo::nitro::audiobrowser {
|
|
19
|
+
|
|
20
|
+
using namespace facebook;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The C++ JNI bridge between the C++ struct "RemoteButtonLayout" and the the Kotlin data class "RemoteButtonLayout".
|
|
24
|
+
*/
|
|
25
|
+
struct JRemoteButtonLayout final: public jni::JavaClass<JRemoteButtonLayout> {
|
|
26
|
+
public:
|
|
27
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/audiobrowser/RemoteButtonLayout;";
|
|
28
|
+
|
|
29
|
+
public:
|
|
30
|
+
/**
|
|
31
|
+
* Convert this Java/Kotlin-based struct to the C++ struct RemoteButtonLayout by copying all values to C++.
|
|
32
|
+
*/
|
|
33
|
+
[[maybe_unused]]
|
|
34
|
+
[[nodiscard]]
|
|
35
|
+
RemoteButtonLayout toCpp() const {
|
|
36
|
+
static const auto clazz = javaClassStatic();
|
|
37
|
+
static const auto fieldBack = clazz->getField<JRemoteButton>("back");
|
|
38
|
+
jni::local_ref<JRemoteButton> back = this->getFieldValue(fieldBack);
|
|
39
|
+
static const auto fieldForward = clazz->getField<JRemoteButton>("forward");
|
|
40
|
+
jni::local_ref<JRemoteButton> forward = this->getFieldValue(fieldForward);
|
|
41
|
+
static const auto fieldOverflow = clazz->getField<jni::JArrayClass<JRemoteButton>>("overflow");
|
|
42
|
+
jni::local_ref<jni::JArrayClass<JRemoteButton>> overflow = this->getFieldValue(fieldOverflow);
|
|
43
|
+
return RemoteButtonLayout(
|
|
44
|
+
back != nullptr ? std::make_optional(back->toCpp()) : std::nullopt,
|
|
45
|
+
forward != nullptr ? std::make_optional(forward->toCpp()) : std::nullopt,
|
|
46
|
+
[&]() {
|
|
47
|
+
size_t __size = overflow->size();
|
|
48
|
+
std::vector<RemoteButton> __vector;
|
|
49
|
+
__vector.reserve(__size);
|
|
50
|
+
for (size_t __i = 0; __i < __size; __i++) {
|
|
51
|
+
auto __element = overflow->getElement(__i);
|
|
52
|
+
__vector.push_back(__element->toCpp());
|
|
53
|
+
}
|
|
54
|
+
return __vector;
|
|
55
|
+
}()
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
public:
|
|
60
|
+
/**
|
|
61
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
62
|
+
*/
|
|
63
|
+
[[maybe_unused]]
|
|
64
|
+
static jni::local_ref<JRemoteButtonLayout::javaobject> fromCpp(const RemoteButtonLayout& value) {
|
|
65
|
+
using JSignature = JRemoteButtonLayout(jni::alias_ref<JRemoteButton>, jni::alias_ref<JRemoteButton>, jni::alias_ref<jni::JArrayClass<JRemoteButton>>);
|
|
66
|
+
static const auto clazz = javaClassStatic();
|
|
67
|
+
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
68
|
+
return create(
|
|
69
|
+
clazz,
|
|
70
|
+
value.back.has_value() ? JRemoteButton::fromCpp(value.back.value()) : nullptr,
|
|
71
|
+
value.forward.has_value() ? JRemoteButton::fromCpp(value.forward.value()) : nullptr,
|
|
72
|
+
[&]() {
|
|
73
|
+
size_t __size = value.overflow.size();
|
|
74
|
+
jni::local_ref<jni::JArrayClass<JRemoteButton>> __array = jni::JArrayClass<JRemoteButton>::newArray(__size);
|
|
75
|
+
for (size_t __i = 0; __i < __size; __i++) {
|
|
76
|
+
const auto& __element = value.overflow[__i];
|
|
77
|
+
auto __elementJni = JRemoteButton::fromCpp(__element);
|
|
78
|
+
__array->setElement(__i, *__elementJni);
|
|
79
|
+
}
|
|
80
|
+
return __array;
|
|
81
|
+
}()
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
} // namespace margelo::nitro::audiobrowser
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JVariant_NullType_RemoteButtonLayout.cpp
|
|
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
|
+
#include "JVariant_NullType_RemoteButtonLayout.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::audiobrowser {
|
|
11
|
+
/**
|
|
12
|
+
* Converts JVariant_NullType_RemoteButtonLayout to std::variant<nitro::NullType, RemoteButtonLayout>
|
|
13
|
+
*/
|
|
14
|
+
std::variant<nitro::NullType, RemoteButtonLayout> JVariant_NullType_RemoteButtonLayout::toCpp() const {
|
|
15
|
+
if (isInstanceOf(JVariant_NullType_RemoteButtonLayout_impl::First::javaClassStatic())) {
|
|
16
|
+
// It's a `nitro::NullType`
|
|
17
|
+
auto jniValue = static_cast<const JVariant_NullType_RemoteButtonLayout_impl::First*>(this)->getValue();
|
|
18
|
+
return nitro::null;
|
|
19
|
+
} else if (isInstanceOf(JVariant_NullType_RemoteButtonLayout_impl::Second::javaClassStatic())) {
|
|
20
|
+
// It's a `RemoteButtonLayout`
|
|
21
|
+
auto jniValue = static_cast<const JVariant_NullType_RemoteButtonLayout_impl::Second*>(this)->getValue();
|
|
22
|
+
return jniValue->toCpp();
|
|
23
|
+
}
|
|
24
|
+
throw std::invalid_argument("Variant is unknown Kotlin instance!");
|
|
25
|
+
}
|
|
26
|
+
} // namespace margelo::nitro::audiobrowser
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JVariant_NullType_RemoteButtonLayout.hpp
|
|
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
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <variant>
|
|
12
|
+
|
|
13
|
+
#include <NitroModules/Null.hpp>
|
|
14
|
+
#include "RemoteButtonLayout.hpp"
|
|
15
|
+
#include <variant>
|
|
16
|
+
#include <NitroModules/JNull.hpp>
|
|
17
|
+
#include "JRemoteButtonLayout.hpp"
|
|
18
|
+
#include "RemoteButton.hpp"
|
|
19
|
+
#include <optional>
|
|
20
|
+
#include "JRemoteButton.hpp"
|
|
21
|
+
#include <vector>
|
|
22
|
+
|
|
23
|
+
namespace margelo::nitro::audiobrowser {
|
|
24
|
+
|
|
25
|
+
using namespace facebook;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The C++ JNI bridge between the C++ std::variant and the Java class "Variant_NullType_RemoteButtonLayout".
|
|
29
|
+
*/
|
|
30
|
+
class JVariant_NullType_RemoteButtonLayout: public jni::JavaClass<JVariant_NullType_RemoteButtonLayout> {
|
|
31
|
+
public:
|
|
32
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/audiobrowser/Variant_NullType_RemoteButtonLayout;";
|
|
33
|
+
|
|
34
|
+
static jni::local_ref<JVariant_NullType_RemoteButtonLayout> create_0(jni::alias_ref<JNull> value) {
|
|
35
|
+
static const auto method = javaClassStatic()->getStaticMethod<JVariant_NullType_RemoteButtonLayout(jni::alias_ref<JNull>)>("create");
|
|
36
|
+
return method(javaClassStatic(), value);
|
|
37
|
+
}
|
|
38
|
+
static jni::local_ref<JVariant_NullType_RemoteButtonLayout> create_1(jni::alias_ref<JRemoteButtonLayout> value) {
|
|
39
|
+
static const auto method = javaClassStatic()->getStaticMethod<JVariant_NullType_RemoteButtonLayout(jni::alias_ref<JRemoteButtonLayout>)>("create");
|
|
40
|
+
return method(javaClassStatic(), value);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
static jni::local_ref<JVariant_NullType_RemoteButtonLayout> fromCpp(const std::variant<nitro::NullType, RemoteButtonLayout>& variant) {
|
|
44
|
+
switch (variant.index()) {
|
|
45
|
+
case 0: return create_0(JNull::null());
|
|
46
|
+
case 1: return create_1(JRemoteButtonLayout::fromCpp(std::get<1>(variant)));
|
|
47
|
+
default: throw std::invalid_argument("Variant holds unknown index! (" + std::to_string(variant.index()) + ")");
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
[[nodiscard]] std::variant<nitro::NullType, RemoteButtonLayout> toCpp() const;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
namespace JVariant_NullType_RemoteButtonLayout_impl {
|
|
55
|
+
class First final: public jni::JavaClass<First, JVariant_NullType_RemoteButtonLayout> {
|
|
56
|
+
public:
|
|
57
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/audiobrowser/Variant_NullType_RemoteButtonLayout$First;";
|
|
58
|
+
|
|
59
|
+
[[nodiscard]] jni::local_ref<JNull> getValue() const {
|
|
60
|
+
static const auto field = javaClassStatic()->getField<JNull>("value");
|
|
61
|
+
return getFieldValue(field);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
class Second final: public jni::JavaClass<Second, JVariant_NullType_RemoteButtonLayout> {
|
|
66
|
+
public:
|
|
67
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/audiobrowser/Variant_NullType_RemoteButtonLayout$Second;";
|
|
68
|
+
|
|
69
|
+
[[nodiscard]] jni::local_ref<JRemoteButtonLayout> getValue() const {
|
|
70
|
+
static const auto field = javaClassStatic()->getField<JRemoteButtonLayout>("value");
|
|
71
|
+
return getFieldValue(field);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
} // namespace JVariant_NullType_RemoteButtonLayout_impl
|
|
75
|
+
} // namespace margelo::nitro::audiobrowser
|
|
@@ -25,7 +25,7 @@ data class AndroidOptions(
|
|
|
25
25
|
val skipSilence: Boolean,
|
|
26
26
|
@DoNotStrip
|
|
27
27
|
@Keep
|
|
28
|
-
val
|
|
28
|
+
val remoteButtonLayout: Variant_NullType_RemoteButtonLayout?
|
|
29
29
|
) {
|
|
30
30
|
/* primary constructor */
|
|
31
31
|
|
|
@@ -37,8 +37,8 @@ data class AndroidOptions(
|
|
|
37
37
|
@Keep
|
|
38
38
|
@Suppress("unused")
|
|
39
39
|
@JvmStatic
|
|
40
|
-
private fun fromCpp(appKilledPlaybackBehavior: AppKilledPlaybackBehavior, skipSilence: Boolean,
|
|
41
|
-
return AndroidOptions(appKilledPlaybackBehavior, skipSilence,
|
|
40
|
+
private fun fromCpp(appKilledPlaybackBehavior: AppKilledPlaybackBehavior, skipSilence: Boolean, remoteButtonLayout: Variant_NullType_RemoteButtonLayout?): AndroidOptions {
|
|
41
|
+
return AndroidOptions(appKilledPlaybackBehavior, skipSilence, remoteButtonLayout)
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -25,7 +25,7 @@ data class NitroAndroidUpdateOptions(
|
|
|
25
25
|
val skipSilence: Boolean?,
|
|
26
26
|
@DoNotStrip
|
|
27
27
|
@Keep
|
|
28
|
-
val
|
|
28
|
+
val remoteButtonLayout: Variant_NullType_RemoteButtonLayout?
|
|
29
29
|
) {
|
|
30
30
|
/* primary constructor */
|
|
31
31
|
|
|
@@ -37,8 +37,8 @@ data class NitroAndroidUpdateOptions(
|
|
|
37
37
|
@Keep
|
|
38
38
|
@Suppress("unused")
|
|
39
39
|
@JvmStatic
|
|
40
|
-
private fun fromCpp(appKilledPlaybackBehavior: AppKilledPlaybackBehavior?, skipSilence: Boolean?,
|
|
41
|
-
return NitroAndroidUpdateOptions(appKilledPlaybackBehavior, skipSilence,
|
|
40
|
+
private fun fromCpp(appKilledPlaybackBehavior: AppKilledPlaybackBehavior?, skipSilence: Boolean?, remoteButtonLayout: Variant_NullType_RemoteButtonLayout?): NitroAndroidUpdateOptions {
|
|
41
|
+
return NitroAndroidUpdateOptions(appKilledPlaybackBehavior, skipSilence, remoteButtonLayout)
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///
|
|
2
|
-
///
|
|
2
|
+
/// RemoteButton.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
5
|
/// Copyright © Marc Rousavy @ Margelo
|
|
@@ -11,11 +11,11 @@ import androidx.annotation.Keep
|
|
|
11
11
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Represents the JavaScript enum/union "
|
|
14
|
+
* Represents the JavaScript enum/union "RemoteButton".
|
|
15
15
|
*/
|
|
16
16
|
@DoNotStrip
|
|
17
17
|
@Keep
|
|
18
|
-
enum class
|
|
18
|
+
enum class RemoteButton(@DoNotStrip @Keep val value: Int) {
|
|
19
19
|
SKIP_TO_PREVIOUS(0),
|
|
20
20
|
SKIP_TO_NEXT(1),
|
|
21
21
|
JUMP_BACKWARD(2),
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/RemoteButtonLayout.kt
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RemoteButtonLayout.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.audiobrowser
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Represents the JavaScript object/struct "RemoteButtonLayout".
|
|
16
|
+
*/
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
@Keep
|
|
19
|
+
data class RemoteButtonLayout(
|
|
20
|
+
@DoNotStrip
|
|
21
|
+
@Keep
|
|
22
|
+
val back: RemoteButton?,
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
@Keep
|
|
25
|
+
val forward: RemoteButton?,
|
|
26
|
+
@DoNotStrip
|
|
27
|
+
@Keep
|
|
28
|
+
val overflow: Array<RemoteButton>
|
|
29
|
+
) {
|
|
30
|
+
/* primary constructor */
|
|
31
|
+
|
|
32
|
+
companion object {
|
|
33
|
+
/**
|
|
34
|
+
* Constructor called from C++
|
|
35
|
+
*/
|
|
36
|
+
@DoNotStrip
|
|
37
|
+
@Keep
|
|
38
|
+
@Suppress("unused")
|
|
39
|
+
@JvmStatic
|
|
40
|
+
private fun fromCpp(back: RemoteButton?, forward: RemoteButton?, overflow: Array<RemoteButton>): RemoteButtonLayout {
|
|
41
|
+
return RemoteButtonLayout(back, forward, overflow)
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///
|
|
2
|
-
///
|
|
2
|
+
/// Variant_NullType_RemoteButtonLayout.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
5
|
/// Copyright © Marc Rousavy @ Margelo
|
|
@@ -11,15 +11,15 @@ import com.facebook.proguard.annotations.DoNotStrip
|
|
|
11
11
|
import com.margelo.nitro.core.NullType
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Represents the TypeScript variant "NullType |
|
|
14
|
+
* Represents the TypeScript variant "NullType | RemoteButtonLayout".
|
|
15
15
|
*/
|
|
16
16
|
@Suppress("ClassName")
|
|
17
17
|
@DoNotStrip
|
|
18
|
-
sealed class
|
|
18
|
+
sealed class Variant_NullType_RemoteButtonLayout {
|
|
19
19
|
@DoNotStrip
|
|
20
|
-
data class First(@DoNotStrip val value: NullType):
|
|
20
|
+
data class First(@DoNotStrip val value: NullType): Variant_NullType_RemoteButtonLayout()
|
|
21
21
|
@DoNotStrip
|
|
22
|
-
data class Second(@DoNotStrip val value:
|
|
22
|
+
data class Second(@DoNotStrip val value: RemoteButtonLayout): Variant_NullType_RemoteButtonLayout()
|
|
23
23
|
|
|
24
24
|
val isFirst: Boolean
|
|
25
25
|
get() = this is First
|
|
@@ -30,12 +30,12 @@ sealed class Variant_NullType_NotificationButtonLayout {
|
|
|
30
30
|
val value = (this as? First)?.value ?: return null
|
|
31
31
|
return value
|
|
32
32
|
}
|
|
33
|
-
fun asSecondOrNull():
|
|
33
|
+
fun asSecondOrNull(): RemoteButtonLayout? {
|
|
34
34
|
val value = (this as? Second)?.value ?: return null
|
|
35
35
|
return value
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
inline fun <R> match(first: (NullType) -> R, second: (
|
|
38
|
+
inline fun <R> match(first: (NullType) -> R, second: (RemoteButtonLayout) -> R): R {
|
|
39
39
|
return when (this) {
|
|
40
40
|
is First -> first(value)
|
|
41
41
|
is Second -> second(value)
|
|
@@ -45,9 +45,9 @@ sealed class Variant_NullType_NotificationButtonLayout {
|
|
|
45
45
|
companion object {
|
|
46
46
|
@JvmStatic
|
|
47
47
|
@DoNotStrip
|
|
48
|
-
fun create(value: NullType):
|
|
48
|
+
fun create(value: NullType): Variant_NullType_RemoteButtonLayout = First(value)
|
|
49
49
|
@JvmStatic
|
|
50
50
|
@DoNotStrip
|
|
51
|
-
fun create(value:
|
|
51
|
+
fun create(value: RemoteButtonLayout): Variant_NullType_RemoteButtonLayout = Second(value)
|
|
52
52
|
}
|
|
53
53
|
}
|