From cbddfe221f8aebad56323c06bb843a9fa460ef57 Mon Sep 17 00:00:00 2001 From: "putterman%netscape.com" Date: Fri, 7 May 1999 20:21:09 +0000 Subject: [PATCH] Added folder parent functions. --- mailnews/base/public/nsIFolder.h | 6 +++--- mailnews/base/public/nsIFolder.idl | 2 +- mailnews/base/public/nsIMsgFolder.h | 7 ++----- mailnews/base/public/nsIMsgFolder.idl | 3 +-- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/mailnews/base/public/nsIFolder.h b/mailnews/base/public/nsIFolder.h index 104be776e43c..ede002730ebd 100644 --- a/mailnews/base/public/nsIFolder.h +++ b/mailnews/base/public/nsIFolder.h @@ -9,7 +9,6 @@ #include "nsICollection.h" /* interface nsICollection */ #include "nsIFolderListener.h" /* interface nsIFolderListener */ #include "nsIEnumerator.h" /* interface nsIEnumerator */ -#include "nsID.h" /* interface nsID */ #ifdef XPIDL_JS_STUBS #include "jsapi.h" @@ -38,8 +37,9 @@ class nsIFolder : public nsICollection { /* nsISupports GetChildNamed (in string name); */ NS_IMETHOD GetChildNamed(const char *name, nsISupports **_retval) = 0; - /* nsIFolder GetParent (); */ - NS_IMETHOD GetParent(nsIFolder **_retval) = 0; + /* attribute nsIFolder parent; */ + NS_IMETHOD GetParent(nsIFolder * *aParent) = 0; + NS_IMETHOD SetParent(nsIFolder * aParent) = 0; /* nsIEnumerator GetSubFolders (); */ NS_IMETHOD GetSubFolders(nsIEnumerator **_retval) = 0; diff --git a/mailnews/base/public/nsIFolder.idl b/mailnews/base/public/nsIFolder.idl index c6111f2584ba..e5bb666dae30 100644 --- a/mailnews/base/public/nsIFolder.idl +++ b/mailnews/base/public/nsIFolder.idl @@ -28,7 +28,7 @@ interface nsIFolder : nsICollection { attribute string name; nsISupports GetChildNamed(in string name); - nsIFolder GetParent(); + attribute nsIFolder parent; nsIEnumerator GetSubFolders(); diff --git a/mailnews/base/public/nsIMsgFolder.h b/mailnews/base/public/nsIMsgFolder.h index dd70120f3850..77be9be4a3a5 100644 --- a/mailnews/base/public/nsIMsgFolder.h +++ b/mailnews/base/public/nsIMsgFolder.h @@ -96,11 +96,8 @@ class nsIMsgFolder : public nsIFolder { /* boolean ContainsChildNamed (in string name); */ NS_IMETHOD ContainsChildNamed(const char *name, PRBool *_retval) = 0; - /* nsIMsgFolder FindParentOf (in nsIMsgFolder childFolder); */ - NS_IMETHOD FindParentOf(nsIMsgFolder *childFolder, nsIMsgFolder **_retval) = 0; - - /* boolean IsParentOf (in nsIMsgFolder folder, in boolean deep); */ - NS_IMETHOD IsParentOf(nsIMsgFolder *folder, PRBool deep, PRBool *_retval) = 0; + /* boolean IsAncestorOf (in nsIMsgFolder folder); */ + NS_IMETHOD IsAncestorOf(nsIMsgFolder *folder, PRBool *_retval) = 0; /* string GenerateUniqueSubfolderName (in string prefix, in nsIMsgFolder otherFolder); */ NS_IMETHOD GenerateUniqueSubfolderName(const char *prefix, nsIMsgFolder *otherFolder, char **_retval) = 0; diff --git a/mailnews/base/public/nsIMsgFolder.idl b/mailnews/base/public/nsIMsgFolder.idl index 51ce459a57ef..46e0a5503941 100644 --- a/mailnews/base/public/nsIMsgFolder.idl +++ b/mailnews/base/public/nsIMsgFolder.idl @@ -64,8 +64,7 @@ interface nsIMsgFolder : nsIFolder { void Adopt(in nsIMsgFolder srcFolder, out unsigned long outPos); boolean ContainsChildNamed(in string name); - nsIMsgFolder FindParentOf(in nsIMsgFolder childFolder); - boolean IsParentOf(in nsIMsgFolder folder, in boolean deep); + boolean IsAncestorOf(in nsIMsgFolder folder); string GenerateUniqueSubfolderName(in string prefix, in nsIMsgFolder otherFolder);