1999-01-27 05:59:12 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
1999-01-23 05:48:58 +03:00
|
|
|
*
|
1999-11-06 06:43:54 +03:00
|
|
|
* The contents of this file are subject to the Netscape 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/NPL/
|
1999-01-23 05:48:58 +03:00
|
|
|
*
|
1999-11-06 06:43:54 +03: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-01-23 05:48:58 +03:00
|
|
|
*
|
1999-11-06 06:43:54 +03:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is Netscape
|
1999-01-23 05:48:58 +03:00
|
|
|
* Communications Corporation. Portions created by Netscape are
|
1999-11-06 06:43:54 +03:00
|
|
|
* Copyright (C) 1998 Netscape Communications Corporation. All
|
|
|
|
* Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
1999-01-23 05:48:58 +03:00
|
|
|
*/
|
1999-01-27 05:59:12 +03:00
|
|
|
|
1999-02-17 08:32:08 +03:00
|
|
|
#include "nsISupports.idl"
|
1999-02-26 04:56:15 +03:00
|
|
|
#include "nsIFolder.idl"
|
1999-04-07 06:50:25 +04:00
|
|
|
#include "nsIMsgThread.idl"
|
1999-05-16 01:04:42 +04:00
|
|
|
#include "nsIMsgIncomingServer.idl"
|
1999-06-25 07:56:02 +04:00
|
|
|
#include "nsIFileSpec.idl"
|
1999-06-29 23:45:19 +04:00
|
|
|
#include "nsISupportsArray.idl"
|
1999-07-14 00:03:57 +04:00
|
|
|
#include "nsIMsgCopyServiceListener.idl"
|
1999-02-26 04:56:15 +03:00
|
|
|
|
|
|
|
%{ C++
|
1999-06-22 02:56:18 +04:00
|
|
|
#include "nsIMsgDatabase.h"
|
1999-06-26 22:20:30 +04:00
|
|
|
#include "nsMsgKeyArray.h"
|
1999-02-26 04:56:15 +03:00
|
|
|
%}
|
1999-06-23 03:42:29 +04:00
|
|
|
|
1999-05-05 06:30:46 +04:00
|
|
|
interface nsIMessage;
|
1999-10-29 08:39:06 +04:00
|
|
|
interface nsIMsgWindow;
|
1999-06-22 02:56:18 +04:00
|
|
|
interface nsIMsgDatabase;
|
2000-03-14 16:37:54 +03:00
|
|
|
interface nsIDBFolderInfo;
|
1999-06-26 22:20:30 +04:00
|
|
|
interface nsMsgKeyArray;
|
1999-05-12 08:40:44 +04:00
|
|
|
|
1999-07-17 07:26:24 +04:00
|
|
|
interface nsIMsgFolderCacheElement;
|
1999-11-19 17:35:31 +03:00
|
|
|
interface nsAutoString;
|
1999-07-17 07:26:24 +04:00
|
|
|
|
1999-05-27 09:19:55 +04:00
|
|
|
[scriptable, uuid(85e39ff0-b248-11d2-b7ef-00805f05ffa5)]
|
1999-02-26 04:56:15 +03:00
|
|
|
interface nsIMsgFolder : nsIFolder {
|
1999-02-04 20:54:04 +03:00
|
|
|
|
1999-02-26 04:56:15 +03:00
|
|
|
/* already exists in nsIFolder */
|
|
|
|
/* readonly attribute string name; */
|
|
|
|
/* void SetName(in string name); */
|
1999-02-04 20:54:04 +03:00
|
|
|
|
|
|
|
|
1999-06-23 03:42:29 +04:00
|
|
|
/* XXX should these 2 go on nsIFolder or nsICollection? */
|
|
|
|
void AddUnique(in nsISupports element);
|
|
|
|
void ReplaceElement(in nsISupports element, in nsISupports newElement);
|
|
|
|
|
2000-01-28 04:22:33 +03:00
|
|
|
nsISimpleEnumerator getMessages(in nsIMsgWindow aMsgWindow);
|
|
|
|
nsISimpleEnumerator getThreads(in nsIMsgWindow aMsgWindow);
|
1999-10-21 01:58:21 +04:00
|
|
|
|
|
|
|
void startFolderLoading();
|
|
|
|
void endFolderLoading();
|
|
|
|
|
1999-09-14 08:02:34 +04:00
|
|
|
/* get new headers for db */
|
1999-11-03 00:36:59 +03:00
|
|
|
void updateFolder(in nsIMsgWindow aWindow);
|
1999-10-21 01:58:21 +04:00
|
|
|
|
|
|
|
nsIMsgThread getThreadForMessage(in nsIMessage message);
|
|
|
|
boolean hasMessage(in nsIMessage message);
|
|
|
|
|
|
|
|
nsIEnumerator getVisibleSubFolders();
|
1999-06-29 01:56:33 +04:00
|
|
|
readonly attribute wstring prettiestName;
|
1999-10-21 01:58:21 +04:00
|
|
|
|
1999-12-03 07:46:49 +03:00
|
|
|
/**
|
|
|
|
* URL for this folder
|
|
|
|
*/
|
1999-10-21 01:58:21 +04:00
|
|
|
readonly attribute string folderURL;
|
1999-02-04 20:54:04 +03:00
|
|
|
|
1999-12-03 07:46:49 +03:00
|
|
|
/**
|
|
|
|
* should probably move to the server
|
|
|
|
*/
|
1999-02-04 20:54:04 +03:00
|
|
|
readonly attribute boolean deleteIsMoveToTrash;
|
1999-12-03 07:46:49 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* should probably move to the server
|
|
|
|
*/
|
1999-02-04 20:54:04 +03:00
|
|
|
readonly attribute boolean showDeletedMessages;
|
1999-05-16 01:04:42 +04:00
|
|
|
|
1999-12-03 07:46:49 +03:00
|
|
|
/**
|
|
|
|
* this folder's parent server
|
|
|
|
*/
|
1999-05-16 01:04:42 +04:00
|
|
|
readonly attribute nsIMsgIncomingServer server;
|
1999-12-03 07:46:49 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* is this folder the "phantom" server folder?
|
|
|
|
*/
|
1999-08-21 02:41:38 +04:00
|
|
|
readonly attribute boolean isServer;
|
fix for #17402, stationary -> stationery.
r=alecf
major fixes for the new folder / rename folder / subscribe dialogs.
we no longer use an html select for the folder picker.
now we use cascading menu popups, like the copy and move menus.
this fixes a lot of bugs, and allows pre-flighting to finally work.
our folder data source has some new properies:
CanFileMessages, CanSubscribe, CanRename, and CanCreateSubfolders
we use these to determine what cascading menu to build, what to disable, etc.
also, nsMessenger::NewFolder() and nsMessenger::RenameFolder() were changes to
take a nsIRDFResource instead of a nsIDOMXULElement. Before we were
passing through to the back end the selected xul element, now we pass
the resource in.
other cool side effects:
in the copy & move menus, you don't get the choice to file or copy to a server, on folders
in the rename dialog, you can't pick a server, on a folder
in the new folder dialog, you can't pick the imap inbox. (* more needs to be done here.)
bugs fixed: #14773, #14254, #20599, #20646
r=alecf
a couple bullet proofing fixes to prevent some crashes reported on fullcircle
r=bienvenu
1999-12-03 11:10:09 +03:00
|
|
|
readonly attribute boolean canSubscribe;
|
|
|
|
readonly attribute boolean canFileMessages;
|
2000-03-14 16:37:54 +03:00
|
|
|
readonly attribute boolean noSelect;
|
1999-12-04 22:56:06 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* does this folder allow subfolders?
|
|
|
|
* for example, newsgroups cannot have subfolders, and the INBOX
|
|
|
|
* on some IMAP servers cannot have subfolders
|
|
|
|
*/
|
fix for #17402, stationary -> stationery.
r=alecf
major fixes for the new folder / rename folder / subscribe dialogs.
we no longer use an html select for the folder picker.
now we use cascading menu popups, like the copy and move menus.
this fixes a lot of bugs, and allows pre-flighting to finally work.
our folder data source has some new properies:
CanFileMessages, CanSubscribe, CanRename, and CanCreateSubfolders
we use these to determine what cascading menu to build, what to disable, etc.
also, nsMessenger::NewFolder() and nsMessenger::RenameFolder() were changes to
take a nsIRDFResource instead of a nsIDOMXULElement. Before we were
passing through to the back end the selected xul element, now we pass
the resource in.
other cool side effects:
in the copy & move menus, you don't get the choice to file or copy to a server, on folders
in the rename dialog, you can't pick a server, on a folder
in the new folder dialog, you can't pick the imap inbox. (* more needs to be done here.)
bugs fixed: #14773, #14254, #20599, #20646
r=alecf
a couple bullet proofing fixes to prevent some crashes reported on fullcircle
r=bienvenu
1999-12-03 11:10:09 +03:00
|
|
|
readonly attribute boolean canCreateSubfolders;
|
1999-12-04 22:56:06 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* can you change the name of this folder?
|
|
|
|
* for example, newsgroups
|
|
|
|
* and some special folders can't be renamed
|
|
|
|
*/
|
fix for #17402, stationary -> stationery.
r=alecf
major fixes for the new folder / rename folder / subscribe dialogs.
we no longer use an html select for the folder picker.
now we use cascading menu popups, like the copy and move menus.
this fixes a lot of bugs, and allows pre-flighting to finally work.
our folder data source has some new properies:
CanFileMessages, CanSubscribe, CanRename, and CanCreateSubfolders
we use these to determine what cascading menu to build, what to disable, etc.
also, nsMessenger::NewFolder() and nsMessenger::RenameFolder() were changes to
take a nsIRDFResource instead of a nsIDOMXULElement. Before we were
passing through to the back end the selected xul element, now we pass
the resource in.
other cool side effects:
in the copy & move menus, you don't get the choice to file or copy to a server, on folders
in the rename dialog, you can't pick a server, on a folder
in the new folder dialog, you can't pick the imap inbox. (* more needs to be done here.)
bugs fixed: #14773, #14254, #20599, #20646
r=alecf
a couple bullet proofing fixes to prevent some crashes reported on fullcircle
r=bienvenu
1999-12-03 11:10:09 +03:00
|
|
|
readonly attribute boolean canRename;
|
1999-12-03 07:46:49 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* the phantom server folder
|
|
|
|
*/
|
|
|
|
readonly attribute nsIMsgFolder rootFolder;
|
1999-01-26 02:38:09 +03:00
|
|
|
|
2000-01-28 18:34:13 +03:00
|
|
|
void ForceDBClosed ();
|
1999-02-04 20:54:04 +03:00
|
|
|
void Delete ();
|
1999-01-27 05:59:12 +03:00
|
|
|
|
1999-10-21 01:58:21 +04:00
|
|
|
void deleteSubFolders(in nsISupportsArray folders);
|
|
|
|
void propagateDelete(in nsIMsgFolder folder, in boolean deleteStorage);
|
|
|
|
void recursiveDelete(in boolean deleteStorage);
|
1999-01-27 05:59:12 +03:00
|
|
|
|
2000-02-07 03:20:37 +03:00
|
|
|
void createSubfolder(in wstring folderName);
|
2000-01-28 10:07:09 +03:00
|
|
|
[noscript] nsIMsgFolder addSubfolder(in nsAutoString folderName);
|
1999-11-19 17:35:31 +03:00
|
|
|
|
1999-10-21 01:58:21 +04:00
|
|
|
void compact();
|
2000-02-17 09:03:55 +03:00
|
|
|
void emptyTrash(in nsIMsgWindow aMsgWindow);
|
1999-08-06 17:32:50 +04:00
|
|
|
|
1999-12-03 07:46:49 +03:00
|
|
|
/**
|
|
|
|
* change the name of the folder
|
|
|
|
*
|
|
|
|
* @param name the new name of the folder
|
|
|
|
*/
|
2000-02-08 04:20:00 +03:00
|
|
|
void rename(in wstring name);
|
1999-10-21 01:58:21 +04:00
|
|
|
void adopt(in nsIMsgFolder srcFolder, out unsigned long outPos);
|
1999-01-27 05:59:12 +03:00
|
|
|
|
1999-12-03 07:46:49 +03:00
|
|
|
/**
|
|
|
|
* looks in immediate children of this folder for the given name
|
|
|
|
*
|
|
|
|
* @param name the name of the target subfolder
|
|
|
|
*/
|
1999-10-21 01:58:21 +04:00
|
|
|
boolean containsChildNamed(in string name);
|
|
|
|
boolean isAncestorOf(in nsIMsgFolder folder);
|
1999-01-27 05:59:12 +03:00
|
|
|
|
1999-10-21 01:58:21 +04:00
|
|
|
string generateUniqueSubfolderName(in string prefix,
|
|
|
|
in nsIMsgFolder otherFolder);
|
1999-01-27 05:59:12 +03:00
|
|
|
|
1999-10-21 01:58:21 +04:00
|
|
|
void updateSummaryTotals(in boolean force);
|
|
|
|
void summaryChanged();
|
1999-12-03 07:46:49 +03:00
|
|
|
/**
|
|
|
|
* get the total number of unread messages in this folder,
|
|
|
|
* or in all subfolders
|
|
|
|
*
|
|
|
|
* @param deep if true, descends into all subfolders and gets a grand total
|
|
|
|
*/
|
1999-10-21 01:58:21 +04:00
|
|
|
long getNumUnread(in boolean deep);
|
1999-12-03 07:46:49 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* get the total number of messages in this folder,
|
|
|
|
* or in all subfolders
|
|
|
|
*
|
|
|
|
* @param deep if true, descends into all subfolders and gets a grand total
|
|
|
|
*/
|
1999-10-21 01:58:21 +04:00
|
|
|
long getTotalMessages(in boolean deep);
|
1999-01-27 05:59:12 +03:00
|
|
|
|
2000-01-29 02:25:17 +03:00
|
|
|
/**
|
|
|
|
* does this folder have new messages
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
boolean hasNewMessages();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* return the first new message in the folder
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
readonly attribute nsIMessage firstNewMessage;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* clear new status flag of all of the new messages
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
void clearNewMessages();
|
|
|
|
|
1999-02-05 06:08:00 +03:00
|
|
|
readonly attribute unsigned long expungedBytesCount;
|
1999-12-03 07:46:49 +03:00
|
|
|
|
2000-01-29 02:25:17 +03:00
|
|
|
|
1999-12-03 07:46:49 +03:00
|
|
|
/**
|
|
|
|
* can this folder be deleted?
|
|
|
|
* for example, special folders cannot be deleted
|
|
|
|
*/
|
1999-02-04 20:54:04 +03:00
|
|
|
readonly attribute boolean deletable;
|
1999-12-03 07:46:49 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* should we be displaying recipients instead of the sender?
|
|
|
|
* for example, in the Sent folder, recipients are more relevant
|
|
|
|
* than the sender
|
|
|
|
*/
|
|
|
|
readonly attribute boolean displayRecipients;
|
1999-01-27 05:59:12 +03:00
|
|
|
|
1999-12-03 07:46:49 +03:00
|
|
|
/**
|
|
|
|
* used to determine if it will take a long time to download all
|
|
|
|
* the headers in this folder - so that we can do folder notifications
|
|
|
|
* synchronously instead of asynchronously
|
|
|
|
*/
|
1999-10-21 01:58:21 +04:00
|
|
|
boolean manyHeadersToDownload();
|
1999-09-14 01:36:02 +04:00
|
|
|
|
1999-12-03 07:46:49 +03:00
|
|
|
readonly attribute boolean requiresCleanup;
|
|
|
|
void clearRequiresCleanup();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* this should go into a news-specific interface
|
|
|
|
*/
|
1999-02-04 20:54:04 +03:00
|
|
|
readonly attribute boolean knowsSearchNntpExtension;
|
1999-12-03 07:46:49 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* this should go into a news-specific interface
|
|
|
|
*/
|
1999-02-04 20:54:04 +03:00
|
|
|
readonly attribute boolean allowsPosting;
|
1999-01-27 05:59:12 +03:00
|
|
|
|
1999-02-04 20:54:04 +03:00
|
|
|
readonly attribute string relativePathName;
|
1999-12-03 07:46:49 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* size of this folder (including headers??) on disk
|
|
|
|
*/
|
1999-02-05 06:08:00 +03:00
|
|
|
readonly attribute unsigned long sizeOnDisk;
|
1999-01-27 05:59:12 +03:00
|
|
|
|
1999-12-03 07:46:49 +03:00
|
|
|
/**
|
|
|
|
* set the password for this folder (what is this used for?)
|
|
|
|
*/
|
1999-10-21 01:58:21 +04:00
|
|
|
void rememberPassword(in string password);
|
|
|
|
readonly attribute string rememberedPassword;
|
|
|
|
boolean userNeedsToAuthenticateForFolder(in boolean displayOnly);
|
2000-01-25 07:57:22 +03:00
|
|
|
readonly attribute string username;
|
|
|
|
readonly attribute string hostname;
|
2000-01-26 09:46:01 +03:00
|
|
|
|
1999-10-21 01:58:21 +04:00
|
|
|
void setFlag(in unsigned long flag);
|
|
|
|
void clearFlag(in unsigned long flag);
|
|
|
|
boolean getFlag(in unsigned long flag);
|
2000-03-14 16:37:54 +03:00
|
|
|
void setPrefFlag();
|
1999-01-28 04:23:40 +03:00
|
|
|
|
1999-10-21 01:58:21 +04:00
|
|
|
void toggleFlag (in unsigned long flag);
|
|
|
|
void onFlagChange (in unsigned long flag);
|
|
|
|
|
2000-03-14 16:37:54 +03:00
|
|
|
attribute unsigned long flags;
|
1999-01-28 04:23:40 +03:00
|
|
|
|
2000-01-11 11:01:37 +03:00
|
|
|
nsIMsgFolder getFoldersWithFlag(in unsigned long flags,
|
1999-02-05 06:08:00 +03:00
|
|
|
in unsigned long resultsize, out unsigned long numFolders);
|
1999-01-28 04:23:40 +03:00
|
|
|
|
1999-10-21 01:58:21 +04:00
|
|
|
void getExpansionArray(in nsISupportsArray expansionArray);
|
1999-01-28 04:23:40 +03:00
|
|
|
|
1999-10-21 01:58:21 +04:00
|
|
|
void deleteMessages(in nsISupportsArray message,
|
1999-10-29 08:39:06 +04:00
|
|
|
in nsIMsgWindow msgWindow,
|
2000-02-16 03:39:23 +03:00
|
|
|
in boolean deleteStorage, in boolean isMove);
|
1999-03-12 11:02:35 +03:00
|
|
|
|
1999-10-21 01:58:21 +04:00
|
|
|
void copyMessages(in nsIMsgFolder srcFolder, in nsISupportsArray messages,
|
1999-10-29 08:39:06 +04:00
|
|
|
in boolean isMove, in nsIMsgWindow msgWindow,
|
1999-07-14 00:03:57 +04:00
|
|
|
in nsIMsgCopyServiceListener listener);
|
1999-06-26 22:20:30 +04:00
|
|
|
|
1999-10-21 01:58:21 +04:00
|
|
|
void copyFileMessage(in nsIFileSpec fileSpec, in nsIMessage msgToReplace,
|
1999-10-29 08:39:06 +04:00
|
|
|
in boolean isDraft, in nsIMsgWindow msgWindow,
|
1999-07-14 00:03:57 +04:00
|
|
|
in nsIMsgCopyServiceListener listener);
|
1999-06-26 22:20:30 +04:00
|
|
|
|
1999-10-21 01:58:21 +04:00
|
|
|
void acquireSemaphore (in nsISupports semHolder);
|
|
|
|
void releaseSemaphore (in nsISupports semHolder);
|
|
|
|
boolean testSemaphore (in nsISupports semHolder);
|
|
|
|
readonly attribute boolean locked;
|
1999-03-24 02:19:58 +03:00
|
|
|
|
1999-10-21 01:58:21 +04:00
|
|
|
nsIMessage createMessageFromMsgDBHdr(in nsIMsgDBHdr msgDBHdr);
|
1999-11-03 00:36:59 +03:00
|
|
|
void getNewMessages(in nsIMsgWindow aWindow);
|
1999-07-17 07:26:24 +04:00
|
|
|
|
1999-12-03 07:46:49 +03:00
|
|
|
/**
|
|
|
|
* write out summary data for this folder
|
|
|
|
* to the given folder cache (i.e. panacea.dat)
|
|
|
|
*/
|
1999-10-21 01:58:21 +04:00
|
|
|
void writeToFolderCache(in nsIMsgFolderCache folderCache);
|
1999-12-03 07:46:49 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* the charset of this folder
|
|
|
|
*/
|
1999-06-04 02:53:37 +04:00
|
|
|
attribute wstring charset;
|
1999-10-21 01:58:21 +04:00
|
|
|
attribute unsigned long biffState;
|
1999-12-03 07:46:49 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* the number of new messages since this folder was last visited
|
|
|
|
*/
|
1999-10-21 01:58:21 +04:00
|
|
|
attribute long numNewMessages;
|
1999-06-12 02:07:08 +04:00
|
|
|
|
1999-12-03 07:46:49 +03:00
|
|
|
/**
|
|
|
|
* verbose description of the new messages in this folder
|
|
|
|
*/
|
1999-10-21 01:58:21 +04:00
|
|
|
readonly attribute wstring newMessagesNotificationDescription;
|
1999-06-25 07:56:02 +04:00
|
|
|
|
1999-12-03 07:46:49 +03:00
|
|
|
/**
|
|
|
|
* local path of this folder
|
|
|
|
*/
|
1999-12-07 08:51:53 +03:00
|
|
|
attribute nsIFileSpec path;
|
1999-07-23 08:32:54 +04:00
|
|
|
|
1999-10-21 01:58:21 +04:00
|
|
|
void markMessagesRead(in nsISupportsArray messages, in boolean markRead);
|
|
|
|
void markAllMessagesRead();
|
|
|
|
void markMessagesFlagged(in nsISupportsArray messages, in boolean markFlagged);
|
2000-03-14 08:34:42 +03:00
|
|
|
void markThreadRead(in nsIMsgThread thread);
|
2000-02-04 02:40:09 +03:00
|
|
|
nsIMsgDatabase getMsgDatabase(in nsIMsgWindow msgWindow);
|
2000-03-14 16:37:54 +03:00
|
|
|
nsIMsgDatabase getDBFolderInfoAndDB(out nsIDBFolderInfo folderInfo);
|
1999-07-23 08:32:54 +04:00
|
|
|
|
1999-10-21 01:58:21 +04:00
|
|
|
nsIMsgFolder getChildWithURI(in string uri, in boolean deep);
|
1999-01-23 05:48:58 +03:00
|
|
|
};
|