react-native-push-signal 0.1.4 → 0.1.7
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 +1 -1
- package/PushSignal.podspec +2 -12
- package/README.md +3 -11
- package/README.ru.md +3 -11
- package/android/build.gradle +1 -62
- package/android/consumer-rules.pro +3 -3
- package/android/src/main/AndroidManifest.xml +2 -2
- package/android/src/main/java/com/pushsignal/PushModels.kt +15 -0
- package/android/src/main/java/com/{margelo/nitro/pushsignal → pushsignal}/PushSignalCenter.kt +24 -71
- package/android/src/main/java/com/{margelo/nitro/pushsignal → pushsignal}/PushSignalInitProvider.kt +1 -1
- package/android/src/main/java/com/{margelo/nitro/pushsignal → pushsignal}/PushSignalMessagingService.kt +1 -1
- package/android/src/main/java/com/pushsignal/PushSignalModule.kt +88 -0
- package/android/src/main/java/com/pushsignal/PushSignalPackage.kt +30 -0
- package/ios/PushSignal.h +4 -0
- package/ios/PushSignal.mm +57 -0
- package/ios/PushSignalCenter.h +26 -0
- package/ios/PushSignalCenter.m +608 -0
- package/ios/PushSignalLaunchStore.m +6 -9
- package/lib/module/NativePushSignal.js +5 -0
- package/lib/module/NativePushSignal.js.map +1 -0
- package/lib/module/pushSignal.native.js +36 -12
- package/lib/module/pushSignal.native.js.map +1 -1
- package/lib/module/types.js +2 -0
- package/lib/module/types.js.map +1 -0
- package/lib/typescript/src/NativePushSignal.d.ts +22 -0
- package/lib/typescript/src/NativePushSignal.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/pushSignal.d.ts +1 -1
- package/lib/typescript/src/pushSignal.d.ts.map +1 -1
- package/lib/typescript/src/pushSignal.native.d.ts +1 -1
- package/lib/typescript/src/pushSignal.native.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +22 -0
- package/lib/typescript/src/types.d.ts.map +1 -0
- package/package.json +14 -19
- package/src/NativePushSignal.ts +25 -0
- package/src/index.tsx +1 -1
- package/src/pushSignal.native.tsx +60 -22
- package/src/pushSignal.tsx +1 -1
- package/src/types.ts +25 -0
- package/android/CMakeLists.txt +0 -24
- package/android/src/main/cpp/cpp-adapter.cpp +0 -11
- package/android/src/main/java/com/margelo/nitro/pushsignal/PushSignal.kt +0 -38
- package/android/src/main/java/com/margelo/nitro/pushsignal/PushSignalPackage.kt +0 -22
- package/ios/PushSignal.swift +0 -29
- package/ios/PushSignalCenter.swift +0 -588
- package/lib/module/PushSignal.nitro.js +0 -4
- package/lib/module/PushSignal.nitro.js.map +0 -1
- package/lib/typescript/src/PushSignal.nitro.d.ts +0 -32
- package/lib/typescript/src/PushSignal.nitro.d.ts.map +0 -1
- package/nitro.json +0 -23
- package/nitrogen/generated/android/c++/JAndroidFirebaseConfig.hpp +0 -70
- package/nitrogen/generated/android/c++/JFunc_std__shared_ptr_Promise_std__shared_ptr_Promise_bool_____PushMessage.hpp +0 -128
- package/nitrogen/generated/android/c++/JFunc_void_PushMessage.hpp +0 -80
- package/nitrogen/generated/android/c++/JHybridPushSignalSpec.cpp +0 -115
- package/nitrogen/generated/android/c++/JHybridPushSignalSpec.hpp +0 -66
- package/nitrogen/generated/android/c++/JPushCredentials.hpp +0 -70
- package/nitrogen/generated/android/c++/JPushEnvironment.hpp +0 -58
- package/nitrogen/generated/android/c++/JPushMessage.hpp +0 -84
- package/nitrogen/generated/android/c++/JPushPlatform.hpp +0 -58
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/pushsignal/AndroidFirebaseConfig.kt +0 -66
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/pushsignal/Func_std__shared_ptr_Promise_std__shared_ptr_Promise_bool_____PushMessage.kt +0 -78
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/pushsignal/Func_void_PushMessage.kt +0 -78
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/pushsignal/HybridPushSignalSpec.kt +0 -79
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/pushsignal/PushCredentials.kt +0 -61
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/pushsignal/PushEnvironment.kt +0 -23
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/pushsignal/PushMessage.kt +0 -66
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/pushsignal/PushPlatform.kt +0 -23
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/pushsignal/pushsignalOnLoad.kt +0 -35
- package/nitrogen/generated/android/pushsignal+autolinking.cmake +0 -81
- package/nitrogen/generated/android/pushsignal+autolinking.gradle +0 -27
- package/nitrogen/generated/android/pushsignalOnLoad.cpp +0 -58
- package/nitrogen/generated/android/pushsignalOnLoad.hpp +0 -34
- package/nitrogen/generated/ios/PushSignal+autolinking.rb +0 -62
- package/nitrogen/generated/ios/PushSignal-Swift-Cxx-Bridge.cpp +0 -90
- package/nitrogen/generated/ios/PushSignal-Swift-Cxx-Bridge.hpp +0 -345
- package/nitrogen/generated/ios/PushSignal-Swift-Cxx-Umbrella.hpp +0 -63
- package/nitrogen/generated/ios/PushSignalAutolinking.mm +0 -33
- package/nitrogen/generated/ios/PushSignalAutolinking.swift +0 -26
- package/nitrogen/generated/ios/c++/HybridPushSignalSpecSwift.cpp +0 -11
- package/nitrogen/generated/ios/c++/HybridPushSignalSpecSwift.hpp +0 -120
- package/nitrogen/generated/ios/swift/AndroidFirebaseConfig.swift +0 -96
- package/nitrogen/generated/ios/swift/Func_std__shared_ptr_Promise_std__shared_ptr_Promise_bool_____PushMessage.swift +0 -61
- package/nitrogen/generated/ios/swift/Func_void.swift +0 -46
- package/nitrogen/generated/ios/swift/Func_void_PushCredentials.swift +0 -46
- package/nitrogen/generated/ios/swift/Func_void_PushMessage.swift +0 -46
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +0 -46
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +0 -46
- package/nitrogen/generated/ios/swift/Func_void_std__shared_ptr_Promise_bool__.swift +0 -66
- package/nitrogen/generated/ios/swift/HybridPushSignalSpec.swift +0 -58
- package/nitrogen/generated/ios/swift/HybridPushSignalSpec_cxx.swift +0 -217
- package/nitrogen/generated/ios/swift/PushCredentials.swift +0 -45
- package/nitrogen/generated/ios/swift/PushEnvironment.swift +0 -40
- package/nitrogen/generated/ios/swift/PushMessage.swift +0 -97
- package/nitrogen/generated/ios/swift/PushPlatform.swift +0 -40
- package/nitrogen/generated/shared/c++/AndroidFirebaseConfig.hpp +0 -96
- package/nitrogen/generated/shared/c++/HybridPushSignalSpec.cpp +0 -24
- package/nitrogen/generated/shared/c++/HybridPushSignalSpec.hpp +0 -74
- package/nitrogen/generated/shared/c++/PushCredentials.hpp +0 -97
- package/nitrogen/generated/shared/c++/PushEnvironment.hpp +0 -76
- package/nitrogen/generated/shared/c++/PushMessage.hpp +0 -97
- package/nitrogen/generated/shared/c++/PushPlatform.hpp +0 -76
- package/src/PushSignal.nitro.ts +0 -39
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// pushsignalOnLoad.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
|
-
#ifndef BUILDING_PUSHSIGNAL_WITH_GENERATED_CMAKE_PROJECT
|
|
9
|
-
#error pushsignalOnLoad.cpp is not being built with the autogenerated CMakeLists.txt project. Is a different CMakeLists.txt building this?
|
|
10
|
-
#endif
|
|
11
|
-
|
|
12
|
-
#include "pushsignalOnLoad.hpp"
|
|
13
|
-
|
|
14
|
-
#include <jni.h>
|
|
15
|
-
#include <fbjni/fbjni.h>
|
|
16
|
-
#include <NitroModules/HybridObjectRegistry.hpp>
|
|
17
|
-
|
|
18
|
-
#include "JHybridPushSignalSpec.hpp"
|
|
19
|
-
#include "JFunc_std__shared_ptr_Promise_std__shared_ptr_Promise_bool_____PushMessage.hpp"
|
|
20
|
-
#include "JFunc_void_PushMessage.hpp"
|
|
21
|
-
#include <NitroModules/DefaultConstructableObject.hpp>
|
|
22
|
-
|
|
23
|
-
namespace margelo::nitro::pushsignal {
|
|
24
|
-
|
|
25
|
-
int initialize(JavaVM* vm) {
|
|
26
|
-
return facebook::jni::initialize(vm, []() {
|
|
27
|
-
::margelo::nitro::pushsignal::registerAllNatives();
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
struct JHybridPushSignalSpecImpl: public jni::JavaClass<JHybridPushSignalSpecImpl, JHybridPushSignalSpec::JavaPart> {
|
|
32
|
-
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/pushsignal/PushSignal;";
|
|
33
|
-
static std::shared_ptr<JHybridPushSignalSpec> create() {
|
|
34
|
-
static const auto constructorFn = javaClassStatic()->getConstructor<JHybridPushSignalSpecImpl::javaobject()>();
|
|
35
|
-
jni::local_ref<JHybridPushSignalSpec::JavaPart> javaPart = javaClassStatic()->newObject(constructorFn);
|
|
36
|
-
return javaPart->getJHybridPushSignalSpec();
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
void registerAllNatives() {
|
|
41
|
-
using namespace margelo::nitro;
|
|
42
|
-
using namespace margelo::nitro::pushsignal;
|
|
43
|
-
|
|
44
|
-
// Register native JNI methods
|
|
45
|
-
margelo::nitro::pushsignal::JHybridPushSignalSpec::CxxPart::registerNatives();
|
|
46
|
-
margelo::nitro::pushsignal::JFunc_std__shared_ptr_Promise_std__shared_ptr_Promise_bool_____PushMessage_cxx::registerNatives();
|
|
47
|
-
margelo::nitro::pushsignal::JFunc_void_PushMessage_cxx::registerNatives();
|
|
48
|
-
|
|
49
|
-
// Register Nitro Hybrid Objects
|
|
50
|
-
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
51
|
-
"PushSignal",
|
|
52
|
-
[]() -> std::shared_ptr<HybridObject> {
|
|
53
|
-
return JHybridPushSignalSpecImpl::create();
|
|
54
|
-
}
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
} // namespace margelo::nitro::pushsignal
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// pushsignalOnLoad.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
|
-
#include <jni.h>
|
|
9
|
-
#include <functional>
|
|
10
|
-
#include <NitroModules/NitroDefines.hpp>
|
|
11
|
-
|
|
12
|
-
namespace margelo::nitro::pushsignal {
|
|
13
|
-
|
|
14
|
-
[[deprecated("Use registerNatives() instead.")]]
|
|
15
|
-
int initialize(JavaVM* vm);
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Register the native (C++) part of pushsignal, and autolinks all Hybrid Objects.
|
|
19
|
-
* Call this in your `JNI_OnLoad` function (probably inside `cpp-adapter.cpp`),
|
|
20
|
-
* inside a `facebook::jni::initialize(vm, ...)` call.
|
|
21
|
-
* Example:
|
|
22
|
-
* ```cpp (cpp-adapter.cpp)
|
|
23
|
-
* JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void*) {
|
|
24
|
-
* return facebook::jni::initialize(vm, []() {
|
|
25
|
-
* // register all pushsignal HybridObjects
|
|
26
|
-
* margelo::nitro::pushsignal::registerNatives();
|
|
27
|
-
* // any other custom registrations go here.
|
|
28
|
-
* });
|
|
29
|
-
* }
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
void registerAllNatives();
|
|
33
|
-
|
|
34
|
-
} // namespace margelo::nitro::pushsignal
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
#
|
|
2
|
-
# PushSignal+autolinking.rb
|
|
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
|
-
# This is a Ruby script that adds all files generated by Nitrogen
|
|
9
|
-
# to the given podspec.
|
|
10
|
-
#
|
|
11
|
-
# To use it, add this to your .podspec:
|
|
12
|
-
# ```ruby
|
|
13
|
-
# Pod::Spec.new do |spec|
|
|
14
|
-
# # ...
|
|
15
|
-
#
|
|
16
|
-
# # Add all files generated by Nitrogen
|
|
17
|
-
# load 'nitrogen/generated/ios/PushSignal+autolinking.rb'
|
|
18
|
-
# add_nitrogen_files(spec)
|
|
19
|
-
# end
|
|
20
|
-
# ```
|
|
21
|
-
|
|
22
|
-
def add_nitrogen_files(spec)
|
|
23
|
-
Pod::UI.puts "[NitroModules] 🔥 PushSignal is boosted by nitro!"
|
|
24
|
-
|
|
25
|
-
spec.dependency "NitroModules"
|
|
26
|
-
|
|
27
|
-
current_source_files = Array(spec.attributes_hash['source_files'])
|
|
28
|
-
spec.source_files = current_source_files + [
|
|
29
|
-
# Generated cross-platform specs
|
|
30
|
-
"nitrogen/generated/shared/**/*.{h,hpp,c,cpp,swift}",
|
|
31
|
-
# Generated bridges for the cross-platform specs
|
|
32
|
-
"nitrogen/generated/ios/**/*.{h,hpp,c,cpp,mm,swift}",
|
|
33
|
-
]
|
|
34
|
-
|
|
35
|
-
current_public_header_files = Array(spec.attributes_hash['public_header_files'])
|
|
36
|
-
spec.public_header_files = current_public_header_files + [
|
|
37
|
-
# Generated specs
|
|
38
|
-
"nitrogen/generated/shared/**/*.{h,hpp}",
|
|
39
|
-
# Swift to C++ bridging helpers
|
|
40
|
-
"nitrogen/generated/ios/PushSignal-Swift-Cxx-Bridge.hpp"
|
|
41
|
-
]
|
|
42
|
-
|
|
43
|
-
current_private_header_files = Array(spec.attributes_hash['private_header_files'])
|
|
44
|
-
spec.private_header_files = current_private_header_files + [
|
|
45
|
-
# iOS specific specs
|
|
46
|
-
"nitrogen/generated/ios/c++/**/*.{h,hpp}",
|
|
47
|
-
# Views are framework-specific and should be private
|
|
48
|
-
"nitrogen/generated/shared/**/views/**/*"
|
|
49
|
-
]
|
|
50
|
-
|
|
51
|
-
current_pod_target_xcconfig = spec.attributes_hash['pod_target_xcconfig'] || {}
|
|
52
|
-
spec.pod_target_xcconfig = current_pod_target_xcconfig.merge({
|
|
53
|
-
# Use C++ 20
|
|
54
|
-
"CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
|
|
55
|
-
# Enables C++ <-> Swift interop (by default it's only ObjC)
|
|
56
|
-
"SWIFT_OBJC_INTEROP_MODE" => "objcxx",
|
|
57
|
-
# Enables stricter modular headers
|
|
58
|
-
"DEFINES_MODULE" => "YES",
|
|
59
|
-
# Disable auto-generated ObjC header for Swift (Static linkage on Xcode 26.4 breaks here)
|
|
60
|
-
"SWIFT_INSTALL_OBJC_HEADER" => "NO",
|
|
61
|
-
})
|
|
62
|
-
end
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// PushSignal-Swift-Cxx-Bridge.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 "PushSignal-Swift-Cxx-Bridge.hpp"
|
|
9
|
-
|
|
10
|
-
// Include C++ implementation defined types
|
|
11
|
-
#include "HybridPushSignalSpecSwift.hpp"
|
|
12
|
-
#include "PushSignal-Swift-Cxx-Umbrella.hpp"
|
|
13
|
-
#include <NitroModules/NitroDefines.hpp>
|
|
14
|
-
|
|
15
|
-
namespace margelo::nitro::pushsignal::bridge::swift {
|
|
16
|
-
|
|
17
|
-
// pragma MARK: std::function<void()>
|
|
18
|
-
Func_void create_Func_void(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
19
|
-
auto swiftClosure = PushSignal::Func_void::fromUnsafe(swiftClosureWrapper);
|
|
20
|
-
return [swiftClosure = std::move(swiftClosure)]() mutable -> void {
|
|
21
|
-
swiftClosure.call();
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// pragma MARK: std::function<void(const std::exception_ptr& /* error */)>
|
|
26
|
-
Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
27
|
-
auto swiftClosure = PushSignal::Func_void_std__exception_ptr::fromUnsafe(swiftClosureWrapper);
|
|
28
|
-
return [swiftClosure = std::move(swiftClosure)](const std::exception_ptr& error) mutable -> void {
|
|
29
|
-
swiftClosure.call(error);
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// pragma MARK: std::function<void(const PushCredentials& /* result */)>
|
|
34
|
-
Func_void_PushCredentials create_Func_void_PushCredentials(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
35
|
-
auto swiftClosure = PushSignal::Func_void_PushCredentials::fromUnsafe(swiftClosureWrapper);
|
|
36
|
-
return [swiftClosure = std::move(swiftClosure)](const PushCredentials& result) mutable -> void {
|
|
37
|
-
swiftClosure.call(result);
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// pragma MARK: std::function<void(bool /* result */)>
|
|
42
|
-
Func_void_bool create_Func_void_bool(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
43
|
-
auto swiftClosure = PushSignal::Func_void_bool::fromUnsafe(swiftClosureWrapper);
|
|
44
|
-
return [swiftClosure = std::move(swiftClosure)](bool result) mutable -> void {
|
|
45
|
-
swiftClosure.call(result);
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// pragma MARK: std::function<std::shared_ptr<Promise<std::shared_ptr<Promise<bool>>>>(const PushMessage& /* message */)>
|
|
50
|
-
Func_std__shared_ptr_Promise_std__shared_ptr_Promise_bool_____PushMessage create_Func_std__shared_ptr_Promise_std__shared_ptr_Promise_bool_____PushMessage(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
51
|
-
auto swiftClosure = PushSignal::Func_std__shared_ptr_Promise_std__shared_ptr_Promise_bool_____PushMessage::fromUnsafe(swiftClosureWrapper);
|
|
52
|
-
return [swiftClosure = std::move(swiftClosure)](const PushMessage& message) mutable -> std::shared_ptr<Promise<std::shared_ptr<Promise<bool>>>> {
|
|
53
|
-
auto __result = swiftClosure.call(message);
|
|
54
|
-
return __result;
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// pragma MARK: std::function<void(const std::shared_ptr<Promise<bool>>& /* result */)>
|
|
59
|
-
Func_void_std__shared_ptr_Promise_bool__ create_Func_void_std__shared_ptr_Promise_bool__(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
60
|
-
auto swiftClosure = PushSignal::Func_void_std__shared_ptr_Promise_bool__::fromUnsafe(swiftClosureWrapper);
|
|
61
|
-
return [swiftClosure = std::move(swiftClosure)](const std::shared_ptr<Promise<bool>>& result) mutable -> void {
|
|
62
|
-
swiftClosure.call(result);
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// pragma MARK: std::function<void(const PushMessage& /* message */)>
|
|
67
|
-
Func_void_PushMessage create_Func_void_PushMessage(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
68
|
-
auto swiftClosure = PushSignal::Func_void_PushMessage::fromUnsafe(swiftClosureWrapper);
|
|
69
|
-
return [swiftClosure = std::move(swiftClosure)](const PushMessage& message) mutable -> void {
|
|
70
|
-
swiftClosure.call(message);
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// pragma MARK: std::shared_ptr<HybridPushSignalSpec>
|
|
75
|
-
std::shared_ptr<HybridPushSignalSpec> create_std__shared_ptr_HybridPushSignalSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
|
|
76
|
-
PushSignal::HybridPushSignalSpec_cxx swiftPart = PushSignal::HybridPushSignalSpec_cxx::fromUnsafe(swiftUnsafePointer);
|
|
77
|
-
return std::make_shared<margelo::nitro::pushsignal::HybridPushSignalSpecSwift>(swiftPart);
|
|
78
|
-
}
|
|
79
|
-
void* NON_NULL get_std__shared_ptr_HybridPushSignalSpec_(std__shared_ptr_HybridPushSignalSpec_ cppType) {
|
|
80
|
-
std::shared_ptr<margelo::nitro::pushsignal::HybridPushSignalSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::pushsignal::HybridPushSignalSpecSwift>(cppType);
|
|
81
|
-
#ifdef NITRO_DEBUG
|
|
82
|
-
if (swiftWrapper == nullptr) [[unlikely]] {
|
|
83
|
-
throw std::runtime_error("Class \"HybridPushSignalSpec\" is not implemented in Swift!");
|
|
84
|
-
}
|
|
85
|
-
#endif
|
|
86
|
-
PushSignal::HybridPushSignalSpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
|
|
87
|
-
return swiftPart.toUnsafe();
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
} // namespace margelo::nitro::pushsignal::bridge::swift
|
|
@@ -1,345 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// PushSignal-Swift-Cxx-Bridge.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
|
-
// Forward declarations of C++ defined types
|
|
11
|
-
// Forward declaration of `HybridPushSignalSpec` to properly resolve imports.
|
|
12
|
-
namespace margelo::nitro::pushsignal { class HybridPushSignalSpec; }
|
|
13
|
-
// Forward declaration of `PushCredentials` to properly resolve imports.
|
|
14
|
-
namespace margelo::nitro::pushsignal { struct PushCredentials; }
|
|
15
|
-
// Forward declaration of `PushEnvironment` to properly resolve imports.
|
|
16
|
-
namespace margelo::nitro::pushsignal { enum class PushEnvironment; }
|
|
17
|
-
// Forward declaration of `PushMessage` to properly resolve imports.
|
|
18
|
-
namespace margelo::nitro::pushsignal { struct PushMessage; }
|
|
19
|
-
// Forward declaration of `PushPlatform` to properly resolve imports.
|
|
20
|
-
namespace margelo::nitro::pushsignal { enum class PushPlatform; }
|
|
21
|
-
|
|
22
|
-
// Forward declarations of Swift defined types
|
|
23
|
-
// Forward declaration of `HybridPushSignalSpec_cxx` to properly resolve imports.
|
|
24
|
-
namespace PushSignal { class HybridPushSignalSpec_cxx; }
|
|
25
|
-
|
|
26
|
-
// Include C++ defined types
|
|
27
|
-
#include "HybridPushSignalSpec.hpp"
|
|
28
|
-
#include "PushCredentials.hpp"
|
|
29
|
-
#include "PushEnvironment.hpp"
|
|
30
|
-
#include "PushMessage.hpp"
|
|
31
|
-
#include "PushPlatform.hpp"
|
|
32
|
-
#include <NitroModules/Promise.hpp>
|
|
33
|
-
#include <NitroModules/PromiseHolder.hpp>
|
|
34
|
-
#include <NitroModules/Result.hpp>
|
|
35
|
-
#include <exception>
|
|
36
|
-
#include <functional>
|
|
37
|
-
#include <memory>
|
|
38
|
-
#include <optional>
|
|
39
|
-
#include <string>
|
|
40
|
-
#include <unordered_map>
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Contains specialized versions of C++ templated types so they can be accessed from Swift,
|
|
44
|
-
* as well as helper functions to interact with those C++ types from Swift.
|
|
45
|
-
*/
|
|
46
|
-
namespace margelo::nitro::pushsignal::bridge::swift {
|
|
47
|
-
|
|
48
|
-
// pragma MARK: std::shared_ptr<Promise<void>>
|
|
49
|
-
/**
|
|
50
|
-
* Specialized version of `std::shared_ptr<Promise<void>>`.
|
|
51
|
-
*/
|
|
52
|
-
using std__shared_ptr_Promise_void__ = std::shared_ptr<Promise<void>>;
|
|
53
|
-
inline std::shared_ptr<Promise<void>> create_std__shared_ptr_Promise_void__() noexcept {
|
|
54
|
-
return Promise<void>::create();
|
|
55
|
-
}
|
|
56
|
-
inline PromiseHolder<void> wrap_std__shared_ptr_Promise_void__(std::shared_ptr<Promise<void>> promise) noexcept {
|
|
57
|
-
return PromiseHolder<void>(std::move(promise));
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// pragma MARK: std::function<void()>
|
|
61
|
-
/**
|
|
62
|
-
* Specialized version of `std::function<void()>`.
|
|
63
|
-
*/
|
|
64
|
-
using Func_void = std::function<void()>;
|
|
65
|
-
/**
|
|
66
|
-
* Wrapper class for a `std::function<void()>`, this can be used from Swift.
|
|
67
|
-
*/
|
|
68
|
-
class Func_void_Wrapper final {
|
|
69
|
-
public:
|
|
70
|
-
explicit Func_void_Wrapper(std::function<void()>&& func): _function(std::make_unique<std::function<void()>>(std::move(func))) {}
|
|
71
|
-
inline void call() const noexcept {
|
|
72
|
-
_function->operator()();
|
|
73
|
-
}
|
|
74
|
-
private:
|
|
75
|
-
std::unique_ptr<std::function<void()>> _function;
|
|
76
|
-
} SWIFT_NONCOPYABLE;
|
|
77
|
-
Func_void create_Func_void(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
78
|
-
inline Func_void_Wrapper wrap_Func_void(Func_void value) noexcept {
|
|
79
|
-
return Func_void_Wrapper(std::move(value));
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// pragma MARK: std::function<void(const std::exception_ptr& /* error */)>
|
|
83
|
-
/**
|
|
84
|
-
* Specialized version of `std::function<void(const std::exception_ptr&)>`.
|
|
85
|
-
*/
|
|
86
|
-
using Func_void_std__exception_ptr = std::function<void(const std::exception_ptr& /* error */)>;
|
|
87
|
-
/**
|
|
88
|
-
* Wrapper class for a `std::function<void(const std::exception_ptr& / * error * /)>`, this can be used from Swift.
|
|
89
|
-
*/
|
|
90
|
-
class Func_void_std__exception_ptr_Wrapper final {
|
|
91
|
-
public:
|
|
92
|
-
explicit Func_void_std__exception_ptr_Wrapper(std::function<void(const std::exception_ptr& /* error */)>&& func): _function(std::make_unique<std::function<void(const std::exception_ptr& /* error */)>>(std::move(func))) {}
|
|
93
|
-
inline void call(std::exception_ptr error) const noexcept {
|
|
94
|
-
_function->operator()(error);
|
|
95
|
-
}
|
|
96
|
-
private:
|
|
97
|
-
std::unique_ptr<std::function<void(const std::exception_ptr& /* error */)>> _function;
|
|
98
|
-
} SWIFT_NONCOPYABLE;
|
|
99
|
-
Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
100
|
-
inline Func_void_std__exception_ptr_Wrapper wrap_Func_void_std__exception_ptr(Func_void_std__exception_ptr value) noexcept {
|
|
101
|
-
return Func_void_std__exception_ptr_Wrapper(std::move(value));
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
// pragma MARK: std::optional<std::string>
|
|
105
|
-
/**
|
|
106
|
-
* Specialized version of `std::optional<std::string>`.
|
|
107
|
-
*/
|
|
108
|
-
using std__optional_std__string_ = std::optional<std::string>;
|
|
109
|
-
inline std::optional<std::string> create_std__optional_std__string_(const std::string& value) noexcept {
|
|
110
|
-
return std::optional<std::string>(value);
|
|
111
|
-
}
|
|
112
|
-
inline bool has_value_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
|
|
113
|
-
return optional.has_value();
|
|
114
|
-
}
|
|
115
|
-
inline std::string get_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
|
|
116
|
-
return optional.value();
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
// pragma MARK: std::optional<PushEnvironment>
|
|
120
|
-
/**
|
|
121
|
-
* Specialized version of `std::optional<PushEnvironment>`.
|
|
122
|
-
*/
|
|
123
|
-
using std__optional_PushEnvironment_ = std::optional<PushEnvironment>;
|
|
124
|
-
inline std::optional<PushEnvironment> create_std__optional_PushEnvironment_(const PushEnvironment& value) noexcept {
|
|
125
|
-
return std::optional<PushEnvironment>(value);
|
|
126
|
-
}
|
|
127
|
-
inline bool has_value_std__optional_PushEnvironment_(const std::optional<PushEnvironment>& optional) noexcept {
|
|
128
|
-
return optional.has_value();
|
|
129
|
-
}
|
|
130
|
-
inline PushEnvironment get_std__optional_PushEnvironment_(const std::optional<PushEnvironment>& optional) noexcept {
|
|
131
|
-
return optional.value();
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
// pragma MARK: std::shared_ptr<Promise<PushCredentials>>
|
|
135
|
-
/**
|
|
136
|
-
* Specialized version of `std::shared_ptr<Promise<PushCredentials>>`.
|
|
137
|
-
*/
|
|
138
|
-
using std__shared_ptr_Promise_PushCredentials__ = std::shared_ptr<Promise<PushCredentials>>;
|
|
139
|
-
inline std::shared_ptr<Promise<PushCredentials>> create_std__shared_ptr_Promise_PushCredentials__() noexcept {
|
|
140
|
-
return Promise<PushCredentials>::create();
|
|
141
|
-
}
|
|
142
|
-
inline PromiseHolder<PushCredentials> wrap_std__shared_ptr_Promise_PushCredentials__(std::shared_ptr<Promise<PushCredentials>> promise) noexcept {
|
|
143
|
-
return PromiseHolder<PushCredentials>(std::move(promise));
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
// pragma MARK: std::function<void(const PushCredentials& /* result */)>
|
|
147
|
-
/**
|
|
148
|
-
* Specialized version of `std::function<void(const PushCredentials&)>`.
|
|
149
|
-
*/
|
|
150
|
-
using Func_void_PushCredentials = std::function<void(const PushCredentials& /* result */)>;
|
|
151
|
-
/**
|
|
152
|
-
* Wrapper class for a `std::function<void(const PushCredentials& / * result * /)>`, this can be used from Swift.
|
|
153
|
-
*/
|
|
154
|
-
class Func_void_PushCredentials_Wrapper final {
|
|
155
|
-
public:
|
|
156
|
-
explicit Func_void_PushCredentials_Wrapper(std::function<void(const PushCredentials& /* result */)>&& func): _function(std::make_unique<std::function<void(const PushCredentials& /* result */)>>(std::move(func))) {}
|
|
157
|
-
inline void call(PushCredentials result) const noexcept {
|
|
158
|
-
_function->operator()(result);
|
|
159
|
-
}
|
|
160
|
-
private:
|
|
161
|
-
std::unique_ptr<std::function<void(const PushCredentials& /* result */)>> _function;
|
|
162
|
-
} SWIFT_NONCOPYABLE;
|
|
163
|
-
Func_void_PushCredentials create_Func_void_PushCredentials(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
164
|
-
inline Func_void_PushCredentials_Wrapper wrap_Func_void_PushCredentials(Func_void_PushCredentials value) noexcept {
|
|
165
|
-
return Func_void_PushCredentials_Wrapper(std::move(value));
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
// pragma MARK: std::shared_ptr<Promise<bool>>
|
|
169
|
-
/**
|
|
170
|
-
* Specialized version of `std::shared_ptr<Promise<bool>>`.
|
|
171
|
-
*/
|
|
172
|
-
using std__shared_ptr_Promise_bool__ = std::shared_ptr<Promise<bool>>;
|
|
173
|
-
inline std::shared_ptr<Promise<bool>> create_std__shared_ptr_Promise_bool__() noexcept {
|
|
174
|
-
return Promise<bool>::create();
|
|
175
|
-
}
|
|
176
|
-
inline PromiseHolder<bool> wrap_std__shared_ptr_Promise_bool__(std::shared_ptr<Promise<bool>> promise) noexcept {
|
|
177
|
-
return PromiseHolder<bool>(std::move(promise));
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
// pragma MARK: std::function<void(bool /* result */)>
|
|
181
|
-
/**
|
|
182
|
-
* Specialized version of `std::function<void(bool)>`.
|
|
183
|
-
*/
|
|
184
|
-
using Func_void_bool = std::function<void(bool /* result */)>;
|
|
185
|
-
/**
|
|
186
|
-
* Wrapper class for a `std::function<void(bool / * result * /)>`, this can be used from Swift.
|
|
187
|
-
*/
|
|
188
|
-
class Func_void_bool_Wrapper final {
|
|
189
|
-
public:
|
|
190
|
-
explicit Func_void_bool_Wrapper(std::function<void(bool /* result */)>&& func): _function(std::make_unique<std::function<void(bool /* result */)>>(std::move(func))) {}
|
|
191
|
-
inline void call(bool result) const noexcept {
|
|
192
|
-
_function->operator()(result);
|
|
193
|
-
}
|
|
194
|
-
private:
|
|
195
|
-
std::unique_ptr<std::function<void(bool /* result */)>> _function;
|
|
196
|
-
} SWIFT_NONCOPYABLE;
|
|
197
|
-
Func_void_bool create_Func_void_bool(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
198
|
-
inline Func_void_bool_Wrapper wrap_Func_void_bool(Func_void_bool value) noexcept {
|
|
199
|
-
return Func_void_bool_Wrapper(std::move(value));
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
// pragma MARK: std::unordered_map<std::string, std::string>
|
|
203
|
-
/**
|
|
204
|
-
* Specialized version of `std::unordered_map<std::string, std::string>`.
|
|
205
|
-
*/
|
|
206
|
-
using std__unordered_map_std__string__std__string_ = std::unordered_map<std::string, std::string>;
|
|
207
|
-
inline std::unordered_map<std::string, std::string> create_std__unordered_map_std__string__std__string_(size_t size) noexcept {
|
|
208
|
-
std::unordered_map<std::string, std::string> map;
|
|
209
|
-
map.reserve(size);
|
|
210
|
-
return map;
|
|
211
|
-
}
|
|
212
|
-
inline std::vector<std::string> get_std__unordered_map_std__string__std__string__keys(const std__unordered_map_std__string__std__string_& map) noexcept {
|
|
213
|
-
std::vector<std::string> keys;
|
|
214
|
-
keys.reserve(map.size());
|
|
215
|
-
for (const auto& entry : map) {
|
|
216
|
-
keys.push_back(entry.first);
|
|
217
|
-
}
|
|
218
|
-
return keys;
|
|
219
|
-
}
|
|
220
|
-
inline std::string get_std__unordered_map_std__string__std__string__value(const std__unordered_map_std__string__std__string_& map, const std::string& key) noexcept {
|
|
221
|
-
return map.find(key)->second;
|
|
222
|
-
}
|
|
223
|
-
inline void emplace_std__unordered_map_std__string__std__string_(std__unordered_map_std__string__std__string_& map, const std::string& key, const std::string& value) noexcept {
|
|
224
|
-
map.emplace(key, value);
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
// pragma MARK: std::function<std::shared_ptr<Promise<std::shared_ptr<Promise<bool>>>>(const PushMessage& /* message */)>
|
|
228
|
-
/**
|
|
229
|
-
* Specialized version of `std::function<std::shared_ptr<Promise<std::shared_ptr<Promise<bool>>>>(const PushMessage&)>`.
|
|
230
|
-
*/
|
|
231
|
-
using Func_std__shared_ptr_Promise_std__shared_ptr_Promise_bool_____PushMessage = std::function<std::shared_ptr<Promise<std::shared_ptr<Promise<bool>>>>(const PushMessage& /* message */)>;
|
|
232
|
-
/**
|
|
233
|
-
* Wrapper class for a `std::function<std::shared_ptr<Promise<std::shared_ptr<Promise<bool>>>>(const PushMessage& / * message * /)>`, this can be used from Swift.
|
|
234
|
-
*/
|
|
235
|
-
class Func_std__shared_ptr_Promise_std__shared_ptr_Promise_bool_____PushMessage_Wrapper final {
|
|
236
|
-
public:
|
|
237
|
-
explicit Func_std__shared_ptr_Promise_std__shared_ptr_Promise_bool_____PushMessage_Wrapper(std::function<std::shared_ptr<Promise<std::shared_ptr<Promise<bool>>>>(const PushMessage& /* message */)>&& func): _function(std::make_unique<std::function<std::shared_ptr<Promise<std::shared_ptr<Promise<bool>>>>(const PushMessage& /* message */)>>(std::move(func))) {}
|
|
238
|
-
inline std::shared_ptr<Promise<std::shared_ptr<Promise<bool>>>> call(PushMessage message) const noexcept {
|
|
239
|
-
auto __result = _function->operator()(message);
|
|
240
|
-
return __result;
|
|
241
|
-
}
|
|
242
|
-
private:
|
|
243
|
-
std::unique_ptr<std::function<std::shared_ptr<Promise<std::shared_ptr<Promise<bool>>>>(const PushMessage& /* message */)>> _function;
|
|
244
|
-
} SWIFT_NONCOPYABLE;
|
|
245
|
-
Func_std__shared_ptr_Promise_std__shared_ptr_Promise_bool_____PushMessage create_Func_std__shared_ptr_Promise_std__shared_ptr_Promise_bool_____PushMessage(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
246
|
-
inline Func_std__shared_ptr_Promise_std__shared_ptr_Promise_bool_____PushMessage_Wrapper wrap_Func_std__shared_ptr_Promise_std__shared_ptr_Promise_bool_____PushMessage(Func_std__shared_ptr_Promise_std__shared_ptr_Promise_bool_____PushMessage value) noexcept {
|
|
247
|
-
return Func_std__shared_ptr_Promise_std__shared_ptr_Promise_bool_____PushMessage_Wrapper(std::move(value));
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
// pragma MARK: std::shared_ptr<Promise<std::shared_ptr<Promise<bool>>>>
|
|
251
|
-
/**
|
|
252
|
-
* Specialized version of `std::shared_ptr<Promise<std::shared_ptr<Promise<bool>>>>`.
|
|
253
|
-
*/
|
|
254
|
-
using std__shared_ptr_Promise_std__shared_ptr_Promise_bool____ = std::shared_ptr<Promise<std::shared_ptr<Promise<bool>>>>;
|
|
255
|
-
inline std::shared_ptr<Promise<std::shared_ptr<Promise<bool>>>> create_std__shared_ptr_Promise_std__shared_ptr_Promise_bool____() noexcept {
|
|
256
|
-
return Promise<std::shared_ptr<Promise<bool>>>::create();
|
|
257
|
-
}
|
|
258
|
-
inline PromiseHolder<std::shared_ptr<Promise<bool>>> wrap_std__shared_ptr_Promise_std__shared_ptr_Promise_bool____(std::shared_ptr<Promise<std::shared_ptr<Promise<bool>>>> promise) noexcept {
|
|
259
|
-
return PromiseHolder<std::shared_ptr<Promise<bool>>>(std::move(promise));
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
// pragma MARK: std::function<void(const std::shared_ptr<Promise<bool>>& /* result */)>
|
|
263
|
-
/**
|
|
264
|
-
* Specialized version of `std::function<void(const std::shared_ptr<Promise<bool>>&)>`.
|
|
265
|
-
*/
|
|
266
|
-
using Func_void_std__shared_ptr_Promise_bool__ = std::function<void(const std::shared_ptr<Promise<bool>>& /* result */)>;
|
|
267
|
-
/**
|
|
268
|
-
* Wrapper class for a `std::function<void(const std::shared_ptr<Promise<bool>>& / * result * /)>`, this can be used from Swift.
|
|
269
|
-
*/
|
|
270
|
-
class Func_void_std__shared_ptr_Promise_bool___Wrapper final {
|
|
271
|
-
public:
|
|
272
|
-
explicit Func_void_std__shared_ptr_Promise_bool___Wrapper(std::function<void(const std::shared_ptr<Promise<bool>>& /* result */)>&& func): _function(std::make_unique<std::function<void(const std::shared_ptr<Promise<bool>>& /* result */)>>(std::move(func))) {}
|
|
273
|
-
inline void call(std::shared_ptr<Promise<bool>> result) const noexcept {
|
|
274
|
-
_function->operator()(result);
|
|
275
|
-
}
|
|
276
|
-
private:
|
|
277
|
-
std::unique_ptr<std::function<void(const std::shared_ptr<Promise<bool>>& /* result */)>> _function;
|
|
278
|
-
} SWIFT_NONCOPYABLE;
|
|
279
|
-
Func_void_std__shared_ptr_Promise_bool__ create_Func_void_std__shared_ptr_Promise_bool__(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
280
|
-
inline Func_void_std__shared_ptr_Promise_bool___Wrapper wrap_Func_void_std__shared_ptr_Promise_bool__(Func_void_std__shared_ptr_Promise_bool__ value) noexcept {
|
|
281
|
-
return Func_void_std__shared_ptr_Promise_bool___Wrapper(std::move(value));
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
// pragma MARK: std::function<void(const PushMessage& /* message */)>
|
|
285
|
-
/**
|
|
286
|
-
* Specialized version of `std::function<void(const PushMessage&)>`.
|
|
287
|
-
*/
|
|
288
|
-
using Func_void_PushMessage = std::function<void(const PushMessage& /* message */)>;
|
|
289
|
-
/**
|
|
290
|
-
* Wrapper class for a `std::function<void(const PushMessage& / * message * /)>`, this can be used from Swift.
|
|
291
|
-
*/
|
|
292
|
-
class Func_void_PushMessage_Wrapper final {
|
|
293
|
-
public:
|
|
294
|
-
explicit Func_void_PushMessage_Wrapper(std::function<void(const PushMessage& /* message */)>&& func): _function(std::make_unique<std::function<void(const PushMessage& /* message */)>>(std::move(func))) {}
|
|
295
|
-
inline void call(PushMessage message) const noexcept {
|
|
296
|
-
_function->operator()(message);
|
|
297
|
-
}
|
|
298
|
-
private:
|
|
299
|
-
std::unique_ptr<std::function<void(const PushMessage& /* message */)>> _function;
|
|
300
|
-
} SWIFT_NONCOPYABLE;
|
|
301
|
-
Func_void_PushMessage create_Func_void_PushMessage(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
302
|
-
inline Func_void_PushMessage_Wrapper wrap_Func_void_PushMessage(Func_void_PushMessage value) noexcept {
|
|
303
|
-
return Func_void_PushMessage_Wrapper(std::move(value));
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
// pragma MARK: std::shared_ptr<HybridPushSignalSpec>
|
|
307
|
-
/**
|
|
308
|
-
* Specialized version of `std::shared_ptr<HybridPushSignalSpec>`.
|
|
309
|
-
*/
|
|
310
|
-
using std__shared_ptr_HybridPushSignalSpec_ = std::shared_ptr<HybridPushSignalSpec>;
|
|
311
|
-
std::shared_ptr<HybridPushSignalSpec> create_std__shared_ptr_HybridPushSignalSpec_(void* NON_NULL swiftUnsafePointer) noexcept;
|
|
312
|
-
void* NON_NULL get_std__shared_ptr_HybridPushSignalSpec_(std__shared_ptr_HybridPushSignalSpec_ cppType);
|
|
313
|
-
|
|
314
|
-
// pragma MARK: std::weak_ptr<HybridPushSignalSpec>
|
|
315
|
-
using std__weak_ptr_HybridPushSignalSpec_ = std::weak_ptr<HybridPushSignalSpec>;
|
|
316
|
-
inline std__weak_ptr_HybridPushSignalSpec_ weakify_std__shared_ptr_HybridPushSignalSpec_(const std::shared_ptr<HybridPushSignalSpec>& strong) noexcept { return strong; }
|
|
317
|
-
|
|
318
|
-
// pragma MARK: Result<std::shared_ptr<Promise<void>>>
|
|
319
|
-
using Result_std__shared_ptr_Promise_void___ = Result<std::shared_ptr<Promise<void>>>;
|
|
320
|
-
inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::shared_ptr<Promise<void>>& value) noexcept {
|
|
321
|
-
return Result<std::shared_ptr<Promise<void>>>::withValue(value);
|
|
322
|
-
}
|
|
323
|
-
inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::exception_ptr& error) noexcept {
|
|
324
|
-
return Result<std::shared_ptr<Promise<void>>>::withError(error);
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
// pragma MARK: Result<std::shared_ptr<Promise<PushCredentials>>>
|
|
328
|
-
using Result_std__shared_ptr_Promise_PushCredentials___ = Result<std::shared_ptr<Promise<PushCredentials>>>;
|
|
329
|
-
inline Result_std__shared_ptr_Promise_PushCredentials___ create_Result_std__shared_ptr_Promise_PushCredentials___(const std::shared_ptr<Promise<PushCredentials>>& value) noexcept {
|
|
330
|
-
return Result<std::shared_ptr<Promise<PushCredentials>>>::withValue(value);
|
|
331
|
-
}
|
|
332
|
-
inline Result_std__shared_ptr_Promise_PushCredentials___ create_Result_std__shared_ptr_Promise_PushCredentials___(const std::exception_ptr& error) noexcept {
|
|
333
|
-
return Result<std::shared_ptr<Promise<PushCredentials>>>::withError(error);
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
// pragma MARK: Result<void>
|
|
337
|
-
using Result_void_ = Result<void>;
|
|
338
|
-
inline Result_void_ create_Result_void_() noexcept {
|
|
339
|
-
return Result<void>::withValue();
|
|
340
|
-
}
|
|
341
|
-
inline Result_void_ create_Result_void_(const std::exception_ptr& error) noexcept {
|
|
342
|
-
return Result<void>::withError(error);
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
} // namespace margelo::nitro::pushsignal::bridge::swift
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// PushSignal-Swift-Cxx-Umbrella.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
|
-
// Forward declarations of C++ defined types
|
|
11
|
-
// Forward declaration of `AndroidFirebaseConfig` to properly resolve imports.
|
|
12
|
-
namespace margelo::nitro::pushsignal { struct AndroidFirebaseConfig; }
|
|
13
|
-
// Forward declaration of `HybridPushSignalSpec` to properly resolve imports.
|
|
14
|
-
namespace margelo::nitro::pushsignal { class HybridPushSignalSpec; }
|
|
15
|
-
// Forward declaration of `PushCredentials` to properly resolve imports.
|
|
16
|
-
namespace margelo::nitro::pushsignal { struct PushCredentials; }
|
|
17
|
-
// Forward declaration of `PushEnvironment` to properly resolve imports.
|
|
18
|
-
namespace margelo::nitro::pushsignal { enum class PushEnvironment; }
|
|
19
|
-
// Forward declaration of `PushMessage` to properly resolve imports.
|
|
20
|
-
namespace margelo::nitro::pushsignal { struct PushMessage; }
|
|
21
|
-
// Forward declaration of `PushPlatform` to properly resolve imports.
|
|
22
|
-
namespace margelo::nitro::pushsignal { enum class PushPlatform; }
|
|
23
|
-
|
|
24
|
-
// Include C++ defined types
|
|
25
|
-
#include "AndroidFirebaseConfig.hpp"
|
|
26
|
-
#include "HybridPushSignalSpec.hpp"
|
|
27
|
-
#include "PushCredentials.hpp"
|
|
28
|
-
#include "PushEnvironment.hpp"
|
|
29
|
-
#include "PushMessage.hpp"
|
|
30
|
-
#include "PushPlatform.hpp"
|
|
31
|
-
#include <NitroModules/Promise.hpp>
|
|
32
|
-
#include <NitroModules/Result.hpp>
|
|
33
|
-
#include <exception>
|
|
34
|
-
#include <functional>
|
|
35
|
-
#include <memory>
|
|
36
|
-
#include <optional>
|
|
37
|
-
#include <string>
|
|
38
|
-
#include <unordered_map>
|
|
39
|
-
|
|
40
|
-
// C++ helpers for Swift
|
|
41
|
-
#include "PushSignal-Swift-Cxx-Bridge.hpp"
|
|
42
|
-
|
|
43
|
-
// Common C++ types used in Swift
|
|
44
|
-
#include <NitroModules/ArrayBufferHolder.hpp>
|
|
45
|
-
#include <NitroModules/AnyMapUtils.hpp>
|
|
46
|
-
#include <NitroModules/RuntimeError.hpp>
|
|
47
|
-
#include <NitroModules/DateToChronoDate.hpp>
|
|
48
|
-
|
|
49
|
-
// Forward declarations of Swift defined types
|
|
50
|
-
// Forward declaration of `HybridPushSignalSpec_cxx` to properly resolve imports.
|
|
51
|
-
namespace PushSignal { class HybridPushSignalSpec_cxx; }
|
|
52
|
-
|
|
53
|
-
// Include Swift defined types
|
|
54
|
-
#if __has_include("PushSignal-Swift.h")
|
|
55
|
-
// This header is generated by Xcode/Swift on every app build.
|
|
56
|
-
// If it cannot be found, make sure the Swift module's name (= podspec name) is actually "PushSignal".
|
|
57
|
-
#include "PushSignal-Swift.h"
|
|
58
|
-
// Same as above, but used when building with frameworks (`use_frameworks`)
|
|
59
|
-
#elif __has_include(<PushSignal/PushSignal-Swift.h>)
|
|
60
|
-
#include <PushSignal/PushSignal-Swift.h>
|
|
61
|
-
#else
|
|
62
|
-
#error PushSignal's autogenerated Swift header cannot be found! Make sure the Swift module's name (= podspec name) is actually "PushSignal", and try building the app first.
|
|
63
|
-
#endif
|