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,118 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// EmailImapSmtp-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 `AppendResult` to properly resolve imports.
|
|
12
|
+
namespace margelo::nitro::emailimapsmtp { struct AppendResult; }
|
|
13
|
+
// Forward declaration of `AttachmentInfo` to properly resolve imports.
|
|
14
|
+
namespace margelo::nitro::emailimapsmtp { struct AttachmentInfo; }
|
|
15
|
+
// Forward declaration of `ConnectionConfig` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::emailimapsmtp { struct ConnectionConfig; }
|
|
17
|
+
// Forward declaration of `ConnectionResult` to properly resolve imports.
|
|
18
|
+
namespace margelo::nitro::emailimapsmtp { struct ConnectionResult; }
|
|
19
|
+
// Forward declaration of `DeleteResult` to properly resolve imports.
|
|
20
|
+
namespace margelo::nitro::emailimapsmtp { struct DeleteResult; }
|
|
21
|
+
// Forward declaration of `EmailAddress` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::emailimapsmtp { struct EmailAddress; }
|
|
23
|
+
// Forward declaration of `EmailBody` to properly resolve imports.
|
|
24
|
+
namespace margelo::nitro::emailimapsmtp { struct EmailBody; }
|
|
25
|
+
// Forward declaration of `EmailMessage` to properly resolve imports.
|
|
26
|
+
namespace margelo::nitro::emailimapsmtp { struct EmailMessage; }
|
|
27
|
+
// Forward declaration of `FetchEmailsOptions` to properly resolve imports.
|
|
28
|
+
namespace margelo::nitro::emailimapsmtp { struct FetchEmailsOptions; }
|
|
29
|
+
// Forward declaration of `FolderInfo` to properly resolve imports.
|
|
30
|
+
namespace margelo::nitro::emailimapsmtp { struct FolderInfo; }
|
|
31
|
+
// Forward declaration of `HybridEmailImapSmtpSpec` to properly resolve imports.
|
|
32
|
+
namespace margelo::nitro::emailimapsmtp { class HybridEmailImapSmtpSpec; }
|
|
33
|
+
// Forward declaration of `IdleNotification` to properly resolve imports.
|
|
34
|
+
namespace margelo::nitro::emailimapsmtp { struct IdleNotification; }
|
|
35
|
+
// Forward declaration of `ImapServerInfo` to properly resolve imports.
|
|
36
|
+
namespace margelo::nitro::emailimapsmtp { struct ImapServerInfo; }
|
|
37
|
+
// Forward declaration of `MailboxInfo` to properly resolve imports.
|
|
38
|
+
namespace margelo::nitro::emailimapsmtp { struct MailboxInfo; }
|
|
39
|
+
// Forward declaration of `MailboxListItem` to properly resolve imports.
|
|
40
|
+
namespace margelo::nitro::emailimapsmtp { struct MailboxListItem; }
|
|
41
|
+
// Forward declaration of `QuotaInfo` to properly resolve imports.
|
|
42
|
+
namespace margelo::nitro::emailimapsmtp { struct QuotaInfo; }
|
|
43
|
+
// Forward declaration of `SearchCriteria` to properly resolve imports.
|
|
44
|
+
namespace margelo::nitro::emailimapsmtp { struct SearchCriteria; }
|
|
45
|
+
// Forward declaration of `SearchHeader` to properly resolve imports.
|
|
46
|
+
namespace margelo::nitro::emailimapsmtp { struct SearchHeader; }
|
|
47
|
+
// Forward declaration of `SendMailOptions` to properly resolve imports.
|
|
48
|
+
namespace margelo::nitro::emailimapsmtp { struct SendMailOptions; }
|
|
49
|
+
// Forward declaration of `SendMailResult` to properly resolve imports.
|
|
50
|
+
namespace margelo::nitro::emailimapsmtp { struct SendMailResult; }
|
|
51
|
+
// Forward declaration of `SmtpAttachment` to properly resolve imports.
|
|
52
|
+
namespace margelo::nitro::emailimapsmtp { struct SmtpAttachment; }
|
|
53
|
+
// Forward declaration of `SmtpConnectionConfig` to properly resolve imports.
|
|
54
|
+
namespace margelo::nitro::emailimapsmtp { struct SmtpConnectionConfig; }
|
|
55
|
+
// Forward declaration of `SmtpServerInfo` to properly resolve imports.
|
|
56
|
+
namespace margelo::nitro::emailimapsmtp { struct SmtpServerInfo; }
|
|
57
|
+
|
|
58
|
+
// Include C++ defined types
|
|
59
|
+
#include "AppendResult.hpp"
|
|
60
|
+
#include "AttachmentInfo.hpp"
|
|
61
|
+
#include "ConnectionConfig.hpp"
|
|
62
|
+
#include "ConnectionResult.hpp"
|
|
63
|
+
#include "DeleteResult.hpp"
|
|
64
|
+
#include "EmailAddress.hpp"
|
|
65
|
+
#include "EmailBody.hpp"
|
|
66
|
+
#include "EmailMessage.hpp"
|
|
67
|
+
#include "FetchEmailsOptions.hpp"
|
|
68
|
+
#include "FolderInfo.hpp"
|
|
69
|
+
#include "HybridEmailImapSmtpSpec.hpp"
|
|
70
|
+
#include "IdleNotification.hpp"
|
|
71
|
+
#include "ImapServerInfo.hpp"
|
|
72
|
+
#include "MailboxInfo.hpp"
|
|
73
|
+
#include "MailboxListItem.hpp"
|
|
74
|
+
#include "QuotaInfo.hpp"
|
|
75
|
+
#include "SearchCriteria.hpp"
|
|
76
|
+
#include "SearchHeader.hpp"
|
|
77
|
+
#include "SendMailOptions.hpp"
|
|
78
|
+
#include "SendMailResult.hpp"
|
|
79
|
+
#include "SmtpAttachment.hpp"
|
|
80
|
+
#include "SmtpConnectionConfig.hpp"
|
|
81
|
+
#include "SmtpServerInfo.hpp"
|
|
82
|
+
#include <NitroModules/ArrayBuffer.hpp>
|
|
83
|
+
#include <NitroModules/Null.hpp>
|
|
84
|
+
#include <NitroModules/Promise.hpp>
|
|
85
|
+
#include <NitroModules/Result.hpp>
|
|
86
|
+
#include <exception>
|
|
87
|
+
#include <functional>
|
|
88
|
+
#include <memory>
|
|
89
|
+
#include <optional>
|
|
90
|
+
#include <string>
|
|
91
|
+
#include <unordered_map>
|
|
92
|
+
#include <variant>
|
|
93
|
+
#include <vector>
|
|
94
|
+
|
|
95
|
+
// C++ helpers for Swift
|
|
96
|
+
#include "EmailImapSmtp-Swift-Cxx-Bridge.hpp"
|
|
97
|
+
|
|
98
|
+
// Common C++ types used in Swift
|
|
99
|
+
#include <NitroModules/ArrayBufferHolder.hpp>
|
|
100
|
+
#include <NitroModules/AnyMapUtils.hpp>
|
|
101
|
+
#include <NitroModules/RuntimeError.hpp>
|
|
102
|
+
#include <NitroModules/DateToChronoDate.hpp>
|
|
103
|
+
|
|
104
|
+
// Forward declarations of Swift defined types
|
|
105
|
+
// Forward declaration of `HybridEmailImapSmtpSpec_cxx` to properly resolve imports.
|
|
106
|
+
namespace EmailImapSmtp { class HybridEmailImapSmtpSpec_cxx; }
|
|
107
|
+
|
|
108
|
+
// Include Swift defined types
|
|
109
|
+
#if __has_include("EmailImapSmtp-Swift.h")
|
|
110
|
+
// This header is generated by Xcode/Swift on every app build.
|
|
111
|
+
// If it cannot be found, make sure the Swift module's name (= podspec name) is actually "EmailImapSmtp".
|
|
112
|
+
#include "EmailImapSmtp-Swift.h"
|
|
113
|
+
// Same as above, but used when building with frameworks (`use_frameworks`)
|
|
114
|
+
#elif __has_include(<EmailImapSmtp/EmailImapSmtp-Swift.h>)
|
|
115
|
+
#include <EmailImapSmtp/EmailImapSmtp-Swift.h>
|
|
116
|
+
#else
|
|
117
|
+
#error EmailImapSmtp's autogenerated Swift header cannot be found! Make sure the Swift module's name (= podspec name) is actually "EmailImapSmtp", and try building the app first.
|
|
118
|
+
#endif
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// EmailImapSmtpAutolinking.mm
|
|
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 <Foundation/Foundation.h>
|
|
9
|
+
#import <NitroModules/HybridObjectRegistry.hpp>
|
|
10
|
+
#import "EmailImapSmtp-Swift-Cxx-Umbrella.hpp"
|
|
11
|
+
#import <type_traits>
|
|
12
|
+
|
|
13
|
+
#include "HybridEmailImapSmtpSpecSwift.hpp"
|
|
14
|
+
|
|
15
|
+
@interface EmailImapSmtpAutolinking : NSObject
|
|
16
|
+
@end
|
|
17
|
+
|
|
18
|
+
@implementation EmailImapSmtpAutolinking
|
|
19
|
+
|
|
20
|
+
+ (void) load {
|
|
21
|
+
using namespace margelo::nitro;
|
|
22
|
+
using namespace margelo::nitro::emailimapsmtp;
|
|
23
|
+
|
|
24
|
+
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
25
|
+
"EmailImapSmtp",
|
|
26
|
+
[]() -> std::shared_ptr<HybridObject> {
|
|
27
|
+
std::shared_ptr<HybridEmailImapSmtpSpec> hybridObject = EmailImapSmtp::EmailImapSmtpAutolinking::createEmailImapSmtp();
|
|
28
|
+
return hybridObject;
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// EmailImapSmtpAutolinking.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
|
+
// TODO: Use empty enums once Swift supports exporting them as namespaces
|
|
11
|
+
// See: https://github.com/swiftlang/swift/pull/83616
|
|
12
|
+
public final class EmailImapSmtpAutolinking {
|
|
13
|
+
public typealias bridge = margelo.nitro.emailimapsmtp.bridge.swift
|
|
14
|
+
|
|
15
|
+
public static func createEmailImapSmtp() -> bridge.std__shared_ptr_HybridEmailImapSmtpSpec_ {
|
|
16
|
+
let hybridObject = EmailImapSmtp()
|
|
17
|
+
return { () -> bridge.std__shared_ptr_HybridEmailImapSmtpSpec_ in
|
|
18
|
+
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
19
|
+
return __cxxWrapped.getCxxPart()
|
|
20
|
+
}()
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
public static func isEmailImapSmtpRecyclable() -> Bool {
|
|
24
|
+
return EmailImapSmtp.self is any RecyclableView.Type
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridEmailImapSmtpSpecSwift.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 "HybridEmailImapSmtpSpecSwift.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::emailimapsmtp {
|
|
11
|
+
} // namespace margelo::nitro::emailimapsmtp
|
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridEmailImapSmtpSpecSwift.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include "HybridEmailImapSmtpSpec.hpp"
|
|
11
|
+
|
|
12
|
+
// Forward declaration of `HybridEmailImapSmtpSpec_cxx` to properly resolve imports.
|
|
13
|
+
namespace EmailImapSmtp { class HybridEmailImapSmtpSpec_cxx; }
|
|
14
|
+
|
|
15
|
+
// Forward declaration of `ConnectionResult` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::emailimapsmtp { struct ConnectionResult; }
|
|
17
|
+
// Forward declaration of `ImapServerInfo` to properly resolve imports.
|
|
18
|
+
namespace margelo::nitro::emailimapsmtp { struct ImapServerInfo; }
|
|
19
|
+
// Forward declaration of `SmtpServerInfo` to properly resolve imports.
|
|
20
|
+
namespace margelo::nitro::emailimapsmtp { struct SmtpServerInfo; }
|
|
21
|
+
// Forward declaration of `ConnectionConfig` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::emailimapsmtp { struct ConnectionConfig; }
|
|
23
|
+
// Forward declaration of `MailboxListItem` to properly resolve imports.
|
|
24
|
+
namespace margelo::nitro::emailimapsmtp { struct MailboxListItem; }
|
|
25
|
+
// Forward declaration of `MailboxInfo` to properly resolve imports.
|
|
26
|
+
namespace margelo::nitro::emailimapsmtp { struct MailboxInfo; }
|
|
27
|
+
// Forward declaration of `FolderInfo` to properly resolve imports.
|
|
28
|
+
namespace margelo::nitro::emailimapsmtp { struct FolderInfo; }
|
|
29
|
+
// Forward declaration of `EmailMessage` to properly resolve imports.
|
|
30
|
+
namespace margelo::nitro::emailimapsmtp { struct EmailMessage; }
|
|
31
|
+
// Forward declaration of `EmailAddress` to properly resolve imports.
|
|
32
|
+
namespace margelo::nitro::emailimapsmtp { struct EmailAddress; }
|
|
33
|
+
// Forward declaration of `EmailBody` to properly resolve imports.
|
|
34
|
+
namespace margelo::nitro::emailimapsmtp { struct EmailBody; }
|
|
35
|
+
// Forward declaration of `AttachmentInfo` to properly resolve imports.
|
|
36
|
+
namespace margelo::nitro::emailimapsmtp { struct AttachmentInfo; }
|
|
37
|
+
// Forward declaration of `ArrayBufferHolder` to properly resolve imports.
|
|
38
|
+
namespace NitroModules { class ArrayBufferHolder; }
|
|
39
|
+
// Forward declaration of `FetchEmailsOptions` to properly resolve imports.
|
|
40
|
+
namespace margelo::nitro::emailimapsmtp { struct FetchEmailsOptions; }
|
|
41
|
+
// Forward declaration of `SearchCriteria` to properly resolve imports.
|
|
42
|
+
namespace margelo::nitro::emailimapsmtp { struct SearchCriteria; }
|
|
43
|
+
// Forward declaration of `SearchHeader` to properly resolve imports.
|
|
44
|
+
namespace margelo::nitro::emailimapsmtp { struct SearchHeader; }
|
|
45
|
+
// Forward declaration of `DeleteResult` to properly resolve imports.
|
|
46
|
+
namespace margelo::nitro::emailimapsmtp { struct DeleteResult; }
|
|
47
|
+
// Forward declaration of `IdleNotification` to properly resolve imports.
|
|
48
|
+
namespace margelo::nitro::emailimapsmtp { struct IdleNotification; }
|
|
49
|
+
// Forward declaration of `QuotaInfo` to properly resolve imports.
|
|
50
|
+
namespace margelo::nitro::emailimapsmtp { struct QuotaInfo; }
|
|
51
|
+
// Forward declaration of `AppendResult` to properly resolve imports.
|
|
52
|
+
namespace margelo::nitro::emailimapsmtp { struct AppendResult; }
|
|
53
|
+
// Forward declaration of `SmtpConnectionConfig` to properly resolve imports.
|
|
54
|
+
namespace margelo::nitro::emailimapsmtp { struct SmtpConnectionConfig; }
|
|
55
|
+
// Forward declaration of `SendMailResult` to properly resolve imports.
|
|
56
|
+
namespace margelo::nitro::emailimapsmtp { struct SendMailResult; }
|
|
57
|
+
// Forward declaration of `SendMailOptions` to properly resolve imports.
|
|
58
|
+
namespace margelo::nitro::emailimapsmtp { struct SendMailOptions; }
|
|
59
|
+
// Forward declaration of `SmtpAttachment` to properly resolve imports.
|
|
60
|
+
namespace margelo::nitro::emailimapsmtp { struct SmtpAttachment; }
|
|
61
|
+
|
|
62
|
+
#include "ConnectionResult.hpp"
|
|
63
|
+
#include <NitroModules/Promise.hpp>
|
|
64
|
+
#include "ImapServerInfo.hpp"
|
|
65
|
+
#include "SmtpServerInfo.hpp"
|
|
66
|
+
#include <variant>
|
|
67
|
+
#include <optional>
|
|
68
|
+
#include <string>
|
|
69
|
+
#include <vector>
|
|
70
|
+
#include "ConnectionConfig.hpp"
|
|
71
|
+
#include "MailboxListItem.hpp"
|
|
72
|
+
#include "MailboxInfo.hpp"
|
|
73
|
+
#include "FolderInfo.hpp"
|
|
74
|
+
#include "EmailMessage.hpp"
|
|
75
|
+
#include "EmailAddress.hpp"
|
|
76
|
+
#include "EmailBody.hpp"
|
|
77
|
+
#include "AttachmentInfo.hpp"
|
|
78
|
+
#include <NitroModules/ArrayBuffer.hpp>
|
|
79
|
+
#include <NitroModules/ArrayBufferHolder.hpp>
|
|
80
|
+
#include <unordered_map>
|
|
81
|
+
#include "FetchEmailsOptions.hpp"
|
|
82
|
+
#include <NitroModules/Null.hpp>
|
|
83
|
+
#include "SearchCriteria.hpp"
|
|
84
|
+
#include "SearchHeader.hpp"
|
|
85
|
+
#include "DeleteResult.hpp"
|
|
86
|
+
#include "IdleNotification.hpp"
|
|
87
|
+
#include <functional>
|
|
88
|
+
#include "QuotaInfo.hpp"
|
|
89
|
+
#include "AppendResult.hpp"
|
|
90
|
+
#include "SmtpConnectionConfig.hpp"
|
|
91
|
+
#include "SendMailResult.hpp"
|
|
92
|
+
#include "SendMailOptions.hpp"
|
|
93
|
+
#include "SmtpAttachment.hpp"
|
|
94
|
+
|
|
95
|
+
#include "EmailImapSmtp-Swift-Cxx-Umbrella.hpp"
|
|
96
|
+
|
|
97
|
+
namespace margelo::nitro::emailimapsmtp {
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* The C++ part of HybridEmailImapSmtpSpec_cxx.swift.
|
|
101
|
+
*
|
|
102
|
+
* HybridEmailImapSmtpSpecSwift (C++) accesses HybridEmailImapSmtpSpec_cxx (Swift), and might
|
|
103
|
+
* contain some additional bridging code for C++ <> Swift interop.
|
|
104
|
+
*
|
|
105
|
+
* Since this obviously introduces an overhead, I hope at some point in
|
|
106
|
+
* the future, HybridEmailImapSmtpSpec_cxx can directly inherit from the C++ class HybridEmailImapSmtpSpec
|
|
107
|
+
* to simplify the whole structure and memory management.
|
|
108
|
+
*/
|
|
109
|
+
class HybridEmailImapSmtpSpecSwift: public virtual HybridEmailImapSmtpSpec {
|
|
110
|
+
public:
|
|
111
|
+
// Constructor from a Swift instance
|
|
112
|
+
explicit HybridEmailImapSmtpSpecSwift(const EmailImapSmtp::HybridEmailImapSmtpSpec_cxx& swiftPart):
|
|
113
|
+
HybridObject(HybridEmailImapSmtpSpec::TAG),
|
|
114
|
+
_swiftPart(swiftPart) { }
|
|
115
|
+
|
|
116
|
+
public:
|
|
117
|
+
// Get the Swift part
|
|
118
|
+
inline EmailImapSmtp::HybridEmailImapSmtpSpec_cxx& getSwiftPart() noexcept {
|
|
119
|
+
return _swiftPart;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
public:
|
|
123
|
+
inline size_t getExternalMemorySize() noexcept override {
|
|
124
|
+
return _swiftPart.getMemorySize();
|
|
125
|
+
}
|
|
126
|
+
bool equals(const std::shared_ptr<HybridObject>& other) override {
|
|
127
|
+
if (auto otherCast = std::dynamic_pointer_cast<HybridEmailImapSmtpSpecSwift>(other)) {
|
|
128
|
+
return _swiftPart.equals(otherCast->_swiftPart);
|
|
129
|
+
}
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
void dispose() noexcept override {
|
|
133
|
+
_swiftPart.dispose();
|
|
134
|
+
}
|
|
135
|
+
std::string toString() override {
|
|
136
|
+
return _swiftPart.toString();
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
public:
|
|
140
|
+
// Properties
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
public:
|
|
144
|
+
// Methods
|
|
145
|
+
inline std::shared_ptr<Promise<ConnectionResult>> imapConnect(const ConnectionConfig& config) override {
|
|
146
|
+
auto __result = _swiftPart.imapConnect(std::forward<decltype(config)>(config));
|
|
147
|
+
if (__result.hasError()) [[unlikely]] {
|
|
148
|
+
std::rethrow_exception(__result.error());
|
|
149
|
+
}
|
|
150
|
+
auto __value = std::move(__result.value());
|
|
151
|
+
return __value;
|
|
152
|
+
}
|
|
153
|
+
inline std::shared_ptr<Promise<void>> imapDisconnect() override {
|
|
154
|
+
auto __result = _swiftPart.imapDisconnect();
|
|
155
|
+
if (__result.hasError()) [[unlikely]] {
|
|
156
|
+
std::rethrow_exception(__result.error());
|
|
157
|
+
}
|
|
158
|
+
auto __value = std::move(__result.value());
|
|
159
|
+
return __value;
|
|
160
|
+
}
|
|
161
|
+
inline std::shared_ptr<Promise<std::vector<MailboxListItem>>> imapListMailboxes() override {
|
|
162
|
+
auto __result = _swiftPart.imapListMailboxes();
|
|
163
|
+
if (__result.hasError()) [[unlikely]] {
|
|
164
|
+
std::rethrow_exception(__result.error());
|
|
165
|
+
}
|
|
166
|
+
auto __value = std::move(__result.value());
|
|
167
|
+
return __value;
|
|
168
|
+
}
|
|
169
|
+
inline std::shared_ptr<Promise<MailboxInfo>> imapSelectMailbox(const std::string& mailbox, bool readOnly) override {
|
|
170
|
+
auto __result = _swiftPart.imapSelectMailbox(mailbox, std::forward<decltype(readOnly)>(readOnly));
|
|
171
|
+
if (__result.hasError()) [[unlikely]] {
|
|
172
|
+
std::rethrow_exception(__result.error());
|
|
173
|
+
}
|
|
174
|
+
auto __value = std::move(__result.value());
|
|
175
|
+
return __value;
|
|
176
|
+
}
|
|
177
|
+
inline std::shared_ptr<Promise<MailboxInfo>> imapRefreshMailbox() override {
|
|
178
|
+
auto __result = _swiftPart.imapRefreshMailbox();
|
|
179
|
+
if (__result.hasError()) [[unlikely]] {
|
|
180
|
+
std::rethrow_exception(__result.error());
|
|
181
|
+
}
|
|
182
|
+
auto __value = std::move(__result.value());
|
|
183
|
+
return __value;
|
|
184
|
+
}
|
|
185
|
+
inline std::shared_ptr<Promise<std::vector<FolderInfo>>> imapFetchFolders() override {
|
|
186
|
+
auto __result = _swiftPart.imapFetchFolders();
|
|
187
|
+
if (__result.hasError()) [[unlikely]] {
|
|
188
|
+
std::rethrow_exception(__result.error());
|
|
189
|
+
}
|
|
190
|
+
auto __value = std::move(__result.value());
|
|
191
|
+
return __value;
|
|
192
|
+
}
|
|
193
|
+
inline std::shared_ptr<Promise<void>> imapCreateFolder(const std::string& folderName) override {
|
|
194
|
+
auto __result = _swiftPart.imapCreateFolder(folderName);
|
|
195
|
+
if (__result.hasError()) [[unlikely]] {
|
|
196
|
+
std::rethrow_exception(__result.error());
|
|
197
|
+
}
|
|
198
|
+
auto __value = std::move(__result.value());
|
|
199
|
+
return __value;
|
|
200
|
+
}
|
|
201
|
+
inline std::shared_ptr<Promise<void>> imapDeleteFolder(const std::string& folderName) override {
|
|
202
|
+
auto __result = _swiftPart.imapDeleteFolder(folderName);
|
|
203
|
+
if (__result.hasError()) [[unlikely]] {
|
|
204
|
+
std::rethrow_exception(__result.error());
|
|
205
|
+
}
|
|
206
|
+
auto __value = std::move(__result.value());
|
|
207
|
+
return __value;
|
|
208
|
+
}
|
|
209
|
+
inline std::shared_ptr<Promise<void>> imapRenameFolder(const std::string& oldName, const std::string& newName) override {
|
|
210
|
+
auto __result = _swiftPart.imapRenameFolder(oldName, newName);
|
|
211
|
+
if (__result.hasError()) [[unlikely]] {
|
|
212
|
+
std::rethrow_exception(__result.error());
|
|
213
|
+
}
|
|
214
|
+
auto __value = std::move(__result.value());
|
|
215
|
+
return __value;
|
|
216
|
+
}
|
|
217
|
+
inline std::shared_ptr<Promise<void>> imapSubscribeFolder(const std::string& folderName) override {
|
|
218
|
+
auto __result = _swiftPart.imapSubscribeFolder(folderName);
|
|
219
|
+
if (__result.hasError()) [[unlikely]] {
|
|
220
|
+
std::rethrow_exception(__result.error());
|
|
221
|
+
}
|
|
222
|
+
auto __value = std::move(__result.value());
|
|
223
|
+
return __value;
|
|
224
|
+
}
|
|
225
|
+
inline std::shared_ptr<Promise<void>> imapUnsubscribeFolder(const std::string& folderName) override {
|
|
226
|
+
auto __result = _swiftPart.imapUnsubscribeFolder(folderName);
|
|
227
|
+
if (__result.hasError()) [[unlikely]] {
|
|
228
|
+
std::rethrow_exception(__result.error());
|
|
229
|
+
}
|
|
230
|
+
auto __value = std::move(__result.value());
|
|
231
|
+
return __value;
|
|
232
|
+
}
|
|
233
|
+
inline std::shared_ptr<Promise<std::vector<EmailMessage>>> imapFetchEmails(const FetchEmailsOptions& options) override {
|
|
234
|
+
auto __result = _swiftPart.imapFetchEmails(std::forward<decltype(options)>(options));
|
|
235
|
+
if (__result.hasError()) [[unlikely]] {
|
|
236
|
+
std::rethrow_exception(__result.error());
|
|
237
|
+
}
|
|
238
|
+
auto __value = std::move(__result.value());
|
|
239
|
+
return __value;
|
|
240
|
+
}
|
|
241
|
+
inline std::shared_ptr<Promise<std::variant<nitro::NullType, EmailMessage>>> imapFetchEmailByUID(double uid) override {
|
|
242
|
+
auto __result = _swiftPart.imapFetchEmailByUID(std::forward<decltype(uid)>(uid));
|
|
243
|
+
if (__result.hasError()) [[unlikely]] {
|
|
244
|
+
std::rethrow_exception(__result.error());
|
|
245
|
+
}
|
|
246
|
+
auto __value = std::move(__result.value());
|
|
247
|
+
return __value;
|
|
248
|
+
}
|
|
249
|
+
inline std::shared_ptr<Promise<std::vector<EmailMessage>>> imapSearchEmails(const SearchCriteria& criteria) override {
|
|
250
|
+
auto __result = _swiftPart.imapSearchEmails(std::forward<decltype(criteria)>(criteria));
|
|
251
|
+
if (__result.hasError()) [[unlikely]] {
|
|
252
|
+
std::rethrow_exception(__result.error());
|
|
253
|
+
}
|
|
254
|
+
auto __value = std::move(__result.value());
|
|
255
|
+
return __value;
|
|
256
|
+
}
|
|
257
|
+
inline std::shared_ptr<Promise<void>> imapMarkAsRead(const std::vector<double>& uids, bool silent) override {
|
|
258
|
+
auto __result = _swiftPart.imapMarkAsRead(uids, std::forward<decltype(silent)>(silent));
|
|
259
|
+
if (__result.hasError()) [[unlikely]] {
|
|
260
|
+
std::rethrow_exception(__result.error());
|
|
261
|
+
}
|
|
262
|
+
auto __value = std::move(__result.value());
|
|
263
|
+
return __value;
|
|
264
|
+
}
|
|
265
|
+
inline std::shared_ptr<Promise<void>> imapMarkAsFlagged(const std::vector<double>& uids, bool flagged) override {
|
|
266
|
+
auto __result = _swiftPart.imapMarkAsFlagged(uids, std::forward<decltype(flagged)>(flagged));
|
|
267
|
+
if (__result.hasError()) [[unlikely]] {
|
|
268
|
+
std::rethrow_exception(__result.error());
|
|
269
|
+
}
|
|
270
|
+
auto __value = std::move(__result.value());
|
|
271
|
+
return __value;
|
|
272
|
+
}
|
|
273
|
+
inline std::shared_ptr<Promise<void>> imapMoveEmails(const std::vector<double>& uids, const std::string& destinationMailbox) override {
|
|
274
|
+
auto __result = _swiftPart.imapMoveEmails(uids, destinationMailbox);
|
|
275
|
+
if (__result.hasError()) [[unlikely]] {
|
|
276
|
+
std::rethrow_exception(__result.error());
|
|
277
|
+
}
|
|
278
|
+
auto __value = std::move(__result.value());
|
|
279
|
+
return __value;
|
|
280
|
+
}
|
|
281
|
+
inline std::shared_ptr<Promise<void>> imapCopyEmails(const std::vector<double>& uids, const std::string& destinationMailbox) override {
|
|
282
|
+
auto __result = _swiftPart.imapCopyEmails(uids, destinationMailbox);
|
|
283
|
+
if (__result.hasError()) [[unlikely]] {
|
|
284
|
+
std::rethrow_exception(__result.error());
|
|
285
|
+
}
|
|
286
|
+
auto __value = std::move(__result.value());
|
|
287
|
+
return __value;
|
|
288
|
+
}
|
|
289
|
+
inline std::shared_ptr<Promise<DeleteResult>> imapDeleteEmails(const std::vector<double>& uids) override {
|
|
290
|
+
auto __result = _swiftPart.imapDeleteEmails(uids);
|
|
291
|
+
if (__result.hasError()) [[unlikely]] {
|
|
292
|
+
std::rethrow_exception(__result.error());
|
|
293
|
+
}
|
|
294
|
+
auto __value = std::move(__result.value());
|
|
295
|
+
return __value;
|
|
296
|
+
}
|
|
297
|
+
inline std::shared_ptr<Promise<void>> imapExpunge() override {
|
|
298
|
+
auto __result = _swiftPart.imapExpunge();
|
|
299
|
+
if (__result.hasError()) [[unlikely]] {
|
|
300
|
+
std::rethrow_exception(__result.error());
|
|
301
|
+
}
|
|
302
|
+
auto __value = std::move(__result.value());
|
|
303
|
+
return __value;
|
|
304
|
+
}
|
|
305
|
+
inline std::shared_ptr<Promise<std::variant<nitro::NullType, AttachmentInfo>>> imapFetchAttachments(double uid, const std::string& partId) override {
|
|
306
|
+
auto __result = _swiftPart.imapFetchAttachments(std::forward<decltype(uid)>(uid), partId);
|
|
307
|
+
if (__result.hasError()) [[unlikely]] {
|
|
308
|
+
std::rethrow_exception(__result.error());
|
|
309
|
+
}
|
|
310
|
+
auto __value = std::move(__result.value());
|
|
311
|
+
return __value;
|
|
312
|
+
}
|
|
313
|
+
inline std::shared_ptr<Promise<std::vector<AttachmentInfo>>> imapFetchAllAttachments(double uid) override {
|
|
314
|
+
auto __result = _swiftPart.imapFetchAllAttachments(std::forward<decltype(uid)>(uid));
|
|
315
|
+
if (__result.hasError()) [[unlikely]] {
|
|
316
|
+
std::rethrow_exception(__result.error());
|
|
317
|
+
}
|
|
318
|
+
auto __value = std::move(__result.value());
|
|
319
|
+
return __value;
|
|
320
|
+
}
|
|
321
|
+
inline std::shared_ptr<Promise<void>> imapIdle(const std::function<void(const IdleNotification& /* notification */)>& callback) override {
|
|
322
|
+
auto __result = _swiftPart.imapIdle(callback);
|
|
323
|
+
if (__result.hasError()) [[unlikely]] {
|
|
324
|
+
std::rethrow_exception(__result.error());
|
|
325
|
+
}
|
|
326
|
+
auto __value = std::move(__result.value());
|
|
327
|
+
return __value;
|
|
328
|
+
}
|
|
329
|
+
inline std::shared_ptr<Promise<void>> imapStopIdle() override {
|
|
330
|
+
auto __result = _swiftPart.imapStopIdle();
|
|
331
|
+
if (__result.hasError()) [[unlikely]] {
|
|
332
|
+
std::rethrow_exception(__result.error());
|
|
333
|
+
}
|
|
334
|
+
auto __value = std::move(__result.value());
|
|
335
|
+
return __value;
|
|
336
|
+
}
|
|
337
|
+
inline std::shared_ptr<Promise<QuotaInfo>> imapGetQuota(const std::optional<std::string>& root) override {
|
|
338
|
+
auto __result = _swiftPart.imapGetQuota(root);
|
|
339
|
+
if (__result.hasError()) [[unlikely]] {
|
|
340
|
+
std::rethrow_exception(__result.error());
|
|
341
|
+
}
|
|
342
|
+
auto __value = std::move(__result.value());
|
|
343
|
+
return __value;
|
|
344
|
+
}
|
|
345
|
+
inline std::shared_ptr<Promise<AppendResult>> imapAppendMessage(const std::string& mailbox, const std::shared_ptr<ArrayBuffer>& rawMimeData, const std::optional<std::vector<std::string>>& flags) override {
|
|
346
|
+
auto __result = _swiftPart.imapAppendMessage(mailbox, ArrayBufferHolder(rawMimeData), flags);
|
|
347
|
+
if (__result.hasError()) [[unlikely]] {
|
|
348
|
+
std::rethrow_exception(__result.error());
|
|
349
|
+
}
|
|
350
|
+
auto __value = std::move(__result.value());
|
|
351
|
+
return __value;
|
|
352
|
+
}
|
|
353
|
+
inline std::shared_ptr<Promise<ConnectionResult>> smtpConnect(const SmtpConnectionConfig& config) override {
|
|
354
|
+
auto __result = _swiftPart.smtpConnect(std::forward<decltype(config)>(config));
|
|
355
|
+
if (__result.hasError()) [[unlikely]] {
|
|
356
|
+
std::rethrow_exception(__result.error());
|
|
357
|
+
}
|
|
358
|
+
auto __value = std::move(__result.value());
|
|
359
|
+
return __value;
|
|
360
|
+
}
|
|
361
|
+
inline std::shared_ptr<Promise<void>> smtpDisconnect() override {
|
|
362
|
+
auto __result = _swiftPart.smtpDisconnect();
|
|
363
|
+
if (__result.hasError()) [[unlikely]] {
|
|
364
|
+
std::rethrow_exception(__result.error());
|
|
365
|
+
}
|
|
366
|
+
auto __value = std::move(__result.value());
|
|
367
|
+
return __value;
|
|
368
|
+
}
|
|
369
|
+
inline std::shared_ptr<Promise<SendMailResult>> smtpSendMail(const SendMailOptions& options) override {
|
|
370
|
+
auto __result = _swiftPart.smtpSendMail(std::forward<decltype(options)>(options));
|
|
371
|
+
if (__result.hasError()) [[unlikely]] {
|
|
372
|
+
std::rethrow_exception(__result.error());
|
|
373
|
+
}
|
|
374
|
+
auto __value = std::move(__result.value());
|
|
375
|
+
return __value;
|
|
376
|
+
}
|
|
377
|
+
inline std::shared_ptr<Promise<bool>> smtpVerifyConnection() override {
|
|
378
|
+
auto __result = _swiftPart.smtpVerifyConnection();
|
|
379
|
+
if (__result.hasError()) [[unlikely]] {
|
|
380
|
+
std::rethrow_exception(__result.error());
|
|
381
|
+
}
|
|
382
|
+
auto __value = std::move(__result.value());
|
|
383
|
+
return __value;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
private:
|
|
387
|
+
EmailImapSmtp::HybridEmailImapSmtpSpec_cxx _swiftPart;
|
|
388
|
+
};
|
|
389
|
+
|
|
390
|
+
} // namespace margelo::nitro::emailimapsmtp
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// AppendResult.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
|
+
* Represents an instance of `AppendResult`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias AppendResult = margelo.nitro.emailimapsmtp.AppendResult
|
|
14
|
+
|
|
15
|
+
public extension AppendResult {
|
|
16
|
+
private typealias bridge = margelo.nitro.emailimapsmtp.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `AppendResult`.
|
|
20
|
+
*/
|
|
21
|
+
init(uid: Double, uidValidity: Double, date: String) {
|
|
22
|
+
self.init(uid, uidValidity, std.string(date))
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@inline(__always)
|
|
26
|
+
var uid: Double {
|
|
27
|
+
return self.__uid
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@inline(__always)
|
|
31
|
+
var uidValidity: Double {
|
|
32
|
+
return self.__uidValidity
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@inline(__always)
|
|
36
|
+
var date: String {
|
|
37
|
+
return String(self.__date)
|
|
38
|
+
}
|
|
39
|
+
}
|