From a5c4082159635d3a125219f52926d9f0d5c165dc Mon Sep 17 00:00:00 2001 From: "arielb%rice.edu" Date: Thu, 9 Sep 1999 06:02:05 +0000 Subject: [PATCH] spamming tree with NS_DECL_IFOO's. generated code from macros replacing code in .h files --- mailnews/base/search/src/nsMsgFilterList.h | 24 +--- mailnews/base/search/src/nsMsgFilterService.h | 6 +- .../base/src/nsCopyMessageStreamListener.h | 8 +- mailnews/base/src/nsMessageViewDataSource.h | 118 +--------------- mailnews/base/src/nsMsgBiffManager.h | 7 +- mailnews/base/src/nsMsgFolderCache.h | 8 +- mailnews/base/src/nsMsgFolderCacheElement.h | 13 +- mailnews/base/src/nsMsgFolderDataSource.h | 13 +- mailnews/base/src/nsMsgMailSession.h | 18 +-- mailnews/base/src/nsMsgMessageDataSource.h | 14 +- mailnews/base/src/nsMsgNotificationManager.h | 7 +- mailnews/base/src/nsMsgRDFDataSource.h | 131 +----------------- mailnews/base/src/nsMsgStatusFeedback.h | 10 +- mailnews/base/src/nsUrlListenerManager.h | 14 +- mailnews/base/util/nsMessage.h | 10 +- mailnews/base/util/nsMsgDBFolder.h | 14 +- mailnews/base/util/nsMsgMailNewsUrl.h | 38 +---- mailnews/base/util/nsMsgProtocol.h | 14 +- 18 files changed, 31 insertions(+), 436 deletions(-) diff --git a/mailnews/base/search/src/nsMsgFilterList.h b/mailnews/base/search/src/nsMsgFilterList.h index df33124d35a9..35cc9b53faa8 100644 --- a/mailnews/base/search/src/nsMsgFilterList.h +++ b/mailnews/base/search/src/nsMsgFilterList.h @@ -55,31 +55,13 @@ class nsMsgFilterList : public nsIMsgFilterList { public: NS_DECL_ISUPPORTS - static const nsIID& GetIID() { static nsIID iid = NS_IMSGFILTERLIST_IID; return iid; } + NS_DECL_NSIMSGFILTERLIST +//should be generated by idl. commenting out + // static const nsIID& GetIID() { static nsIID iid = NS_IMSGFILTERLIST_IID; return iid; } nsMsgFilterList(nsIOFileStream *fileStream); virtual ~nsMsgFilterList(); - NS_IMETHOD GetFolderForFilterList(nsIMsgFolder **aFolder); - NS_IMETHOD GetFilterCount(PRUint32 *pCount); - NS_IMETHOD GetFilterAt(PRUint32 filterIndex, nsIMsgFilter **filter); - /* these methods don't delete filters - they just change the list. FE still must - call MSG_DestroyFilter to delete a filter. - */ - NS_IMETHOD SetFilterAt(PRUint32 filterIndex, nsIMsgFilter *filter); - NS_IMETHOD RemoveFilterAt(PRUint32 filterIndex); - NS_IMETHOD MoveFilterAt(PRUint32 filterIndex, nsMsgFilterMotionValue motion); - NS_IMETHOD InsertFilterAt(PRUint32 filterIndex, nsIMsgFilter *filter); - - NS_IMETHOD SetLoggingEnabled(PRBool enable); - NS_IMETHOD GetLoggingEnabled(PRBool *aResult); - - NS_IMETHOD CreateFilter(const char *name, nsIMsgFilter **result); - NS_IMETHOD SaveToFile(nsIOFileStream *stream); - - NS_IMETHOD ApplyFiltersToHdr(nsMsgFilterTypeType filterType, nsIMsgDBHdr *msgHdr, nsIMsgFolder *folder, nsIMsgDatabase *db, - const char *headers, PRUint32 headersSize, nsIMsgFilterHitNotify *listener); - nsresult Close(); nsresult LoadTextFilters(); diff --git a/mailnews/base/search/src/nsMsgFilterService.h b/mailnews/base/search/src/nsMsgFilterService.h index f60fe229bc41..8c1a2d3fae37 100644 --- a/mailnews/base/search/src/nsMsgFilterService.h +++ b/mailnews/base/search/src/nsMsgFilterService.h @@ -39,16 +39,12 @@ public: virtual ~nsMsgFilterService(); NS_DECL_ISUPPORTS + NS_DECL_NSIMSGFILTERSERVICE /* clients call OpenFilterList to get a handle to a FilterList, of existing nsMsgFilter *. These are manipulated by the front end as a result of user interaction with dialog boxes. To apply the new list call MSG_CloseFilterList. */ - NS_IMETHOD OpenFilterList(nsFileSpec *filterFile, nsIMsgFilterList **filterList); - NS_IMETHOD CloseFilterList(nsIMsgFilterList *filterList); - NS_IMETHOD SaveFilterList(nsIMsgFilterList *filterList, nsFileSpec *filterFile); /* save without deleting */ - NS_IMETHOD CancelFilterList(nsIMsgFilterList *filterList); - }; #endif // _nsMsgFilterService_H_ diff --git a/mailnews/base/src/nsCopyMessageStreamListener.h b/mailnews/base/src/nsCopyMessageStreamListener.h index eaef2e287814..d44fb2760159 100644 --- a/mailnews/base/src/nsCopyMessageStreamListener.h +++ b/mailnews/base/src/nsCopyMessageStreamListener.h @@ -33,14 +33,8 @@ public: virtual ~nsCopyMessageStreamListener(); NS_DECL_ISUPPORTS - - //nsICopyMessageStreamListener - NS_IMETHOD Init(nsIMsgFolder *srcFolder, nsICopyMessageListener *destination, nsISupports *listenerData); - - // nsIStreamObserver + NS_DECL_NSICOPYMESSAGESTREAMLISTENER NS_DECL_NSISTREAMOBSERVER - - // nsIStreamListener NS_DECL_NSISTREAMLISTENER protected: diff --git a/mailnews/base/src/nsMessageViewDataSource.h b/mailnews/base/src/nsMessageViewDataSource.h index 7d3645a390d9..8f47063189ca 100644 --- a/mailnews/base/src/nsMessageViewDataSource.h +++ b/mailnews/base/src/nsMessageViewDataSource.h @@ -45,123 +45,15 @@ private: public: NS_DECL_ISUPPORTS - + NS_DECL_NSIRDFDATASOURCE + NS_DECL_NSIRDFCOMPOSITEDATASOURCE + NS_DECL_NSIRDFOBSERVER + NS_DECL_NSIMESSAGEVIEW + NS_DECL_NSIMSGWINDOWDATA nsMessageViewDataSource(void); virtual ~nsMessageViewDataSource (void); virtual nsresult Init(); - - // nsIRDFDataSource methods - NS_IMETHOD GetURI(char* *uri); - - NS_IMETHOD GetSource(nsIRDFResource* property, - nsIRDFNode* target, - PRBool tv, - nsIRDFResource** source /* out */); - - NS_IMETHOD GetTarget(nsIRDFResource* source, - nsIRDFResource* property, - PRBool tv, - nsIRDFNode** target); - - NS_IMETHOD GetSources(nsIRDFResource* property, - nsIRDFNode* target, - PRBool tv, - nsISimpleEnumerator** sources); - - NS_IMETHOD GetTargets(nsIRDFResource* source, - nsIRDFResource* property, - PRBool tv, - nsISimpleEnumerator** targets); - - NS_IMETHOD Assert(nsIRDFResource* source, - nsIRDFResource* property, - nsIRDFNode* target, - PRBool tv); - - NS_IMETHOD Unassert(nsIRDFResource* source, - nsIRDFResource* property, - nsIRDFNode* target); - - NS_IMETHOD Change(nsIRDFResource* aSource, - nsIRDFResource* aProperty, - nsIRDFNode* aOldTarget, - nsIRDFNode* aNewTarget); - - NS_IMETHOD Move(nsIRDFResource* aOldSource, - nsIRDFResource* aNewSource, - nsIRDFResource* aProperty, - nsIRDFNode* aTarget); - - NS_IMETHOD HasAssertion(nsIRDFResource* source, - nsIRDFResource* property, - nsIRDFNode* target, - PRBool tv, - PRBool* hasAssertion); - - NS_IMETHOD AddObserver(nsIRDFObserver* n); - - NS_IMETHOD RemoveObserver(nsIRDFObserver* n); - - NS_IMETHOD ArcLabelsIn(nsIRDFNode* node, - nsISimpleEnumerator** labels); - - NS_IMETHOD ArcLabelsOut(nsIRDFResource* source, - nsISimpleEnumerator** labels); - - NS_IMETHOD GetAllResources(nsISimpleEnumerator** aResult); - - NS_IMETHOD GetAllCommands(nsIRDFResource* source, - nsIEnumerator/**/** commands); - NS_IMETHOD GetAllCmds(nsIRDFResource* source, - nsISimpleEnumerator/**/** commands); - - NS_IMETHOD IsCommandEnabled(nsISupportsArray/**/* aSources, - nsIRDFResource* aCommand, - nsISupportsArray/**/* aArguments, - PRBool* aResult); - - NS_IMETHOD DoCommand(nsISupportsArray/**/* aSources, - nsIRDFResource* aCommand, - nsISupportsArray/**/* aArguments); - - - //nsIRDFCompositeDataSource - NS_IMETHOD AddDataSource(nsIRDFDataSource* source); - - NS_IMETHOD RemoveDataSource(nsIRDFDataSource* source); - - //nsIRDFObserver - NS_IMETHOD OnAssert(nsIRDFResource* subject, - nsIRDFResource* predicate, - nsIRDFNode* object); - - NS_IMETHOD OnUnassert(nsIRDFResource* subject, - nsIRDFResource* predicate, - nsIRDFNode* object); - - NS_IMETHOD OnChange(nsIRDFResource* aSource, - nsIRDFResource* aProperty, - nsIRDFNode* aOldTarget, - nsIRDFNode* aNewTarget); - - NS_IMETHOD OnMove(nsIRDFResource* aOldSource, - nsIRDFResource* aNewSource, - nsIRDFResource* aProperty, - nsIRDFNode* aTarget); - //nsIMessageView - NS_IMETHOD SetShowAll(); - NS_IMETHOD SetShowUnread(); - NS_IMETHOD SetShowRead(); - NS_IMETHOD SetShowWatched(); - NS_IMETHOD SetShowThreads(PRBool showThreads); - - //nsIMsgWindowData interface - NS_IMETHOD GetStatusFeedback(nsIMsgStatusFeedback * *aStatusFeedback); - NS_IMETHOD SetStatusFeedback(nsIMsgStatusFeedback * aStatusFeedback); - NS_IMETHOD GetTransactionManager(nsITransactionManager * *aTransactionManager); - NS_IMETHOD SetTransactionManager(nsITransactionManager * aTransactionManager); - protected: nsresult createMessageNode(nsIMessage *message, nsIRDFResource *property, nsIRDFNode **target); nsresult createUnreadNode(nsIMessage *message, nsIRDFNode **target); diff --git a/mailnews/base/src/nsMsgBiffManager.h b/mailnews/base/src/nsMsgBiffManager.h index 4380b7508308..26d7a6a8a015 100644 --- a/mailnews/base/src/nsMsgBiffManager.h +++ b/mailnews/base/src/nsMsgBiffManager.h @@ -40,12 +40,7 @@ public: virtual ~nsMsgBiffManager(); NS_DECL_ISUPPORTS - - //nsIBiffManager implementation - NS_IMETHOD AddServerBiff(nsIMsgIncomingServer *server); - NS_IMETHOD RemoveServerBiff(nsIMsgIncomingServer *server); - NS_IMETHOD ForceBiff(nsIMsgIncomingServer *server); - NS_IMETHOD ForceBiffAll(); + NS_DECL_NSIMSGBIFFMANAGER //nsITimerCallback implementation virtual void Notify(nsITimer *timer); diff --git a/mailnews/base/src/nsMsgFolderCache.h b/mailnews/base/src/nsMsgFolderCache.h index 80566068d7ff..b2774978bdfd 100644 --- a/mailnews/base/src/nsMsgFolderCache.h +++ b/mailnews/base/src/nsMsgFolderCache.h @@ -41,13 +41,7 @@ public: NS_IMETHOD OnShutdown(const nsCID& aClass, nsISupports *service); NS_DECL_ISUPPORTS - - //nsMsgFolderCache - NS_IMETHOD Init(nsIFileSpec *dbFileSpec); - NS_IMETHOD GetCacheElement(const char *uri, PRBool createIfMissing, - nsIMsgFolderCacheElement **result); - NS_IMETHOD Close(); - + NS_DECL_NSIMSGFOLDERCACHE protected: static PRBool FindCacheElementByURI(nsISupports *aElement, void *data); diff --git a/mailnews/base/src/nsMsgFolderCacheElement.h b/mailnews/base/src/nsMsgFolderCacheElement.h index a08b7caf273b..f957b7fee95b 100644 --- a/mailnews/base/src/nsMsgFolderCacheElement.h +++ b/mailnews/base/src/nsMsgFolderCacheElement.h @@ -31,18 +31,7 @@ public: virtual ~nsMsgFolderCacheElement(); NS_DECL_ISUPPORTS - - //nsMsgFolderCacheElement - - NS_IMETHOD GetStringProperty(const char *propertyName, char **result); - NS_IMETHOD GetInt32Property(const char *propertyName, PRInt32 *result); - NS_IMETHOD SetStringProperty(const char *propertyName, const char *propertyValue); - NS_IMETHOD SetInt32Property(const char *propertyName, PRInt32 propertyValue); - - /* readonly attribute string URI; */ - NS_IMETHOD GetURI(char * *aURI); - - NS_IMETHOD SetURI(char *aURI); + NS_DECL_NSIMSGFOLDERCACHEELEMENT void SetMDBRow(nsIMdbRow *row); void SetOwningCache(nsMsgFolderCache *owningCache); diff --git a/mailnews/base/src/nsMsgFolderDataSource.h b/mailnews/base/src/nsMsgFolderDataSource.h index 022eab4531d9..6e7ac90f4a3c 100644 --- a/mailnews/base/src/nsMsgFolderDataSource.h +++ b/mailnews/base/src/nsMsgFolderDataSource.h @@ -40,6 +40,7 @@ private: public: NS_DECL_ISUPPORTS_INHERITED + NS_DECL_NSIFOLDERLISTENER nsMsgFolderDataSource(void); virtual ~nsMsgFolderDataSource (void); @@ -104,18 +105,6 @@ public: NS_IMETHOD DoCommand(nsISupportsArray/**/* aSources, nsIRDFResource* aCommand, nsISupportsArray/**/* aArguments); - - NS_IMETHOD OnItemAdded(nsIFolder *parentFolder, nsISupports *item); - - NS_IMETHOD OnItemRemoved(nsIFolder *parentFolder, nsISupports *item); - - NS_IMETHOD OnItemPropertyChanged(nsISupports *item, const char *property, - const char *oldValue, const char *newValue); - - NS_IMETHOD OnItemPropertyFlagChanged(nsISupports *item, const char *property, - PRUint32 oldFlag, PRUint32 newFlag); - - // caching frequently used resources protected: nsresult NotifyPropertyChanged(nsIRDFResource *resource, nsIRDFResource *propertyResource, diff --git a/mailnews/base/src/nsMsgMailSession.h b/mailnews/base/src/nsMsgMailSession.h index 2b033c9da07f..d1a7a322f205 100644 --- a/mailnews/base/src/nsMsgMailSession.h +++ b/mailnews/base/src/nsMsgMailSession.h @@ -44,24 +44,8 @@ public: virtual ~nsMsgMailSession(); NS_DECL_ISUPPORTS - - // nsIMsgMailSession support - NS_IMETHOD GetCurrentIdentity(nsIMsgIdentity ** aIdentity); - NS_IMETHOD GetCurrentServer(nsIMsgIncomingServer **aServer); - NS_IMETHOD GetAccountManager(nsIMsgAccountManager* *aAM); + NS_DECL_NSIMSGMAILSESSION - NS_IMETHOD AddFolderListener(nsIFolderListener *listener); - NS_IMETHOD RemoveFolderListener(nsIFolderListener *listener); - NS_IMETHOD NotifyFolderItemPropertyChanged(nsISupports *item, const char *property, const char* oldValue, const char* newValue); - NS_IMETHOD NotifyFolderItemPropertyFlagChanged(nsISupports *item, const char *property, PRUint32 oldValue, - PRUint32 newValue); - NS_IMETHOD NotifyFolderItemAdded(nsIFolder *folder, nsISupports *item); - NS_IMETHOD NotifyFolderItemDeleted(nsIFolder *folder, nsISupports *item); - - NS_IMETHOD GetFolderCache(nsIMsgFolderCache **aFolderCache); - - NS_IMETHOD SetTemporaryMsgStatusFeedback(nsIMsgStatusFeedback *aMsgStatusFeedback); - NS_IMETHOD GetTemporaryMsgStatusFeedback(nsIMsgStatusFeedback **aMsgStatusFeedback); nsresult Init(); protected: nsIMsgAccountManager *m_accountManager; diff --git a/mailnews/base/src/nsMsgMessageDataSource.h b/mailnews/base/src/nsMsgMessageDataSource.h index e88c479a0265..95a5ad1a8ae6 100644 --- a/mailnews/base/src/nsMsgMessageDataSource.h +++ b/mailnews/base/src/nsMsgMessageDataSource.h @@ -42,7 +42,7 @@ private: public: NS_DECL_ISUPPORTS_INHERITED - + NS_DECL_NSIFOLDERLISTENER nsMsgMessageDataSource(void); virtual ~nsMsgMessageDataSource (void); virtual nsresult Init(); @@ -107,18 +107,6 @@ public: nsIRDFResource* aCommand, nsISupportsArray/**/* aArguments); - //nsIFolderListener - NS_IMETHOD OnItemAdded(nsIFolder *parentFolder, nsISupports *item); - - NS_IMETHOD OnItemRemoved(nsIFolder *parentFolder, nsISupports *item); - - NS_IMETHOD OnItemPropertyChanged(nsISupports *item, const char *property, - const char *oldValue, const char *newValue); - - NS_IMETHOD OnItemPropertyFlagChanged(nsISupports *item, const char *property, - PRUint32 oldFlag, PRUint32 newFlag); - - // caching frequently used resources protected: nsresult GetSenderName(nsAutoString& sender, nsAutoString *senderUserName); diff --git a/mailnews/base/src/nsMsgNotificationManager.h b/mailnews/base/src/nsMsgNotificationManager.h index 3095c403d62b..985e2c378ada 100644 --- a/mailnews/base/src/nsMsgNotificationManager.h +++ b/mailnews/base/src/nsMsgNotificationManager.h @@ -34,13 +34,8 @@ public: virtual ~nsMsgNotificationManager(); NS_DECL_ISUPPORTS - + NS_DECL_NSIFOLDERLISTENER nsresult Init(); - //nsIFolderListener - NS_IMETHOD OnItemAdded(nsIFolder *parentFolder, nsISupports *item); - NS_IMETHOD OnItemRemoved(nsIFolder *parentFolder, nsISupports *item); - NS_IMETHOD OnItemPropertyChanged(nsISupports *item, const char *property, const char *oldValue, const char *newValue); - NS_IMETHOD OnItemPropertyFlagChanged(nsISupports *item, const char *property, PRUint32 oldFlag, PRUint32 newFlag); protected: nsresult AddNewMailNotification(nsIMsgFolder *folder); diff --git a/mailnews/base/src/nsMsgRDFDataSource.h b/mailnews/base/src/nsMsgRDFDataSource.h index 79f10035473c..81381779c495 100644 --- a/mailnews/base/src/nsMsgRDFDataSource.h +++ b/mailnews/base/src/nsMsgRDFDataSource.h @@ -38,137 +38,10 @@ class nsMsgRDFDataSource : public nsIRDFDataSource, virtual nsresult Init(); NS_DECL_ISUPPORTS - + NS_DECL_NSIMSGWINDOWDATA + NS_DECL_NSIRDFDATASOURCE NS_IMETHOD OnShutdown(const nsCID& aClass, nsISupports* service); - /* readonly attribute string URI; */ - NS_IMETHOD GetURI(char * *aURI); - - /* nsIRDFResource GetSource (in nsIRDFResource aProperty, - in nsIRDFNode aTarget, - in boolean aTruthValue); */ - NS_IMETHOD GetSource(nsIRDFResource *aProperty, - nsIRDFNode *aTarget, - PRBool aTruthValue, - nsIRDFResource **_retval); - - /* nsISimpleEnumerator GetSources (in nsIRDFResource aProperty, - in nsIRDFNode aTarget, - in boolean aTruthValue); */ - NS_IMETHOD GetSources(nsIRDFResource *aProperty, - nsIRDFNode *aTarget, - PRBool aTruthValue, - nsISimpleEnumerator **_retval); - - /* nsIRDFNode GetTarget (in nsIRDFResource aSource, - in nsIRDFResource aProperty, - in boolean aTruthValue); */ - NS_IMETHOD GetTarget(nsIRDFResource *aSource, - nsIRDFResource *aProperty, - PRBool aTruthValue, - nsIRDFNode **_retval); - - /* nsISimpleEnumerator GetTargets (in nsIRDFResource aSource, - in nsIRDFResource aProperty, - in boolean aTruthValue); */ - NS_IMETHOD GetTargets(nsIRDFResource *aSource, - nsIRDFResource *aProperty, - PRBool aTruthValue, - nsISimpleEnumerator **_retval); - - /* void Assert (in nsIRDFResource aSource, - in nsIRDFResource aProperty, - in nsIRDFNode aTarget, - in boolean aTruthValue); */ - NS_IMETHOD Assert(nsIRDFResource *aSource, - nsIRDFResource *aProperty, - nsIRDFNode *aTarget, - PRBool aTruthValue); - - /* void Unassert (in nsIRDFResource aSource, - in nsIRDFResource aProperty, - in nsIRDFNode aTarget); */ - NS_IMETHOD Unassert(nsIRDFResource *aSource, - nsIRDFResource *aProperty, - nsIRDFNode *aTarget); - - /* void Change (in nsIRDFResource aSource, - in nsIRDFResource aProperty, - in nsIRDFNode aOldTarget, - in nsIRDFNode aNewTarget); - */ - NS_IMETHOD Change(nsIRDFResource *aSource, - nsIRDFResource *aProperty, - nsIRDFNode *aOldTarget, - nsIRDFNode *aNewTarget); - - /* void Move (in nsIRDFResource aOldSource, - in nsIRDFResource aNewSource, - in nsIRDFResource aProperty, - in nsIRDFNode aTarget); */ - NS_IMETHOD Move(nsIRDFResource *aOldSource, - nsIRDFResource *aNewSource, - nsIRDFResource *aProperty, - nsIRDFNode *aTarget); - - /* boolean HasAssertion (in nsIRDFResource aSource, - in nsIRDFResource aProperty, - in nsIRDFNode aTarget, - in boolean aTruthValue); */ - NS_IMETHOD HasAssertion(nsIRDFResource *aSource, - nsIRDFResource *aProperty, - nsIRDFNode *aTarget, - PRBool aTruthValue, - PRBool *_retval); - - /* void AddObserver (in nsIRDFObserver aObserver); */ - NS_IMETHOD AddObserver(nsIRDFObserver *aObserver); - - /* void RemoveObserver (in nsIRDFObserver aObserver); */ - NS_IMETHOD RemoveObserver(nsIRDFObserver *aObserver); - - /* nsISimpleEnumerator ArcLabelsIn (in nsIRDFNode aNode); */ - NS_IMETHOD ArcLabelsIn(nsIRDFNode *aNode, - nsISimpleEnumerator **_retval); - - /* nsISimpleEnumerator ArcLabelsOut (in nsIRDFResource aSource); */ - NS_IMETHOD ArcLabelsOut(nsIRDFResource *aSource, - nsISimpleEnumerator **_retval); - - /* nsISimpleEnumerator GetAllResources (); */ - NS_IMETHOD GetAllResources(nsISimpleEnumerator **_retval); - - /* nsIEnumerator GetAllCommands (in nsIRDFResource aSource); */ - NS_IMETHOD GetAllCommands(nsIRDFResource *aSource, - nsIEnumerator **_retval); - - /* nsISimpleEnumerator GetAllCommands (in nsIRDFResource aSource); */ - NS_IMETHOD GetAllCmds(nsIRDFResource *aSource, - nsISimpleEnumerator **_retval); - - /* boolean IsCommandEnabled (in nsISupportsArray aSources, - in nsIRDFResource aCommand, - in nsISupportsArray aArguments); */ - NS_IMETHOD IsCommandEnabled(nsISupportsArray *aSources, - nsIRDFResource *aCommand, - nsISupportsArray *aArguments, - PRBool *_retval); - - /* void DoCommand (in nsISupportsArray aSources, - in nsIRDFResource aCommand, - in nsISupportsArray aArguments); */ - NS_IMETHOD DoCommand(nsISupportsArray *aSources, - nsIRDFResource *aCommand, - nsISupportsArray *aArguments); - - - //nsIMsgWindowData interface - NS_IMETHOD GetStatusFeedback(nsIMsgStatusFeedback * *aStatusFeedback); - NS_IMETHOD SetStatusFeedback(nsIMsgStatusFeedback * aStatusFeedback); - - NS_IMETHOD GetTransactionManager(nsITransactionManager * *aTransactionManager); - NS_IMETHOD SetTransactionManager(nsITransactionManager * aTransactionManager); - protected: nsIRDFService *getRDFService(); static PRBool assertEnumFunc(nsISupports *aElement, void *aData); diff --git a/mailnews/base/src/nsMsgStatusFeedback.h b/mailnews/base/src/nsMsgStatusFeedback.h index 50a526129921..26991e073102 100644 --- a/mailnews/base/src/nsMsgStatusFeedback.h +++ b/mailnews/base/src/nsMsgStatusFeedback.h @@ -32,14 +32,8 @@ public: virtual ~nsMsgStatusFeedback(); NS_DECL_ISUPPORTS - - // nsIMsgStatusFeedback - NS_IMETHOD ShowStatusString(const PRUnichar *status); - NS_IMETHOD StartMeteors(); - NS_IMETHOD StopMeteors(); - NS_IMETHOD ShowProgress(PRInt32 percent); - NS_IMETHOD SetWebShell(nsIWebShell *shell, nsIDOMWindow *mWindow); - + NS_DECL_NSIMSGSTATUSFEEDBACK + // nsIDocumntLoaderObserver NS_IMETHOD OnStartDocumentLoad(nsIDocumentLoader* loader, nsIURI* aURL, const char* aCommand); NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel, nsresult aStatus, nsIDocumentLoaderObserver* aObserver); diff --git a/mailnews/base/src/nsUrlListenerManager.h b/mailnews/base/src/nsUrlListenerManager.h index e39e0f9e664b..a8845fdd9ac4 100644 --- a/mailnews/base/src/nsUrlListenerManager.h +++ b/mailnews/base/src/nsUrlListenerManager.h @@ -42,18 +42,10 @@ typedef enum { class nsUrlListenerManager : public nsIUrlListenerManager { public: NS_DECL_ISUPPORTS - nsUrlListenerManager(); + NS_DECL_NSIURLLISTENERMANAGER + nsUrlListenerManager(); virtual ~nsUrlListenerManager(); - - // nsIUrlListenerManager interface support - - NS_IMETHOD RegisterListener(nsIUrlListener * aUrlListener); - NS_IMETHOD UnRegisterListener(nsIUrlListener * aUrlListener); - - // These functions turn around and broadcast the notifications to all url listeners... - NS_IMETHOD OnStartRunningUrl(nsIMsgMailNewsUrl * aUrl); - NS_IMETHOD OnStopRunningUrl(nsIMsgMailNewsUrl * aUrl, nsresult aExitCode); - + protected: nsVoidArray * m_listeners; diff --git a/mailnews/base/util/nsMessage.h b/mailnews/base/util/nsMessage.h index ffb44c4e1960..62753b44900a 100644 --- a/mailnews/base/util/nsMessage.h +++ b/mailnews/base/util/nsMessage.h @@ -39,7 +39,8 @@ public: virtual ~nsMessage(void); NS_DECL_ISUPPORTS_INHERITED - + NS_DECL_NSIMESSAGE + NS_DECL_NSIDBMESSAGE //nsIMsgHdr NS_IMETHOD GetProperty(const char *propertyName, nsString &resultProperty); NS_IMETHOD SetProperty(const char *propertyName, nsString &propertyStr); @@ -100,13 +101,6 @@ public: NS_IMETHOD GetThreadParent(nsMsgKey *result); NS_IMETHOD SetThreadParent(nsMsgKey inKey); - //nsIMessage - NS_IMETHOD GetMsgFolder(nsIMsgFolder **folder); - NS_IMETHOD SetMsgFolder(nsIMsgFolder *folder); - - NS_IMETHOD SetMsgDBHdr(nsIMsgDBHdr *hdr); - NS_IMETHOD GetMsgDBHdr(nsIMsgDBHdr **hdr); - protected: nsIMsgFolder *mFolder; nsCOMPtr mMsgHdr; diff --git a/mailnews/base/util/nsMsgDBFolder.h b/mailnews/base/util/nsMsgDBFolder.h index 1b4f3e106a39..c5faff2d83b8 100644 --- a/mailnews/base/util/nsMsgDBFolder.h +++ b/mailnews/base/util/nsMsgDBFolder.h @@ -38,7 +38,8 @@ class NS_MSG_BASE nsMsgDBFolder: public nsMsgFolder, public nsIDBChangeListener public: nsMsgDBFolder(void); virtual ~nsMsgDBFolder(void); - + NS_DECL_NSIDBCHANGELISTENER + NS_IMETHOD GetThreads(nsISimpleEnumerator** threadEnumerator); NS_IMETHOD GetThreadForMessage(nsIMessage *message, nsIMsgThread **thread); NS_IMETHOD HasMessage(nsIMessage *message, PRBool *hasMessage); @@ -47,17 +48,6 @@ public: NS_IMETHOD GetMsgDatabase(nsIMsgDatabase** aMsgDatabase); - //nsIDBChangeListener - NS_IMETHOD OnKeyChange(nsMsgKey aKeyChanged, PRUint32 aOldFlags, PRUint32 aNewFlags, - nsIDBChangeListener * aInstigator); - NS_IMETHOD OnKeyDeleted(nsMsgKey aKeyChanged, nsMsgKey aParentKey, PRInt32 aFlags, - nsIDBChangeListener * aInstigator); - NS_IMETHOD OnKeyAdded(nsMsgKey aKeyChanged, nsMsgKey aParentKey, PRInt32 aFlags, - nsIDBChangeListener * aInstigator); - NS_IMETHOD OnParentChanged(nsMsgKey aKeyChanged, nsMsgKey oldParent, nsMsgKey newParent, - nsIDBChangeListener * aInstigator); - NS_IMETHOD OnAnnouncerGoingAway(nsIDBChangeAnnouncer * instigator); - NS_DECL_ISUPPORTS_INHERITED NS_IMETHOD WriteToFolderCache(nsIMsgFolderCache *folderCache); diff --git a/mailnews/base/util/nsMsgMailNewsUrl.h b/mailnews/base/util/nsMsgMailNewsUrl.h index 7856463608db..b3dab4361360 100644 --- a/mailnews/base/util/nsMsgMailNewsUrl.h +++ b/mailnews/base/util/nsMsgMailNewsUrl.h @@ -42,44 +42,8 @@ public: nsMsgMailNewsUrl(); NS_DECL_ISUPPORTS - - // nsIMsgMailNewsUrl support - - /////////////////////////////////////////////////////////////////////////////// - // The idea is to allow the "application" (the part of the code which wants to - // run a url in order to perform some action) to register itself as a listener - // on url. As a url listener, the app will be informed when the url begins to run - // and when the url is finished. - //////////////////////////////////////////////////////////////////////////////// - NS_IMETHOD RegisterListener (nsIUrlListener * aUrlListener); - NS_IMETHOD UnRegisterListener (nsIUrlListener * aUrlListener); - - /////////////////////////////////////////////////////////////////////////////// - // Getters and Setters for the nsMsgMailNewsUrl specific info.... - /////////////////////////////////////////////////////////////////////////////// - - NS_IMETHOD SetErrorMessage (const char * errorMessage); - // caller must free using PR_FREE - NS_IMETHOD GetErrorMessage (char ** errorMessage); - - NS_IMETHOD SetStatusFeedback(nsIMsgStatusFeedback *aMsgFeedback); - NS_IMETHOD GetStatusFeedback(nsIMsgStatusFeedback **aMsgFeedback); - - // This is just a stub implementation. It is the responsibility of derived - // url classes to over-ride this method. - NS_IMETHOD GetServer(nsIMsgIncomingServer ** aIncomingServer); - - // if you really want to know what the current state of the url is (running or not - // running) you should look into becoming a urlListener... - NS_IMETHOD SetUrlState(PRBool runningUrl, nsresult aStatusCode); - NS_IMETHOD GetUrlState(PRBool *runningUrl); - - ////////////////////////////////////////////////////////////////////////////////// - // nsIURI support + NS_DECL_NSIMSGMAILNEWSURL NS_DECL_NSIURI - - ////////////////////////////////////////////////////////////////////////////////// - // nsIURL support NS_DECL_NSIURL protected: diff --git a/mailnews/base/util/nsMsgProtocol.h b/mailnews/base/util/nsMsgProtocol.h index 80baeda006fa..618d231223f6 100644 --- a/mailnews/base/util/nsMsgProtocol.h +++ b/mailnews/base/util/nsMsgProtocol.h @@ -38,18 +38,8 @@ public: virtual ~nsMsgProtocol(); NS_DECL_ISUPPORTS - - //////////////////////////////////////////////////////////////////////////////////////// - // we suppport the nsIStreamListener interface - //////////////////////////////////////////////////////////////////////////////////////// - - NS_IMETHOD OnDataAvailable(nsIChannel * aChannel, nsISupports *ctxt, nsIInputStream *inStr, PRUint32 sourceOffset, PRUint32 count); - NS_IMETHOD OnStartRequest(nsIChannel * aChannel, nsISupports *ctxt); - NS_IMETHOD OnStopRequest(nsIChannel * aChannel, nsISupports *ctxt, nsresult status, const PRUnichar *errorMsg); - - //////////////////////////////////////////////////////////////////////////////////////// - // End of nsIStreamListenerSupport - //////////////////////////////////////////////////////////////////////////////////////// + NS_DECL_NSISTREAMLISTENER + NS_DECL_NSISTREAMOBSERVER // LoadUrl -- A protocol typically overrides this function, sets up any local state for the url and // then calls the base class which opens the socket if it needs opened. If the socket is