react-native-liftoffads 0.0.1
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/LICENSE +20 -0
- package/NitroLiftoffAds.podspec +26 -0
- package/README.md +61 -0
- package/android/CMakeLists.txt +20 -0
- package/android/build.gradle +132 -0
- package/android/consumer-rules.pro +2 -0
- package/android/fix-prefab.gradle +46 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +1 -0
- package/android/src/main/cpp/cpp-adapter.cpp +7 -0
- package/android/src/main/java/com/margelo/nitro/liftoffads/HybridLiftoffAds.kt +121 -0
- package/android/src/main/java/com/margelo/nitro/liftoffads/HybridLiftoffInterstitialAd.kt +96 -0
- package/android/src/main/java/com/margelo/nitro/liftoffads/HybridLiftoffRewardedAd.kt +104 -0
- package/android/src/main/java/com/margelo/nitro/liftoffads/LiftoffAdEventEmitter.kt +51 -0
- package/android/src/main/java/com/margelo/nitro/liftoffads/LiftoffAndroidUtils.kt +54 -0
- package/android/src/main/java/com/margelo/nitro/liftoffads/NitroLiftoffAdsPackage.java +27 -0
- package/ios/HybridLiftoffAds.swift +113 -0
- package/ios/HybridLiftoffInterstitialAd.swift +98 -0
- package/ios/HybridLiftoffRewardedAd.swift +100 -0
- package/ios/LiftoffSupport.swift +106 -0
- package/lib/module/index.js +169 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/index.test.js +205 -0
- package/lib/module/index.test.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/specs/LiftoffAds.nitro.js +4 -0
- package/lib/module/specs/LiftoffAds.nitro.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/index.d.ts +72 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/index.test.d.ts +2 -0
- package/lib/typescript/src/index.test.d.ts.map +1 -0
- package/lib/typescript/src/specs/LiftoffAds.nitro.d.ts +46 -0
- package/lib/typescript/src/specs/LiftoffAds.nitro.d.ts.map +1 -0
- package/nitro.json +18 -0
- package/nitrogen/generated/android/NitroLiftoffAds+autolinking.cmake +85 -0
- package/nitrogen/generated/android/NitroLiftoffAds+autolinking.gradle +27 -0
- package/nitrogen/generated/android/NitroLiftoffAdsOnLoad.cpp +50 -0
- package/nitrogen/generated/android/NitroLiftoffAdsOnLoad.hpp +25 -0
- package/nitrogen/generated/android/c++/JFunc_void_std__optional_LiftoffAdEventPayload_.hpp +78 -0
- package/nitrogen/generated/android/c++/JHybridLiftoffAdsSpec.cpp +88 -0
- package/nitrogen/generated/android/c++/JHybridLiftoffAdsSpec.hpp +69 -0
- package/nitrogen/generated/android/c++/JHybridLiftoffInterstitialAdSpec.cpp +89 -0
- package/nitrogen/generated/android/c++/JHybridLiftoffInterstitialAdSpec.hpp +68 -0
- package/nitrogen/generated/android/c++/JHybridLiftoffRewardedAdSpec.cpp +93 -0
- package/nitrogen/generated/android/c++/JHybridLiftoffRewardedAdSpec.hpp +69 -0
- package/nitrogen/generated/android/c++/JLiftoffAdEventPayload.hpp +58 -0
- package/nitrogen/generated/android/c++/JLiftoffAdEventType.hpp +77 -0
- package/nitrogen/generated/android/c++/JLiftoffAdShowOptions.hpp +53 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/liftoffads/Func_void_std__optional_LiftoffAdEventPayload_.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/liftoffads/HybridLiftoffAdsSpec.kt +72 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/liftoffads/HybridLiftoffInterstitialAdSpec.kt +73 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/liftoffads/HybridLiftoffRewardedAdSpec.kt +77 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/liftoffads/LiftoffAdEventPayload.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/liftoffads/LiftoffAdEventType.kt +27 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/liftoffads/LiftoffAdShowOptions.kt +29 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/liftoffads/NitroLiftoffAdsOnLoad.kt +35 -0
- package/nitrogen/generated/ios/NitroLiftoffAds+autolinking.rb +60 -0
- package/nitrogen/generated/ios/NitroLiftoffAds-Swift-Cxx-Bridge.cpp +90 -0
- package/nitrogen/generated/ios/NitroLiftoffAds-Swift-Cxx-Bridge.hpp +285 -0
- package/nitrogen/generated/ios/NitroLiftoffAds-Swift-Cxx-Umbrella.hpp +66 -0
- package/nitrogen/generated/ios/NitroLiftoffAdsAutolinking.mm +33 -0
- package/nitrogen/generated/ios/NitroLiftoffAdsAutolinking.swift +25 -0
- package/nitrogen/generated/ios/c++/HybridLiftoffAdsSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridLiftoffAdsSpecSwift.hpp +114 -0
- package/nitrogen/generated/ios/c++/HybridLiftoffInterstitialAdSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridLiftoffInterstitialAdSpecSwift.hpp +110 -0
- package/nitrogen/generated/ios/c++/HybridLiftoffRewardedAdSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridLiftoffRewardedAdSpecSwift.hpp +116 -0
- package/nitrogen/generated/ios/swift/Func_void.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_LiftoffAdEventPayload_.swift +54 -0
- package/nitrogen/generated/ios/swift/HybridLiftoffAdsSpec.swift +54 -0
- package/nitrogen/generated/ios/swift/HybridLiftoffAdsSpec_cxx.swift +193 -0
- package/nitrogen/generated/ios/swift/HybridLiftoffInterstitialAdSpec.swift +53 -0
- package/nitrogen/generated/ios/swift/HybridLiftoffInterstitialAdSpec_cxx.swift +193 -0
- package/nitrogen/generated/ios/swift/HybridLiftoffRewardedAdSpec.swift +54 -0
- package/nitrogen/generated/ios/swift/HybridLiftoffRewardedAdSpec_cxx.swift +204 -0
- package/nitrogen/generated/ios/swift/LiftoffAdEventPayload.swift +77 -0
- package/nitrogen/generated/ios/swift/LiftoffAdEventType.swift +64 -0
- package/nitrogen/generated/ios/swift/LiftoffAdShowOptions.swift +47 -0
- package/nitrogen/generated/shared/c++/HybridLiftoffAdsSpec.cpp +26 -0
- package/nitrogen/generated/shared/c++/HybridLiftoffAdsSpec.hpp +74 -0
- package/nitrogen/generated/shared/c++/HybridLiftoffInterstitialAdSpec.cpp +25 -0
- package/nitrogen/generated/shared/c++/HybridLiftoffInterstitialAdSpec.hpp +76 -0
- package/nitrogen/generated/shared/c++/HybridLiftoffRewardedAdSpec.cpp +26 -0
- package/nitrogen/generated/shared/c++/HybridLiftoffRewardedAdSpec.hpp +78 -0
- package/nitrogen/generated/shared/c++/LiftoffAdEventPayload.hpp +72 -0
- package/nitrogen/generated/shared/c++/LiftoffAdEventType.hpp +100 -0
- package/nitrogen/generated/shared/c++/LiftoffAdShowOptions.hpp +67 -0
- package/package.json +173 -0
- package/react-native.config.js +8 -0
- package/src/index.test.ts +257 -0
- package/src/index.ts +307 -0
- package/src/specs/LiftoffAds.nitro.ts +67 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// LiftoffAdEventPayload.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents an instance of `LiftoffAdEventPayload`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias LiftoffAdEventPayload = margelo.nitro.liftoffads.LiftoffAdEventPayload
|
|
14
|
+
|
|
15
|
+
public extension LiftoffAdEventPayload {
|
|
16
|
+
private typealias bridge = margelo.nitro.liftoffads.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `LiftoffAdEventPayload`.
|
|
20
|
+
*/
|
|
21
|
+
init(errorCode: Double?, errorMessage: String?) {
|
|
22
|
+
self.init({ () -> bridge.std__optional_double_ in
|
|
23
|
+
if let __unwrappedValue = errorCode {
|
|
24
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
25
|
+
} else {
|
|
26
|
+
return .init()
|
|
27
|
+
}
|
|
28
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
29
|
+
if let __unwrappedValue = errorMessage {
|
|
30
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
31
|
+
} else {
|
|
32
|
+
return .init()
|
|
33
|
+
}
|
|
34
|
+
}())
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
var errorCode: Double? {
|
|
38
|
+
@inline(__always)
|
|
39
|
+
get {
|
|
40
|
+
return self.__errorCode.value
|
|
41
|
+
}
|
|
42
|
+
@inline(__always)
|
|
43
|
+
set {
|
|
44
|
+
self.__errorCode = { () -> bridge.std__optional_double_ in
|
|
45
|
+
if let __unwrappedValue = newValue {
|
|
46
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
47
|
+
} else {
|
|
48
|
+
return .init()
|
|
49
|
+
}
|
|
50
|
+
}()
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
var errorMessage: String? {
|
|
55
|
+
@inline(__always)
|
|
56
|
+
get {
|
|
57
|
+
return { () -> String? in
|
|
58
|
+
if bridge.has_value_std__optional_std__string_(self.__errorMessage) {
|
|
59
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__errorMessage)
|
|
60
|
+
return String(__unwrapped)
|
|
61
|
+
} else {
|
|
62
|
+
return nil
|
|
63
|
+
}
|
|
64
|
+
}()
|
|
65
|
+
}
|
|
66
|
+
@inline(__always)
|
|
67
|
+
set {
|
|
68
|
+
self.__errorMessage = { () -> bridge.std__optional_std__string_ in
|
|
69
|
+
if let __unwrappedValue = newValue {
|
|
70
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
71
|
+
} else {
|
|
72
|
+
return .init()
|
|
73
|
+
}
|
|
74
|
+
}()
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// LiftoffAdEventType.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Represents the JS union `LiftoffAdEventType`, backed by a C++ enum.
|
|
10
|
+
*/
|
|
11
|
+
public typealias LiftoffAdEventType = margelo.nitro.liftoffads.LiftoffAdEventType
|
|
12
|
+
|
|
13
|
+
public extension LiftoffAdEventType {
|
|
14
|
+
/**
|
|
15
|
+
* Get a LiftoffAdEventType for the given String value, or
|
|
16
|
+
* return `nil` if the given value was invalid/unknown.
|
|
17
|
+
*/
|
|
18
|
+
init?(fromString string: String) {
|
|
19
|
+
switch string {
|
|
20
|
+
case "loaded":
|
|
21
|
+
self = .loaded
|
|
22
|
+
case "error":
|
|
23
|
+
self = .error
|
|
24
|
+
case "opened":
|
|
25
|
+
self = .opened
|
|
26
|
+
case "paid":
|
|
27
|
+
self = .paid
|
|
28
|
+
case "clicked":
|
|
29
|
+
self = .clicked
|
|
30
|
+
case "closed":
|
|
31
|
+
self = .closed
|
|
32
|
+
case "rewarded_loaded":
|
|
33
|
+
self = .rewardedLoaded
|
|
34
|
+
case "rewarded_earned_reward":
|
|
35
|
+
self = .rewardedEarnedReward
|
|
36
|
+
default:
|
|
37
|
+
return nil
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Get the String value this LiftoffAdEventType represents.
|
|
43
|
+
*/
|
|
44
|
+
var stringValue: String {
|
|
45
|
+
switch self {
|
|
46
|
+
case .loaded:
|
|
47
|
+
return "loaded"
|
|
48
|
+
case .error:
|
|
49
|
+
return "error"
|
|
50
|
+
case .opened:
|
|
51
|
+
return "opened"
|
|
52
|
+
case .paid:
|
|
53
|
+
return "paid"
|
|
54
|
+
case .clicked:
|
|
55
|
+
return "clicked"
|
|
56
|
+
case .closed:
|
|
57
|
+
return "closed"
|
|
58
|
+
case .rewardedLoaded:
|
|
59
|
+
return "rewarded_loaded"
|
|
60
|
+
case .rewardedEarnedReward:
|
|
61
|
+
return "rewarded_earned_reward"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// LiftoffAdShowOptions.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents an instance of `LiftoffAdShowOptions`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias LiftoffAdShowOptions = margelo.nitro.liftoffads.LiftoffAdShowOptions
|
|
14
|
+
|
|
15
|
+
public extension LiftoffAdShowOptions {
|
|
16
|
+
private typealias bridge = margelo.nitro.liftoffads.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `LiftoffAdShowOptions`.
|
|
20
|
+
*/
|
|
21
|
+
init(immersiveModeEnabled: Bool?) {
|
|
22
|
+
self.init({ () -> bridge.std__optional_bool_ in
|
|
23
|
+
if let __unwrappedValue = immersiveModeEnabled {
|
|
24
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
25
|
+
} else {
|
|
26
|
+
return .init()
|
|
27
|
+
}
|
|
28
|
+
}())
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
var immersiveModeEnabled: Bool? {
|
|
32
|
+
@inline(__always)
|
|
33
|
+
get {
|
|
34
|
+
return self.__immersiveModeEnabled.value
|
|
35
|
+
}
|
|
36
|
+
@inline(__always)
|
|
37
|
+
set {
|
|
38
|
+
self.__immersiveModeEnabled = { () -> bridge.std__optional_bool_ in
|
|
39
|
+
if let __unwrappedValue = newValue {
|
|
40
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
41
|
+
} else {
|
|
42
|
+
return .init()
|
|
43
|
+
}
|
|
44
|
+
}()
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridLiftoffAdsSpec.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#include "HybridLiftoffAdsSpec.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::liftoffads {
|
|
11
|
+
|
|
12
|
+
void HybridLiftoffAdsSpec::loadHybridMethods() {
|
|
13
|
+
// load base methods/properties
|
|
14
|
+
HybridObject::loadHybridMethods();
|
|
15
|
+
// load custom methods/properties
|
|
16
|
+
registerHybrids(this, [](Prototype& prototype) {
|
|
17
|
+
prototype.registerHybridMethod("initialize", &HybridLiftoffAdsSpec::initialize);
|
|
18
|
+
prototype.registerHybridMethod("setGDPRConsent", &HybridLiftoffAdsSpec::setGDPRConsent);
|
|
19
|
+
prototype.registerHybridMethod("setCCPAConsent", &HybridLiftoffAdsSpec::setCCPAConsent);
|
|
20
|
+
prototype.registerHybridMethod("setCOPPA", &HybridLiftoffAdsSpec::setCOPPA);
|
|
21
|
+
prototype.registerHybridMethod("createInterstitialAd", &HybridLiftoffAdsSpec::createInterstitialAd);
|
|
22
|
+
prototype.registerHybridMethod("createRewardedAd", &HybridLiftoffAdsSpec::createRewardedAd);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
} // namespace margelo::nitro::liftoffads
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridLiftoffAdsSpec.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/HybridObject.hpp>)
|
|
11
|
+
#include <NitroModules/HybridObject.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
|
|
16
|
+
// Forward declaration of `HybridLiftoffInterstitialAdSpec` to properly resolve imports.
|
|
17
|
+
namespace margelo::nitro::liftoffads { class HybridLiftoffInterstitialAdSpec; }
|
|
18
|
+
// Forward declaration of `HybridLiftoffRewardedAdSpec` to properly resolve imports.
|
|
19
|
+
namespace margelo::nitro::liftoffads { class HybridLiftoffRewardedAdSpec; }
|
|
20
|
+
|
|
21
|
+
#include <NitroModules/Promise.hpp>
|
|
22
|
+
#include <string>
|
|
23
|
+
#include <memory>
|
|
24
|
+
#include "HybridLiftoffInterstitialAdSpec.hpp"
|
|
25
|
+
#include "HybridLiftoffRewardedAdSpec.hpp"
|
|
26
|
+
|
|
27
|
+
namespace margelo::nitro::liftoffads {
|
|
28
|
+
|
|
29
|
+
using namespace margelo::nitro;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* An abstract base class for `LiftoffAds`
|
|
33
|
+
* Inherit this class to create instances of `HybridLiftoffAdsSpec` in C++.
|
|
34
|
+
* You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
|
|
35
|
+
* @example
|
|
36
|
+
* ```cpp
|
|
37
|
+
* class HybridLiftoffAds: public HybridLiftoffAdsSpec {
|
|
38
|
+
* public:
|
|
39
|
+
* HybridLiftoffAds(...): HybridObject(TAG) { ... }
|
|
40
|
+
* // ...
|
|
41
|
+
* };
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
class HybridLiftoffAdsSpec: public virtual HybridObject {
|
|
45
|
+
public:
|
|
46
|
+
// Constructor
|
|
47
|
+
explicit HybridLiftoffAdsSpec(): HybridObject(TAG) { }
|
|
48
|
+
|
|
49
|
+
// Destructor
|
|
50
|
+
~HybridLiftoffAdsSpec() override = default;
|
|
51
|
+
|
|
52
|
+
public:
|
|
53
|
+
// Properties
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
public:
|
|
57
|
+
// Methods
|
|
58
|
+
virtual std::shared_ptr<Promise<void>> initialize(const std::string& appId) = 0;
|
|
59
|
+
virtual void setGDPRConsent(bool optIn, const std::string& consentMessageVersion) = 0;
|
|
60
|
+
virtual void setCCPAConsent(bool optIn) = 0;
|
|
61
|
+
virtual void setCOPPA(bool isUserCoppa) = 0;
|
|
62
|
+
virtual std::shared_ptr<HybridLiftoffInterstitialAdSpec> createInterstitialAd(const std::string& placementId) = 0;
|
|
63
|
+
virtual std::shared_ptr<HybridLiftoffRewardedAdSpec> createRewardedAd(const std::string& placementId) = 0;
|
|
64
|
+
|
|
65
|
+
protected:
|
|
66
|
+
// Hybrid Setup
|
|
67
|
+
void loadHybridMethods() override;
|
|
68
|
+
|
|
69
|
+
protected:
|
|
70
|
+
// Tag for logging
|
|
71
|
+
static constexpr auto TAG = "LiftoffAds";
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
} // namespace margelo::nitro::liftoffads
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridLiftoffInterstitialAdSpec.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#include "HybridLiftoffInterstitialAdSpec.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::liftoffads {
|
|
11
|
+
|
|
12
|
+
void HybridLiftoffInterstitialAdSpec::loadHybridMethods() {
|
|
13
|
+
// load base methods/properties
|
|
14
|
+
HybridObject::loadHybridMethods();
|
|
15
|
+
// load custom methods/properties
|
|
16
|
+
registerHybrids(this, [](Prototype& prototype) {
|
|
17
|
+
prototype.registerHybridMethod("load", &HybridLiftoffInterstitialAdSpec::load);
|
|
18
|
+
prototype.registerHybridMethod("show", &HybridLiftoffInterstitialAdSpec::show);
|
|
19
|
+
prototype.registerHybridMethod("addAdEventListener", &HybridLiftoffInterstitialAdSpec::addAdEventListener);
|
|
20
|
+
prototype.registerHybridMethod("removeAdEventListener", &HybridLiftoffInterstitialAdSpec::removeAdEventListener);
|
|
21
|
+
prototype.registerHybridMethod("removeAllListeners", &HybridLiftoffInterstitialAdSpec::removeAllListeners);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
} // namespace margelo::nitro::liftoffads
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridLiftoffInterstitialAdSpec.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/HybridObject.hpp>)
|
|
11
|
+
#include <NitroModules/HybridObject.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
|
|
16
|
+
// Forward declaration of `LiftoffAdShowOptions` to properly resolve imports.
|
|
17
|
+
namespace margelo::nitro::liftoffads { struct LiftoffAdShowOptions; }
|
|
18
|
+
// Forward declaration of `LiftoffAdEventType` to properly resolve imports.
|
|
19
|
+
namespace margelo::nitro::liftoffads { enum class LiftoffAdEventType; }
|
|
20
|
+
// Forward declaration of `LiftoffAdEventPayload` to properly resolve imports.
|
|
21
|
+
namespace margelo::nitro::liftoffads { struct LiftoffAdEventPayload; }
|
|
22
|
+
|
|
23
|
+
#include <NitroModules/Promise.hpp>
|
|
24
|
+
#include "LiftoffAdShowOptions.hpp"
|
|
25
|
+
#include <optional>
|
|
26
|
+
#include "LiftoffAdEventType.hpp"
|
|
27
|
+
#include "LiftoffAdEventPayload.hpp"
|
|
28
|
+
#include <functional>
|
|
29
|
+
|
|
30
|
+
namespace margelo::nitro::liftoffads {
|
|
31
|
+
|
|
32
|
+
using namespace margelo::nitro;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* An abstract base class for `LiftoffInterstitialAd`
|
|
36
|
+
* Inherit this class to create instances of `HybridLiftoffInterstitialAdSpec` in C++.
|
|
37
|
+
* You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
|
|
38
|
+
* @example
|
|
39
|
+
* ```cpp
|
|
40
|
+
* class HybridLiftoffInterstitialAd: public HybridLiftoffInterstitialAdSpec {
|
|
41
|
+
* public:
|
|
42
|
+
* HybridLiftoffInterstitialAd(...): HybridObject(TAG) { ... }
|
|
43
|
+
* // ...
|
|
44
|
+
* };
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
class HybridLiftoffInterstitialAdSpec: public virtual HybridObject {
|
|
48
|
+
public:
|
|
49
|
+
// Constructor
|
|
50
|
+
explicit HybridLiftoffInterstitialAdSpec(): HybridObject(TAG) { }
|
|
51
|
+
|
|
52
|
+
// Destructor
|
|
53
|
+
~HybridLiftoffInterstitialAdSpec() override = default;
|
|
54
|
+
|
|
55
|
+
public:
|
|
56
|
+
// Properties
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
public:
|
|
60
|
+
// Methods
|
|
61
|
+
virtual void load() = 0;
|
|
62
|
+
virtual std::shared_ptr<Promise<void>> show(const std::optional<LiftoffAdShowOptions>& options) = 0;
|
|
63
|
+
virtual double addAdEventListener(LiftoffAdEventType eventType, const std::function<void(const std::optional<LiftoffAdEventPayload>& /* payload */)>& listener) = 0;
|
|
64
|
+
virtual void removeAdEventListener(double subscriptionId) = 0;
|
|
65
|
+
virtual void removeAllListeners() = 0;
|
|
66
|
+
|
|
67
|
+
protected:
|
|
68
|
+
// Hybrid Setup
|
|
69
|
+
void loadHybridMethods() override;
|
|
70
|
+
|
|
71
|
+
protected:
|
|
72
|
+
// Tag for logging
|
|
73
|
+
static constexpr auto TAG = "LiftoffInterstitialAd";
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
} // namespace margelo::nitro::liftoffads
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridLiftoffRewardedAdSpec.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#include "HybridLiftoffRewardedAdSpec.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::liftoffads {
|
|
11
|
+
|
|
12
|
+
void HybridLiftoffRewardedAdSpec::loadHybridMethods() {
|
|
13
|
+
// load base methods/properties
|
|
14
|
+
HybridObject::loadHybridMethods();
|
|
15
|
+
// load custom methods/properties
|
|
16
|
+
registerHybrids(this, [](Prototype& prototype) {
|
|
17
|
+
prototype.registerHybridMethod("load", &HybridLiftoffRewardedAdSpec::load);
|
|
18
|
+
prototype.registerHybridMethod("setUserId", &HybridLiftoffRewardedAdSpec::setUserId);
|
|
19
|
+
prototype.registerHybridMethod("show", &HybridLiftoffRewardedAdSpec::show);
|
|
20
|
+
prototype.registerHybridMethod("addAdEventListener", &HybridLiftoffRewardedAdSpec::addAdEventListener);
|
|
21
|
+
prototype.registerHybridMethod("removeAdEventListener", &HybridLiftoffRewardedAdSpec::removeAdEventListener);
|
|
22
|
+
prototype.registerHybridMethod("removeAllListeners", &HybridLiftoffRewardedAdSpec::removeAllListeners);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
} // namespace margelo::nitro::liftoffads
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridLiftoffRewardedAdSpec.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/HybridObject.hpp>)
|
|
11
|
+
#include <NitroModules/HybridObject.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
|
|
16
|
+
// Forward declaration of `LiftoffAdShowOptions` to properly resolve imports.
|
|
17
|
+
namespace margelo::nitro::liftoffads { struct LiftoffAdShowOptions; }
|
|
18
|
+
// Forward declaration of `LiftoffAdEventType` to properly resolve imports.
|
|
19
|
+
namespace margelo::nitro::liftoffads { enum class LiftoffAdEventType; }
|
|
20
|
+
// Forward declaration of `LiftoffAdEventPayload` to properly resolve imports.
|
|
21
|
+
namespace margelo::nitro::liftoffads { struct LiftoffAdEventPayload; }
|
|
22
|
+
|
|
23
|
+
#include <string>
|
|
24
|
+
#include <NitroModules/Promise.hpp>
|
|
25
|
+
#include "LiftoffAdShowOptions.hpp"
|
|
26
|
+
#include <optional>
|
|
27
|
+
#include "LiftoffAdEventType.hpp"
|
|
28
|
+
#include "LiftoffAdEventPayload.hpp"
|
|
29
|
+
#include <functional>
|
|
30
|
+
|
|
31
|
+
namespace margelo::nitro::liftoffads {
|
|
32
|
+
|
|
33
|
+
using namespace margelo::nitro;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* An abstract base class for `LiftoffRewardedAd`
|
|
37
|
+
* Inherit this class to create instances of `HybridLiftoffRewardedAdSpec` in C++.
|
|
38
|
+
* You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
|
|
39
|
+
* @example
|
|
40
|
+
* ```cpp
|
|
41
|
+
* class HybridLiftoffRewardedAd: public HybridLiftoffRewardedAdSpec {
|
|
42
|
+
* public:
|
|
43
|
+
* HybridLiftoffRewardedAd(...): HybridObject(TAG) { ... }
|
|
44
|
+
* // ...
|
|
45
|
+
* };
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
class HybridLiftoffRewardedAdSpec: public virtual HybridObject {
|
|
49
|
+
public:
|
|
50
|
+
// Constructor
|
|
51
|
+
explicit HybridLiftoffRewardedAdSpec(): HybridObject(TAG) { }
|
|
52
|
+
|
|
53
|
+
// Destructor
|
|
54
|
+
~HybridLiftoffRewardedAdSpec() override = default;
|
|
55
|
+
|
|
56
|
+
public:
|
|
57
|
+
// Properties
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
public:
|
|
61
|
+
// Methods
|
|
62
|
+
virtual void load() = 0;
|
|
63
|
+
virtual void setUserId(const std::string& userId) = 0;
|
|
64
|
+
virtual std::shared_ptr<Promise<void>> show(const std::optional<LiftoffAdShowOptions>& options) = 0;
|
|
65
|
+
virtual double addAdEventListener(LiftoffAdEventType eventType, const std::function<void(const std::optional<LiftoffAdEventPayload>& /* payload */)>& listener) = 0;
|
|
66
|
+
virtual void removeAdEventListener(double subscriptionId) = 0;
|
|
67
|
+
virtual void removeAllListeners() = 0;
|
|
68
|
+
|
|
69
|
+
protected:
|
|
70
|
+
// Hybrid Setup
|
|
71
|
+
void loadHybridMethods() override;
|
|
72
|
+
|
|
73
|
+
protected:
|
|
74
|
+
// Tag for logging
|
|
75
|
+
static constexpr auto TAG = "LiftoffRewardedAd";
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
} // namespace margelo::nitro::liftoffads
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// LiftoffAdEventPayload.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
#include <optional>
|
|
24
|
+
#include <string>
|
|
25
|
+
|
|
26
|
+
namespace margelo::nitro::liftoffads {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* A struct which can be represented as a JavaScript object (LiftoffAdEventPayload).
|
|
30
|
+
*/
|
|
31
|
+
struct LiftoffAdEventPayload {
|
|
32
|
+
public:
|
|
33
|
+
std::optional<double> errorCode SWIFT_PRIVATE;
|
|
34
|
+
std::optional<std::string> errorMessage SWIFT_PRIVATE;
|
|
35
|
+
|
|
36
|
+
public:
|
|
37
|
+
LiftoffAdEventPayload() = default;
|
|
38
|
+
explicit LiftoffAdEventPayload(std::optional<double> errorCode, std::optional<std::string> errorMessage): errorCode(errorCode), errorMessage(errorMessage) {}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
} // namespace margelo::nitro::liftoffads
|
|
42
|
+
|
|
43
|
+
namespace margelo::nitro {
|
|
44
|
+
|
|
45
|
+
// C++ LiftoffAdEventPayload <> JS LiftoffAdEventPayload (object)
|
|
46
|
+
template <>
|
|
47
|
+
struct JSIConverter<margelo::nitro::liftoffads::LiftoffAdEventPayload> final {
|
|
48
|
+
static inline margelo::nitro::liftoffads::LiftoffAdEventPayload fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
49
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
50
|
+
return margelo::nitro::liftoffads::LiftoffAdEventPayload(
|
|
51
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "errorCode")),
|
|
52
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "errorMessage"))
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::liftoffads::LiftoffAdEventPayload& arg) {
|
|
56
|
+
jsi::Object obj(runtime);
|
|
57
|
+
obj.setProperty(runtime, "errorCode", JSIConverter<std::optional<double>>::toJSI(runtime, arg.errorCode));
|
|
58
|
+
obj.setProperty(runtime, "errorMessage", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.errorMessage));
|
|
59
|
+
return obj;
|
|
60
|
+
}
|
|
61
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
62
|
+
if (!value.isObject()) {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
jsi::Object obj = value.getObject(runtime);
|
|
66
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "errorCode"))) return false;
|
|
67
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "errorMessage"))) return false;
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// LiftoffAdEventType.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/NitroHash.hpp>)
|
|
11
|
+
#include <NitroModules/NitroHash.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
16
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
21
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
namespace margelo::nitro::liftoffads {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* An enum which can be represented as a JavaScript union (LiftoffAdEventType).
|
|
30
|
+
*/
|
|
31
|
+
enum class LiftoffAdEventType {
|
|
32
|
+
LOADED SWIFT_NAME(loaded) = 0,
|
|
33
|
+
ERROR SWIFT_NAME(error) = 1,
|
|
34
|
+
OPENED SWIFT_NAME(opened) = 2,
|
|
35
|
+
PAID SWIFT_NAME(paid) = 3,
|
|
36
|
+
CLICKED SWIFT_NAME(clicked) = 4,
|
|
37
|
+
CLOSED SWIFT_NAME(closed) = 5,
|
|
38
|
+
REWARDED_LOADED SWIFT_NAME(rewardedLoaded) = 6,
|
|
39
|
+
REWARDED_EARNED_REWARD SWIFT_NAME(rewardedEarnedReward) = 7,
|
|
40
|
+
} CLOSED_ENUM;
|
|
41
|
+
|
|
42
|
+
} // namespace margelo::nitro::liftoffads
|
|
43
|
+
|
|
44
|
+
namespace margelo::nitro {
|
|
45
|
+
|
|
46
|
+
// C++ LiftoffAdEventType <> JS LiftoffAdEventType (union)
|
|
47
|
+
template <>
|
|
48
|
+
struct JSIConverter<margelo::nitro::liftoffads::LiftoffAdEventType> final {
|
|
49
|
+
static inline margelo::nitro::liftoffads::LiftoffAdEventType fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
50
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
51
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
52
|
+
case hashString("loaded"): return margelo::nitro::liftoffads::LiftoffAdEventType::LOADED;
|
|
53
|
+
case hashString("error"): return margelo::nitro::liftoffads::LiftoffAdEventType::ERROR;
|
|
54
|
+
case hashString("opened"): return margelo::nitro::liftoffads::LiftoffAdEventType::OPENED;
|
|
55
|
+
case hashString("paid"): return margelo::nitro::liftoffads::LiftoffAdEventType::PAID;
|
|
56
|
+
case hashString("clicked"): return margelo::nitro::liftoffads::LiftoffAdEventType::CLICKED;
|
|
57
|
+
case hashString("closed"): return margelo::nitro::liftoffads::LiftoffAdEventType::CLOSED;
|
|
58
|
+
case hashString("rewarded_loaded"): return margelo::nitro::liftoffads::LiftoffAdEventType::REWARDED_LOADED;
|
|
59
|
+
case hashString("rewarded_earned_reward"): return margelo::nitro::liftoffads::LiftoffAdEventType::REWARDED_EARNED_REWARD;
|
|
60
|
+
default: [[unlikely]]
|
|
61
|
+
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum LiftoffAdEventType - invalid value!");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::liftoffads::LiftoffAdEventType arg) {
|
|
65
|
+
switch (arg) {
|
|
66
|
+
case margelo::nitro::liftoffads::LiftoffAdEventType::LOADED: return JSIConverter<std::string>::toJSI(runtime, "loaded");
|
|
67
|
+
case margelo::nitro::liftoffads::LiftoffAdEventType::ERROR: return JSIConverter<std::string>::toJSI(runtime, "error");
|
|
68
|
+
case margelo::nitro::liftoffads::LiftoffAdEventType::OPENED: return JSIConverter<std::string>::toJSI(runtime, "opened");
|
|
69
|
+
case margelo::nitro::liftoffads::LiftoffAdEventType::PAID: return JSIConverter<std::string>::toJSI(runtime, "paid");
|
|
70
|
+
case margelo::nitro::liftoffads::LiftoffAdEventType::CLICKED: return JSIConverter<std::string>::toJSI(runtime, "clicked");
|
|
71
|
+
case margelo::nitro::liftoffads::LiftoffAdEventType::CLOSED: return JSIConverter<std::string>::toJSI(runtime, "closed");
|
|
72
|
+
case margelo::nitro::liftoffads::LiftoffAdEventType::REWARDED_LOADED: return JSIConverter<std::string>::toJSI(runtime, "rewarded_loaded");
|
|
73
|
+
case margelo::nitro::liftoffads::LiftoffAdEventType::REWARDED_EARNED_REWARD: return JSIConverter<std::string>::toJSI(runtime, "rewarded_earned_reward");
|
|
74
|
+
default: [[unlikely]]
|
|
75
|
+
throw std::invalid_argument("Cannot convert LiftoffAdEventType to JS - invalid value: "
|
|
76
|
+
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
80
|
+
if (!value.isString()) {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
|
|
84
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
85
|
+
case hashString("loaded"):
|
|
86
|
+
case hashString("error"):
|
|
87
|
+
case hashString("opened"):
|
|
88
|
+
case hashString("paid"):
|
|
89
|
+
case hashString("clicked"):
|
|
90
|
+
case hashString("closed"):
|
|
91
|
+
case hashString("rewarded_loaded"):
|
|
92
|
+
case hashString("rewarded_earned_reward"):
|
|
93
|
+
return true;
|
|
94
|
+
default:
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
} // namespace margelo::nitro
|