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.
Files changed (201) hide show
  1. package/EmailImapSmtp.podspec +29 -0
  2. package/LICENSE +20 -0
  3. package/README.md +121 -0
  4. package/android/CMakeLists.txt +24 -0
  5. package/android/build.gradle +117 -0
  6. package/android/src/main/AndroidManifest.xml +3 -0
  7. package/android/src/main/cpp/cpp-adapter.cpp +11 -0
  8. package/android/src/main/java/com/margelo/nitro/emailimapsmtp/EmailImapSmtp.kt +1533 -0
  9. package/android/src/main/java/com/margelo/nitro/emailimapsmtp/EmailImapSmtpPackage.kt +22 -0
  10. package/ios/EmailImapSmtp.swift +5 -0
  11. package/lib/module/EmailImapSmtp.nitro.js +4 -0
  12. package/lib/module/EmailImapSmtp.nitro.js.map +1 -0
  13. package/lib/module/NativeEmailImapSmtp.js +14 -0
  14. package/lib/module/NativeEmailImapSmtp.js.map +1 -0
  15. package/lib/module/index.js +64 -0
  16. package/lib/module/index.js.map +1 -0
  17. package/lib/module/native.js +227 -0
  18. package/lib/module/native.js.map +1 -0
  19. package/lib/module/package.json +1 -0
  20. package/lib/module/types.js +2 -0
  21. package/lib/module/types.js.map +1 -0
  22. package/lib/module/web.js +107 -0
  23. package/lib/module/web.js.map +1 -0
  24. package/lib/module/windows.js +156 -0
  25. package/lib/module/windows.js.map +1 -0
  26. package/lib/typescript/package.json +1 -0
  27. package/lib/typescript/src/EmailImapSmtp.nitro.d.ts +268 -0
  28. package/lib/typescript/src/EmailImapSmtp.nitro.d.ts.map +1 -0
  29. package/lib/typescript/src/NativeEmailImapSmtp.d.ts +36 -0
  30. package/lib/typescript/src/NativeEmailImapSmtp.d.ts.map +1 -0
  31. package/lib/typescript/src/index.d.ts +33 -0
  32. package/lib/typescript/src/index.d.ts.map +1 -0
  33. package/lib/typescript/src/native.d.ts +32 -0
  34. package/lib/typescript/src/native.d.ts.map +1 -0
  35. package/lib/typescript/src/types.d.ts +261 -0
  36. package/lib/typescript/src/types.d.ts.map +1 -0
  37. package/lib/typescript/src/web.d.ts +32 -0
  38. package/lib/typescript/src/web.d.ts.map +1 -0
  39. package/lib/typescript/src/windows.d.ts +32 -0
  40. package/lib/typescript/src/windows.d.ts.map +1 -0
  41. package/nitro.json +23 -0
  42. package/nitrogen/generated/android/c++/JAppendResult.hpp +65 -0
  43. package/nitrogen/generated/android/c++/JAttachmentInfo.hpp +96 -0
  44. package/nitrogen/generated/android/c++/JConnectionConfig.hpp +94 -0
  45. package/nitrogen/generated/android/c++/JConnectionResult.hpp +73 -0
  46. package/nitrogen/generated/android/c++/JDeleteResult.hpp +87 -0
  47. package/nitrogen/generated/android/c++/JEmailAddress.hpp +61 -0
  48. package/nitrogen/generated/android/c++/JEmailBody.hpp +84 -0
  49. package/nitrogen/generated/android/c++/JEmailMessage.hpp +273 -0
  50. package/nitrogen/generated/android/c++/JFetchEmailsOptions.hpp +110 -0
  51. package/nitrogen/generated/android/c++/JFolderInfo.hpp +126 -0
  52. package/nitrogen/generated/android/c++/JFunc_void_IdleNotification.hpp +79 -0
  53. package/nitrogen/generated/android/c++/JHybridEmailImapSmtpSpec.cpp +697 -0
  54. package/nitrogen/generated/android/c++/JHybridEmailImapSmtpSpec.hpp +92 -0
  55. package/nitrogen/generated/android/c++/JIdleNotification.hpp +78 -0
  56. package/nitrogen/generated/android/c++/JImapServerInfo.hpp +84 -0
  57. package/nitrogen/generated/android/c++/JMailboxInfo.hpp +134 -0
  58. package/nitrogen/generated/android/c++/JMailboxListItem.hpp +92 -0
  59. package/nitrogen/generated/android/c++/JQuotaInfo.hpp +78 -0
  60. package/nitrogen/generated/android/c++/JSearchCriteria.hpp +187 -0
  61. package/nitrogen/generated/android/c++/JSearchHeader.hpp +61 -0
  62. package/nitrogen/generated/android/c++/JSendMailOptions.hpp +229 -0
  63. package/nitrogen/generated/android/c++/JSendMailResult.hpp +88 -0
  64. package/nitrogen/generated/android/c++/JSmtpAttachment.hpp +80 -0
  65. package/nitrogen/generated/android/c++/JSmtpConnectionConfig.hpp +98 -0
  66. package/nitrogen/generated/android/c++/JSmtpServerInfo.hpp +102 -0
  67. package/nitrogen/generated/android/c++/JVariant_ImapServerInfo_SmtpServerInfo.cpp +26 -0
  68. package/nitrogen/generated/android/c++/JVariant_ImapServerInfo_SmtpServerInfo.hpp +73 -0
  69. package/nitrogen/generated/android/c++/JVariant_NullType_AttachmentInfo.cpp +26 -0
  70. package/nitrogen/generated/android/c++/JVariant_NullType_AttachmentInfo.hpp +75 -0
  71. package/nitrogen/generated/android/c++/JVariant_NullType_EmailMessage.cpp +26 -0
  72. package/nitrogen/generated/android/c++/JVariant_NullType_EmailMessage.hpp +83 -0
  73. package/nitrogen/generated/android/emailimapsmtp+autolinking.cmake +84 -0
  74. package/nitrogen/generated/android/emailimapsmtp+autolinking.gradle +27 -0
  75. package/nitrogen/generated/android/emailimapsmtpOnLoad.cpp +56 -0
  76. package/nitrogen/generated/android/emailimapsmtpOnLoad.hpp +34 -0
  77. package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/AppendResult.kt +61 -0
  78. package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/AttachmentInfo.kt +96 -0
  79. package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/ConnectionConfig.kt +96 -0
  80. package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/ConnectionResult.kt +61 -0
  81. package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/DeleteResult.kt +61 -0
  82. package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/EmailAddress.kt +56 -0
  83. package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/EmailBody.kt +61 -0
  84. package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/EmailMessage.kt +156 -0
  85. package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/FetchEmailsOptions.kt +116 -0
  86. package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/FolderInfo.kt +91 -0
  87. package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/Func_void_IdleNotification.kt +80 -0
  88. package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/HybridEmailImapSmtpSpec.kt +178 -0
  89. package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/IdleNotification.kt +76 -0
  90. package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/ImapServerInfo.kt +61 -0
  91. package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/MailboxInfo.kt +101 -0
  92. package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/MailboxListItem.kt +71 -0
  93. package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/QuotaInfo.kt +76 -0
  94. package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/SearchCriteria.kt +196 -0
  95. package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/SearchHeader.kt +56 -0
  96. package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/SendMailOptions.kt +126 -0
  97. package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/SendMailResult.kt +86 -0
  98. package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/SmtpAttachment.kt +76 -0
  99. package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/SmtpConnectionConfig.kt +101 -0
  100. package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/SmtpServerInfo.kt +61 -0
  101. package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/Variant_ImapServerInfo_SmtpServerInfo.kt +62 -0
  102. package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/Variant_NullType_AttachmentInfo.kt +62 -0
  103. package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/Variant_NullType_EmailMessage.kt +62 -0
  104. package/nitrogen/generated/android/kotlin/com/margelo/nitro/emailimapsmtp/emailimapsmtpOnLoad.kt +35 -0
  105. package/nitrogen/generated/ios/EmailImapSmtp+autolinking.rb +62 -0
  106. package/nitrogen/generated/ios/EmailImapSmtp-Swift-Cxx-Bridge.cpp +161 -0
  107. package/nitrogen/generated/ios/EmailImapSmtp-Swift-Cxx-Bridge.hpp +1132 -0
  108. package/nitrogen/generated/ios/EmailImapSmtp-Swift-Cxx-Umbrella.hpp +118 -0
  109. package/nitrogen/generated/ios/EmailImapSmtpAutolinking.mm +33 -0
  110. package/nitrogen/generated/ios/EmailImapSmtpAutolinking.swift +26 -0
  111. package/nitrogen/generated/ios/c++/HybridEmailImapSmtpSpecSwift.cpp +11 -0
  112. package/nitrogen/generated/ios/c++/HybridEmailImapSmtpSpecSwift.hpp +390 -0
  113. package/nitrogen/generated/ios/swift/AppendResult.swift +39 -0
  114. package/nitrogen/generated/ios/swift/AttachmentInfo.swift +113 -0
  115. package/nitrogen/generated/ios/swift/ConnectionConfig.swift +87 -0
  116. package/nitrogen/generated/ios/swift/ConnectionResult.swift +84 -0
  117. package/nitrogen/generated/ios/swift/DeleteResult.swift +64 -0
  118. package/nitrogen/generated/ios/swift/EmailAddress.swift +34 -0
  119. package/nitrogen/generated/ios/swift/EmailBody.swift +45 -0
  120. package/nitrogen/generated/ios/swift/EmailMessage.swift +184 -0
  121. package/nitrogen/generated/ios/swift/FetchEmailsOptions.swift +198 -0
  122. package/nitrogen/generated/ios/swift/FolderInfo.swift +81 -0
  123. package/nitrogen/generated/ios/swift/Func_void.swift +46 -0
  124. package/nitrogen/generated/ios/swift/Func_void_AppendResult.swift +46 -0
  125. package/nitrogen/generated/ios/swift/Func_void_ConnectionResult.swift +46 -0
  126. package/nitrogen/generated/ios/swift/Func_void_DeleteResult.swift +46 -0
  127. package/nitrogen/generated/ios/swift/Func_void_IdleNotification.swift +46 -0
  128. package/nitrogen/generated/ios/swift/Func_void_MailboxInfo.swift +46 -0
  129. package/nitrogen/generated/ios/swift/Func_void_QuotaInfo.swift +46 -0
  130. package/nitrogen/generated/ios/swift/Func_void_SendMailResult.swift +46 -0
  131. package/nitrogen/generated/ios/swift/Func_void_bool.swift +46 -0
  132. package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +46 -0
  133. package/nitrogen/generated/ios/swift/Func_void_std__variant_nitro__NullType__AttachmentInfo_.swift +58 -0
  134. package/nitrogen/generated/ios/swift/Func_void_std__variant_nitro__NullType__EmailMessage_.swift +58 -0
  135. package/nitrogen/generated/ios/swift/Func_void_std__vector_AttachmentInfo_.swift +46 -0
  136. package/nitrogen/generated/ios/swift/Func_void_std__vector_EmailMessage_.swift +46 -0
  137. package/nitrogen/generated/ios/swift/Func_void_std__vector_FolderInfo_.swift +46 -0
  138. package/nitrogen/generated/ios/swift/Func_void_std__vector_MailboxListItem_.swift +46 -0
  139. package/nitrogen/generated/ios/swift/HybridEmailImapSmtpSpec.swift +84 -0
  140. package/nitrogen/generated/ios/swift/HybridEmailImapSmtpSpec_cxx.swift +759 -0
  141. package/nitrogen/generated/ios/swift/IdleNotification.swift +93 -0
  142. package/nitrogen/generated/ios/swift/ImapServerInfo.swift +45 -0
  143. package/nitrogen/generated/ios/swift/MailboxInfo.swift +91 -0
  144. package/nitrogen/generated/ios/swift/MailboxListItem.swift +55 -0
  145. package/nitrogen/generated/ios/swift/QuotaInfo.swift +80 -0
  146. package/nitrogen/generated/ios/swift/SearchCriteria.swift +485 -0
  147. package/nitrogen/generated/ios/swift/SearchHeader.swift +34 -0
  148. package/nitrogen/generated/ios/swift/SendMailOptions.swift +310 -0
  149. package/nitrogen/generated/ios/swift/SendMailResult.swift +155 -0
  150. package/nitrogen/generated/ios/swift/SmtpAttachment.swift +80 -0
  151. package/nitrogen/generated/ios/swift/SmtpConnectionConfig.swift +105 -0
  152. package/nitrogen/generated/ios/swift/SmtpServerInfo.swift +51 -0
  153. package/nitrogen/generated/ios/swift/Variant_ImapServerInfo_SmtpServerInfo.swift +30 -0
  154. package/nitrogen/generated/ios/swift/Variant_NullType_AttachmentInfo.swift +30 -0
  155. package/nitrogen/generated/ios/swift/Variant_NullType_EmailMessage.swift +30 -0
  156. package/nitrogen/generated/shared/c++/AppendResult.hpp +91 -0
  157. package/nitrogen/generated/shared/c++/AttachmentInfo.hpp +121 -0
  158. package/nitrogen/generated/shared/c++/ConnectionConfig.hpp +120 -0
  159. package/nitrogen/generated/shared/c++/ConnectionResult.hpp +98 -0
  160. package/nitrogen/generated/shared/c++/DeleteResult.hpp +93 -0
  161. package/nitrogen/generated/shared/c++/EmailAddress.hpp +87 -0
  162. package/nitrogen/generated/shared/c++/EmailBody.hpp +92 -0
  163. package/nitrogen/generated/shared/c++/EmailMessage.hpp +177 -0
  164. package/nitrogen/generated/shared/c++/FetchEmailsOptions.hpp +136 -0
  165. package/nitrogen/generated/shared/c++/FolderInfo.hpp +116 -0
  166. package/nitrogen/generated/shared/c++/HybridEmailImapSmtpSpec.cpp +50 -0
  167. package/nitrogen/generated/shared/c++/HybridEmailImapSmtpSpec.hpp +145 -0
  168. package/nitrogen/generated/shared/c++/IdleNotification.hpp +104 -0
  169. package/nitrogen/generated/shared/c++/ImapServerInfo.hpp +92 -0
  170. package/nitrogen/generated/shared/c++/MailboxInfo.hpp +124 -0
  171. package/nitrogen/generated/shared/c++/MailboxListItem.hpp +100 -0
  172. package/nitrogen/generated/shared/c++/QuotaInfo.hpp +104 -0
  173. package/nitrogen/generated/shared/c++/SearchCriteria.hpp +203 -0
  174. package/nitrogen/generated/shared/c++/SearchHeader.hpp +87 -0
  175. package/nitrogen/generated/shared/c++/SendMailOptions.hpp +151 -0
  176. package/nitrogen/generated/shared/c++/SendMailResult.hpp +113 -0
  177. package/nitrogen/generated/shared/c++/SmtpAttachment.hpp +105 -0
  178. package/nitrogen/generated/shared/c++/SmtpConnectionConfig.hpp +124 -0
  179. package/nitrogen/generated/shared/c++/SmtpServerInfo.hpp +92 -0
  180. package/package.json +196 -0
  181. package/react-native.config.js +27 -0
  182. package/src/EmailImapSmtp.nitro.ts +333 -0
  183. package/src/NativeEmailImapSmtp.ts +100 -0
  184. package/src/index.tsx +166 -0
  185. package/src/native.ts +305 -0
  186. package/src/types.ts +328 -0
  187. package/src/web.ts +196 -0
  188. package/src/windows.ts +304 -0
  189. package/windows/EmailImapSmtp.cpp +735 -0
  190. package/windows/EmailImapSmtp.h +137 -0
  191. package/windows/EmailImapSmtpModule.cpp +10 -0
  192. package/windows/EmailImapSmtpModule.h +139 -0
  193. package/windows/EmailImapSmtpPackage.cpp +15 -0
  194. package/windows/EmailImapSmtpPackage.h +13 -0
  195. package/windows/ImapProtocol.cpp +1382 -0
  196. package/windows/ImapProtocol.h +97 -0
  197. package/windows/ProtocolDefs.h +300 -0
  198. package/windows/SmtpProtocol.cpp +334 -0
  199. package/windows/SmtpProtocol.h +36 -0
  200. package/windows/TlsSocket.cpp +818 -0
  201. package/windows/TlsSocket.h +87 -0
@@ -0,0 +1,56 @@
1
+ ///
2
+ /// emailimapsmtpOnLoad.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_EMAILIMAPSMTP_WITH_GENERATED_CMAKE_PROJECT
9
+ #error emailimapsmtpOnLoad.cpp is not being built with the autogenerated CMakeLists.txt project. Is a different CMakeLists.txt building this?
10
+ #endif
11
+
12
+ #include "emailimapsmtpOnLoad.hpp"
13
+
14
+ #include <jni.h>
15
+ #include <fbjni/fbjni.h>
16
+ #include <NitroModules/HybridObjectRegistry.hpp>
17
+
18
+ #include "JHybridEmailImapSmtpSpec.hpp"
19
+ #include "JFunc_void_IdleNotification.hpp"
20
+ #include <NitroModules/DefaultConstructableObject.hpp>
21
+
22
+ namespace margelo::nitro::emailimapsmtp {
23
+
24
+ int initialize(JavaVM* vm) {
25
+ return facebook::jni::initialize(vm, []() {
26
+ ::margelo::nitro::emailimapsmtp::registerAllNatives();
27
+ });
28
+ }
29
+
30
+ struct JHybridEmailImapSmtpSpecImpl: public jni::JavaClass<JHybridEmailImapSmtpSpecImpl, JHybridEmailImapSmtpSpec::JavaPart> {
31
+ static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/emailimapsmtp/EmailImapSmtp;";
32
+ static std::shared_ptr<JHybridEmailImapSmtpSpec> create() {
33
+ static const auto constructorFn = javaClassStatic()->getConstructor<JHybridEmailImapSmtpSpecImpl::javaobject()>();
34
+ jni::local_ref<JHybridEmailImapSmtpSpec::JavaPart> javaPart = javaClassStatic()->newObject(constructorFn);
35
+ return javaPart->getJHybridEmailImapSmtpSpec();
36
+ }
37
+ };
38
+
39
+ void registerAllNatives() {
40
+ using namespace margelo::nitro;
41
+ using namespace margelo::nitro::emailimapsmtp;
42
+
43
+ // Register native JNI methods
44
+ margelo::nitro::emailimapsmtp::JHybridEmailImapSmtpSpec::CxxPart::registerNatives();
45
+ margelo::nitro::emailimapsmtp::JFunc_void_IdleNotification_cxx::registerNatives();
46
+
47
+ // Register Nitro Hybrid Objects
48
+ HybridObjectRegistry::registerHybridObjectConstructor(
49
+ "EmailImapSmtp",
50
+ []() -> std::shared_ptr<HybridObject> {
51
+ return JHybridEmailImapSmtpSpecImpl::create();
52
+ }
53
+ );
54
+ }
55
+
56
+ } // namespace margelo::nitro::emailimapsmtp
@@ -0,0 +1,34 @@
1
+ ///
2
+ /// emailimapsmtpOnLoad.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::emailimapsmtp {
13
+
14
+ [[deprecated("Use registerNatives() instead.")]]
15
+ int initialize(JavaVM* vm);
16
+
17
+ /**
18
+ * Register the native (C++) part of emailimapsmtp, 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 emailimapsmtp HybridObjects
26
+ * margelo::nitro::emailimapsmtp::registerNatives();
27
+ * // any other custom registrations go here.
28
+ * });
29
+ * }
30
+ * ```
31
+ */
32
+ void registerAllNatives();
33
+
34
+ } // namespace margelo::nitro::emailimapsmtp
@@ -0,0 +1,61 @@
1
+ ///
2
+ /// AppendResult.kt
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
+ package com.margelo.nitro.emailimapsmtp
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+ import java.util.Objects
13
+
14
+
15
+ /**
16
+ * Represents the JavaScript object/struct "AppendResult".
17
+ */
18
+ @DoNotStrip
19
+ @Keep
20
+ data class AppendResult(
21
+ @DoNotStrip
22
+ @Keep
23
+ val uid: Double,
24
+ @DoNotStrip
25
+ @Keep
26
+ val uidValidity: Double,
27
+ @DoNotStrip
28
+ @Keep
29
+ val date: String
30
+ ) {
31
+ /* primary constructor */
32
+
33
+ override fun equals(other: Any?): Boolean {
34
+ if (this === other) return true
35
+ if (other !is AppendResult) return false
36
+ return Objects.deepEquals(this.uid, other.uid)
37
+ && Objects.deepEquals(this.uidValidity, other.uidValidity)
38
+ && Objects.deepEquals(this.date, other.date)
39
+ }
40
+
41
+ override fun hashCode(): Int {
42
+ return arrayOf<Any?>(
43
+ uid,
44
+ uidValidity,
45
+ date
46
+ ).contentDeepHashCode()
47
+ }
48
+
49
+ companion object {
50
+ /**
51
+ * Constructor called from C++
52
+ */
53
+ @DoNotStrip
54
+ @Keep
55
+ @Suppress("unused")
56
+ @JvmStatic
57
+ private fun fromCpp(uid: Double, uidValidity: Double, date: String): AppendResult {
58
+ return AppendResult(uid, uidValidity, date)
59
+ }
60
+ }
61
+ }
@@ -0,0 +1,96 @@
1
+ ///
2
+ /// AttachmentInfo.kt
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
+ package com.margelo.nitro.emailimapsmtp
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+ import java.util.Objects
13
+ import com.margelo.nitro.core.ArrayBuffer
14
+
15
+ /**
16
+ * Represents the JavaScript object/struct "AttachmentInfo".
17
+ */
18
+ @DoNotStrip
19
+ @Keep
20
+ data class AttachmentInfo(
21
+ @DoNotStrip
22
+ @Keep
23
+ val filename: String,
24
+ @DoNotStrip
25
+ @Keep
26
+ val mimeType: String,
27
+ @DoNotStrip
28
+ @Keep
29
+ val partId: String,
30
+ @DoNotStrip
31
+ @Keep
32
+ val size: Double,
33
+ @DoNotStrip
34
+ @Keep
35
+ val data: ArrayBuffer,
36
+ @DoNotStrip
37
+ @Keep
38
+ val contentId: String?,
39
+ @DoNotStrip
40
+ @Keep
41
+ val inline: Boolean,
42
+ @DoNotStrip
43
+ @Keep
44
+ val charset: String?,
45
+ @DoNotStrip
46
+ @Keep
47
+ val contentDisposition: String,
48
+ @DoNotStrip
49
+ @Keep
50
+ val localPath: String?
51
+ ) {
52
+ /* primary constructor */
53
+
54
+ override fun equals(other: Any?): Boolean {
55
+ if (this === other) return true
56
+ if (other !is AttachmentInfo) return false
57
+ return Objects.deepEquals(this.filename, other.filename)
58
+ && Objects.deepEquals(this.mimeType, other.mimeType)
59
+ && Objects.deepEquals(this.partId, other.partId)
60
+ && Objects.deepEquals(this.size, other.size)
61
+ && Objects.deepEquals(this.data, other.data)
62
+ && Objects.deepEquals(this.contentId, other.contentId)
63
+ && Objects.deepEquals(this.inline, other.inline)
64
+ && Objects.deepEquals(this.charset, other.charset)
65
+ && Objects.deepEquals(this.contentDisposition, other.contentDisposition)
66
+ && Objects.deepEquals(this.localPath, other.localPath)
67
+ }
68
+
69
+ override fun hashCode(): Int {
70
+ return arrayOf<Any?>(
71
+ filename,
72
+ mimeType,
73
+ partId,
74
+ size,
75
+ data,
76
+ contentId,
77
+ inline,
78
+ charset,
79
+ contentDisposition,
80
+ localPath
81
+ ).contentDeepHashCode()
82
+ }
83
+
84
+ companion object {
85
+ /**
86
+ * Constructor called from C++
87
+ */
88
+ @DoNotStrip
89
+ @Keep
90
+ @Suppress("unused")
91
+ @JvmStatic
92
+ private fun fromCpp(filename: String, mimeType: String, partId: String, size: Double, data: ArrayBuffer, contentId: String?, inline: Boolean, charset: String?, contentDisposition: String, localPath: String?): AttachmentInfo {
93
+ return AttachmentInfo(filename, mimeType, partId, size, data, contentId, inline, charset, contentDisposition, localPath)
94
+ }
95
+ }
96
+ }
@@ -0,0 +1,96 @@
1
+ ///
2
+ /// ConnectionConfig.kt
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
+ package com.margelo.nitro.emailimapsmtp
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+ import java.util.Objects
13
+
14
+
15
+ /**
16
+ * Represents the JavaScript object/struct "ConnectionConfig".
17
+ */
18
+ @DoNotStrip
19
+ @Keep
20
+ data class ConnectionConfig(
21
+ @DoNotStrip
22
+ @Keep
23
+ val host: String,
24
+ @DoNotStrip
25
+ @Keep
26
+ val port: Double,
27
+ @DoNotStrip
28
+ @Keep
29
+ val username: String,
30
+ @DoNotStrip
31
+ @Keep
32
+ val password: String,
33
+ @DoNotStrip
34
+ @Keep
35
+ val tls: Boolean,
36
+ @DoNotStrip
37
+ @Keep
38
+ val authType: String,
39
+ @DoNotStrip
40
+ @Keep
41
+ val accessToken: String?,
42
+ @DoNotStrip
43
+ @Keep
44
+ val timeout: Double,
45
+ @DoNotStrip
46
+ @Keep
47
+ val checkCertificate: Boolean,
48
+ @DoNotStrip
49
+ @Keep
50
+ val debug: Boolean
51
+ ) {
52
+ /* primary constructor */
53
+
54
+ override fun equals(other: Any?): Boolean {
55
+ if (this === other) return true
56
+ if (other !is ConnectionConfig) return false
57
+ return Objects.deepEquals(this.host, other.host)
58
+ && Objects.deepEquals(this.port, other.port)
59
+ && Objects.deepEquals(this.username, other.username)
60
+ && Objects.deepEquals(this.password, other.password)
61
+ && Objects.deepEquals(this.tls, other.tls)
62
+ && Objects.deepEquals(this.authType, other.authType)
63
+ && Objects.deepEquals(this.accessToken, other.accessToken)
64
+ && Objects.deepEquals(this.timeout, other.timeout)
65
+ && Objects.deepEquals(this.checkCertificate, other.checkCertificate)
66
+ && Objects.deepEquals(this.debug, other.debug)
67
+ }
68
+
69
+ override fun hashCode(): Int {
70
+ return arrayOf<Any?>(
71
+ host,
72
+ port,
73
+ username,
74
+ password,
75
+ tls,
76
+ authType,
77
+ accessToken,
78
+ timeout,
79
+ checkCertificate,
80
+ debug
81
+ ).contentDeepHashCode()
82
+ }
83
+
84
+ companion object {
85
+ /**
86
+ * Constructor called from C++
87
+ */
88
+ @DoNotStrip
89
+ @Keep
90
+ @Suppress("unused")
91
+ @JvmStatic
92
+ private fun fromCpp(host: String, port: Double, username: String, password: String, tls: Boolean, authType: String, accessToken: String?, timeout: Double, checkCertificate: Boolean, debug: Boolean): ConnectionConfig {
93
+ return ConnectionConfig(host, port, username, password, tls, authType, accessToken, timeout, checkCertificate, debug)
94
+ }
95
+ }
96
+ }
@@ -0,0 +1,61 @@
1
+ ///
2
+ /// ConnectionResult.kt
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
+ package com.margelo.nitro.emailimapsmtp
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+ import java.util.Objects
13
+
14
+
15
+ /**
16
+ * Represents the JavaScript object/struct "ConnectionResult".
17
+ */
18
+ @DoNotStrip
19
+ @Keep
20
+ data class ConnectionResult(
21
+ @DoNotStrip
22
+ @Keep
23
+ val success: Boolean,
24
+ @DoNotStrip
25
+ @Keep
26
+ val serverInfo: Variant_ImapServerInfo_SmtpServerInfo?,
27
+ @DoNotStrip
28
+ @Keep
29
+ val error: String?
30
+ ) {
31
+ /* primary constructor */
32
+
33
+ override fun equals(other: Any?): Boolean {
34
+ if (this === other) return true
35
+ if (other !is ConnectionResult) return false
36
+ return Objects.deepEquals(this.success, other.success)
37
+ && Objects.deepEquals(this.serverInfo, other.serverInfo)
38
+ && Objects.deepEquals(this.error, other.error)
39
+ }
40
+
41
+ override fun hashCode(): Int {
42
+ return arrayOf<Any?>(
43
+ success,
44
+ serverInfo,
45
+ error
46
+ ).contentDeepHashCode()
47
+ }
48
+
49
+ companion object {
50
+ /**
51
+ * Constructor called from C++
52
+ */
53
+ @DoNotStrip
54
+ @Keep
55
+ @Suppress("unused")
56
+ @JvmStatic
57
+ private fun fromCpp(success: Boolean, serverInfo: Variant_ImapServerInfo_SmtpServerInfo?, error: String?): ConnectionResult {
58
+ return ConnectionResult(success, serverInfo, error)
59
+ }
60
+ }
61
+ }
@@ -0,0 +1,61 @@
1
+ ///
2
+ /// DeleteResult.kt
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
+ package com.margelo.nitro.emailimapsmtp
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+ import java.util.Objects
13
+
14
+
15
+ /**
16
+ * Represents the JavaScript object/struct "DeleteResult".
17
+ */
18
+ @DoNotStrip
19
+ @Keep
20
+ data class DeleteResult(
21
+ @DoNotStrip
22
+ @Keep
23
+ val success: DoubleArray,
24
+ @DoNotStrip
25
+ @Keep
26
+ val failed: DoubleArray,
27
+ @DoNotStrip
28
+ @Keep
29
+ val error: String?
30
+ ) {
31
+ /* primary constructor */
32
+
33
+ override fun equals(other: Any?): Boolean {
34
+ if (this === other) return true
35
+ if (other !is DeleteResult) return false
36
+ return Objects.deepEquals(this.success, other.success)
37
+ && Objects.deepEquals(this.failed, other.failed)
38
+ && Objects.deepEquals(this.error, other.error)
39
+ }
40
+
41
+ override fun hashCode(): Int {
42
+ return arrayOf<Any?>(
43
+ success,
44
+ failed,
45
+ error
46
+ ).contentDeepHashCode()
47
+ }
48
+
49
+ companion object {
50
+ /**
51
+ * Constructor called from C++
52
+ */
53
+ @DoNotStrip
54
+ @Keep
55
+ @Suppress("unused")
56
+ @JvmStatic
57
+ private fun fromCpp(success: DoubleArray, failed: DoubleArray, error: String?): DeleteResult {
58
+ return DeleteResult(success, failed, error)
59
+ }
60
+ }
61
+ }
@@ -0,0 +1,56 @@
1
+ ///
2
+ /// EmailAddress.kt
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
+ package com.margelo.nitro.emailimapsmtp
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+ import java.util.Objects
13
+
14
+
15
+ /**
16
+ * Represents the JavaScript object/struct "EmailAddress".
17
+ */
18
+ @DoNotStrip
19
+ @Keep
20
+ data class EmailAddress(
21
+ @DoNotStrip
22
+ @Keep
23
+ val name: String,
24
+ @DoNotStrip
25
+ @Keep
26
+ val email: String
27
+ ) {
28
+ /* primary constructor */
29
+
30
+ override fun equals(other: Any?): Boolean {
31
+ if (this === other) return true
32
+ if (other !is EmailAddress) return false
33
+ return Objects.deepEquals(this.name, other.name)
34
+ && Objects.deepEquals(this.email, other.email)
35
+ }
36
+
37
+ override fun hashCode(): Int {
38
+ return arrayOf<Any?>(
39
+ name,
40
+ email
41
+ ).contentDeepHashCode()
42
+ }
43
+
44
+ companion object {
45
+ /**
46
+ * Constructor called from C++
47
+ */
48
+ @DoNotStrip
49
+ @Keep
50
+ @Suppress("unused")
51
+ @JvmStatic
52
+ private fun fromCpp(name: String, email: String): EmailAddress {
53
+ return EmailAddress(name, email)
54
+ }
55
+ }
56
+ }
@@ -0,0 +1,61 @@
1
+ ///
2
+ /// EmailBody.kt
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
+ package com.margelo.nitro.emailimapsmtp
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+ import java.util.Objects
13
+
14
+
15
+ /**
16
+ * Represents the JavaScript object/struct "EmailBody".
17
+ */
18
+ @DoNotStrip
19
+ @Keep
20
+ data class EmailBody(
21
+ @DoNotStrip
22
+ @Keep
23
+ val text: String,
24
+ @DoNotStrip
25
+ @Keep
26
+ val html: String,
27
+ @DoNotStrip
28
+ @Keep
29
+ val embeddedAttachments: Array<String>
30
+ ) {
31
+ /* primary constructor */
32
+
33
+ override fun equals(other: Any?): Boolean {
34
+ if (this === other) return true
35
+ if (other !is EmailBody) return false
36
+ return Objects.deepEquals(this.text, other.text)
37
+ && Objects.deepEquals(this.html, other.html)
38
+ && Objects.deepEquals(this.embeddedAttachments, other.embeddedAttachments)
39
+ }
40
+
41
+ override fun hashCode(): Int {
42
+ return arrayOf<Any?>(
43
+ text,
44
+ html,
45
+ embeddedAttachments
46
+ ).contentDeepHashCode()
47
+ }
48
+
49
+ companion object {
50
+ /**
51
+ * Constructor called from C++
52
+ */
53
+ @DoNotStrip
54
+ @Keep
55
+ @Suppress("unused")
56
+ @JvmStatic
57
+ private fun fromCpp(text: String, html: String, embeddedAttachments: Array<String>): EmailBody {
58
+ return EmailBody(text, html, embeddedAttachments)
59
+ }
60
+ }
61
+ }