summaryrefslogtreecommitdiffstats
path: root/comm/mailnews/local/public/nsIMsgParseMailMsgState.idl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /comm/mailnews/local/public/nsIMsgParseMailMsgState.idl
parentInitial commit. (diff)
downloadthunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz
thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'comm/mailnews/local/public/nsIMsgParseMailMsgState.idl')
-rw-r--r--comm/mailnews/local/public/nsIMsgParseMailMsgState.idl46
1 files changed, 46 insertions, 0 deletions
diff --git a/comm/mailnews/local/public/nsIMsgParseMailMsgState.idl b/comm/mailnews/local/public/nsIMsgParseMailMsgState.idl
new file mode 100644
index 0000000000..77c92b72df
--- /dev/null
+++ b/comm/mailnews/local/public/nsIMsgParseMailMsgState.idl
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "nsISupports.idl"
+#include "MailNewsTypes2.idl" // for nsMsgKey typedef
+
+interface nsIMsgDatabase;
+interface nsIMsgDBHdr;
+
+typedef long nsMailboxParseState;
+
+[scriptable, uuid(0d44646c-0759-43a2-954d-dc2a9a9660ec)]
+interface nsIMsgParseMailMsgState : nsISupports {
+ void SetMailDB(in nsIMsgDatabase aDatabase);
+ /*
+ * Set a backup mail database, whose data will be read during parsing to
+ * attempt to recover message metadata
+ *
+ * @param aDatabase the backup database
+ */
+ void SetBackupMailDB(in nsIMsgDatabase aDatabase);
+ void Clear();
+
+ void ParseAFolderLine(in string line, in unsigned long lineLength);
+ /// db header for message we're currently parsing
+ attribute nsIMsgDBHdr newMsgHdr;
+ void FinishHeader();
+
+ long GetAllHeaders(out string headers);
+ readonly attribute string headers;
+ attribute nsMailboxParseState state;
+ /* these are nsMailboxParseState */
+ const long ParseEnvelopeState=0;
+ const long ParseHeadersState=1;
+ const long ParseBodyState=2;
+
+ /**
+ * Set the key to be used for the new message header.
+ *
+ * @param aNewKey the new db key
+ *
+ */
+ void setNewKey(in nsMsgKey aKey);
+};