react-native-email-imap-smtp 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/EmailImapSmtp.podspec +29 -0
- package/LICENSE +20 -0
- package/README.md +121 -0
- package/android/CMakeLists.txt +24 -0
- package/android/build.gradle +117 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/cpp/cpp-adapter.cpp +11 -0
- package/android/src/main/java/com/margelo/nitro/emailimapsmtp/EmailImapSmtp.kt +1533 -0
- package/android/src/main/java/com/margelo/nitro/emailimapsmtp/EmailImapSmtpPackage.kt +22 -0
- package/ios/EmailImapSmtp.swift +5 -0
- package/lib/module/EmailImapSmtp.nitro.js +4 -0
- package/lib/module/EmailImapSmtp.nitro.js.map +1 -0
- package/lib/module/NativeEmailImapSmtp.js +14 -0
- package/lib/module/NativeEmailImapSmtp.js.map +1 -0
- package/lib/module/index.js +64 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/native.js +227 -0
- package/lib/module/native.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/types.js +2 -0
- package/lib/module/types.js.map +1 -0
- package/lib/module/web.js +107 -0
- package/lib/module/web.js.map +1 -0
- package/lib/module/windows.js +156 -0
- package/lib/module/windows.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/EmailImapSmtp.nitro.d.ts +268 -0
- package/lib/typescript/src/EmailImapSmtp.nitro.d.ts.map +1 -0
- package/lib/typescript/src/NativeEmailImapSmtp.d.ts +36 -0
- package/lib/typescript/src/NativeEmailImapSmtp.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +33 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/native.d.ts +32 -0
- package/lib/typescript/src/native.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +261 -0
- package/lib/typescript/src/types.d.ts.map +1 -0
- package/lib/typescript/src/web.d.ts +32 -0
- package/lib/typescript/src/web.d.ts.map +1 -0
- package/lib/typescript/src/windows.d.ts +32 -0
- package/lib/typescript/src/windows.d.ts.map +1 -0
- package/nitro.json +23 -0
- package/nitrogen/generated/android/c++/JAppendResult.hpp +65 -0
- package/nitrogen/generated/android/c++/JAttachmentInfo.hpp +96 -0
- package/nitrogen/generated/android/c++/JConnectionConfig.hpp +94 -0
- package/nitrogen/generated/android/c++/JConnectionResult.hpp +73 -0
- package/nitrogen/generated/android/c++/JDeleteResult.hpp +87 -0
- package/nitrogen/generated/android/c++/JEmailAddress.hpp +61 -0
- package/nitrogen/generated/android/c++/JEmailBody.hpp +84 -0
- package/nitrogen/generated/android/c++/JEmailMessage.hpp +273 -0
- package/nitrogen/generated/android/c++/JFetchEmailsOptions.hpp +110 -0
- package/nitrogen/generated/android/c++/JFolderInfo.hpp +126 -0
- package/nitrogen/generated/android/c++/JFunc_void_IdleNotification.hpp +79 -0
- package/nitrogen/generated/android/c++/JHybridEmailImapSmtpSpec.cpp +697 -0
- package/nitrogen/generated/android/c++/JHybridEmailImapSmtpSpec.hpp +92 -0
- package/nitrogen/generated/android/c++/JIdleNotification.hpp +78 -0
- package/nitrogen/generated/android/c++/JImapServerInfo.hpp +84 -0
- package/nitrogen/generated/android/c++/JMailboxInfo.hpp +134 -0
- package/nitrogen/generated/android/c++/JMailboxListItem.hpp +92 -0
- package/nitrogen/generated/android/c++/JQuotaInfo.hpp +78 -0
- package/nitrogen/generated/android/c++/JSearchCriteria.hpp +187 -0
- package/nitrogen/generated/android/c++/JSearchHeader.hpp +61 -0
- package/nitrogen/generated/android/c++/JSendMailOptions.hpp +229 -0
- package/nitrogen/generated/android/c++/JSendMailResult.hpp +88 -0
- package/nitrogen/generated/android/c++/JSmtpAttachment.hpp +80 -0
- package/nitrogen/generated/android/c++/JSmtpConnectionConfig.hpp +98 -0
- package/nitrogen/generated/android/c++/JSmtpServerInfo.hpp +102 -0
- package/nitrogen/generated/android/c++/JVariant_ImapServerInfo_SmtpServerInfo.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_ImapServerInfo_SmtpServerInfo.hpp +73 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_AttachmentInfo.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_AttachmentInfo.hpp +75 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_EmailMessage.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_EmailMessage.hpp +83 -0
- package/nitrogen/generated/android/emailimapsmtp+autolinking.cmake +84 -0
- package/nitrogen/generated/android/emailimapsmtp+autolinking.gradle +27 -0
- package/nitrogen/generated/android/emailimapsmtpOnLoad.cpp +56 -0
- package/nitrogen/generated/android/emailimapsmtpOnLoad.hpp +34 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/AppendResult.kt +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/AttachmentInfo.kt +96 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/ConnectionConfig.kt +96 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/ConnectionResult.kt +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/DeleteResult.kt +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/EmailAddress.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/EmailBody.kt +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/EmailMessage.kt +156 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/FetchEmailsOptions.kt +116 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/FolderInfo.kt +91 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/Func_void_IdleNotification.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/HybridEmailImapSmtpSpec.kt +178 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/IdleNotification.kt +76 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/ImapServerInfo.kt +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/MailboxInfo.kt +101 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/MailboxListItem.kt +71 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/QuotaInfo.kt +76 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/SearchCriteria.kt +196 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/SearchHeader.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/SendMailOptions.kt +126 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/SendMailResult.kt +86 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/SmtpAttachment.kt +76 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/SmtpConnectionConfig.kt +101 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/SmtpServerInfo.kt +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/Variant_ImapServerInfo_SmtpServerInfo.kt +62 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/Variant_NullType_AttachmentInfo.kt +62 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/Variant_NullType_EmailMessage.kt +62 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/emailimapsmtpOnLoad.kt +35 -0
- package/nitrogen/generated/ios/EmailImapSmtp+autolinking.rb +62 -0
- package/nitrogen/generated/ios/EmailImapSmtp-Swift-Cxx-Bridge.cpp +161 -0
- package/nitrogen/generated/ios/EmailImapSmtp-Swift-Cxx-Bridge.hpp +1132 -0
- package/nitrogen/generated/ios/EmailImapSmtp-Swift-Cxx-Umbrella.hpp +118 -0
- package/nitrogen/generated/ios/EmailImapSmtpAutolinking.mm +33 -0
- package/nitrogen/generated/ios/EmailImapSmtpAutolinking.swift +26 -0
- package/nitrogen/generated/ios/c++/HybridEmailImapSmtpSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridEmailImapSmtpSpecSwift.hpp +390 -0
- package/nitrogen/generated/ios/swift/AppendResult.swift +39 -0
- package/nitrogen/generated/ios/swift/AttachmentInfo.swift +113 -0
- package/nitrogen/generated/ios/swift/ConnectionConfig.swift +87 -0
- package/nitrogen/generated/ios/swift/ConnectionResult.swift +84 -0
- package/nitrogen/generated/ios/swift/DeleteResult.swift +64 -0
- package/nitrogen/generated/ios/swift/EmailAddress.swift +34 -0
- package/nitrogen/generated/ios/swift/EmailBody.swift +45 -0
- package/nitrogen/generated/ios/swift/EmailMessage.swift +184 -0
- package/nitrogen/generated/ios/swift/FetchEmailsOptions.swift +198 -0
- package/nitrogen/generated/ios/swift/FolderInfo.swift +81 -0
- package/nitrogen/generated/ios/swift/Func_void.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_AppendResult.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_ConnectionResult.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_DeleteResult.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_IdleNotification.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_MailboxInfo.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_QuotaInfo.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_SendMailResult.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__variant_nitro__NullType__AttachmentInfo_.swift +58 -0
- package/nitrogen/generated/ios/swift/Func_void_std__variant_nitro__NullType__EmailMessage_.swift +58 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_AttachmentInfo_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_EmailMessage_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_FolderInfo_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_MailboxListItem_.swift +46 -0
- package/nitrogen/generated/ios/swift/HybridEmailImapSmtpSpec.swift +84 -0
- package/nitrogen/generated/ios/swift/HybridEmailImapSmtpSpec_cxx.swift +759 -0
- package/nitrogen/generated/ios/swift/IdleNotification.swift +93 -0
- package/nitrogen/generated/ios/swift/ImapServerInfo.swift +45 -0
- package/nitrogen/generated/ios/swift/MailboxInfo.swift +91 -0
- package/nitrogen/generated/ios/swift/MailboxListItem.swift +55 -0
- package/nitrogen/generated/ios/swift/QuotaInfo.swift +80 -0
- package/nitrogen/generated/ios/swift/SearchCriteria.swift +485 -0
- package/nitrogen/generated/ios/swift/SearchHeader.swift +34 -0
- package/nitrogen/generated/ios/swift/SendMailOptions.swift +310 -0
- package/nitrogen/generated/ios/swift/SendMailResult.swift +155 -0
- package/nitrogen/generated/ios/swift/SmtpAttachment.swift +80 -0
- package/nitrogen/generated/ios/swift/SmtpConnectionConfig.swift +105 -0
- package/nitrogen/generated/ios/swift/SmtpServerInfo.swift +51 -0
- package/nitrogen/generated/ios/swift/Variant_ImapServerInfo_SmtpServerInfo.swift +30 -0
- package/nitrogen/generated/ios/swift/Variant_NullType_AttachmentInfo.swift +30 -0
- package/nitrogen/generated/ios/swift/Variant_NullType_EmailMessage.swift +30 -0
- package/nitrogen/generated/shared/c++/AppendResult.hpp +91 -0
- package/nitrogen/generated/shared/c++/AttachmentInfo.hpp +121 -0
- package/nitrogen/generated/shared/c++/ConnectionConfig.hpp +120 -0
- package/nitrogen/generated/shared/c++/ConnectionResult.hpp +98 -0
- package/nitrogen/generated/shared/c++/DeleteResult.hpp +93 -0
- package/nitrogen/generated/shared/c++/EmailAddress.hpp +87 -0
- package/nitrogen/generated/shared/c++/EmailBody.hpp +92 -0
- package/nitrogen/generated/shared/c++/EmailMessage.hpp +177 -0
- package/nitrogen/generated/shared/c++/FetchEmailsOptions.hpp +136 -0
- package/nitrogen/generated/shared/c++/FolderInfo.hpp +116 -0
- package/nitrogen/generated/shared/c++/HybridEmailImapSmtpSpec.cpp +50 -0
- package/nitrogen/generated/shared/c++/HybridEmailImapSmtpSpec.hpp +145 -0
- package/nitrogen/generated/shared/c++/IdleNotification.hpp +104 -0
- package/nitrogen/generated/shared/c++/ImapServerInfo.hpp +92 -0
- package/nitrogen/generated/shared/c++/MailboxInfo.hpp +124 -0
- package/nitrogen/generated/shared/c++/MailboxListItem.hpp +100 -0
- package/nitrogen/generated/shared/c++/QuotaInfo.hpp +104 -0
- package/nitrogen/generated/shared/c++/SearchCriteria.hpp +203 -0
- package/nitrogen/generated/shared/c++/SearchHeader.hpp +87 -0
- package/nitrogen/generated/shared/c++/SendMailOptions.hpp +151 -0
- package/nitrogen/generated/shared/c++/SendMailResult.hpp +113 -0
- package/nitrogen/generated/shared/c++/SmtpAttachment.hpp +105 -0
- package/nitrogen/generated/shared/c++/SmtpConnectionConfig.hpp +124 -0
- package/nitrogen/generated/shared/c++/SmtpServerInfo.hpp +92 -0
- package/package.json +196 -0
- package/react-native.config.js +27 -0
- package/src/EmailImapSmtp.nitro.ts +333 -0
- package/src/NativeEmailImapSmtp.ts +100 -0
- package/src/index.tsx +166 -0
- package/src/native.ts +305 -0
- package/src/types.ts +328 -0
- package/src/web.ts +196 -0
- package/src/windows.ts +304 -0
- package/windows/EmailImapSmtp.cpp +735 -0
- package/windows/EmailImapSmtp.h +137 -0
- package/windows/EmailImapSmtpModule.cpp +10 -0
- package/windows/EmailImapSmtpModule.h +139 -0
- package/windows/EmailImapSmtpPackage.cpp +15 -0
- package/windows/EmailImapSmtpPackage.h +13 -0
- package/windows/ImapProtocol.cpp +1382 -0
- package/windows/ImapProtocol.h +97 -0
- package/windows/ProtocolDefs.h +300 -0
- package/windows/SmtpProtocol.cpp +334 -0
- package/windows/SmtpProtocol.h +36 -0
- package/windows/TlsSocket.cpp +818 -0
- package/windows/TlsSocket.h +87 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Func_void_std__exception_ptr.swift
|
|
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
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Wraps a Swift `(_ error: Error) -> Void` as a class.
|
|
12
|
+
* This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
|
|
13
|
+
*/
|
|
14
|
+
public final class Func_void_std__exception_ptr {
|
|
15
|
+
public typealias bridge = margelo.nitro.emailimapsmtp.bridge.swift
|
|
16
|
+
|
|
17
|
+
private let closure: (_ error: Error) -> Void
|
|
18
|
+
|
|
19
|
+
public init(_ closure: @escaping (_ error: Error) -> Void) {
|
|
20
|
+
self.closure = closure
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@inline(__always)
|
|
24
|
+
public func call(error: std.exception_ptr) -> Void {
|
|
25
|
+
self.closure(RuntimeError.from(cppError: error))
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Casts this instance to a retained unsafe raw pointer.
|
|
30
|
+
* This acquires one additional strong reference on the object!
|
|
31
|
+
*/
|
|
32
|
+
@inline(__always)
|
|
33
|
+
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
34
|
+
return Unmanaged.passRetained(self).toOpaque()
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Casts an unsafe pointer to a `Func_void_std__exception_ptr`.
|
|
39
|
+
* The pointer has to be a retained opaque `Unmanaged<Func_void_std__exception_ptr>`.
|
|
40
|
+
* This removes one strong reference from the object!
|
|
41
|
+
*/
|
|
42
|
+
@inline(__always)
|
|
43
|
+
public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_std__exception_ptr {
|
|
44
|
+
return Unmanaged<Func_void_std__exception_ptr>.fromOpaque(pointer).takeRetainedValue()
|
|
45
|
+
}
|
|
46
|
+
}
|
package/nitrogen/generated/ios/swift/Func_void_std__variant_nitro__NullType__AttachmentInfo_.swift
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Func_void_std__variant_nitro__NullType__AttachmentInfo_.swift
|
|
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
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Wraps a Swift `(_ value: Variant_NullType_AttachmentInfo) -> Void` as a class.
|
|
12
|
+
* This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
|
|
13
|
+
*/
|
|
14
|
+
public final class Func_void_std__variant_nitro__NullType__AttachmentInfo_ {
|
|
15
|
+
public typealias bridge = margelo.nitro.emailimapsmtp.bridge.swift
|
|
16
|
+
|
|
17
|
+
private let closure: (_ value: Variant_NullType_AttachmentInfo) -> Void
|
|
18
|
+
|
|
19
|
+
public init(_ closure: @escaping (_ value: Variant_NullType_AttachmentInfo) -> Void) {
|
|
20
|
+
self.closure = closure
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@inline(__always)
|
|
24
|
+
public func call(value: bridge.std__variant_nitro__NullType__AttachmentInfo_) -> Void {
|
|
25
|
+
self.closure({ () -> Variant_NullType_AttachmentInfo in
|
|
26
|
+
let __variant = value
|
|
27
|
+
switch __variant.index() {
|
|
28
|
+
case 0:
|
|
29
|
+
let __actual = __variant.get_0()
|
|
30
|
+
return .first(NullType.null)
|
|
31
|
+
case 1:
|
|
32
|
+
let __actual = __variant.get_1()
|
|
33
|
+
return .second(__actual)
|
|
34
|
+
default:
|
|
35
|
+
fatalError("Variant can never have index \(__variant.index())!")
|
|
36
|
+
}
|
|
37
|
+
}())
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Casts this instance to a retained unsafe raw pointer.
|
|
42
|
+
* This acquires one additional strong reference on the object!
|
|
43
|
+
*/
|
|
44
|
+
@inline(__always)
|
|
45
|
+
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
46
|
+
return Unmanaged.passRetained(self).toOpaque()
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Casts an unsafe pointer to a `Func_void_std__variant_nitro__NullType__AttachmentInfo_`.
|
|
51
|
+
* The pointer has to be a retained opaque `Unmanaged<Func_void_std__variant_nitro__NullType__AttachmentInfo_>`.
|
|
52
|
+
* This removes one strong reference from the object!
|
|
53
|
+
*/
|
|
54
|
+
@inline(__always)
|
|
55
|
+
public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_std__variant_nitro__NullType__AttachmentInfo_ {
|
|
56
|
+
return Unmanaged<Func_void_std__variant_nitro__NullType__AttachmentInfo_>.fromOpaque(pointer).takeRetainedValue()
|
|
57
|
+
}
|
|
58
|
+
}
|
package/nitrogen/generated/ios/swift/Func_void_std__variant_nitro__NullType__EmailMessage_.swift
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Func_void_std__variant_nitro__NullType__EmailMessage_.swift
|
|
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
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Wraps a Swift `(_ value: Variant_NullType_EmailMessage) -> Void` as a class.
|
|
12
|
+
* This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
|
|
13
|
+
*/
|
|
14
|
+
public final class Func_void_std__variant_nitro__NullType__EmailMessage_ {
|
|
15
|
+
public typealias bridge = margelo.nitro.emailimapsmtp.bridge.swift
|
|
16
|
+
|
|
17
|
+
private let closure: (_ value: Variant_NullType_EmailMessage) -> Void
|
|
18
|
+
|
|
19
|
+
public init(_ closure: @escaping (_ value: Variant_NullType_EmailMessage) -> Void) {
|
|
20
|
+
self.closure = closure
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@inline(__always)
|
|
24
|
+
public func call(value: bridge.std__variant_nitro__NullType__EmailMessage_) -> Void {
|
|
25
|
+
self.closure({ () -> Variant_NullType_EmailMessage in
|
|
26
|
+
let __variant = value
|
|
27
|
+
switch __variant.index() {
|
|
28
|
+
case 0:
|
|
29
|
+
let __actual = __variant.get_0()
|
|
30
|
+
return .first(NullType.null)
|
|
31
|
+
case 1:
|
|
32
|
+
let __actual = __variant.get_1()
|
|
33
|
+
return .second(__actual)
|
|
34
|
+
default:
|
|
35
|
+
fatalError("Variant can never have index \(__variant.index())!")
|
|
36
|
+
}
|
|
37
|
+
}())
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Casts this instance to a retained unsafe raw pointer.
|
|
42
|
+
* This acquires one additional strong reference on the object!
|
|
43
|
+
*/
|
|
44
|
+
@inline(__always)
|
|
45
|
+
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
46
|
+
return Unmanaged.passRetained(self).toOpaque()
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Casts an unsafe pointer to a `Func_void_std__variant_nitro__NullType__EmailMessage_`.
|
|
51
|
+
* The pointer has to be a retained opaque `Unmanaged<Func_void_std__variant_nitro__NullType__EmailMessage_>`.
|
|
52
|
+
* This removes one strong reference from the object!
|
|
53
|
+
*/
|
|
54
|
+
@inline(__always)
|
|
55
|
+
public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_std__variant_nitro__NullType__EmailMessage_ {
|
|
56
|
+
return Unmanaged<Func_void_std__variant_nitro__NullType__EmailMessage_>.fromOpaque(pointer).takeRetainedValue()
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Func_void_std__vector_AttachmentInfo_.swift
|
|
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
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Wraps a Swift `(_ value: [AttachmentInfo]) -> Void` as a class.
|
|
12
|
+
* This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
|
|
13
|
+
*/
|
|
14
|
+
public final class Func_void_std__vector_AttachmentInfo_ {
|
|
15
|
+
public typealias bridge = margelo.nitro.emailimapsmtp.bridge.swift
|
|
16
|
+
|
|
17
|
+
private let closure: (_ value: [AttachmentInfo]) -> Void
|
|
18
|
+
|
|
19
|
+
public init(_ closure: @escaping (_ value: [AttachmentInfo]) -> Void) {
|
|
20
|
+
self.closure = closure
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@inline(__always)
|
|
24
|
+
public func call(value: bridge.std__vector_AttachmentInfo_) -> Void {
|
|
25
|
+
self.closure(value.map({ __item in __item }))
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Casts this instance to a retained unsafe raw pointer.
|
|
30
|
+
* This acquires one additional strong reference on the object!
|
|
31
|
+
*/
|
|
32
|
+
@inline(__always)
|
|
33
|
+
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
34
|
+
return Unmanaged.passRetained(self).toOpaque()
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Casts an unsafe pointer to a `Func_void_std__vector_AttachmentInfo_`.
|
|
39
|
+
* The pointer has to be a retained opaque `Unmanaged<Func_void_std__vector_AttachmentInfo_>`.
|
|
40
|
+
* This removes one strong reference from the object!
|
|
41
|
+
*/
|
|
42
|
+
@inline(__always)
|
|
43
|
+
public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_std__vector_AttachmentInfo_ {
|
|
44
|
+
return Unmanaged<Func_void_std__vector_AttachmentInfo_>.fromOpaque(pointer).takeRetainedValue()
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Func_void_std__vector_EmailMessage_.swift
|
|
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
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Wraps a Swift `(_ value: [EmailMessage]) -> Void` as a class.
|
|
12
|
+
* This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
|
|
13
|
+
*/
|
|
14
|
+
public final class Func_void_std__vector_EmailMessage_ {
|
|
15
|
+
public typealias bridge = margelo.nitro.emailimapsmtp.bridge.swift
|
|
16
|
+
|
|
17
|
+
private let closure: (_ value: [EmailMessage]) -> Void
|
|
18
|
+
|
|
19
|
+
public init(_ closure: @escaping (_ value: [EmailMessage]) -> Void) {
|
|
20
|
+
self.closure = closure
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@inline(__always)
|
|
24
|
+
public func call(value: bridge.std__vector_EmailMessage_) -> Void {
|
|
25
|
+
self.closure(value.map({ __item in __item }))
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Casts this instance to a retained unsafe raw pointer.
|
|
30
|
+
* This acquires one additional strong reference on the object!
|
|
31
|
+
*/
|
|
32
|
+
@inline(__always)
|
|
33
|
+
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
34
|
+
return Unmanaged.passRetained(self).toOpaque()
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Casts an unsafe pointer to a `Func_void_std__vector_EmailMessage_`.
|
|
39
|
+
* The pointer has to be a retained opaque `Unmanaged<Func_void_std__vector_EmailMessage_>`.
|
|
40
|
+
* This removes one strong reference from the object!
|
|
41
|
+
*/
|
|
42
|
+
@inline(__always)
|
|
43
|
+
public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_std__vector_EmailMessage_ {
|
|
44
|
+
return Unmanaged<Func_void_std__vector_EmailMessage_>.fromOpaque(pointer).takeRetainedValue()
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Func_void_std__vector_FolderInfo_.swift
|
|
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
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Wraps a Swift `(_ value: [FolderInfo]) -> Void` as a class.
|
|
12
|
+
* This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
|
|
13
|
+
*/
|
|
14
|
+
public final class Func_void_std__vector_FolderInfo_ {
|
|
15
|
+
public typealias bridge = margelo.nitro.emailimapsmtp.bridge.swift
|
|
16
|
+
|
|
17
|
+
private let closure: (_ value: [FolderInfo]) -> Void
|
|
18
|
+
|
|
19
|
+
public init(_ closure: @escaping (_ value: [FolderInfo]) -> Void) {
|
|
20
|
+
self.closure = closure
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@inline(__always)
|
|
24
|
+
public func call(value: bridge.std__vector_FolderInfo_) -> Void {
|
|
25
|
+
self.closure(value.map({ __item in __item }))
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Casts this instance to a retained unsafe raw pointer.
|
|
30
|
+
* This acquires one additional strong reference on the object!
|
|
31
|
+
*/
|
|
32
|
+
@inline(__always)
|
|
33
|
+
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
34
|
+
return Unmanaged.passRetained(self).toOpaque()
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Casts an unsafe pointer to a `Func_void_std__vector_FolderInfo_`.
|
|
39
|
+
* The pointer has to be a retained opaque `Unmanaged<Func_void_std__vector_FolderInfo_>`.
|
|
40
|
+
* This removes one strong reference from the object!
|
|
41
|
+
*/
|
|
42
|
+
@inline(__always)
|
|
43
|
+
public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_std__vector_FolderInfo_ {
|
|
44
|
+
return Unmanaged<Func_void_std__vector_FolderInfo_>.fromOpaque(pointer).takeRetainedValue()
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Func_void_std__vector_MailboxListItem_.swift
|
|
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
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Wraps a Swift `(_ value: [MailboxListItem]) -> Void` as a class.
|
|
12
|
+
* This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
|
|
13
|
+
*/
|
|
14
|
+
public final class Func_void_std__vector_MailboxListItem_ {
|
|
15
|
+
public typealias bridge = margelo.nitro.emailimapsmtp.bridge.swift
|
|
16
|
+
|
|
17
|
+
private let closure: (_ value: [MailboxListItem]) -> Void
|
|
18
|
+
|
|
19
|
+
public init(_ closure: @escaping (_ value: [MailboxListItem]) -> Void) {
|
|
20
|
+
self.closure = closure
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@inline(__always)
|
|
24
|
+
public func call(value: bridge.std__vector_MailboxListItem_) -> Void {
|
|
25
|
+
self.closure(value.map({ __item in __item }))
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Casts this instance to a retained unsafe raw pointer.
|
|
30
|
+
* This acquires one additional strong reference on the object!
|
|
31
|
+
*/
|
|
32
|
+
@inline(__always)
|
|
33
|
+
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
34
|
+
return Unmanaged.passRetained(self).toOpaque()
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Casts an unsafe pointer to a `Func_void_std__vector_MailboxListItem_`.
|
|
39
|
+
* The pointer has to be a retained opaque `Unmanaged<Func_void_std__vector_MailboxListItem_>`.
|
|
40
|
+
* This removes one strong reference from the object!
|
|
41
|
+
*/
|
|
42
|
+
@inline(__always)
|
|
43
|
+
public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_std__vector_MailboxListItem_ {
|
|
44
|
+
return Unmanaged<Func_void_std__vector_MailboxListItem_>.fromOpaque(pointer).takeRetainedValue()
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridEmailImapSmtpSpec.swift
|
|
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
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/// See ``HybridEmailImapSmtpSpec``
|
|
11
|
+
public protocol HybridEmailImapSmtpSpec_protocol: HybridObject {
|
|
12
|
+
// Properties
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
// Methods
|
|
16
|
+
func imapConnect(config: ConnectionConfig) throws -> Promise<ConnectionResult>
|
|
17
|
+
func imapDisconnect() throws -> Promise<Void>
|
|
18
|
+
func imapListMailboxes() throws -> Promise<[MailboxListItem]>
|
|
19
|
+
func imapSelectMailbox(mailbox: String, readOnly: Bool) throws -> Promise<MailboxInfo>
|
|
20
|
+
func imapRefreshMailbox() throws -> Promise<MailboxInfo>
|
|
21
|
+
func imapFetchFolders() throws -> Promise<[FolderInfo]>
|
|
22
|
+
func imapCreateFolder(folderName: String) throws -> Promise<Void>
|
|
23
|
+
func imapDeleteFolder(folderName: String) throws -> Promise<Void>
|
|
24
|
+
func imapRenameFolder(oldName: String, newName: String) throws -> Promise<Void>
|
|
25
|
+
func imapSubscribeFolder(folderName: String) throws -> Promise<Void>
|
|
26
|
+
func imapUnsubscribeFolder(folderName: String) throws -> Promise<Void>
|
|
27
|
+
func imapFetchEmails(options: FetchEmailsOptions) throws -> Promise<[EmailMessage]>
|
|
28
|
+
func imapFetchEmailByUID(uid: Double) throws -> Promise<Variant_NullType_EmailMessage>
|
|
29
|
+
func imapSearchEmails(criteria: SearchCriteria) throws -> Promise<[EmailMessage]>
|
|
30
|
+
func imapMarkAsRead(uids: [Double], silent: Bool) throws -> Promise<Void>
|
|
31
|
+
func imapMarkAsFlagged(uids: [Double], flagged: Bool) throws -> Promise<Void>
|
|
32
|
+
func imapMoveEmails(uids: [Double], destinationMailbox: String) throws -> Promise<Void>
|
|
33
|
+
func imapCopyEmails(uids: [Double], destinationMailbox: String) throws -> Promise<Void>
|
|
34
|
+
func imapDeleteEmails(uids: [Double]) throws -> Promise<DeleteResult>
|
|
35
|
+
func imapExpunge() throws -> Promise<Void>
|
|
36
|
+
func imapFetchAttachments(uid: Double, partId: String) throws -> Promise<Variant_NullType_AttachmentInfo>
|
|
37
|
+
func imapFetchAllAttachments(uid: Double) throws -> Promise<[AttachmentInfo]>
|
|
38
|
+
func imapIdle(callback: @escaping (_ notification: IdleNotification) -> Void) throws -> Promise<Void>
|
|
39
|
+
func imapStopIdle() throws -> Promise<Void>
|
|
40
|
+
func imapGetQuota(root: String?) throws -> Promise<QuotaInfo>
|
|
41
|
+
func imapAppendMessage(mailbox: String, rawMimeData: ArrayBuffer, flags: [String]?) throws -> Promise<AppendResult>
|
|
42
|
+
func smtpConnect(config: SmtpConnectionConfig) throws -> Promise<ConnectionResult>
|
|
43
|
+
func smtpDisconnect() throws -> Promise<Void>
|
|
44
|
+
func smtpSendMail(options: SendMailOptions) throws -> Promise<SendMailResult>
|
|
45
|
+
func smtpVerifyConnection() throws -> Promise<Bool>
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
public extension HybridEmailImapSmtpSpec_protocol {
|
|
49
|
+
/// Default implementation of ``HybridObject.toString``
|
|
50
|
+
func toString() -> String {
|
|
51
|
+
return "[HybridObject EmailImapSmtp]"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/// See ``HybridEmailImapSmtpSpec``
|
|
56
|
+
open class HybridEmailImapSmtpSpec_base {
|
|
57
|
+
private weak var cxxWrapper: HybridEmailImapSmtpSpec_cxx? = nil
|
|
58
|
+
public init() { }
|
|
59
|
+
public func getCxxWrapper() -> HybridEmailImapSmtpSpec_cxx {
|
|
60
|
+
#if DEBUG
|
|
61
|
+
guard self is any HybridEmailImapSmtpSpec else {
|
|
62
|
+
fatalError("`self` is not a `HybridEmailImapSmtpSpec`! Did you accidentally inherit from `HybridEmailImapSmtpSpec_base` instead of `HybridEmailImapSmtpSpec`?")
|
|
63
|
+
}
|
|
64
|
+
#endif
|
|
65
|
+
if let cxxWrapper = self.cxxWrapper {
|
|
66
|
+
return cxxWrapper
|
|
67
|
+
} else {
|
|
68
|
+
let cxxWrapper = HybridEmailImapSmtpSpec_cxx(self as! any HybridEmailImapSmtpSpec)
|
|
69
|
+
self.cxxWrapper = cxxWrapper
|
|
70
|
+
return cxxWrapper
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* A Swift base-protocol representing the EmailImapSmtp HybridObject.
|
|
77
|
+
* Implement this protocol to create Swift-based instances of EmailImapSmtp.
|
|
78
|
+
* ```swift
|
|
79
|
+
* class HybridEmailImapSmtp : HybridEmailImapSmtpSpec {
|
|
80
|
+
* // ...
|
|
81
|
+
* }
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
public typealias HybridEmailImapSmtpSpec = HybridEmailImapSmtpSpec_protocol & HybridEmailImapSmtpSpec_base
|