react-native-pangleads 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/LICENSE +20 -0
- package/NitroPangleAds.podspec +26 -0
- package/README.md +80 -0
- package/android/CMakeLists.txt +20 -0
- package/android/build.gradle +129 -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/pangleads/HybridPangleAds.kt +123 -0
- package/android/src/main/java/com/margelo/nitro/pangleads/HybridPangleInterstitialAd.kt +106 -0
- package/android/src/main/java/com/margelo/nitro/pangleads/HybridPangleRewardedAd.kt +139 -0
- package/android/src/main/java/com/margelo/nitro/pangleads/NitroPangleAdsPackage.java +27 -0
- package/android/src/main/java/com/margelo/nitro/pangleads/PangleAdEventEmitter.kt +41 -0
- package/android/src/main/java/com/margelo/nitro/pangleads/PangleAndroidUtils.kt +32 -0
- package/ios/HybridPangleAds.swift +120 -0
- package/ios/HybridPangleInterstitialAd.swift +110 -0
- package/ios/HybridPangleRewardedAd.swift +143 -0
- package/ios/PangleSupport.swift +129 -0
- package/lib/module/index.js +172 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/index.test.js +201 -0
- package/lib/module/index.test.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/specs/PangleAds.nitro.js +4 -0
- package/lib/module/specs/PangleAds.nitro.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/index.d.ts +68 -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/PangleAds.nitro.d.ts +46 -0
- package/lib/typescript/src/specs/PangleAds.nitro.d.ts.map +1 -0
- package/nitro.json +18 -0
- package/nitrogen/generated/android/NitroPangleAds+autolinking.cmake +85 -0
- package/nitrogen/generated/android/NitroPangleAds+autolinking.gradle +27 -0
- package/nitrogen/generated/android/NitroPangleAdsOnLoad.cpp +50 -0
- package/nitrogen/generated/android/NitroPangleAdsOnLoad.hpp +25 -0
- package/nitrogen/generated/android/c++/JFunc_void_std__optional_PangleAdEventPayload_.hpp +78 -0
- package/nitrogen/generated/android/c++/JHybridPangleAdsSpec.cpp +88 -0
- package/nitrogen/generated/android/c++/JHybridPangleAdsSpec.hpp +69 -0
- package/nitrogen/generated/android/c++/JHybridPangleInterstitialAdSpec.cpp +85 -0
- package/nitrogen/generated/android/c++/JHybridPangleInterstitialAdSpec.hpp +68 -0
- package/nitrogen/generated/android/c++/JHybridPangleRewardedAdSpec.cpp +89 -0
- package/nitrogen/generated/android/c++/JHybridPangleRewardedAdSpec.hpp +68 -0
- package/nitrogen/generated/android/c++/JPangleAdEventPayload.hpp +58 -0
- package/nitrogen/generated/android/c++/JPangleAdEventType.hpp +74 -0
- package/nitrogen/generated/android/c++/JPangleAdVerificationOptions.hpp +58 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/pangleads/Func_void_std__optional_PangleAdEventPayload_.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/pangleads/HybridPangleAdsSpec.kt +72 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/pangleads/HybridPangleInterstitialAdSpec.kt +73 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/pangleads/HybridPangleRewardedAdSpec.kt +73 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/pangleads/NitroPangleAdsOnLoad.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/pangleads/PangleAdEventPayload.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/pangleads/PangleAdEventType.kt +26 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/pangleads/PangleAdVerificationOptions.kt +32 -0
- package/nitrogen/generated/ios/NitroPangleAds+autolinking.rb +60 -0
- package/nitrogen/generated/ios/NitroPangleAds-Swift-Cxx-Bridge.cpp +90 -0
- package/nitrogen/generated/ios/NitroPangleAds-Swift-Cxx-Bridge.hpp +270 -0
- package/nitrogen/generated/ios/NitroPangleAds-Swift-Cxx-Umbrella.hpp +66 -0
- package/nitrogen/generated/ios/NitroPangleAdsAutolinking.mm +33 -0
- package/nitrogen/generated/ios/NitroPangleAdsAutolinking.swift +25 -0
- package/nitrogen/generated/ios/c++/HybridPangleAdsSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridPangleAdsSpecSwift.hpp +114 -0
- package/nitrogen/generated/ios/c++/HybridPangleInterstitialAdSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridPangleInterstitialAdSpecSwift.hpp +107 -0
- package/nitrogen/generated/ios/c++/HybridPangleRewardedAdSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridPangleRewardedAdSpecSwift.hpp +110 -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_PangleAdEventPayload_.swift +54 -0
- package/nitrogen/generated/ios/swift/HybridPangleAdsSpec.swift +54 -0
- package/nitrogen/generated/ios/swift/HybridPangleAdsSpec_cxx.swift +193 -0
- package/nitrogen/generated/ios/swift/HybridPangleInterstitialAdSpec.swift +53 -0
- package/nitrogen/generated/ios/swift/HybridPangleInterstitialAdSpec_cxx.swift +186 -0
- package/nitrogen/generated/ios/swift/HybridPangleRewardedAdSpec.swift +53 -0
- package/nitrogen/generated/ios/swift/HybridPangleRewardedAdSpec_cxx.swift +193 -0
- package/nitrogen/generated/ios/swift/PangleAdEventPayload.swift +77 -0
- package/nitrogen/generated/ios/swift/PangleAdEventType.swift +60 -0
- package/nitrogen/generated/ios/swift/PangleAdVerificationOptions.swift +84 -0
- package/nitrogen/generated/shared/c++/HybridPangleAdsSpec.cpp +26 -0
- package/nitrogen/generated/shared/c++/HybridPangleAdsSpec.hpp +74 -0
- package/nitrogen/generated/shared/c++/HybridPangleInterstitialAdSpec.cpp +25 -0
- package/nitrogen/generated/shared/c++/HybridPangleInterstitialAdSpec.hpp +73 -0
- package/nitrogen/generated/shared/c++/HybridPangleRewardedAdSpec.cpp +25 -0
- package/nitrogen/generated/shared/c++/HybridPangleRewardedAdSpec.hpp +76 -0
- package/nitrogen/generated/shared/c++/PangleAdEventPayload.hpp +72 -0
- package/nitrogen/generated/shared/c++/PangleAdEventType.hpp +96 -0
- package/nitrogen/generated/shared/c++/PangleAdVerificationOptions.hpp +72 -0
- package/package.json +177 -0
- package/react-native.config.js +8 -0
- package/src/index.test.ts +255 -0
- package/src/index.ts +305 -0
- package/src/specs/PangleAds.nitro.ts +66 -0
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridPangleAdsSpec_cxx.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 Foundation
|
|
9
|
+
import NitroModules
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* A class implementation that bridges HybridPangleAdsSpec over to C++.
|
|
13
|
+
* In C++, we cannot use Swift protocols - so we need to wrap it in a class to make it strongly defined.
|
|
14
|
+
*
|
|
15
|
+
* Also, some Swift types need to be bridged with special handling:
|
|
16
|
+
* - Enums need to be wrapped in Structs, otherwise they cannot be accessed bi-directionally (Swift bug: https://github.com/swiftlang/swift/issues/75330)
|
|
17
|
+
* - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper
|
|
18
|
+
* - Throwing methods need to be wrapped with a Result<T, Error> type, as exceptions cannot be propagated to C++
|
|
19
|
+
*/
|
|
20
|
+
open class HybridPangleAdsSpec_cxx {
|
|
21
|
+
/**
|
|
22
|
+
* The Swift <> C++ bridge's namespace (`margelo::nitro::pangleads::bridge::swift`)
|
|
23
|
+
* from `NitroPangleAds-Swift-Cxx-Bridge.hpp`.
|
|
24
|
+
* This contains specialized C++ templates, and C++ helper functions that can be accessed from Swift.
|
|
25
|
+
*/
|
|
26
|
+
public typealias bridge = margelo.nitro.pangleads.bridge.swift
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Holds an instance of the `HybridPangleAdsSpec` Swift protocol.
|
|
30
|
+
*/
|
|
31
|
+
private var __implementation: any HybridPangleAdsSpec
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Holds a weak pointer to the C++ class that wraps the Swift class.
|
|
35
|
+
*/
|
|
36
|
+
private var __cxxPart: bridge.std__weak_ptr_HybridPangleAdsSpec_
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Create a new `HybridPangleAdsSpec_cxx` that wraps the given `HybridPangleAdsSpec`.
|
|
40
|
+
* All properties and methods bridge to C++ types.
|
|
41
|
+
*/
|
|
42
|
+
public init(_ implementation: any HybridPangleAdsSpec) {
|
|
43
|
+
self.__implementation = implementation
|
|
44
|
+
self.__cxxPart = .init()
|
|
45
|
+
/* no base class */
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Get the actual `HybridPangleAdsSpec` instance this class wraps.
|
|
50
|
+
*/
|
|
51
|
+
@inline(__always)
|
|
52
|
+
public func getHybridPangleAdsSpec() -> any HybridPangleAdsSpec {
|
|
53
|
+
return __implementation
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Casts this instance to a retained unsafe raw pointer.
|
|
58
|
+
* This acquires one additional strong reference on the object!
|
|
59
|
+
*/
|
|
60
|
+
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
61
|
+
return Unmanaged.passRetained(self).toOpaque()
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Casts an unsafe pointer to a `HybridPangleAdsSpec_cxx`.
|
|
66
|
+
* The pointer has to be a retained opaque `Unmanaged<HybridPangleAdsSpec_cxx>`.
|
|
67
|
+
* This removes one strong reference from the object!
|
|
68
|
+
*/
|
|
69
|
+
public class func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> HybridPangleAdsSpec_cxx {
|
|
70
|
+
return Unmanaged<HybridPangleAdsSpec_cxx>.fromOpaque(pointer).takeRetainedValue()
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Gets (or creates) the C++ part of this Hybrid Object.
|
|
75
|
+
* The C++ part is a `std::shared_ptr<HybridPangleAdsSpec>`.
|
|
76
|
+
*/
|
|
77
|
+
public func getCxxPart() -> bridge.std__shared_ptr_HybridPangleAdsSpec_ {
|
|
78
|
+
let cachedCxxPart = self.__cxxPart.lock()
|
|
79
|
+
if cachedCxxPart.__convertToBool() {
|
|
80
|
+
return cachedCxxPart
|
|
81
|
+
} else {
|
|
82
|
+
let newCxxPart = bridge.create_std__shared_ptr_HybridPangleAdsSpec_(self.toUnsafe())
|
|
83
|
+
__cxxPart = bridge.weakify_std__shared_ptr_HybridPangleAdsSpec_(newCxxPart)
|
|
84
|
+
return newCxxPart
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Get the memory size of the Swift class (plus size of any other allocations)
|
|
92
|
+
* so the JS VM can properly track it and garbage-collect the JS object if needed.
|
|
93
|
+
*/
|
|
94
|
+
@inline(__always)
|
|
95
|
+
public var memorySize: Int {
|
|
96
|
+
return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Call dispose() on the Swift class.
|
|
101
|
+
* This _may_ be called manually from JS.
|
|
102
|
+
*/
|
|
103
|
+
@inline(__always)
|
|
104
|
+
public func dispose() {
|
|
105
|
+
self.__implementation.dispose()
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Properties
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
// Methods
|
|
112
|
+
@inline(__always)
|
|
113
|
+
public final func initialize(appId: std.string) -> bridge.Result_std__shared_ptr_Promise_void___ {
|
|
114
|
+
do {
|
|
115
|
+
let __result = try self.__implementation.initialize(appId: String(appId))
|
|
116
|
+
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_void__ in
|
|
117
|
+
let __promise = bridge.create_std__shared_ptr_Promise_void__()
|
|
118
|
+
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_void__(__promise)
|
|
119
|
+
__result
|
|
120
|
+
.then({ __result in __promiseHolder.resolve() })
|
|
121
|
+
.catch({ __error in __promiseHolder.reject(__error.toCpp()) })
|
|
122
|
+
return __promise
|
|
123
|
+
}()
|
|
124
|
+
return bridge.create_Result_std__shared_ptr_Promise_void___(__resultCpp)
|
|
125
|
+
} catch (let __error) {
|
|
126
|
+
let __exceptionPtr = __error.toCpp()
|
|
127
|
+
return bridge.create_Result_std__shared_ptr_Promise_void___(__exceptionPtr)
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@inline(__always)
|
|
132
|
+
public final func setGDPRConsent(optIn: Bool) -> bridge.Result_void_ {
|
|
133
|
+
do {
|
|
134
|
+
try self.__implementation.setGDPRConsent(optIn: optIn)
|
|
135
|
+
return bridge.create_Result_void_()
|
|
136
|
+
} catch (let __error) {
|
|
137
|
+
let __exceptionPtr = __error.toCpp()
|
|
138
|
+
return bridge.create_Result_void_(__exceptionPtr)
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@inline(__always)
|
|
143
|
+
public final func setCCPAConsent(optIn: Bool) -> bridge.Result_void_ {
|
|
144
|
+
do {
|
|
145
|
+
try self.__implementation.setCCPAConsent(optIn: optIn)
|
|
146
|
+
return bridge.create_Result_void_()
|
|
147
|
+
} catch (let __error) {
|
|
148
|
+
let __exceptionPtr = __error.toCpp()
|
|
149
|
+
return bridge.create_Result_void_(__exceptionPtr)
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
@inline(__always)
|
|
154
|
+
public final func setCOPPA(isUserCoppa: Bool) -> bridge.Result_void_ {
|
|
155
|
+
do {
|
|
156
|
+
try self.__implementation.setCOPPA(isUserCoppa: isUserCoppa)
|
|
157
|
+
return bridge.create_Result_void_()
|
|
158
|
+
} catch (let __error) {
|
|
159
|
+
let __exceptionPtr = __error.toCpp()
|
|
160
|
+
return bridge.create_Result_void_(__exceptionPtr)
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
@inline(__always)
|
|
165
|
+
public final func createInterstitialAd(placementId: std.string) -> bridge.Result_std__shared_ptr_HybridPangleInterstitialAdSpec__ {
|
|
166
|
+
do {
|
|
167
|
+
let __result = try self.__implementation.createInterstitialAd(placementId: String(placementId))
|
|
168
|
+
let __resultCpp = { () -> bridge.std__shared_ptr_HybridPangleInterstitialAdSpec_ in
|
|
169
|
+
let __cxxWrapped = __result.getCxxWrapper()
|
|
170
|
+
return __cxxWrapped.getCxxPart()
|
|
171
|
+
}()
|
|
172
|
+
return bridge.create_Result_std__shared_ptr_HybridPangleInterstitialAdSpec__(__resultCpp)
|
|
173
|
+
} catch (let __error) {
|
|
174
|
+
let __exceptionPtr = __error.toCpp()
|
|
175
|
+
return bridge.create_Result_std__shared_ptr_HybridPangleInterstitialAdSpec__(__exceptionPtr)
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
@inline(__always)
|
|
180
|
+
public final func createRewardedAd(placementId: std.string) -> bridge.Result_std__shared_ptr_HybridPangleRewardedAdSpec__ {
|
|
181
|
+
do {
|
|
182
|
+
let __result = try self.__implementation.createRewardedAd(placementId: String(placementId))
|
|
183
|
+
let __resultCpp = { () -> bridge.std__shared_ptr_HybridPangleRewardedAdSpec_ in
|
|
184
|
+
let __cxxWrapped = __result.getCxxWrapper()
|
|
185
|
+
return __cxxWrapped.getCxxPart()
|
|
186
|
+
}()
|
|
187
|
+
return bridge.create_Result_std__shared_ptr_HybridPangleRewardedAdSpec__(__resultCpp)
|
|
188
|
+
} catch (let __error) {
|
|
189
|
+
let __exceptionPtr = __error.toCpp()
|
|
190
|
+
return bridge.create_Result_std__shared_ptr_HybridPangleRewardedAdSpec__(__exceptionPtr)
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridPangleInterstitialAdSpec.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 Foundation
|
|
9
|
+
import NitroModules
|
|
10
|
+
|
|
11
|
+
/// See ``HybridPangleInterstitialAdSpec``
|
|
12
|
+
public protocol HybridPangleInterstitialAdSpec_protocol: HybridObject {
|
|
13
|
+
// Properties
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
// Methods
|
|
17
|
+
func load() throws -> Void
|
|
18
|
+
func show() throws -> Promise<Void>
|
|
19
|
+
func addAdEventListener(eventType: PangleAdEventType, listener: @escaping (_ payload: PangleAdEventPayload?) -> Void) throws -> Double
|
|
20
|
+
func removeAdEventListener(subscriptionId: Double) throws -> Void
|
|
21
|
+
func removeAllListeners() throws -> Void
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/// See ``HybridPangleInterstitialAdSpec``
|
|
25
|
+
open class HybridPangleInterstitialAdSpec_base {
|
|
26
|
+
private weak var cxxWrapper: HybridPangleInterstitialAdSpec_cxx? = nil
|
|
27
|
+
public init() { }
|
|
28
|
+
public func getCxxWrapper() -> HybridPangleInterstitialAdSpec_cxx {
|
|
29
|
+
#if DEBUG
|
|
30
|
+
guard self is HybridPangleInterstitialAdSpec else {
|
|
31
|
+
fatalError("`self` is not a `HybridPangleInterstitialAdSpec`! Did you accidentally inherit from `HybridPangleInterstitialAdSpec_base` instead of `HybridPangleInterstitialAdSpec`?")
|
|
32
|
+
}
|
|
33
|
+
#endif
|
|
34
|
+
if let cxxWrapper = self.cxxWrapper {
|
|
35
|
+
return cxxWrapper
|
|
36
|
+
} else {
|
|
37
|
+
let cxxWrapper = HybridPangleInterstitialAdSpec_cxx(self as! HybridPangleInterstitialAdSpec)
|
|
38
|
+
self.cxxWrapper = cxxWrapper
|
|
39
|
+
return cxxWrapper
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* A Swift base-protocol representing the PangleInterstitialAd HybridObject.
|
|
46
|
+
* Implement this protocol to create Swift-based instances of PangleInterstitialAd.
|
|
47
|
+
* ```swift
|
|
48
|
+
* class HybridPangleInterstitialAd : HybridPangleInterstitialAdSpec {
|
|
49
|
+
* // ...
|
|
50
|
+
* }
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
public typealias HybridPangleInterstitialAdSpec = HybridPangleInterstitialAdSpec_protocol & HybridPangleInterstitialAdSpec_base
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridPangleInterstitialAdSpec_cxx.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 Foundation
|
|
9
|
+
import NitroModules
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* A class implementation that bridges HybridPangleInterstitialAdSpec over to C++.
|
|
13
|
+
* In C++, we cannot use Swift protocols - so we need to wrap it in a class to make it strongly defined.
|
|
14
|
+
*
|
|
15
|
+
* Also, some Swift types need to be bridged with special handling:
|
|
16
|
+
* - Enums need to be wrapped in Structs, otherwise they cannot be accessed bi-directionally (Swift bug: https://github.com/swiftlang/swift/issues/75330)
|
|
17
|
+
* - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper
|
|
18
|
+
* - Throwing methods need to be wrapped with a Result<T, Error> type, as exceptions cannot be propagated to C++
|
|
19
|
+
*/
|
|
20
|
+
open class HybridPangleInterstitialAdSpec_cxx {
|
|
21
|
+
/**
|
|
22
|
+
* The Swift <> C++ bridge's namespace (`margelo::nitro::pangleads::bridge::swift`)
|
|
23
|
+
* from `NitroPangleAds-Swift-Cxx-Bridge.hpp`.
|
|
24
|
+
* This contains specialized C++ templates, and C++ helper functions that can be accessed from Swift.
|
|
25
|
+
*/
|
|
26
|
+
public typealias bridge = margelo.nitro.pangleads.bridge.swift
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Holds an instance of the `HybridPangleInterstitialAdSpec` Swift protocol.
|
|
30
|
+
*/
|
|
31
|
+
private var __implementation: any HybridPangleInterstitialAdSpec
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Holds a weak pointer to the C++ class that wraps the Swift class.
|
|
35
|
+
*/
|
|
36
|
+
private var __cxxPart: bridge.std__weak_ptr_HybridPangleInterstitialAdSpec_
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Create a new `HybridPangleInterstitialAdSpec_cxx` that wraps the given `HybridPangleInterstitialAdSpec`.
|
|
40
|
+
* All properties and methods bridge to C++ types.
|
|
41
|
+
*/
|
|
42
|
+
public init(_ implementation: any HybridPangleInterstitialAdSpec) {
|
|
43
|
+
self.__implementation = implementation
|
|
44
|
+
self.__cxxPart = .init()
|
|
45
|
+
/* no base class */
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Get the actual `HybridPangleInterstitialAdSpec` instance this class wraps.
|
|
50
|
+
*/
|
|
51
|
+
@inline(__always)
|
|
52
|
+
public func getHybridPangleInterstitialAdSpec() -> any HybridPangleInterstitialAdSpec {
|
|
53
|
+
return __implementation
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Casts this instance to a retained unsafe raw pointer.
|
|
58
|
+
* This acquires one additional strong reference on the object!
|
|
59
|
+
*/
|
|
60
|
+
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
61
|
+
return Unmanaged.passRetained(self).toOpaque()
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Casts an unsafe pointer to a `HybridPangleInterstitialAdSpec_cxx`.
|
|
66
|
+
* The pointer has to be a retained opaque `Unmanaged<HybridPangleInterstitialAdSpec_cxx>`.
|
|
67
|
+
* This removes one strong reference from the object!
|
|
68
|
+
*/
|
|
69
|
+
public class func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> HybridPangleInterstitialAdSpec_cxx {
|
|
70
|
+
return Unmanaged<HybridPangleInterstitialAdSpec_cxx>.fromOpaque(pointer).takeRetainedValue()
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Gets (or creates) the C++ part of this Hybrid Object.
|
|
75
|
+
* The C++ part is a `std::shared_ptr<HybridPangleInterstitialAdSpec>`.
|
|
76
|
+
*/
|
|
77
|
+
public func getCxxPart() -> bridge.std__shared_ptr_HybridPangleInterstitialAdSpec_ {
|
|
78
|
+
let cachedCxxPart = self.__cxxPart.lock()
|
|
79
|
+
if cachedCxxPart.__convertToBool() {
|
|
80
|
+
return cachedCxxPart
|
|
81
|
+
} else {
|
|
82
|
+
let newCxxPart = bridge.create_std__shared_ptr_HybridPangleInterstitialAdSpec_(self.toUnsafe())
|
|
83
|
+
__cxxPart = bridge.weakify_std__shared_ptr_HybridPangleInterstitialAdSpec_(newCxxPart)
|
|
84
|
+
return newCxxPart
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Get the memory size of the Swift class (plus size of any other allocations)
|
|
92
|
+
* so the JS VM can properly track it and garbage-collect the JS object if needed.
|
|
93
|
+
*/
|
|
94
|
+
@inline(__always)
|
|
95
|
+
public var memorySize: Int {
|
|
96
|
+
return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Call dispose() on the Swift class.
|
|
101
|
+
* This _may_ be called manually from JS.
|
|
102
|
+
*/
|
|
103
|
+
@inline(__always)
|
|
104
|
+
public func dispose() {
|
|
105
|
+
self.__implementation.dispose()
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Properties
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
// Methods
|
|
112
|
+
@inline(__always)
|
|
113
|
+
public final func load() -> bridge.Result_void_ {
|
|
114
|
+
do {
|
|
115
|
+
try self.__implementation.load()
|
|
116
|
+
return bridge.create_Result_void_()
|
|
117
|
+
} catch (let __error) {
|
|
118
|
+
let __exceptionPtr = __error.toCpp()
|
|
119
|
+
return bridge.create_Result_void_(__exceptionPtr)
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@inline(__always)
|
|
124
|
+
public final func show() -> bridge.Result_std__shared_ptr_Promise_void___ {
|
|
125
|
+
do {
|
|
126
|
+
let __result = try self.__implementation.show()
|
|
127
|
+
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_void__ in
|
|
128
|
+
let __promise = bridge.create_std__shared_ptr_Promise_void__()
|
|
129
|
+
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_void__(__promise)
|
|
130
|
+
__result
|
|
131
|
+
.then({ __result in __promiseHolder.resolve() })
|
|
132
|
+
.catch({ __error in __promiseHolder.reject(__error.toCpp()) })
|
|
133
|
+
return __promise
|
|
134
|
+
}()
|
|
135
|
+
return bridge.create_Result_std__shared_ptr_Promise_void___(__resultCpp)
|
|
136
|
+
} catch (let __error) {
|
|
137
|
+
let __exceptionPtr = __error.toCpp()
|
|
138
|
+
return bridge.create_Result_std__shared_ptr_Promise_void___(__exceptionPtr)
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@inline(__always)
|
|
143
|
+
public final func addAdEventListener(eventType: Int32, listener: bridge.Func_void_std__optional_PangleAdEventPayload_) -> bridge.Result_double_ {
|
|
144
|
+
do {
|
|
145
|
+
let __result = try self.__implementation.addAdEventListener(eventType: margelo.nitro.pangleads.PangleAdEventType(rawValue: eventType)!, listener: { () -> (PangleAdEventPayload?) -> Void in
|
|
146
|
+
let __wrappedFunction = bridge.wrap_Func_void_std__optional_PangleAdEventPayload_(listener)
|
|
147
|
+
return { (__payload: PangleAdEventPayload?) -> Void in
|
|
148
|
+
__wrappedFunction.call({ () -> bridge.std__optional_PangleAdEventPayload_ in
|
|
149
|
+
if let __unwrappedValue = __payload {
|
|
150
|
+
return bridge.create_std__optional_PangleAdEventPayload_(__unwrappedValue)
|
|
151
|
+
} else {
|
|
152
|
+
return .init()
|
|
153
|
+
}
|
|
154
|
+
}())
|
|
155
|
+
}
|
|
156
|
+
}())
|
|
157
|
+
let __resultCpp = __result
|
|
158
|
+
return bridge.create_Result_double_(__resultCpp)
|
|
159
|
+
} catch (let __error) {
|
|
160
|
+
let __exceptionPtr = __error.toCpp()
|
|
161
|
+
return bridge.create_Result_double_(__exceptionPtr)
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
@inline(__always)
|
|
166
|
+
public final func removeAdEventListener(subscriptionId: Double) -> bridge.Result_void_ {
|
|
167
|
+
do {
|
|
168
|
+
try self.__implementation.removeAdEventListener(subscriptionId: subscriptionId)
|
|
169
|
+
return bridge.create_Result_void_()
|
|
170
|
+
} catch (let __error) {
|
|
171
|
+
let __exceptionPtr = __error.toCpp()
|
|
172
|
+
return bridge.create_Result_void_(__exceptionPtr)
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
@inline(__always)
|
|
177
|
+
public final func removeAllListeners() -> bridge.Result_void_ {
|
|
178
|
+
do {
|
|
179
|
+
try self.__implementation.removeAllListeners()
|
|
180
|
+
return bridge.create_Result_void_()
|
|
181
|
+
} catch (let __error) {
|
|
182
|
+
let __exceptionPtr = __error.toCpp()
|
|
183
|
+
return bridge.create_Result_void_(__exceptionPtr)
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridPangleRewardedAdSpec.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 Foundation
|
|
9
|
+
import NitroModules
|
|
10
|
+
|
|
11
|
+
/// See ``HybridPangleRewardedAdSpec``
|
|
12
|
+
public protocol HybridPangleRewardedAdSpec_protocol: HybridObject {
|
|
13
|
+
// Properties
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
// Methods
|
|
17
|
+
func load(verification: PangleAdVerificationOptions?) throws -> Void
|
|
18
|
+
func show() throws -> Promise<Void>
|
|
19
|
+
func addAdEventListener(eventType: PangleAdEventType, listener: @escaping (_ payload: PangleAdEventPayload?) -> Void) throws -> Double
|
|
20
|
+
func removeAdEventListener(subscriptionId: Double) throws -> Void
|
|
21
|
+
func removeAllListeners() throws -> Void
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/// See ``HybridPangleRewardedAdSpec``
|
|
25
|
+
open class HybridPangleRewardedAdSpec_base {
|
|
26
|
+
private weak var cxxWrapper: HybridPangleRewardedAdSpec_cxx? = nil
|
|
27
|
+
public init() { }
|
|
28
|
+
public func getCxxWrapper() -> HybridPangleRewardedAdSpec_cxx {
|
|
29
|
+
#if DEBUG
|
|
30
|
+
guard self is HybridPangleRewardedAdSpec else {
|
|
31
|
+
fatalError("`self` is not a `HybridPangleRewardedAdSpec`! Did you accidentally inherit from `HybridPangleRewardedAdSpec_base` instead of `HybridPangleRewardedAdSpec`?")
|
|
32
|
+
}
|
|
33
|
+
#endif
|
|
34
|
+
if let cxxWrapper = self.cxxWrapper {
|
|
35
|
+
return cxxWrapper
|
|
36
|
+
} else {
|
|
37
|
+
let cxxWrapper = HybridPangleRewardedAdSpec_cxx(self as! HybridPangleRewardedAdSpec)
|
|
38
|
+
self.cxxWrapper = cxxWrapper
|
|
39
|
+
return cxxWrapper
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* A Swift base-protocol representing the PangleRewardedAd HybridObject.
|
|
46
|
+
* Implement this protocol to create Swift-based instances of PangleRewardedAd.
|
|
47
|
+
* ```swift
|
|
48
|
+
* class HybridPangleRewardedAd : HybridPangleRewardedAdSpec {
|
|
49
|
+
* // ...
|
|
50
|
+
* }
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
public typealias HybridPangleRewardedAdSpec = HybridPangleRewardedAdSpec_protocol & HybridPangleRewardedAdSpec_base
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridPangleRewardedAdSpec_cxx.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 Foundation
|
|
9
|
+
import NitroModules
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* A class implementation that bridges HybridPangleRewardedAdSpec over to C++.
|
|
13
|
+
* In C++, we cannot use Swift protocols - so we need to wrap it in a class to make it strongly defined.
|
|
14
|
+
*
|
|
15
|
+
* Also, some Swift types need to be bridged with special handling:
|
|
16
|
+
* - Enums need to be wrapped in Structs, otherwise they cannot be accessed bi-directionally (Swift bug: https://github.com/swiftlang/swift/issues/75330)
|
|
17
|
+
* - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper
|
|
18
|
+
* - Throwing methods need to be wrapped with a Result<T, Error> type, as exceptions cannot be propagated to C++
|
|
19
|
+
*/
|
|
20
|
+
open class HybridPangleRewardedAdSpec_cxx {
|
|
21
|
+
/**
|
|
22
|
+
* The Swift <> C++ bridge's namespace (`margelo::nitro::pangleads::bridge::swift`)
|
|
23
|
+
* from `NitroPangleAds-Swift-Cxx-Bridge.hpp`.
|
|
24
|
+
* This contains specialized C++ templates, and C++ helper functions that can be accessed from Swift.
|
|
25
|
+
*/
|
|
26
|
+
public typealias bridge = margelo.nitro.pangleads.bridge.swift
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Holds an instance of the `HybridPangleRewardedAdSpec` Swift protocol.
|
|
30
|
+
*/
|
|
31
|
+
private var __implementation: any HybridPangleRewardedAdSpec
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Holds a weak pointer to the C++ class that wraps the Swift class.
|
|
35
|
+
*/
|
|
36
|
+
private var __cxxPart: bridge.std__weak_ptr_HybridPangleRewardedAdSpec_
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Create a new `HybridPangleRewardedAdSpec_cxx` that wraps the given `HybridPangleRewardedAdSpec`.
|
|
40
|
+
* All properties and methods bridge to C++ types.
|
|
41
|
+
*/
|
|
42
|
+
public init(_ implementation: any HybridPangleRewardedAdSpec) {
|
|
43
|
+
self.__implementation = implementation
|
|
44
|
+
self.__cxxPart = .init()
|
|
45
|
+
/* no base class */
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Get the actual `HybridPangleRewardedAdSpec` instance this class wraps.
|
|
50
|
+
*/
|
|
51
|
+
@inline(__always)
|
|
52
|
+
public func getHybridPangleRewardedAdSpec() -> any HybridPangleRewardedAdSpec {
|
|
53
|
+
return __implementation
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Casts this instance to a retained unsafe raw pointer.
|
|
58
|
+
* This acquires one additional strong reference on the object!
|
|
59
|
+
*/
|
|
60
|
+
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
61
|
+
return Unmanaged.passRetained(self).toOpaque()
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Casts an unsafe pointer to a `HybridPangleRewardedAdSpec_cxx`.
|
|
66
|
+
* The pointer has to be a retained opaque `Unmanaged<HybridPangleRewardedAdSpec_cxx>`.
|
|
67
|
+
* This removes one strong reference from the object!
|
|
68
|
+
*/
|
|
69
|
+
public class func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> HybridPangleRewardedAdSpec_cxx {
|
|
70
|
+
return Unmanaged<HybridPangleRewardedAdSpec_cxx>.fromOpaque(pointer).takeRetainedValue()
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Gets (or creates) the C++ part of this Hybrid Object.
|
|
75
|
+
* The C++ part is a `std::shared_ptr<HybridPangleRewardedAdSpec>`.
|
|
76
|
+
*/
|
|
77
|
+
public func getCxxPart() -> bridge.std__shared_ptr_HybridPangleRewardedAdSpec_ {
|
|
78
|
+
let cachedCxxPart = self.__cxxPart.lock()
|
|
79
|
+
if cachedCxxPart.__convertToBool() {
|
|
80
|
+
return cachedCxxPart
|
|
81
|
+
} else {
|
|
82
|
+
let newCxxPart = bridge.create_std__shared_ptr_HybridPangleRewardedAdSpec_(self.toUnsafe())
|
|
83
|
+
__cxxPart = bridge.weakify_std__shared_ptr_HybridPangleRewardedAdSpec_(newCxxPart)
|
|
84
|
+
return newCxxPart
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Get the memory size of the Swift class (plus size of any other allocations)
|
|
92
|
+
* so the JS VM can properly track it and garbage-collect the JS object if needed.
|
|
93
|
+
*/
|
|
94
|
+
@inline(__always)
|
|
95
|
+
public var memorySize: Int {
|
|
96
|
+
return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Call dispose() on the Swift class.
|
|
101
|
+
* This _may_ be called manually from JS.
|
|
102
|
+
*/
|
|
103
|
+
@inline(__always)
|
|
104
|
+
public func dispose() {
|
|
105
|
+
self.__implementation.dispose()
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Properties
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
// Methods
|
|
112
|
+
@inline(__always)
|
|
113
|
+
public final func load(verification: bridge.std__optional_PangleAdVerificationOptions_) -> bridge.Result_void_ {
|
|
114
|
+
do {
|
|
115
|
+
try self.__implementation.load(verification: { () -> PangleAdVerificationOptions? in
|
|
116
|
+
if bridge.has_value_std__optional_PangleAdVerificationOptions_(verification) {
|
|
117
|
+
let __unwrapped = bridge.get_std__optional_PangleAdVerificationOptions_(verification)
|
|
118
|
+
return __unwrapped
|
|
119
|
+
} else {
|
|
120
|
+
return nil
|
|
121
|
+
}
|
|
122
|
+
}())
|
|
123
|
+
return bridge.create_Result_void_()
|
|
124
|
+
} catch (let __error) {
|
|
125
|
+
let __exceptionPtr = __error.toCpp()
|
|
126
|
+
return bridge.create_Result_void_(__exceptionPtr)
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@inline(__always)
|
|
131
|
+
public final func show() -> bridge.Result_std__shared_ptr_Promise_void___ {
|
|
132
|
+
do {
|
|
133
|
+
let __result = try self.__implementation.show()
|
|
134
|
+
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_void__ in
|
|
135
|
+
let __promise = bridge.create_std__shared_ptr_Promise_void__()
|
|
136
|
+
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_void__(__promise)
|
|
137
|
+
__result
|
|
138
|
+
.then({ __result in __promiseHolder.resolve() })
|
|
139
|
+
.catch({ __error in __promiseHolder.reject(__error.toCpp()) })
|
|
140
|
+
return __promise
|
|
141
|
+
}()
|
|
142
|
+
return bridge.create_Result_std__shared_ptr_Promise_void___(__resultCpp)
|
|
143
|
+
} catch (let __error) {
|
|
144
|
+
let __exceptionPtr = __error.toCpp()
|
|
145
|
+
return bridge.create_Result_std__shared_ptr_Promise_void___(__exceptionPtr)
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
@inline(__always)
|
|
150
|
+
public final func addAdEventListener(eventType: Int32, listener: bridge.Func_void_std__optional_PangleAdEventPayload_) -> bridge.Result_double_ {
|
|
151
|
+
do {
|
|
152
|
+
let __result = try self.__implementation.addAdEventListener(eventType: margelo.nitro.pangleads.PangleAdEventType(rawValue: eventType)!, listener: { () -> (PangleAdEventPayload?) -> Void in
|
|
153
|
+
let __wrappedFunction = bridge.wrap_Func_void_std__optional_PangleAdEventPayload_(listener)
|
|
154
|
+
return { (__payload: PangleAdEventPayload?) -> Void in
|
|
155
|
+
__wrappedFunction.call({ () -> bridge.std__optional_PangleAdEventPayload_ in
|
|
156
|
+
if let __unwrappedValue = __payload {
|
|
157
|
+
return bridge.create_std__optional_PangleAdEventPayload_(__unwrappedValue)
|
|
158
|
+
} else {
|
|
159
|
+
return .init()
|
|
160
|
+
}
|
|
161
|
+
}())
|
|
162
|
+
}
|
|
163
|
+
}())
|
|
164
|
+
let __resultCpp = __result
|
|
165
|
+
return bridge.create_Result_double_(__resultCpp)
|
|
166
|
+
} catch (let __error) {
|
|
167
|
+
let __exceptionPtr = __error.toCpp()
|
|
168
|
+
return bridge.create_Result_double_(__exceptionPtr)
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
@inline(__always)
|
|
173
|
+
public final func removeAdEventListener(subscriptionId: Double) -> bridge.Result_void_ {
|
|
174
|
+
do {
|
|
175
|
+
try self.__implementation.removeAdEventListener(subscriptionId: subscriptionId)
|
|
176
|
+
return bridge.create_Result_void_()
|
|
177
|
+
} catch (let __error) {
|
|
178
|
+
let __exceptionPtr = __error.toCpp()
|
|
179
|
+
return bridge.create_Result_void_(__exceptionPtr)
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@inline(__always)
|
|
184
|
+
public final func removeAllListeners() -> bridge.Result_void_ {
|
|
185
|
+
do {
|
|
186
|
+
try self.__implementation.removeAllListeners()
|
|
187
|
+
return bridge.create_Result_void_()
|
|
188
|
+
} catch (let __error) {
|
|
189
|
+
let __exceptionPtr = __error.toCpp()
|
|
190
|
+
return bridge.create_Result_void_(__exceptionPtr)
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|