Loading mailnews/base/public/nsIMsgFolder.idl +3 −16 Original line number Diff line number Diff line Loading @@ -17,19 +17,9 @@ */ #include "nsISupportsArray.idl" #include "nsISupports.idl" #include "nsIMsg.idl" /* XXX replaced by QueryInterface for nsIMsgFolder subtypes: 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 { Loading @@ -43,7 +33,6 @@ interface nsIMsgFolder : nsISupports { string GetNameFromPathName(in string pathName); // Accessing sub-folders: boolean HasSubFolders(); unsigned long GetNumSubFolders() ; unsigned long GetNumSubFoldersToDisplay(); Loading @@ -52,7 +41,6 @@ interface nsIMsgFolder : nsISupports { void AddSubFolder(in nsIMsgFolder folder); void RemoveSubFolder(in nsIMsgFolder folder); // Accessing messages: boolean HasMessages(); unsigned long GetNumMessages() ; unsigned long GetNumMessagesToDisplay(); Loading Loading @@ -130,17 +118,16 @@ interface nsIMsgFolder : nsISupports { }; //////////////////////////////////////////////////////////////////////////////// [uuid(27D2DE40-BAF1-11d2-9578-00805F8AC615)] interface nsIMsgLocalMailFolder : nsISupports { attribute string pathName; }; //////////////////////////////////////////////////////////////////////////////// [uuid(FBFEBE79-C1DD-11d2-8A40-0060B0FC04D2)] interface nsIMsgImapMailFolder : nsISupports { }; mailnews/base/public/nsIMsgHost.h +0 −3 Original line number Diff line number Diff line Loading @@ -17,9 +17,6 @@ { 0xB7, 0xED, 0x00, 0x80, 0x5F, 0x05, 0xFF, 0xA5 }} class nsIMsgHost : public nsISupports { private: void operator delete(void *); // NOT TO BE IMPLEMENTED public: static const nsIID& IID() { static nsIID iid = NS_IMSGHOST_IID; Loading mailnews/base/src/makefile.win +0 −3 Original line number Diff line number Diff line Loading @@ -34,7 +34,6 @@ CPPSRCS= \ nsMsgLocalMailFolder.cpp \ nsMsgImapMailFolder.cpp \ nsMsgGroupRecord.cpp \ nsMsgRDFFolder.cpp \ nsLocalFolderSummarySpec.cpp \ nsMsgLineBuffer.cpp \ nsNewsSet.cpp \ Loading @@ -49,12 +48,10 @@ CPP_OBJS= \ .\$(OBJDIR)\nsMsgLocalMailFolder.obj \ .\$(OBJDIR)\nsMsgImapMailFolder.obj \ .\$(OBJDIR)\nsMsgGroupRecord.obj \ .\$(OBJDIR)\nsMsgRDFFolder.obj \ .\$(OBJDIR)\nsNewsSet.obj \ .\$(OBJDIR)\nsMsgLineBuffer.obj \ $(NULL) EXPORTS= \ nsMsgRFC822Parser.h \ nsUInt32Array.h \ Loading mailnews/base/src/nsMsgFolder.h +3 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ #include "msgCore.h" #include "nsIMsgFolder.h" /* include the interface we are going to support */ #include "nsRDFResource.h" #include "nsIRDFResourceFactory.h" /* * MsgFolder Loading Loading @@ -303,4 +304,6 @@ protected: }; PR_EXTERN(nsresult) NS_NewRDFMsgFolderResourceFactory(nsIRDFResourceFactory** aResult); #endif mailnews/base/src/nsMsgLocalMailFolder.cpp +59 −1 Original line number Diff line number Diff line Loading @@ -21,10 +21,12 @@ #include "nsMsgLocalMailFolder.h" #include "nsMsgFolderFlags.h" #include "prprf.h" #include "nsIRDFResourceFactory.h" nsMsgLocalMailFolder::nsMsgLocalMailFolder(const char* uri) :nsMsgFolder(uri) { NS_INIT_REFCNT(); mHaveReadNameFromDB = PR_FALSE; mPathName = nsnull; } Loading Loading @@ -661,3 +663,59 @@ NS_IMETHODIMP nsMsgLocalMailFolder::SetPathName(char * aPathName) return NS_OK; } /** * This class creates resources for message folder URIs. It should be * registered for the "mailnewsfolder:" prefix. */ class nsMsgFolderResourceFactoryImpl : public nsIRDFResourceFactory { public: nsMsgFolderResourceFactoryImpl(void); virtual ~nsMsgFolderResourceFactoryImpl(void); NS_DECL_ISUPPORTS NS_IMETHOD CreateResource(const char* aURI, nsIRDFResource** aResult); }; nsMsgFolderResourceFactoryImpl::nsMsgFolderResourceFactoryImpl(void) { NS_INIT_REFCNT(); } nsMsgFolderResourceFactoryImpl::~nsMsgFolderResourceFactoryImpl(void) { } NS_IMPL_ISUPPORTS(nsMsgFolderResourceFactoryImpl, nsIRDFResourceFactory::IID()); NS_IMETHODIMP nsMsgFolderResourceFactoryImpl::CreateResource(const char* aURI, nsIRDFResource** aResult) { if (! aResult) return NS_ERROR_NULL_POINTER; nsMsgLocalMailFolder *folder = new nsMsgLocalMailFolder(aURI); if (! folder) return NS_ERROR_OUT_OF_MEMORY; folder->QueryInterface(nsIRDFResource::IID(), (void**)aResult); return NS_OK; } nsresult NS_NewRDFMsgFolderResourceFactory(nsIRDFResourceFactory** aResult) { if (! aResult) return NS_ERROR_NULL_POINTER; nsMsgFolderResourceFactoryImpl* factory = new nsMsgFolderResourceFactoryImpl(); if (! factory) return NS_ERROR_OUT_OF_MEMORY; NS_ADDREF(factory); *aResult = factory; return NS_OK; } Loading
mailnews/base/public/nsIMsgFolder.idl +3 −16 Original line number Diff line number Diff line Loading @@ -17,19 +17,9 @@ */ #include "nsISupportsArray.idl" #include "nsISupports.idl" #include "nsIMsg.idl" /* XXX replaced by QueryInterface for nsIMsgFolder subtypes: 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 { Loading @@ -43,7 +33,6 @@ interface nsIMsgFolder : nsISupports { string GetNameFromPathName(in string pathName); // Accessing sub-folders: boolean HasSubFolders(); unsigned long GetNumSubFolders() ; unsigned long GetNumSubFoldersToDisplay(); Loading @@ -52,7 +41,6 @@ interface nsIMsgFolder : nsISupports { void AddSubFolder(in nsIMsgFolder folder); void RemoveSubFolder(in nsIMsgFolder folder); // Accessing messages: boolean HasMessages(); unsigned long GetNumMessages() ; unsigned long GetNumMessagesToDisplay(); Loading Loading @@ -130,17 +118,16 @@ interface nsIMsgFolder : nsISupports { }; //////////////////////////////////////////////////////////////////////////////// [uuid(27D2DE40-BAF1-11d2-9578-00805F8AC615)] interface nsIMsgLocalMailFolder : nsISupports { attribute string pathName; }; //////////////////////////////////////////////////////////////////////////////// [uuid(FBFEBE79-C1DD-11d2-8A40-0060B0FC04D2)] interface nsIMsgImapMailFolder : nsISupports { };
mailnews/base/public/nsIMsgHost.h +0 −3 Original line number Diff line number Diff line Loading @@ -17,9 +17,6 @@ { 0xB7, 0xED, 0x00, 0x80, 0x5F, 0x05, 0xFF, 0xA5 }} class nsIMsgHost : public nsISupports { private: void operator delete(void *); // NOT TO BE IMPLEMENTED public: static const nsIID& IID() { static nsIID iid = NS_IMSGHOST_IID; Loading
mailnews/base/src/makefile.win +0 −3 Original line number Diff line number Diff line Loading @@ -34,7 +34,6 @@ CPPSRCS= \ nsMsgLocalMailFolder.cpp \ nsMsgImapMailFolder.cpp \ nsMsgGroupRecord.cpp \ nsMsgRDFFolder.cpp \ nsLocalFolderSummarySpec.cpp \ nsMsgLineBuffer.cpp \ nsNewsSet.cpp \ Loading @@ -49,12 +48,10 @@ CPP_OBJS= \ .\$(OBJDIR)\nsMsgLocalMailFolder.obj \ .\$(OBJDIR)\nsMsgImapMailFolder.obj \ .\$(OBJDIR)\nsMsgGroupRecord.obj \ .\$(OBJDIR)\nsMsgRDFFolder.obj \ .\$(OBJDIR)\nsNewsSet.obj \ .\$(OBJDIR)\nsMsgLineBuffer.obj \ $(NULL) EXPORTS= \ nsMsgRFC822Parser.h \ nsUInt32Array.h \ Loading
mailnews/base/src/nsMsgFolder.h +3 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ #include "msgCore.h" #include "nsIMsgFolder.h" /* include the interface we are going to support */ #include "nsRDFResource.h" #include "nsIRDFResourceFactory.h" /* * MsgFolder Loading Loading @@ -303,4 +304,6 @@ protected: }; PR_EXTERN(nsresult) NS_NewRDFMsgFolderResourceFactory(nsIRDFResourceFactory** aResult); #endif
mailnews/base/src/nsMsgLocalMailFolder.cpp +59 −1 Original line number Diff line number Diff line Loading @@ -21,10 +21,12 @@ #include "nsMsgLocalMailFolder.h" #include "nsMsgFolderFlags.h" #include "prprf.h" #include "nsIRDFResourceFactory.h" nsMsgLocalMailFolder::nsMsgLocalMailFolder(const char* uri) :nsMsgFolder(uri) { NS_INIT_REFCNT(); mHaveReadNameFromDB = PR_FALSE; mPathName = nsnull; } Loading Loading @@ -661,3 +663,59 @@ NS_IMETHODIMP nsMsgLocalMailFolder::SetPathName(char * aPathName) return NS_OK; } /** * This class creates resources for message folder URIs. It should be * registered for the "mailnewsfolder:" prefix. */ class nsMsgFolderResourceFactoryImpl : public nsIRDFResourceFactory { public: nsMsgFolderResourceFactoryImpl(void); virtual ~nsMsgFolderResourceFactoryImpl(void); NS_DECL_ISUPPORTS NS_IMETHOD CreateResource(const char* aURI, nsIRDFResource** aResult); }; nsMsgFolderResourceFactoryImpl::nsMsgFolderResourceFactoryImpl(void) { NS_INIT_REFCNT(); } nsMsgFolderResourceFactoryImpl::~nsMsgFolderResourceFactoryImpl(void) { } NS_IMPL_ISUPPORTS(nsMsgFolderResourceFactoryImpl, nsIRDFResourceFactory::IID()); NS_IMETHODIMP nsMsgFolderResourceFactoryImpl::CreateResource(const char* aURI, nsIRDFResource** aResult) { if (! aResult) return NS_ERROR_NULL_POINTER; nsMsgLocalMailFolder *folder = new nsMsgLocalMailFolder(aURI); if (! folder) return NS_ERROR_OUT_OF_MEMORY; folder->QueryInterface(nsIRDFResource::IID(), (void**)aResult); return NS_OK; } nsresult NS_NewRDFMsgFolderResourceFactory(nsIRDFResourceFactory** aResult) { if (! aResult) return NS_ERROR_NULL_POINTER; nsMsgFolderResourceFactoryImpl* factory = new nsMsgFolderResourceFactoryImpl(); if (! factory) return NS_ERROR_OUT_OF_MEMORY; NS_ADDREF(factory); *aResult = factory; return NS_OK; }