2001-09-28 20:14:13 +00:00
|
|
|
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
2004-04-17 18:33:16 +00:00
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
1999-04-06 22:35:13 +00:00
|
|
|
*
|
2004-04-17 18:33:16 +00:00
|
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/MPL/
|
1999-04-06 22:35:13 +00:00
|
|
|
*
|
2001-09-28 20:14:13 +00:00
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
1999-04-06 22:35:13 +00:00
|
|
|
*
|
1999-11-06 03:43:54 +00:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
2004-04-17 18:33:16 +00:00
|
|
|
* The Initial Developer of the Original Code is
|
2001-09-28 20:14:13 +00:00
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
1999-11-06 03:43:54 +00:00
|
|
|
*
|
2001-09-28 20:14:13 +00:00
|
|
|
* Contributor(s):
|
2004-04-17 18:33:16 +00:00
|
|
|
* Seth Spitzer <sspitzer@netscape.com>
|
2001-09-28 20:14:13 +00:00
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
2004-04-17 18:33:16 +00:00
|
|
|
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
|
|
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
2001-09-28 20:14:13 +00:00
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
2004-04-17 18:33:16 +00:00
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
2001-09-28 20:14:13 +00:00
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
2004-04-17 18:33:16 +00:00
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
2001-09-28 20:14:13 +00:00
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
1999-04-06 22:35:13 +00:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
2001-07-06 21:16:32 +00:00
|
|
|
#include "MailNewsTypes2.idl"
|
1999-04-06 22:35:13 +00:00
|
|
|
|
2001-07-16 02:40:48 +00:00
|
|
|
interface nsIFileSpec;
|
2002-01-14 22:59:02 +00:00
|
|
|
interface nsIMsgFolder;
|
1999-07-17 03:26:24 +00:00
|
|
|
interface nsIMsgFolderCache;
|
2000-01-29 15:53:14 +00:00
|
|
|
interface nsIMsgWindow;
|
2000-03-28 04:58:05 +00:00
|
|
|
interface nsIMsgFilterList;
|
2001-01-01 22:00:17 +00:00
|
|
|
interface nsIMsgRetentionSettings;
|
2001-03-17 01:59:34 +00:00
|
|
|
interface nsIMsgDownloadSettings;
|
2002-09-20 00:04:01 +00:00
|
|
|
interface nsISpamSettings;
|
2002-10-09 01:21:27 +00:00
|
|
|
interface nsIMsgFilterPlugin;
|
2004-05-13 13:45:40 +00:00
|
|
|
interface nsIUrlListener;
|
2003-01-11 23:09:34 +00:00
|
|
|
|
1999-07-01 06:00:55 +00:00
|
|
|
/*
|
|
|
|
* Interface for incoming mail/news host
|
|
|
|
* this is the base interface for all mail server types (imap, pop, nntp, etc)
|
|
|
|
* often you will want to add extra interfaces that give you server-specific
|
|
|
|
* attributes and methods.
|
|
|
|
*/
|
2004-05-18 13:21:12 +00:00
|
|
|
[scriptable, uuid(55569286-ee09-45ec-a83b-96d0273a5ed8)]
|
1999-04-06 22:35:13 +00:00
|
|
|
interface nsIMsgIncomingServer : nsISupports {
|
|
|
|
|
1999-10-28 20:22:06 +00:00
|
|
|
/**
|
|
|
|
* internal pref key - guaranteed to be unique across all servers
|
|
|
|
*/
|
1999-04-10 21:04:50 +00:00
|
|
|
attribute string key;
|
1999-07-01 06:00:55 +00:00
|
|
|
|
1999-10-28 20:22:06 +00:00
|
|
|
/**
|
|
|
|
* pretty name - should be "userid on hostname"
|
|
|
|
* if the pref is not set
|
|
|
|
*/
|
1999-08-10 04:39:22 +00:00
|
|
|
attribute wstring prettyName;
|
2000-08-19 20:52:31 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* helper function to construct the pretty name in a server type
|
|
|
|
* specific way - e.g., mail for foo@test.com, news on news.mozilla.org
|
|
|
|
*/
|
|
|
|
readonly attribute wstring constructedPrettyName;
|
1999-07-01 06:00:55 +00:00
|
|
|
|
1999-10-28 20:22:06 +00:00
|
|
|
/**
|
|
|
|
* hostname of the server
|
|
|
|
*/
|
1999-04-06 22:35:13 +00:00
|
|
|
attribute string hostName;
|
1999-10-26 23:34:30 +00:00
|
|
|
|
2001-10-09 19:20:31 +00:00
|
|
|
/**
|
|
|
|
* real hostname of the server (if server name is changed it's stored here)
|
|
|
|
*/
|
|
|
|
attribute string realHostName;
|
|
|
|
|
1999-10-26 23:34:30 +00:00
|
|
|
/* port of the server */
|
|
|
|
attribute long port;
|
1999-07-01 06:00:55 +00:00
|
|
|
|
1999-10-28 20:22:06 +00:00
|
|
|
/**
|
|
|
|
* userid to log into the server
|
|
|
|
*/
|
1999-05-27 05:36:10 +00:00
|
|
|
attribute string username;
|
1999-07-01 06:00:55 +00:00
|
|
|
|
2001-10-09 19:20:31 +00:00
|
|
|
/**
|
|
|
|
* real username of the server (if username is changed it's stored here)
|
|
|
|
*/
|
|
|
|
attribute string realUsername;
|
|
|
|
|
1999-10-28 20:22:06 +00:00
|
|
|
/**
|
|
|
|
* protocol type, i.e. "pop3", "imap", "nntp", "none", etc
|
|
|
|
* used to construct URLs
|
|
|
|
*/
|
1999-07-13 19:23:40 +00:00
|
|
|
attribute string type;
|
1999-07-01 06:00:55 +00:00
|
|
|
|
1999-10-28 20:22:06 +00:00
|
|
|
/**
|
|
|
|
* the schema for the local mail store, such
|
|
|
|
* as "mailbox", "imap", or "news"
|
|
|
|
* used to construct URIs
|
|
|
|
*/
|
|
|
|
readonly attribute string localStoreType;
|
2001-10-09 19:20:31 +00:00
|
|
|
|
|
|
|
// Perform specific tasks (reset flags, remove files, etc) for account user/server name changes.
|
|
|
|
void OnUserOrHostNameChanged(in string oldName, in string newName);
|
1999-10-28 20:22:06 +00:00
|
|
|
|
1999-07-01 06:00:55 +00:00
|
|
|
/* should we remember the password? */
|
1999-04-16 00:36:52 +00:00
|
|
|
attribute boolean rememberPassword;
|
1999-07-01 06:00:55 +00:00
|
|
|
|
1999-10-28 20:22:06 +00:00
|
|
|
/* cleartext version of the password */
|
1999-09-22 02:21:18 +00:00
|
|
|
attribute string password;
|
1999-10-28 20:22:06 +00:00
|
|
|
|
|
|
|
/* prompt the user for a password */
|
2000-04-26 22:31:59 +00:00
|
|
|
string getPasswordWithUI(in wstring aPromptString, in wstring aPromptTitle, in nsIMsgWindow aMsgWindow, out boolean okayValue);
|
1999-04-16 00:36:52 +00:00
|
|
|
|
2000-02-03 05:01:42 +00:00
|
|
|
/* forget the password in memory and in single signon database */
|
|
|
|
void forgetPassword();
|
|
|
|
|
2003-08-20 22:37:01 +00:00
|
|
|
/**
|
|
|
|
* logon succeeded - persist password, if user chooses.
|
|
|
|
*/
|
|
|
|
void storePassword();
|
|
|
|
|
2001-09-21 05:04:25 +00:00
|
|
|
/* forget the password in memory which is cached for the session */
|
|
|
|
void forgetSessionPassword();
|
|
|
|
|
1999-07-01 06:00:55 +00:00
|
|
|
/* should we download whole messages when biff goes off? */
|
2000-01-11 20:03:51 +00:00
|
|
|
/* in 4.x, this was "mail.pop3_gets_new_mail" for pop */
|
|
|
|
/* "mail.imap.new_mail_get_headers" for imap, and it was global. in 5.x, it is per server */
|
1999-04-16 00:36:52 +00:00
|
|
|
attribute boolean downloadOnBiff;
|
1999-07-01 06:00:55 +00:00
|
|
|
|
|
|
|
/* should we biff the server? */
|
1999-04-06 22:35:13 +00:00
|
|
|
attribute boolean doBiff;
|
1999-07-01 06:00:55 +00:00
|
|
|
|
|
|
|
/* how often to biff */
|
1999-04-06 22:35:13 +00:00
|
|
|
attribute long biffMinutes;
|
1999-04-16 00:36:52 +00:00
|
|
|
|
2001-12-04 15:34:00 +00:00
|
|
|
/* current biff state */
|
|
|
|
attribute unsigned long biffState;
|
|
|
|
|
2002-02-05 01:35:32 +00:00
|
|
|
/* are we running a url as a result of biff going off? (different from user clicking get msg) */
|
|
|
|
attribute boolean performingBiff;
|
|
|
|
|
1999-07-01 06:00:55 +00:00
|
|
|
/* the on-disk path to message storage for this server */
|
1999-09-09 04:11:38 +00:00
|
|
|
attribute nsIFileSpec localPath;
|
1999-10-28 20:22:06 +00:00
|
|
|
|
1999-07-01 06:00:55 +00:00
|
|
|
/* the RDF URI for the root mail folder */
|
2000-05-16 21:17:55 +00:00
|
|
|
readonly attribute string serverURI;
|
1999-05-26 23:51:53 +00:00
|
|
|
|
1999-07-01 06:00:55 +00:00
|
|
|
/* the root folder for this server */
|
2003-11-11 10:19:05 +00:00
|
|
|
attribute nsIMsgFolder rootFolder;
|
2002-01-14 22:59:02 +00:00
|
|
|
|
|
|
|
/* handy accessor when we want a msg folder */
|
|
|
|
readonly attribute nsIMsgFolder rootMsgFolder;
|
1999-06-11 22:07:08 +00:00
|
|
|
|
1999-08-31 06:52:27 +00:00
|
|
|
/* are we already getting new Messages on the current server..
|
|
|
|
This is used to help us prevent multiple get new msg commands from
|
2001-08-21 06:18:58 +00:00
|
|
|
going off at the same time. */
|
1999-08-31 06:52:27 +00:00
|
|
|
attribute boolean serverBusy;
|
|
|
|
|
2000-03-28 04:58:05 +00:00
|
|
|
/* should we use a secure channel? */
|
|
|
|
attribute boolean isSecure;
|
|
|
|
|
2003-05-14 03:16:02 +00:00
|
|
|
/* should we use secure authentication? */
|
|
|
|
attribute boolean useSecAuth;
|
|
|
|
|
2002-03-25 22:34:34 +00:00
|
|
|
/* can server support a secure channel? */
|
|
|
|
readonly attribute boolean isSecureServer;
|
|
|
|
|
2000-02-15 06:57:45 +00:00
|
|
|
/* what kind of logon redirector to use for this server, if any */
|
|
|
|
attribute string redirectorType;
|
2000-03-28 04:58:05 +00:00
|
|
|
|
2000-05-15 14:55:22 +00:00
|
|
|
/* empty trash on exit */
|
|
|
|
attribute boolean emptyTrashOnExit;
|
|
|
|
|
2002-01-31 22:08:48 +00:00
|
|
|
/* get filter list */
|
|
|
|
nsIMsgFilterList getFilterList(in nsIMsgWindow aMsgWindow);
|
2000-03-28 04:58:05 +00:00
|
|
|
|
2002-11-06 05:59:19 +00:00
|
|
|
/* set filter list */
|
2002-04-30 20:35:01 +00:00
|
|
|
void setFilterList(in nsIMsgFilterList aFilterList);
|
|
|
|
|
1999-09-14 09:03:40 +00:00
|
|
|
/* we use this to set the default local path. we use this when migrating prefs */
|
|
|
|
void SetDefaultLocalPath(in nsIFileSpec aDefaultLocalPath);
|
|
|
|
|
1999-07-01 06:00:55 +00:00
|
|
|
/* do a biff */
|
2003-05-19 23:59:06 +00:00
|
|
|
void PerformBiff(in nsIMsgWindow aMsgWindow);
|
2000-04-13 02:59:01 +00:00
|
|
|
|
2004-05-13 13:45:40 +00:00
|
|
|
/* get new messages */
|
|
|
|
void getNewMessages(in nsIMsgFolder aFolder, in nsIMsgWindow aMsgWindow,
|
|
|
|
in nsIUrlListener aUrlListener);
|
2000-04-14 06:54:19 +00:00
|
|
|
/* this checks if a server needs a password to do biff */
|
|
|
|
readonly attribute boolean serverRequiresPasswordForBiff;
|
2000-04-13 02:59:01 +00:00
|
|
|
|
2000-04-03 02:06:57 +00:00
|
|
|
/* this gets called when the server is expanded in the folder pane */
|
2001-08-21 06:18:58 +00:00
|
|
|
void performExpand(in nsIMsgWindow aMsgWindow);
|
2000-04-03 02:06:57 +00:00
|
|
|
|
1999-10-28 20:22:06 +00:00
|
|
|
/* Write out all known folder data to panacea.dat */
|
1999-07-17 03:26:24 +00:00
|
|
|
void WriteToFolderCache(in nsIMsgFolderCache folderCache);
|
|
|
|
|
1999-10-28 20:22:06 +00:00
|
|
|
/* close any server connections */
|
1999-09-30 01:44:30 +00:00
|
|
|
void CloseCachedConnections();
|
2002-09-11 05:03:36 +00:00
|
|
|
|
|
|
|
/* ... */
|
|
|
|
void shutdown();
|
1999-09-30 01:44:30 +00:00
|
|
|
|
1999-09-09 04:11:38 +00:00
|
|
|
/* access to generic attributes */
|
|
|
|
boolean getBoolValue(in string attr);
|
|
|
|
void setBoolValue(in string attr, in boolean value);
|
1999-07-17 03:26:24 +00:00
|
|
|
|
1999-09-09 04:11:38 +00:00
|
|
|
string getCharValue(in string attr);
|
|
|
|
void setCharValue(in string attr, in string value);
|
|
|
|
|
1999-12-03 00:10:00 +00:00
|
|
|
wstring getUnicharValue(in string attr);
|
|
|
|
void setUnicharValue(in string attr, in wstring value);
|
|
|
|
|
1999-09-09 04:11:38 +00:00
|
|
|
long getIntValue(in string attr);
|
|
|
|
void setIntValue(in string attr, in long value);
|
|
|
|
|
|
|
|
nsIFileSpec getFileValue(in string attr);
|
|
|
|
void setFileValue(in string attr, in nsIFileSpec value);
|
2000-01-15 03:06:39 +00:00
|
|
|
|
2000-02-11 00:55:54 +00:00
|
|
|
/**
|
|
|
|
* this is really dangerous. this destroys all pref values
|
|
|
|
* do not call this unless you know what you're doing!
|
|
|
|
*/
|
|
|
|
void clearAllValues();
|
2000-03-15 07:12:59 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* this is also very dangerous. this will remove the files
|
|
|
|
* associated with this server on disk.
|
|
|
|
*/
|
|
|
|
void removeFiles();
|
2000-02-11 00:55:54 +00:00
|
|
|
|
2000-01-15 03:06:39 +00:00
|
|
|
attribute boolean valid;
|
1999-09-09 04:11:38 +00:00
|
|
|
|
|
|
|
wstring toString();
|
2000-01-19 01:16:35 +00:00
|
|
|
|
2001-01-13 15:31:30 +00:00
|
|
|
void displayOfflineMsg(in nsIMsgWindow aWindow);
|
|
|
|
|
2000-01-26 04:11:14 +00:00
|
|
|
/* used for comparing nsIMsgIncomingServers */
|
|
|
|
boolean equals(in nsIMsgIncomingServer server);
|
2000-12-21 23:34:22 +00:00
|
|
|
|
2001-01-23 21:54:34 +00:00
|
|
|
/* Get Messages at startup */
|
|
|
|
readonly attribute boolean downloadMessagesAtStartup;
|
|
|
|
|
2001-02-01 07:26:38 +00:00
|
|
|
/* check to this if the server supports filters */
|
2002-03-28 21:34:42 +00:00
|
|
|
readonly attribute boolean canHaveFilters;
|
2001-02-01 07:26:38 +00:00
|
|
|
|
2000-12-21 23:34:22 +00:00
|
|
|
/**
|
|
|
|
* can this server be removed from the account manager? for
|
|
|
|
* instance, local mail is not removable, but an imported folder is
|
|
|
|
*/
|
|
|
|
attribute boolean canDelete;
|
|
|
|
|
2000-12-22 23:32:32 +00:00
|
|
|
attribute boolean loginAtStartUp;
|
2001-01-01 22:00:17 +00:00
|
|
|
|
2001-03-25 18:48:27 +00:00
|
|
|
attribute boolean limitOfflineMessageSize;
|
2001-02-03 17:43:24 +00:00
|
|
|
attribute long maxMessageSize;
|
|
|
|
|
2001-01-01 22:00:17 +00:00
|
|
|
attribute nsIMsgRetentionSettings retentionSettings;
|
2001-02-23 02:42:31 +00:00
|
|
|
|
|
|
|
/* check if this server can be a default server */
|
|
|
|
readonly attribute boolean canBeDefaultServer;
|
2001-03-14 02:32:04 +00:00
|
|
|
|
|
|
|
/* check if this server allows search operations */
|
|
|
|
readonly attribute boolean canSearchMessages;
|
|
|
|
|
2002-03-25 22:34:34 +00:00
|
|
|
/* check if this server allows canEmptyTrashOnExit operations */
|
|
|
|
readonly attribute boolean canEmptyTrashOnExit;
|
|
|
|
|
2001-03-14 02:32:04 +00:00
|
|
|
/* display startup page once per account per session */
|
|
|
|
attribute boolean displayStartupPage;
|
2001-03-17 01:59:34 +00:00
|
|
|
attribute nsIMsgDownloadSettings downloadSettings;
|
2001-05-19 01:38:51 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Offline support level. Support level can vary based on abilities
|
|
|
|
* and features each server can offer wrt to offline service.
|
|
|
|
* Here is the legend to determine the each support level details
|
|
|
|
*
|
|
|
|
* supportLevel == 0 --> no offline support (default)
|
|
|
|
* supportLevel == 10 --> regular offline feature support
|
|
|
|
* supportLevel == 20 --> extended offline feature support
|
|
|
|
*
|
|
|
|
* Each server can initialize itself to the support level if needed
|
|
|
|
* to override the default choice i.e., no offline support.
|
2001-06-16 07:20:15 +00:00
|
|
|
*
|
|
|
|
* POP3, None and Movemail will default to 0.
|
|
|
|
* IMAP level 10 and NEWS with level 20.
|
|
|
|
*
|
2001-05-19 01:38:51 +00:00
|
|
|
*/
|
|
|
|
attribute long offlineSupportLevel;
|
2001-06-20 06:13:27 +00:00
|
|
|
|
|
|
|
/* create pretty name for migrated accounts */
|
|
|
|
wstring generatePrettyNameForMigration();
|
2001-08-21 06:18:58 +00:00
|
|
|
|
2001-06-16 07:20:15 +00:00
|
|
|
/* does this server have disk space settings? */
|
|
|
|
readonly attribute boolean supportsDiskSpace;
|
2001-06-23 21:11:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* If the server supports Fcc/Sent/etc, default prefs can point to
|
|
|
|
* the server. Otherwise, copies and folders prefs should point to
|
|
|
|
* Local Folders.
|
|
|
|
*
|
|
|
|
* By default this value is set to true via global pref 'allows_specialfolders_usage'
|
|
|
|
* (mailnews.js). For Nntp, the value is overridden to be false.
|
|
|
|
* If ISPs want to modify this value, they should do that in their rdf file
|
|
|
|
* by using this attribute. Please look at mozilla/mailnews/base/ispdata/aol.rdf for
|
|
|
|
* usage example.
|
|
|
|
*/
|
|
|
|
attribute boolean defaultCopiesAndFoldersPrefsToServer;
|
|
|
|
|
2001-06-29 07:04:38 +00:00
|
|
|
/* can this server allows sub folder creation */
|
|
|
|
attribute boolean canCreateFoldersOnServer;
|
|
|
|
|
|
|
|
/* can this server allows message filing ? */
|
|
|
|
attribute boolean canFileMessagesOnServer;
|
2001-07-06 21:16:32 +00:00
|
|
|
|
2002-03-25 22:34:34 +00:00
|
|
|
/* can this server allow compacting folders ? */
|
|
|
|
readonly attribute boolean canCompactFoldersOnServer;
|
|
|
|
|
|
|
|
/* can this server allow undo delete ? */
|
|
|
|
readonly attribute boolean canUndoDeleteOnServer;
|
|
|
|
|
2001-07-06 21:16:32 +00:00
|
|
|
/* used for setting up the filter UI */
|
|
|
|
readonly attribute nsMsgSearchScopeValue filterScope;
|
|
|
|
|
|
|
|
/* used for setting up the search UI */
|
|
|
|
readonly attribute nsMsgSearchScopeValue searchScope;
|
2001-10-31 03:45:24 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* these generic getter / setters, useful for extending mailnews
|
|
|
|
* note, these attributes persist across sessions
|
|
|
|
*/
|
|
|
|
wstring getUnicharAttribute(in string name);
|
|
|
|
void setUnicharAttribute(in string name, in wstring value);
|
|
|
|
|
|
|
|
string getCharAttribute(in string name);
|
|
|
|
void setCharAttribute(in string name, in string value);
|
|
|
|
|
|
|
|
boolean getBoolAttribute(in string name);
|
|
|
|
void setBoolAttribute(in string name, in boolean value);
|
|
|
|
|
|
|
|
long getIntAttribute(in string name);
|
|
|
|
void setIntAttribute(in string name, in long value);
|
2002-02-13 00:15:08 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* If the password for the server is available either via authentication
|
|
|
|
* in the current session or from password manager stored entries, return
|
2003-11-15 00:57:41 +00:00
|
|
|
* false. Otherwise, return true. If password is obtained from password
|
2002-02-13 00:15:08 +00:00
|
|
|
* manager, set the password member variable.
|
|
|
|
*/
|
2003-11-15 00:57:41 +00:00
|
|
|
readonly attribute boolean passwordPromptRequired;
|
2002-03-28 21:34:42 +00:00
|
|
|
|
|
|
|
/**
|
2004-04-19 05:15:39 +00:00
|
|
|
* for mail, this configures both the MDN filter, and the server-side
|
2004-04-13 18:16:35 +00:00
|
|
|
* spam filter filters, if needed.
|
|
|
|
*
|
2002-03-28 21:34:42 +00:00
|
|
|
* If we have set up to filter return receipts into
|
|
|
|
* our Sent folder, this utility method creates
|
|
|
|
* a filter to do that, and adds it to our filterList
|
|
|
|
* if it doesn't exist. If it does, it will enable it.
|
|
|
|
*
|
2004-04-19 05:15:39 +00:00
|
|
|
* this is not used by news filters (yet).
|
2002-03-28 21:34:42 +00:00
|
|
|
*/
|
2004-04-13 18:16:35 +00:00
|
|
|
void configureTemporaryFilters(in nsIMsgFilterList filterList);
|
2002-09-20 00:04:01 +00:00
|
|
|
|
2003-02-28 01:41:36 +00:00
|
|
|
/**
|
|
|
|
* If Sent folder pref is changed we need to clear the temporary
|
|
|
|
* return receipt filter so that the new return receipt filter can
|
|
|
|
* be recreated (by ConfigureTemporaryReturnReceiptsFilter()).
|
|
|
|
*/
|
|
|
|
void clearTemporaryReturnReceiptsFilter();
|
|
|
|
|
2002-09-20 00:04:01 +00:00
|
|
|
/**
|
|
|
|
* spam settings
|
|
|
|
*/
|
|
|
|
attribute nsISpamSettings spamSettings;
|
2002-10-09 01:21:27 +00:00
|
|
|
readonly attribute nsIMsgFilterPlugin spamFilterPlugin;
|
2003-01-11 23:09:34 +00:00
|
|
|
|
|
|
|
nsIMsgFolder getMsgFolderFromURI(in nsIMsgFolder aFolderResource, in string aURI);
|
2004-05-18 13:21:12 +00:00
|
|
|
|
|
|
|
readonly attribute boolean isDeferredTo;
|
1999-04-06 22:35:13 +00:00
|
|
|
};
|
1999-09-09 04:11:38 +00:00
|
|
|
|
|
|
|
%{C++
|
2001-06-16 07:20:15 +00:00
|
|
|
/*
|
|
|
|
* Following values for offline support have been used by
|
|
|
|
* various files. If you are modifying any of the values
|
|
|
|
* below, please do take care of the following files.
|
|
|
|
* - mozilla/mailnews/base/src/nsMsgAccountManagerDS.cpp
|
|
|
|
* - mozilla/mailnews/base/util/nsMsgIncomingServer.cpp
|
|
|
|
* - mozilla/mailnews/imap/src/nsImapIncomingServer.cpp
|
|
|
|
* - mozilla/mailnews/local/src/nsPop3IncomingServer.cpp
|
|
|
|
* - mozilla/mailnews/news/src/nsNntpIncomingServer.cpp
|
|
|
|
* - mozilla/mailnews/base/resources/content/msgAccountCentral.js
|
|
|
|
* - mozilla/modules/libpref/src/init/mailnews.js
|
|
|
|
* - ns/modules/libpref/src/init/mailnews-ns.js
|
|
|
|
* - ns/mailnews/base/ispdata/aol.rdf
|
|
|
|
* - ns/mailnews/base/ispdata/nswebmail.rdf
|
|
|
|
*/
|
|
|
|
#define OFFLINE_SUPPORT_LEVEL_NONE 0
|
|
|
|
#define OFFLINE_SUPPORT_LEVEL_REGULAR 10
|
|
|
|
#define OFFLINE_SUPPORT_LEVEL_EXTENDED 20
|
|
|
|
#define OFFLINE_SUPPORT_LEVEL_UNDEFINED -1
|
|
|
|
|
2001-06-20 06:13:27 +00:00
|
|
|
// Value when no port setting is found
|
|
|
|
#define PORT_NOT_SET -1
|
|
|
|
|
1999-09-09 04:11:38 +00:00
|
|
|
/* some useful macros to implement nsIMsgIncomingServer accessors */
|
|
|
|
#define NS_IMPL_SERVERPREF_STR(_class, _postfix, _prefname) \
|
|
|
|
NS_IMETHODIMP \
|
|
|
|
_class::Get##_postfix(char **retval) \
|
|
|
|
{ \
|
|
|
|
return GetCharValue(_prefname, retval); \
|
|
|
|
} \
|
|
|
|
NS_IMETHODIMP \
|
1999-09-19 23:46:35 +00:00
|
|
|
_class::Set##_postfix(const char *chvalue) \
|
1999-09-09 04:11:38 +00:00
|
|
|
{ \
|
|
|
|
return SetCharValue(_prefname, chvalue); \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define NS_IMPL_SERVERPREF_BOOL(_class, _postfix, _prefname)\
|
|
|
|
NS_IMETHODIMP \
|
|
|
|
_class::Get##_postfix(PRBool *retval) \
|
|
|
|
{ \
|
|
|
|
return GetBoolValue(_prefname, retval); \
|
|
|
|
} \
|
|
|
|
NS_IMETHODIMP \
|
|
|
|
_class::Set##_postfix(PRBool bvalue) \
|
|
|
|
{ \
|
|
|
|
return SetBoolValue(_prefname, bvalue); \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define NS_IMPL_SERVERPREF_INT(_class, _postfix, _prefname)\
|
|
|
|
NS_IMETHODIMP \
|
|
|
|
_class::Get##_postfix(PRInt32 *retval) \
|
|
|
|
{ \
|
|
|
|
return GetIntValue(_prefname, retval); \
|
|
|
|
} \
|
|
|
|
NS_IMETHODIMP \
|
|
|
|
_class::Set##_postfix(PRInt32 ivalue) \
|
|
|
|
{ \
|
|
|
|
return SetIntValue(_prefname, ivalue); \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define NS_IMPL_SERVERPREF_FILE(_class, _postfix, _prefname)\
|
|
|
|
NS_IMETHODIMP \
|
|
|
|
_class::Get##_postfix(nsIFileSpec **retval) \
|
|
|
|
{ \
|
|
|
|
return GetFileValue(_prefname, retval); \
|
|
|
|
} \
|
|
|
|
NS_IMETHODIMP \
|
|
|
|
_class::Set##_postfix(nsIFileSpec* ivalue) \
|
|
|
|
{ \
|
|
|
|
return SetFileValue(_prefname, ivalue); \
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
%}
|