summaryrefslogtreecommitdiff
path: root/mailnews/local/public
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-11-03 00:17:46 -0400
committerMatt A. Tobin <email@mattatobin.com>2019-11-03 00:17:46 -0400
commit302bf1b523012e11b60425d6eee1221ebc2724eb (patch)
treeb191a895f8716efcbe42f454f37597a545a6f421 /mailnews/local/public
parent21b3f6247403c06f85e1f45d219f87549862198f (diff)
downloaduxp-302bf1b523012e11b60425d6eee1221ebc2724eb.tar.gz
Issue #1258 - Part 1: Import mailnews, ldap, and mork from comm-esr52.9.1
Diffstat (limited to 'mailnews/local/public')
-rw-r--r--mailnews/local/public/moz.build31
-rw-r--r--mailnews/local/public/nsILocalMailIncomingServer.idl24
-rw-r--r--mailnews/local/public/nsIMailboxService.idl34
-rw-r--r--mailnews/local/public/nsIMailboxUrl.idl59
-rw-r--r--mailnews/local/public/nsIMovemailIncomingServer.idl11
-rw-r--r--mailnews/local/public/nsIMovemailService.idl25
-rw-r--r--mailnews/local/public/nsIMsgLocalMailFolder.idl122
-rw-r--r--mailnews/local/public/nsIMsgParseMailMsgState.idl48
-rw-r--r--mailnews/local/public/nsINewsBlogFeedDownloader.idl41
-rw-r--r--mailnews/local/public/nsINoIncomingServer.idl16
-rw-r--r--mailnews/local/public/nsINoneService.idl11
-rw-r--r--mailnews/local/public/nsIPop3IncomingServer.idl38
-rw-r--r--mailnews/local/public/nsIPop3Protocol.idl25
-rw-r--r--mailnews/local/public/nsIPop3Service.idl128
-rw-r--r--mailnews/local/public/nsIPop3Sink.idl53
-rw-r--r--mailnews/local/public/nsIPop3URL.idl19
-rw-r--r--mailnews/local/public/nsIRssIncomingServer.idl16
-rw-r--r--mailnews/local/public/nsIRssService.idl10
-rw-r--r--mailnews/local/public/nsMsgLocalCID.h227
19 files changed, 938 insertions, 0 deletions
diff --git a/mailnews/local/public/moz.build b/mailnews/local/public/moz.build
new file mode 100644
index 0000000000..0c656b24b0
--- /dev/null
+++ b/mailnews/local/public/moz.build
@@ -0,0 +1,31 @@
+# vim: set filetype=python:
+# 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/.
+
+XPIDL_SOURCES += [
+ 'nsILocalMailIncomingServer.idl',
+ 'nsIMailboxService.idl',
+ 'nsIMailboxUrl.idl',
+ 'nsIMovemailIncomingServer.idl',
+ 'nsIMovemailService.idl',
+ 'nsIMsgLocalMailFolder.idl',
+ 'nsIMsgParseMailMsgState.idl',
+ 'nsINewsBlogFeedDownloader.idl',
+ 'nsINoIncomingServer.idl',
+ 'nsINoneService.idl',
+ 'nsIPop3IncomingServer.idl',
+ 'nsIPop3Protocol.idl',
+ 'nsIPop3Service.idl',
+ 'nsIPop3Sink.idl',
+ 'nsIPop3URL.idl',
+ 'nsIRssIncomingServer.idl',
+ 'nsIRssService.idl',
+]
+
+XPIDL_MODULE = 'msglocal'
+
+EXPORTS += [
+ 'nsMsgLocalCID.h',
+]
+
diff --git a/mailnews/local/public/nsILocalMailIncomingServer.idl b/mailnews/local/public/nsILocalMailIncomingServer.idl
new file mode 100644
index 0000000000..05bcc0ff21
--- /dev/null
+++ b/mailnews/local/public/nsILocalMailIncomingServer.idl
@@ -0,0 +1,24 @@
+/* -*- Mode: IDL; 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"
+
+interface nsIURI;
+interface nsIMsgWindow;
+interface nsIUrlListener;
+interface nsIMsgFolder;
+
+[scriptable, uuid(f465a3ee-5b29-4da6-8b2e-d764bcba468e)]
+interface nsILocalMailIncomingServer : nsISupports
+{
+ /// Create the necessary default folders that must always exist in an account (e.g. Inbox/Trash).
+ void createDefaultMailboxes();
+
+ /// Set special folder flags on the default folders.
+ void setFlagsOnDefaultMailboxes();
+
+ nsIURI getNewMail(in nsIMsgWindow aMsgWindow, in nsIUrlListener aUrlListener, in nsIMsgFolder aInbox);
+};
+
diff --git a/mailnews/local/public/nsIMailboxService.idl b/mailnews/local/public/nsIMailboxService.idl
new file mode 100644
index 0000000000..13d998844d
--- /dev/null
+++ b/mailnews/local/public/nsIMailboxService.idl
@@ -0,0 +1,34 @@
+/* -*- 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 "nsIUrlListener.idl"
+
+interface nsIURI;
+interface nsIStreamListener;
+interface nsIMsgWindow;
+interface nsIFile;
+
+[scriptable, uuid(809FCD02-B9EA-4DC0-84F0-3FBC55AE11F1)]
+interface nsIMailboxService : nsISupports {
+
+ /*
+ * All of these functions build mailbox urls and run them. If you want a
+ * handle on the running task, pass in a valid nsIURI ptr. You can later
+ * interrupt this action by asking the netlib service manager to interrupt
+ * the url you are given back. Remember to release aURL when you are done
+ * with it. Pass nullptr in for aURL if you don't care about the returned URL.
+ */
+
+ /*
+ * Pass in a file path for the mailbox you wish to parse. You also need to
+ * pass in a mailbox parser (the consumer). The url listener can be null
+ * if you have no interest in tracking the url.
+ */
+ nsIURI ParseMailbox(in nsIMsgWindow aMsgWindow, in nsIFile aMailboxPath,
+ in nsIStreamListener aMailboxParser,
+ in nsIUrlListener aUrlListener);
+
+};
diff --git a/mailnews/local/public/nsIMailboxUrl.idl b/mailnews/local/public/nsIMailboxUrl.idl
new file mode 100644
index 0000000000..d301db6c5d
--- /dev/null
+++ b/mailnews/local/public/nsIMailboxUrl.idl
@@ -0,0 +1,59 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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"
+
+interface nsIStreamListener;
+interface nsIMsgDBHdr;
+
+typedef long nsMailboxAction;
+
+[scriptable, uuid(2ac72280-90f4-4d80-8af1-5e7a1997e2a8)]
+interface nsIMailboxUrl : nsISupports {
+
+ // Mailbox urls which parse a mailbox folder require a consumer of the
+ // stream which will represent the mailbox. This consumer is the mailbox
+ // parser. As data from the mailbox folder is read in, the data will be
+ // written to a stream and the consumer will be notified through
+ // nsIStreamListenter::OnDataAvailable that the stream has data
+ // available...
+ // mscott: I wonder if the caller should be allowed to create and set
+ // the stream they want the data written to as well? Hmm....
+
+ attribute nsIStreamListener mailboxParser;
+
+ /////////////////////////////////////////////////////////////////////////
+ // Copy/Move mailbox urls require a mailbox copy handler which actually
+ // performs the copy.
+ /////////////////////////////////////////////////////////////////////////
+ attribute nsIStreamListener mailboxCopyHandler;
+
+ // Some mailbox urls include a message key for the message in question.
+ readonly attribute nsMsgKey messageKey;
+
+ // this is to support multiple msg move/copy in one url
+ void setMoveCopyMsgKeys(out nsMsgKey keysToFlag, in long numKeys);
+ void getMoveCopyMsgHdrForIndex(in unsigned long msgIndex, out nsIMsgDBHdr msgHdr);
+ readonly attribute unsigned long numMoveCopyMsgs;
+ attribute unsigned long curMoveCopyMsgIndex;
+ // mailbox urls to fetch a mail message can specify the size of
+ // the message...
+ // this saves us the trouble of having to open up the msg db and ask
+ // ourselves...
+ attribute unsigned long messageSize;
+
+ attribute nsMailboxAction mailboxAction;
+
+ /* these are nsMailboxActions */
+ const long ActionParseMailbox = 0;
+ const long ActionFetchMessage = 1;
+ const long ActionCopyMessage = 2;
+ const long ActionMoveMessage = 3;
+ const long ActionSaveMessageToDisk = 4;
+ const long ActionAppendMessageToDisk = 5;
+ const long ActionFetchPart = 6;
+};
+
diff --git a/mailnews/local/public/nsIMovemailIncomingServer.idl b/mailnews/local/public/nsIMovemailIncomingServer.idl
new file mode 100644
index 0000000000..623ee83b3a
--- /dev/null
+++ b/mailnews/local/public/nsIMovemailIncomingServer.idl
@@ -0,0 +1,11 @@
+/* -*- Mode: IDL; 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"
+
+[scriptable, uuid(0dbfa510-1dd2-11b2-9f0e-849c5a241ab6)]
+interface nsIMovemailIncomingServer : nsISupports {
+};
+
diff --git a/mailnews/local/public/nsIMovemailService.idl b/mailnews/local/public/nsIMovemailService.idl
new file mode 100644
index 0000000000..564c06413f
--- /dev/null
+++ b/mailnews/local/public/nsIMovemailService.idl
@@ -0,0 +1,25 @@
+/* -*- 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"
+
+interface nsIMsgWindow;
+interface nsIMsgFolder;
+interface nsIMovemailIncomingServer;
+interface nsIUrlListener;
+interface nsIURI;
+
+[scriptable, uuid(4c7786a4-1dd2-11b2-9fbe-c59d742de59b)]
+interface nsIMovemailService : nsISupports {
+
+ nsIURI GetNewMail(in nsIMsgWindow aMsgWindow,
+ in nsIUrlListener aUrlListener,
+ in nsIMsgFolder aMsgFolder,
+ in nsIMovemailIncomingServer movemailServer);
+
+ nsIURI CheckForNewMail(in nsIUrlListener aUrlListener,
+ in nsIMsgFolder inbox,
+ in nsIMovemailIncomingServer movemailServer);
+};
diff --git a/mailnews/local/public/nsIMsgLocalMailFolder.idl b/mailnews/local/public/nsIMsgLocalMailFolder.idl
new file mode 100644
index 0000000000..6bf1c5c5be
--- /dev/null
+++ b/mailnews/local/public/nsIMsgLocalMailFolder.idl
@@ -0,0 +1,122 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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"
+interface nsIArray;
+interface nsIMsgWindow;
+interface nsIUrlListener;
+interface nsIMsgDatabase;
+interface nsIMsgDBHdr;
+interface nsIMsgFolder;
+interface nsIMsgCopyServiceListener;
+
+[ptr] native nsLocalFolderScanState(nsLocalFolderScanState);
+
+%{C++
+/* flags for markMsgsOnPop3Server */
+#define POP3_NONE 0
+#define POP3_DELETE 1
+#define POP3_FETCH_BODY 2
+#define POP3_FORCE_DEL 3
+
+struct nsLocalFolderScanState;
+%}
+
+[scriptable, uuid(ebf7576c-e15f-4aba-b021-cc6e9266e90c)]
+interface nsIMsgLocalMailFolder : nsISupports {
+ /**
+ * Set the default flags on the subfolders of this folder, such as
+ * Drafts, Templates, etc.
+ * @param flags bitwise OR matching the type of mailboxes you want to flag.
+ * This function will be smart and find the right names.
+ * E.g. nsMsgFolderFlags::Inbox | nsMsgFolderFlags::Drafts
+ */
+ void setFlagsOnDefaultMailboxes(in unsigned long flags);
+
+ /*
+ * This will return null if the db is out of date
+ */
+ nsIMsgDatabase getDatabaseWOReparse();
+
+ /*
+ * This will kick off a url to reparse the db if it's out of date.
+ * If aReparseUrlListener is null, folder will use itself as the listener
+ */
+ nsIMsgDatabase getDatabaseWithReparse(in nsIUrlListener aReparseUrlListener, in nsIMsgWindow aMsgWindow);
+ void parseFolder(in nsIMsgWindow aMsgWindow, in nsIUrlListener listener);
+ void copyFolderLocal(in nsIMsgFolder srcFolder, in boolean isMove, in nsIMsgWindow msgWindow, in nsIMsgCopyServiceListener listener );
+ void copyAllSubFolders(in nsIMsgFolder srcFolder, in nsIMsgWindow msgWindow, in nsIMsgCopyServiceListener listener );
+ void onCopyCompleted(in nsISupports aSrcSupport, in boolean aMoveCopySucceeded);
+ attribute boolean checkForNewMessagesAfterParsing;
+ void markMsgsOnPop3Server(in nsIArray aMessages, in int32_t aMark);
+
+ /**
+ * File size on disk has possibly changed - update and notify.
+ */
+ void refreshSizeOnDisk();
+
+ /**
+ * Creates a subfolder to the current folder with the passed in folder name.
+ * @param aFolderName name of the folder to create.
+ * @return newly created folder.
+ */
+ nsIMsgFolder createLocalSubfolder(in AString aFolderName);
+
+ /**
+ * Adds a message to the end of the folder, parsing it as it goes, and
+ * applying filters, if applicable.
+ * @param aMessage string containing the entire body of the message to add
+ * @return the nsIMsgDBHdr of the added message
+ */
+ nsIMsgDBHdr addMessage(in string aMessage);
+
+ /**
+ * Add one or more messages to the end of the folder in a single batch. Each
+ * batch requires an fsync() on the mailbox file so it is a good idea to
+ * try and minimize the number of calls you make to this method or addMessage.
+ *
+ * Filters are applied, if applicable.
+ *
+ * @param aMessageCount The number of messages.
+ * @param aMessages An array of pointers to strings containing entire message
+ * bodies.
+ * @return an array of nsIMsgDBHdr of the added messages
+ */
+ nsIArray addMessageBatch(in uint32_t aMessageCount,
+ [array, size_is(aMessageCount)] in string aMessages);
+
+ /**
+ * Functions for updating the UI while running DownloadMessagesForOffline:
+ * delete the old message before adding its newly downloaded body, and
+ * select the new message after it has replaced the old one
+ */
+ void deleteDownloadMsg(in nsIMsgDBHdr aMsgHdr, out boolean aDoSelect);
+ void selectDownloadMsg();
+ void notifyDelete();
+
+ /**
+ * Functions for grubbing through a folder to find the Uidl for a
+ * given msgDBHdr.
+ */
+ [noscript] void getFolderScanState(in nsLocalFolderScanState aState);
+ [noscript] void getUidlFromFolder(in nsLocalFolderScanState aState, in nsIMsgDBHdr aMsgHdr);
+
+
+ /**
+ * Shows warning if there is not enough space in the message store
+ * for a message of the given size.
+ */
+ boolean warnIfLocalFileTooBig(in nsIMsgWindow aWindow,
+ [optional] in long long aSpaceRequested);
+
+ /**
+ * Update properties on a new header from an old header, for cases where
+ * a partial message will be replaced with a full message.
+ *
+ * @param aOldHdr message header used as properties source
+ * @param aNewHdr message header used as properties destination
+ */
+ void updateNewMsgHdr(in nsIMsgDBHdr aOldHdr, in nsIMsgDBHdr aNewHdr);
+};
diff --git a/mailnews/local/public/nsIMsgParseMailMsgState.idl b/mailnews/local/public/nsIMsgParseMailMsgState.idl
new file mode 100644
index 0000000000..94f3ac317b
--- /dev/null
+++ b/mailnews/local/public/nsIMsgParseMailMsgState.idl
@@ -0,0 +1,48 @@
+/* -*- 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 {
+ attribute unsigned long long envelopePos;
+ 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);
+};
+
diff --git a/mailnews/local/public/nsINewsBlogFeedDownloader.idl b/mailnews/local/public/nsINewsBlogFeedDownloader.idl
new file mode 100644
index 0000000000..5bad134bdf
--- /dev/null
+++ b/mailnews/local/public/nsINewsBlogFeedDownloader.idl
@@ -0,0 +1,41 @@
+/* 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"
+
+interface nsIMsgFolder;
+interface nsIUrlListener;
+interface nsIMsgWindow;
+
+[scriptable, uuid(86e5bd0e-c324-11e3-923a-00269e4fddc1)]
+interface nsINewsBlogFeedDownloader : nsISupports
+{
+ void downloadFeed(in nsIMsgFolder aFolder,
+ in nsIUrlListener aUrlListener,
+ in bool aIsBiff,
+ in nsIMsgWindow aMsgWindow);
+
+ /**
+ * A convient method to subscribe to feeds without going through the Subscribe
+ * dialog; used by drag and drop and commandline.
+ */
+ void subscribeToFeed(in string aUrl,
+ in nsIMsgFolder aFolder,
+ in nsIMsgWindow aMsgWindow);
+
+ /**
+ * Called when the RSS Incoming Server detects a change to an RSS folder name,
+ * such as delete (move to trash), move/copy, or rename. We then need to update
+ * the feeds.rdf subscriptions data source.
+ *
+ * @param nsIMsgFolder aFolder - the folder, new if rename or target of
+ * move/copy folder (new parent)
+ * @param nsIMsgFolder aOrigFolder - original folder
+ * @param string aAction - "move" or "copy" or "rename"
+ */
+ void updateSubscriptionsDS(in nsIMsgFolder aFolder,
+ in nsIMsgFolder aOrigFolder,
+ in string aAction);
+};
+
diff --git a/mailnews/local/public/nsINoIncomingServer.idl b/mailnews/local/public/nsINoIncomingServer.idl
new file mode 100644
index 0000000000..717689f58b
--- /dev/null
+++ b/mailnews/local/public/nsINoIncomingServer.idl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; 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"
+
+[scriptable, uuid(dacd4917-ddbe-47bb-8a49-6a8d91c49a86)]
+interface nsINoIncomingServer : nsISupports {
+ /**
+ * Copy the default messages (e.g. Templates) from
+ * bin/defaults/messenger/<folderNameOnDisk> to <rootFolder>/<folderNameOnDisk>.
+ * This is useful when first creating the standard folders (like Templates).
+ */
+ void copyDefaultMessages(in string folderNameOnDisk);
+};
diff --git a/mailnews/local/public/nsINoneService.idl b/mailnews/local/public/nsINoneService.idl
new file mode 100644
index 0000000000..045a018fff
--- /dev/null
+++ b/mailnews/local/public/nsINoneService.idl
@@ -0,0 +1,11 @@
+/* -*- 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"
+
+[scriptable, uuid(14714890-1dd2-11b2-87de-d265839520d6)]
+interface nsINoneService : nsISupports {
+ /* nothing yet, but soon. */
+};
diff --git a/mailnews/local/public/nsIPop3IncomingServer.idl b/mailnews/local/public/nsIPop3IncomingServer.idl
new file mode 100644
index 0000000000..3499789a92
--- /dev/null
+++ b/mailnews/local/public/nsIPop3IncomingServer.idl
@@ -0,0 +1,38 @@
+/* -*- Mode: IDL; 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"
+
+interface nsIPop3Protocol;
+interface nsIMsgFolder;
+interface nsIUrlListener;
+interface nsIMsgWindow;
+
+[scriptable, uuid(8494584a-49b7-49df-9001-80ccdd0b50aa)]
+interface nsIPop3IncomingServer : nsISupports {
+ attribute boolean leaveMessagesOnServer;
+ attribute boolean headersOnly;
+ attribute boolean deleteMailLeftOnServer;
+ attribute boolean dotFix;
+ attribute unsigned long pop3CapabilityFlags;
+ attribute boolean deleteByAgeFromServer;
+ attribute long numDaysToLeaveOnServer;
+ attribute nsIPop3Protocol runningProtocol;
+ // client adds uidls to mark one by one, then calls markMessages
+ void addUidlToMark(in string aUidl, in int32_t newStatus);
+ void markMessages();
+ attribute boolean authenticated;
+ /* account to which this server defers storage, for global inbox */
+ attribute ACString deferredToAccount;
+ // whether get new mail in deferredToAccount gets
+ // new mail with this server.
+ attribute boolean deferGetNewMail;
+ void downloadMailFromServers(
+ [array, size_is(count)]in nsIPop3IncomingServer aServers,
+ in unsigned long count, in nsIMsgWindow aMsgWindow,
+ in nsIMsgFolder aFolder, in nsIUrlListener aListener);
+};
+
+
diff --git a/mailnews/local/public/nsIPop3Protocol.idl b/mailnews/local/public/nsIPop3Protocol.idl
new file mode 100644
index 0000000000..9bcdb28d20
--- /dev/null
+++ b/mailnews/local/public/nsIPop3Protocol.idl
@@ -0,0 +1,25 @@
+/* -*- Mode: IDL; 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"
+
+[ptr] native Pop3UidlEntryArrayRef(nsTArray<Pop3UidlEntry*>);
+
+%{C++
+#include "nsTArray.h"
+struct Pop3UidlEntry;
+%}
+
+[scriptable, uuid(3aff0550-87de-4337-9bc1-c84eb5462afe)]
+interface nsIPop3Protocol : nsISupports {
+ /* aUidl is an array of pointers to Pop3UidlEntry's. That structure is
+ * currently defined in nsPop3Protocol.h, perhaps it should be here
+ * instead...
+ */
+ [noscript] void markMessages(in Pop3UidlEntryArrayRef aUidl);
+ boolean checkMessage(in string aUidl);
+};
+
+
diff --git a/mailnews/local/public/nsIPop3Service.idl b/mailnews/local/public/nsIPop3Service.idl
new file mode 100644
index 0000000000..4c3e9a28ee
--- /dev/null
+++ b/mailnews/local/public/nsIPop3Service.idl
@@ -0,0 +1,128 @@
+/* -*- 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 "nsIUrlListener.idl"
+#include "nsIPop3IncomingServer.idl"
+#include "nsIMsgFolder.idl"
+
+interface nsIURI;
+interface nsIMsgWindow;
+interface nsIMsgFolder;
+
+[scriptable, uuid(7302fd8e-946f-4ae3-9468-0fb3a7706c51)]
+interface nsIPop3ServiceListener : nsISupports {
+ /**
+ * Notification that a pop3 download has started.
+ *
+ * @param aFolder folder in which the download is started.
+ */
+ void onDownloadStarted(in nsIMsgFolder aFolder);
+
+ /**
+ * Notification about download progress.
+ *
+ * @param aFolder folder in which the download is happening.
+ * @param aNumDownloaded number of the messages that have been downloaded.
+ * @param aTotalToDownload total number of messages to download.
+ */
+ void onDownloadProgress(in nsIMsgFolder aFolder,
+ in unsigned long aNumDownloaded,
+ in unsigned long aTotalToDownload);
+
+ /**
+ * Notification that a download has completed.
+ *
+ * @param aFolder folder to which the download has completed.
+ * @param aNumberOfMessages number of the messages that were downloaded.
+ */
+ void onDownloadCompleted(in nsIMsgFolder aFolder,
+ in unsigned long aNumberOfMessages);
+};
+
+/*
+ * The Pop3 Service is an interface designed to make building and running
+ * pop3 urls easier.
+ */
+[scriptable, uuid(96d3cc14-a842-4cdf-98f8-a4cc695f8b3b)]
+interface nsIPop3Service : nsISupports {
+ /*
+ * All of these functions build pop3 urls and run them. If you want
+ * a handle on the running task, pass in a valid nsIURI ptr. You can later
+ * interrupt this action by asking the netlib service manager to interrupt
+ * the url you are given back. Remember to release aURL when you are
+ * done with it. Pass nullptr in for aURL if you
+ * don't care about the returned URL.
+ */
+
+ /*
+ * right now getting new mail doesn't require any user specific data.
+ * We use the default current identity for this information. I suspect that
+ * we'll eventually pass in an identity to this call so you can get
+ * mail on different pop3 accounts....
+ */
+
+ nsIURI GetNewMail(in nsIMsgWindow aMsgWindow, in nsIUrlListener aUrlListener,
+ in nsIMsgFolder aInbox, in nsIPop3IncomingServer popServer);
+
+ nsIURI CheckForNewMail(in nsIMsgWindow aMsgWindow, in nsIUrlListener aUrlListener,
+ in nsIMsgFolder inbox, in nsIPop3IncomingServer popServer);
+
+ /**
+ * Verify that we can logon
+ *
+ * @param aServer - pop3 server we're logging on to.
+ * @param aUrlListener - gets called back with success or failure.
+ * @param aMsgWindow - nsIMsgWindow to use for notification callbacks.
+ * @return - the url that we run.
+ *
+ */
+ nsIURI verifyLogon(in nsIMsgIncomingServer aServer,
+ in nsIUrlListener aUrlListener,
+ in nsIMsgWindow aMsgWindow);
+
+ /**
+ * Add a listener for pop3 events like message download. This is
+ * used by the activity manager.
+ *
+ * @param aListener listener that gets notified of pop3 events.
+ */
+ void addListener(in nsIPop3ServiceListener aListener);
+
+ /**
+ * Remove a listener for pop3 events like message download.
+ *
+ * @param aListener listener to remove.
+ */
+ void removeListener(in nsIPop3ServiceListener aListener);
+
+ /**
+ * Send the notification that a pop3 download has started.
+ * This is called from the nsIPop3Sink code.
+ *
+ * @param aFolder folder in which the download is started.
+ */
+ void notifyDownloadStarted(in nsIMsgFolder aFolder);
+
+ /**
+ * Send notification about download progress.
+ *
+ * @param aFolder folder in which the download is happening.
+ * @param aNumDownloaded number of the messages that have been downloaded.
+ * @param aTotalToDownload total number of messages to download.
+ */
+ void notifyDownloadProgress(in nsIMsgFolder aFolder,
+ in unsigned long aNumDownloaded,
+ in unsigned long aTotalToDownload);
+ /**
+ * Send the notification that a download has completed.
+ * This is called from the nsIPop3Sink code.
+ *
+ * @param aFolder folder to which the download has completed.
+ * @param aNumberOfMessages number of the messages that were downloaded.
+ */
+ void notifyDownloadCompleted(in nsIMsgFolder aFolder,
+ in unsigned long aNumberOfMessages);
+};
diff --git a/mailnews/local/public/nsIPop3Sink.idl b/mailnews/local/public/nsIPop3Sink.idl
new file mode 100644
index 0000000000..00fc4ccba7
--- /dev/null
+++ b/mailnews/local/public/nsIPop3Sink.idl
@@ -0,0 +1,53 @@
+/* -*- 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 "nsIPop3IncomingServer.idl"
+#include "nsIMsgFolder.idl"
+
+interface nsIURI;
+
+[scriptable, uuid(ceabfc6b-f139-4c25-890f-efb7c3069d40)]
+interface nsIPop3Sink : nsISupports {
+
+ attribute boolean userAuthenticated;
+ attribute ACString mailAccountURL;
+ attribute boolean buildMessageUri;
+ attribute string messageUri;
+ attribute string baseMessageUri;
+
+ /// message uri for header-only message version
+ attribute ACString origMessageUri;
+
+ boolean BeginMailDelivery(in boolean uidlDownload, in nsIMsgWindow msgWindow);
+ void endMailDelivery(in nsIPop3Protocol protocol);
+ void AbortMailDelivery(in nsIPop3Protocol protocol);
+
+ /* returns a closure ? */
+ [noscript] voidPtr IncorporateBegin(in string uidlString, in nsIURI aURL,
+ in unsigned long flags);
+
+ [noscript] void IncorporateWrite(in string block,
+ in long length);
+
+ [noscript] void IncorporateComplete(in nsIMsgWindow aMsgWindow, in int32_t aSize);
+ [noscript] void IncorporateAbort(in boolean uidlDownload);
+
+ void BiffGetNewMail();
+
+ /**
+ * Tell the pop3sink how many messages we're going to download.
+ *
+ * @param aNumMessages how many messages we're going to download.
+ */
+ void setMsgsToDownload(in unsigned long aNumMessages);
+
+ void SetBiffStateAndUpdateFE(in unsigned long biffState, in long numNewMessages, in boolean notify);
+
+ [noscript] void SetSenderAuthedFlag(in voidPtr closure, in boolean authed);
+
+ attribute nsIPop3IncomingServer popServer;
+ attribute nsIMsgFolder folder;
+};
diff --git a/mailnews/local/public/nsIPop3URL.idl b/mailnews/local/public/nsIPop3URL.idl
new file mode 100644
index 0000000000..c992fef2d5
--- /dev/null
+++ b/mailnews/local/public/nsIPop3URL.idl
@@ -0,0 +1,19 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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 "nsIPop3Sink.idl"
+
+[scriptable, uuid(5fb87ae7-a3a0-440a-8b49-6bca42fb7ff2)]
+interface nsIPop3URL : nsISupports {
+ attribute nsIPop3Sink pop3Sink;
+ attribute string messageUri;
+
+ /// Constant for the default POP3 port number
+ const int32_t DEFAULT_POP3_PORT = 110;
+
+ /// Constant for the default POP3 over ssl port number
+ const int32_t DEFAULT_POP3S_PORT = 995;
+};
diff --git a/mailnews/local/public/nsIRssIncomingServer.idl b/mailnews/local/public/nsIRssIncomingServer.idl
new file mode 100644
index 0000000000..c20c3d97fe
--- /dev/null
+++ b/mailnews/local/public/nsIRssIncomingServer.idl
@@ -0,0 +1,16 @@
+/* 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"
+
+interface nsIFile;
+
+[scriptable, uuid(6d744e7f-2218-45c6-8734-998a56cb3c6d)]
+interface nsIRssIncomingServer : nsISupports {
+ // Path to the subscriptions data source for this RSS server
+ readonly attribute nsIFile subscriptionsDataSourcePath;
+
+ // Path to the feed items data source for this RSS server
+ readonly attribute nsIFile feedItemsDataSourcePath;
+};
diff --git a/mailnews/local/public/nsIRssService.idl b/mailnews/local/public/nsIRssService.idl
new file mode 100644
index 0000000000..19a1d1f349
--- /dev/null
+++ b/mailnews/local/public/nsIRssService.idl
@@ -0,0 +1,10 @@
+/* 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"
+
+[scriptable, uuid(4b31bdd9-6f4c-46d4-a766-a94f11b599bc)]
+interface nsIRssService : nsISupports
+{
+};
diff --git a/mailnews/local/public/nsMsgLocalCID.h b/mailnews/local/public/nsMsgLocalCID.h
new file mode 100644
index 0000000000..260ba985ee
--- /dev/null
+++ b/mailnews/local/public/nsMsgLocalCID.h
@@ -0,0 +1,227 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/. */
+
+#ifndef nsMsgLocalCID_h__
+#define nsMsgLocalCID_h__
+
+#include "nsISupports.h"
+#include "nsIFactory.h"
+#include "nsIComponentManager.h"
+#include "nsMsgBaseCID.h"
+
+#define NS_POP3INCOMINGSERVER_TYPE "pop3"
+
+//
+// nsLocalMailFolderResourceCID
+//
+#define NS_LOCALMAILFOLDERRESOURCE_CONTRACTID \
+ NS_RDF_RESOURCE_FACTORY_CONTRACTID_PREFIX "mailbox"
+#define NS_LOCALMAILFOLDERRESOURCE_CID \
+{ /* e490d22c-cd67-11d2-8cca-0060b0fc14a3 */ \
+ 0xe490d22c, \
+ 0xcd67, \
+ 0x11d2, \
+ {0x8c, 0xca, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3} \
+}
+
+//
+// nsPop3IncomingServer
+//
+#define NS_POP3INCOMINGSERVER_CONTRACTID \
+ NS_MSGINCOMINGSERVER_CONTRACTID_PREFIX NS_POP3INCOMINGSERVER_TYPE
+
+#define NS_POP3INCOMINGSERVER_CID \
+{ /* D2876E51-E62C-11d2-B7FC-00805F05FFA5 */ \
+ 0xd2876e51, 0xe62c, 0x11d2, \
+ {0xb7, 0xfc, 0x0, 0x80, 0x5f, 0x5, 0xff, 0xa5 }}
+
+#ifdef HAVE_MOVEMAIL
+//
+// nsMovemailIncomingServer
+//
+#define NS_MOVEMAILINCOMINGSERVER_CONTRACTID \
+ NS_MSGINCOMINGSERVER_CONTRACTID_PREFIX "movemail"
+
+#define NS_MOVEMAILINCOMINGSERVER_CID \
+{ /* efbb77e4-1dd2-11b2-bbcf-961563396fec */ \
+ 0xefbb77e4, 0x1dd2, 0x11b2, \
+ {0xbb, 0xcf, 0x96, 0x15, 0x63, 0x39, 0x6f, 0xec }}
+
+#endif /* HAVE_MOVEMAIL */
+
+//
+// nsNoIncomingServer
+//
+#define NS_NOINCOMINGSERVER_CONTRACTID \
+ NS_MSGINCOMINGSERVER_CONTRACTID_PREFIX "none"
+
+#define NS_NOINCOMINGSERVER_CID \
+{ /* {ca5ffe7e-5f47-11d3-9a51-004005263078} */ \
+ 0xca5ffe7e, 0x5f47, 0x11d3, \
+ {0x9a, 0x51, 0x00, 0x40, 0x05, 0x26, 0x30, 0x78}}
+
+
+//
+// nsMsgMailboxService
+#define NS_MAILBOXSERVICE_CONTRACTID1 \
+ "@mozilla.org/messenger/mailboxservice;1"
+
+#define NS_MAILBOXSERVICE_CONTRACTID2 \
+ "@mozilla.org/messenger/messageservice;1?type=mailbox"
+
+#define NS_MAILBOXSERVICE_CONTRACTID3 \
+ "@mozilla.org/messenger/messageservice;1?type=mailbox-message"
+
+#define NS_MAILBOXSERVICE_CONTRACTID4 \
+ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "mailbox"
+
+#define NS_MAILBOXSERVICE_CID \
+{ /* EEF82462-CB69-11d2-8065-006008128C4E */ \
+ 0xeef82462, 0xcb69, 0x11d2, \
+ {0x80, 0x65, 0x0, 0x60, 0x8, 0x12, 0x8c, 0x4e}}
+
+
+//
+// nsMailboxUrl
+//
+#define NS_MAILBOXURL_CONTRACTID \
+ "@mozilla.org/messenger/mailboxurl;1"
+
+/* 46EFCB10-CB6D-11d2-8065-006008128C4E */
+#define NS_MAILBOXURL_CID \
+{ 0x46efcb10, 0xcb6d, 0x11d2, \
+ { 0x80, 0x65, 0x0, 0x60, 0x8, 0x12, 0x8c, 0x4e } }
+
+
+//
+// nsPop3Url
+//
+#define NS_POP3URL_CONTRACTID \
+ "@mozilla.org/messenger/popurl;1"
+
+/* EA1B0A11-E6F4-11d2-8070-006008128C4E */
+#define NS_POP3URL_CID \
+{ 0xea1b0a11, 0xe6f4, 0x11d2, \
+ { 0x80, 0x70, 0x0, 0x60, 0x8, 0x12, 0x8c, 0x4e } }
+
+
+//
+// nsPop3Service
+//
+
+#define NS_POP3SERVICE_CONTRACTID1 \
+ "@mozilla.org/messenger/popservice;1"
+
+#define NS_POP3SERVICE_CONTRACTID2 \
+ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "pop"
+
+// Mailnews has used "pop" as the protocol scheme for pop3 in some places,
+// but "pop3" in others. Necko code needs to be able to locate protocolInfo
+// based on pop3 to get proxy information.
+//
+// TODO: fix the mailnews code to use a consistent POP3 protocol scheme.
+
+#define NS_POP3SERVICE_CONTRACTID3 \
+ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "pop3"
+
+#define NS_POP3PROTOCOLINFO_CONTRACTID \
+ NS_MSGPROTOCOLINFO_CONTRACTID_PREFIX NS_POP3INCOMINGSERVER_TYPE
+
+#define NS_POP3SERVICE_CID \
+{ /* 3BB459E3-D746-11d2-806A-006008128C4E */ \
+ 0x3bb459e3, 0xd746, 0x11d2, \
+ { 0x80, 0x6a, 0x0, 0x60, 0x8, 0x12, 0x8c, 0x4e }}
+
+//
+// nsNoneService
+//
+
+#define NS_NONESERVICE_CONTRACTID \
+ "@mozilla.org/messenger/noneservice;1"
+
+#define NS_NONEPROTOCOLINFO_CONTRACTID \
+ NS_MSGPROTOCOLINFO_CONTRACTID_PREFIX "none"
+
+#define NS_NONESERVICE_CID \
+{ /* 75b63b46-1dd2-11b2-9873-bb375e1550fa */ \
+ 0x75b63b46, 0x1dd2, 0x11b2, \
+ { 0x98, 0x73, 0xbb, 0x37, 0x5e, 0x15, 0x50, 0xfa }}
+
+#ifdef HAVE_MOVEMAIL
+//
+// nsMovemailService
+//
+
+#define NS_MOVEMAILSERVICE_CONTRACTID \
+ "@mozilla.org/messenger/movemailservice;1"
+
+#define NS_MOVEMAILPROTOCOLINFO_CONTRACTID \
+ NS_MSGPROTOCOLINFO_CONTRACTID_PREFIX "movemail"
+
+#define NS_MOVEMAILSERVICE_CID \
+{ /* 0e4db62e-1dd2-11b2-a5e4-f128fe4f1b69 */ \
+ 0x0e4db62e, 0x1dd2, 0x11b2, \
+ { 0xa5, 0xe4, 0xf1, 0x28, 0xfe, 0x4f, 0x1b, 0x69 }}
+#endif /* HAVE_MOVEMAIL */
+
+//
+// nsParseMailMsgState
+//
+#define NS_PARSEMAILMSGSTATE_CONTRACTID \
+ "@mozilla.org/messenger/messagestateparser;1"
+
+#define NS_PARSEMAILMSGSTATE_CID \
+{ /* 2B79AC51-1459-11d3-8097-006008128C4E */ \
+ 0x2b79ac51, 0x1459, 0x11d3, \
+ {0x80, 0x97, 0x0, 0x60, 0x8, 0x12, 0x8c, 0x4e} }
+
+//
+// nsMsgMailboxParser
+//
+
+#define NS_MAILBOXPARSER_CONTRACTID \
+ "@mozilla.org/messenger/mailboxparser;1"
+
+/* 46EFCB10-CB6D-11d2-8065-006008128C4E */
+#define NS_MAILBOXPARSER_CID \
+{ 0x8597ab60, 0xd4e2, 0x11d2, \
+ { 0x80, 0x69, 0x0, 0x60, 0x8, 0x12, 0x8c, 0x4e } }
+
+#define NS_RSSSERVICE_CONTRACTID \
+ "@mozilla.org/messenger/rssservice;1"
+
+#define NS_RSSPROTOCOLINFO_CONTRACTID \
+ NS_MSGPROTOCOLINFO_CONTRACTID_PREFIX "rss"
+
+#define NS_RSSSERVICE_CID \
+{ /* 44aef4ce-475b-42e3-bc42-7730d5ce7365 */ \
+ 0x44aef4ce, 0x475b, 0x42e3, \
+ { 0xbc, 0x42, 0x77, 0x30, 0xd5, 0xce, 0x73, 0x65 }}
+
+#define NS_RSSINCOMINGSERVER_CONTRACTID \
+ NS_MSGINCOMINGSERVER_CONTRACTID_PREFIX "rss"
+
+#define NS_RSSINCOMINGSERVER_CID \
+{ /* 3a874285-5520-41a0-bcda-a3dee3dbf4f3 */ \
+ 0x3a874285, 0x5520, 0x41a0, \
+ {0xbc, 0xda, 0xa3, 0xde, 0xe3, 0xdb, 0xf4, 0xf3 }}
+
+#define NS_BRKMBOXSTORE_CID \
+{ /* 36358199-a0e4-4b68-929f-77c01de34c67 */ \
+ 0x36358199, 0xa0e4, 0x4b68, \
+ {0x92, 0x9f, 0x77, 0xc0, 0x1d, 0xe3, 0x4c, 0x67}}
+
+#define NS_BRKMBOXSTORE_CONTRACTID \
+ "@mozilla.org/msgstore/berkeleystore;1"
+
+#define NS_MAILDIRSTORE_CID \
+{ /* 1F993EDA-7DD9-11DF-819A-6257DFD72085 */ \
+ 0x1F993EDA, 0x7DD9, 0x11DF, \
+ { 0x81, 0x9A, 0x62, 0x57, 0xDF, 0xD7, 0x20, 0x85 }}
+
+#define NS_MAILDIRSTORE_CONTRACTID \
+ "@mozilla.org/msgstore/maildirstore;1"
+
+#endif // nsMsgLocalCID_h__