Add new methods to nsIMsgFolder interface

This commit is contained in:
putterman%netscape.com 1999-01-27 02:59:12 +00:00
parent 88a5229020
commit 15fa6026c1
3 changed files with 240 additions and 21 deletions

View File

@ -18,6 +18,7 @@
DEPTH=..\..\..
IGNORE_MANIFEST=1
IDLSRCS = \
nsIMsgHost.idl \
nsIMsgGroupRecord.idl \
@ -31,6 +32,7 @@ EXPORTS = \
nsMsgMessageFlags.h \
nsIMsgHost.h \
nsIMsgGroupRecord.h \
nsIMsgFolder.h \
$(NULL)
MODULE=mailnews

View File

@ -1,3 +1,21 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM nsIMsgFolder.idl
*/
@ -7,6 +25,17 @@
#include "nsISupports.h" /* interface nsISupports */
#include "nsISupportsArray.h" /* interface nsISupportsArray */
#include "nsIRDFNode.h" /* interface nsIRDFNode */
enum FolderType {
FOLDER_MAIL,
FOLDER_IMAPMAIL,
FOLDER_NEWSGROUP,
FOLDER_CONTAINERONLY,
FOLDER_CATEGORYCONTAINER,
FOLDER_IMAPSERVERCONTAINER,
FOLDER_UNKNOWN
};
/* starting interface nsIMsgFolder */
@ -17,7 +46,7 @@
{0x85e39ff0, 0xb248, 0x11d2, \
{ 0xb7, 0xef, 0x00, 0x80, 0x5f, 0x05, 0xff, 0xa5 }}
class nsIMsgFolder : public nsISupports {
class nsIMsgFolder : public nsIRDFResource {
private:
void operator delete(void *); // NOT TO BE IMPLEMENTED
@ -28,24 +57,150 @@ class nsIMsgFolder : public nsISupports {
}
/* <IDL> */
NS_IMETHOD GetDepth(PRInt32 *aDepth) = 0;
NS_IMETHOD SetDepth(PRInt32 aDepth) = 0;
NS_IMETHOD GetType(FolderType *aType) = 0;
/* <IDL> */
NS_IMETHOD GetPrettyName(char * *aPrettyName) = 0;
/* <IDL> */
NS_IMETHOD GetName(char * *aName) = 0;
/* <IDL> */
NS_IMETHOD SetName(const char *name) = 0;
/* <IDL> */
NS_IMETHOD GetPrettiestName(char * *aPrettiestName) = 0;
/* <IDL> */
NS_IMETHOD GetNameFromPathName(const char *pathName, char **_retval) = 0;
/* <IDL> */
NS_IMETHOD HasSubFolders(PRBool *_retval) = 0;
/* <IDL> */
NS_IMETHOD GetNumSubFolders(PRInt32 *_retval) = 0;
/* <IDL> */
NS_IMETHOD GetNumSubFoldersToDisplay(PRInt32 *_retval) = 0;
/* <IDL> */
NS_IMETHOD GetSubFolder(PRInt32 which, nsIMsgFolder **_retval) = 0;
/* <IDL> */
NS_IMETHOD GetSubFolders(nsISupportsArray **_retval) = 0;
/* <IDL> */
NS_IMETHOD AddSubFolder(const nsIMsgFolder *folder) = 0;
/* <IDL> */
NS_IMETHOD RemoveSubFolder(const nsIMsgFolder *folder) = 0;
/* <IDL> */
NS_IMETHOD GetDeleteIsMoveToTrash(PRBool *aDeleteIsMoveToTrash) = 0;
/* <IDL> */
NS_IMETHOD GetShowDeletedMessages(PRBool *aShowDeletedMessages) = 0;
/* <IDL> */
NS_IMETHOD OnCloseFolder() = 0;
/* <IDL> */
NS_IMETHOD Delete() = 0;
/* <IDL> */
NS_IMETHOD PropagateDelete(nsIMsgFolder **folder, PRBool deleteStorage) = 0;
/* <IDL> */
NS_IMETHOD RecursiveDelete(PRBool deleteStorage) = 0;
/* <IDL> */
NS_IMETHOD CreateSubfolder(const char *leafNameFromUser, nsIMsgFolder **outFolder, PRInt32 *outPos) = 0;
/* <IDL> */
NS_IMETHOD Rename(const char *name) = 0;
/* <IDL> */
NS_IMETHOD Adopt(const nsIMsgFolder *srcFolder, PRInt32 *outPos) = 0;
/* <IDL> */
NS_IMETHOD ContainsChildNamed(const char *name, PRBool *_retval) = 0;
/* <IDL> */
NS_IMETHOD FindChildNamed(const char *name, nsIMsgFolder **_retval) = 0;
/* <IDL> */
NS_IMETHOD FindParentOf(const nsIMsgFolder *childFolder, nsIMsgFolder **_retval) = 0;
/* <IDL> */
NS_IMETHOD AddSubfolder(const nsIMsgFolder *newSubfolder) = 0;
NS_IMETHOD IsParentOf(const nsIMsgFolder *folder, PRBool deep, PRBool *_retval) = 0;
/* <IDL> */
NS_IMETHOD GenerateUniqueSubfolderName(const char *prefix, const nsIMsgFolder *otherFolder, char **_retval) = 0;
/* <IDL> */
NS_IMETHOD GetDepth(PRInt32 *aDepth) = 0;
NS_IMETHOD SetDepth(PRInt32 aDepth) = 0;
/* <IDL> */
NS_IMETHOD UpdateSummaryTotals() = 0;
/* <IDL> */
NS_IMETHOD SummaryChanged() = 0;
/* <IDL> */
NS_IMETHOD GetNumUnread(PRBool deep, PRInt32 *_retval) = 0;
/* <IDL> */
NS_IMETHOD GetTotalMessages(PRBool deep, PRInt32 *_retval) = 0;
/* <IDL> */
NS_IMETHOD GetExpungedBytesCount(PRInt32 *aExpungedBytesCount) = 0;
/* <IDL> */
NS_IMETHOD GetDeletable(PRBool *aDeletable) = 0;
/* <IDL> */
NS_IMETHOD GetCanCreateChildren(PRBool *aCanCreateChildren) = 0;
/* <IDL> */
NS_IMETHOD GetCanBeRenamed(PRBool *aCanBeRenamed) = 0;
/* <IDL> */
NS_IMETHOD GetRequiresCleanup(PRBool *aRequiresCleanup) = 0;
/* <IDL> */
NS_IMETHOD ClearRequiresCleanup() = 0;
/* <IDL> */
NS_IMETHOD GetKnowsSearchNntpExtension(PRBool *aKnowsSearchNntpExtension) = 0;
/* <IDL> */
NS_IMETHOD GetAllowsPosting(PRBool *aAllowsPosting) = 0;
/* <IDL> */
NS_IMETHOD GetRelativePathName(char * *aRelativePathName) = 0;
/* <IDL> */
NS_IMETHOD GetSizeOnDisk(PRInt32 *aSizeOnDisk) = 0;
/* <IDL> */
NS_IMETHOD RememberPassword(const char *password) = 0;
/* <IDL> */
NS_IMETHOD GetRememberedPassword(char **_retval) = 0;
/* <IDL> */
NS_IMETHOD UserNeedsToAuthenticateForFolder(PRBool displayOnly, PRBool *_retval) = 0;
/* <IDL> */
NS_IMETHOD GetUserName(char **_retval) = 0;
/* <IDL> */
NS_IMETHOD GetHostName(char **_retval) = 0;
/* <IDL> */
NS_IMETHOD AddSubfolderIfUnique(const nsIMsgFolder *newSubfolder) = 0;
/* <IDL> */
NS_IMETHOD RemoveSubfolder(const nsIMsgFolder *folder) = 0;
/* <IDL> */
NS_IMETHOD ReplaceSubfolder(const nsIMsgFolder *oldFolder, const nsIMsgFolder *newFolder) = 0;

View File

@ -1,4 +1,4 @@
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
@ -15,26 +15,88 @@
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/*
* strawman nsIMsgFolder - putterman has the real one, but at least
* we can use this to compile (though not link) for now
*/
#include "nsISupports.idl"
#include "nsISupportsArray.idl"
#include "nsIRDFNode.idl"
enum FolderType {
FOLDER_MAIL,
FOLDER_IMAPMAIL,
FOLDER_NEWSGROUP,
FOLDER_CONTAINERONLY,
FOLDER_CATEGORYCONTAINER,
FOLDER_IMAPSERVERCONTAINER,
FOLDER_UNKNOWN
};
[uuid(85e39ff0-b248-11d2-b7ef-00805f05ffa5)]
interface nsIMsgFolder : nsISupports {
interface nsIMsgFolder : nsIRDFResource {
readonly attribute FolderType type;
readonly attribute string prettyName;
readonly attribute string name;
void SetName(in string name);
readonly attribute string prettiestName;
string GetNameFromPathName(in string pathName);
boolean HasSubFolders();
long GetNumSubFolders() ;
long GetNumSubFoldersToDisplay();
nsIMsgFolder GetSubFolder(in long which) ;
nsISupportsArray GetSubFolders();
void AddSubFolder(in nsIMsgFolder folder);
void RemoveSubFolder (in nsIMsgFolder folder);
readonly attribute boolean deleteIsMoveToTrash;
readonly attribute boolean showDeletedMessages;
void OnCloseFolder ();
void Delete ();
void PropagateDelete(inout nsIMsgFolder folder, in boolean deleteStorage);
void RecursiveDelete(in boolean deleteStorage);
void CreateSubfolder(in string leafNameFromUser, out nsIMsgFolder outFolder, out long outPos);
void Rename(in string name);
void Adopt(in nsIMsgFolder srcFolder, out long outPos);
boolean ContainsChildNamed(in string name);
nsIMsgFolder FindChildNamed(in string name);
nsIMsgFolder FindParentOf(in nsIMsgFolder childFolder);
boolean IsParentOf(in nsIMsgFolder folder, in boolean deep);
string GenerateUniqueSubfolderName(in string prefix, in nsIMsgFolder otherFolder);
attribute long depth;
nsISupportsArray GetSubFolders();
nsIMsgFolder FindParentOf(in nsIMsgFolder childFolder);
void AddSubfolder(in nsIMsgFolder newSubfolder);
void UpdateSummaryTotals();
void SummaryChanged();
long GetNumUnread(in boolean deep);
long GetTotalMessages(in boolean deep);
readonly attribute long expungedBytesCount;
readonly attribute boolean deletable;
readonly attribute boolean canCreateChildren;
readonly attribute boolean canBeRenamed;
readonly attribute boolean requiresCleanup;
void ClearRequiresCleanup();
readonly attribute boolean knowsSearchNntpExtension;
readonly attribute boolean allowsPosting;
readonly attribute string relativePathName;
readonly attribute long sizeOnDisk;
void RememberPassword(in string password);
string GetRememberedPassword();
boolean UserNeedsToAuthenticateForFolder(in boolean displayOnly);
string GetUserName();
string GetHostName();
void AddSubfolderIfUnique(in nsIMsgFolder newSubfolder);
void RemoveSubfolder(in nsIMsgFolder folder);
void ReplaceSubfolder(in nsIMsgFolder oldFolder,
in nsIMsgFolder newFolder);