From 1f1be21c3602bc841ce4c9719cf65c48c11de378 Mon Sep 17 00:00:00 2001 From: "alecf%netscape.com" Date: Sat, 23 Jan 1999 02:48:58 +0000 Subject: [PATCH] add dummy nsIMsgFolder so that other things can compile. putterman will check a real interface --- mailnews/base/public/Makefile.in | 1 + mailnews/base/public/nsIMsgFolder.h | 41 +++++++++++++++++++++++++++ mailnews/base/public/nsIMsgFolder.idl | 37 ++++++++++++++++++++++++ mailnews/base/src/nsMsgPtrArray.h | 4 +-- mailnews/news/public/nsINNTPHost.idl | 2 +- 5 files changed, 82 insertions(+), 3 deletions(-) create mode 100644 mailnews/base/public/nsIMsgFolder.h create mode 100644 mailnews/base/public/nsIMsgFolder.idl diff --git a/mailnews/base/public/Makefile.in b/mailnews/base/public/Makefile.in index f9b01fb93908..f93f0fa79220 100644 --- a/mailnews/base/public/Makefile.in +++ b/mailnews/base/public/Makefile.in @@ -35,6 +35,7 @@ EXPORTS = \ nsIMsgRFC822Parser.h \ nsIMsgHost.h \ nsIMsgGroupRecord.h \ + nsIMsgFolder.h \ $(NULL) include $(topsrcdir)/config/config.mk diff --git a/mailnews/base/public/nsIMsgFolder.h b/mailnews/base/public/nsIMsgFolder.h new file mode 100644 index 000000000000..d92071c12688 --- /dev/null +++ b/mailnews/base/public/nsIMsgFolder.h @@ -0,0 +1,41 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nsIMsgFolder.idl + */ + +#ifndef __gen_nsIMsgFolder_h__ +#define __gen_nsIMsgFolder_h__ + +#include "nsISupports.h" /* interface nsISupports */ +#include "nsISupportsArray.h" /* interface nsISupportsArray */ + + +/* starting interface nsIMsgFolder */ + +/* {85e39ff0-b248-11d2-b7ef-00805f05ffa5} */ +#define NS_IMSGFOLDER_IID_STR "85e39ff0-b248-11d2-b7ef-00805f05ffa5" +#define NS_IMSGFOLDER_IID \ + {0x85e39ff0, 0xb248, 0x11d2, \ + { 0xb7, 0xef, 0x00, 0x80, 0x5f, 0x05, 0xff, 0xa5 }} + +class nsIMsgFolder : public nsISupports { + private: + void operator delete(void *); // NOT TO BE IMPLEMENTED + + public: + static const nsIID& IID() { + static nsIID iid = NS_IMSGFOLDER_IID; + return iid; + } + + /* */ + NS_IMETHOD GetDepth(PRInt32 *aDepth) = 0; + NS_IMETHOD SetDepth(PRInt32 aDepth) = 0; + + /* */ + NS_IMETHOD GetSubFolders(nsISupportsArray **_retval) = 0; + + /* */ + NS_IMETHOD FindParentOf(const nsIMsgFolder *childFolder, nsIMsgFolder **_retval) = 0; +}; + +#endif /* __gen_nsIMsgFolder_h__ */ diff --git a/mailnews/base/public/nsIMsgFolder.idl b/mailnews/base/public/nsIMsgFolder.idl new file mode 100644 index 000000000000..24556f14d655 --- /dev/null +++ b/mailnews/base/public/nsIMsgFolder.idl @@ -0,0 +1,37 @@ +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * + * 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. + */ + +/* + * 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" + +[uuid(85e39ff0-b248-11d2-b7ef-00805f05ffa5)] +interface nsIMsgFolder : nsISupports { + + attribute long depth; + nsISupportsArray GetSubFolders(); + nsIMsgFolder FindParentOf(in nsIMsgFolder childFolder); + +}; + + diff --git a/mailnews/base/src/nsMsgPtrArray.h b/mailnews/base/src/nsMsgPtrArray.h index 401d6c3cb41d..00f27a06d8df 100644 --- a/mailnews/base/src/nsMsgPtrArray.h +++ b/mailnews/base/src/nsMsgPtrArray.h @@ -20,6 +20,7 @@ #ifndef PTR_ARRAY_H_ #define PTR_ARRAY_H_ +#include "nsIMsgFolder.h" typedef int XPCompareFunc(const void *, const void * ); #ifdef DEBUG @@ -151,7 +152,6 @@ protected: //***************************************************************************** -class MSG_FolderInfo; class MSG_FolderArray : public XPSortedPtrArray { @@ -160,7 +160,7 @@ public: MSG_FolderArray (XPCompareFunc *compare = NULL) : XPSortedPtrArray (compare) {} // Encapsulate this typecast, so we don't have to do it all over the place. - MSG_FolderInfo *GetAt(int i) const { return (MSG_FolderInfo*) XPPtrArray::GetAt(i); } + nsIMsgFolder *GetAt(int i) const { return (nsIMsgFolder *) XPPtrArray::GetAt(i); } }; #endif diff --git a/mailnews/news/public/nsINNTPHost.idl b/mailnews/news/public/nsINNTPHost.idl index 2255dfeef833..13a3473b9625 100644 --- a/mailnews/news/public/nsINNTPHost.idl +++ b/mailnews/news/public/nsINNTPHost.idl @@ -111,7 +111,7 @@ interface nsINNTPHost : nsISupports { void SetPrettyName(in string groupName, in string prettyName); /* Go load the newsrc for this host. Creates the subscribed hosts as - children of the given MSG_FolderInfo. */ + children of the given nsIMsgFolder. */ void LoadNewsrc(); /* Write out the newsrc for this host right now. In general, either MarkDirty() or WriteIfDirty() should be called instead. */