зеркало из https://github.com/mozilla/pjs.git
rework nsMessages so they are generic across all server/folder types, so that we can recycle them later
r=putterman for bug #26456
This commit is contained in:
Родитель
5bf2f50796
Коммит
dfa40bb847
|
@ -44,6 +44,7 @@ LLIBS= \
|
|||
$(DIST)\lib\msgbase_s.lib \
|
||||
$(DIST)\lib\msgsearch_s.lib \
|
||||
$(DIST)\lib\timer_s.lib \
|
||||
$(DIST)\lib\rdfutil_s.lib \
|
||||
$(LIBNSPR) \
|
||||
$(NULL)
|
||||
|
||||
|
|
|
@ -27,16 +27,6 @@
|
|||
#include "nsIFactory.h"
|
||||
#include "nsIComponentManager.h"
|
||||
|
||||
#define NS_MSGFOLDEREVENT_CID \
|
||||
{ /* FBFEBE7A-C1DD-11d2-8A40-0060B0FC04D2 */ \
|
||||
0xfbfebe7a, 0xc1dd, 0x11d2, \
|
||||
{0x8a, 0x40, 0x0, 0x60, 0xb0, 0xfc, 0x4, 0xd2}}
|
||||
|
||||
#define NS_MSGGROUPRECORD_CID \
|
||||
{ /* a8f54ee0-d292-11d2-b7f6-00805f05ffa5 */ \
|
||||
0xa8f54ee0, 0xd292, 0x11d2, \
|
||||
{0xb7, 0xf6, 0x00, 0x80, 0x5f, 0x05, 0xff, 0xa5}}
|
||||
|
||||
//
|
||||
// nsMsgFolderDataSource
|
||||
//
|
||||
|
@ -310,6 +300,27 @@
|
|||
{ 0xbb460dff, 0x8bf0, 0x11d3, \
|
||||
{ 0x8a, 0xfe, 0x0, 0x60, 0xb0, 0xfc, 0x4, 0xd2}}
|
||||
|
||||
//
|
||||
// nsMessage
|
||||
//
|
||||
|
||||
/* {44C0D336-796D-42ee-B8B7-6FA3DE372E7E} */
|
||||
#define NS_MESSAGE_CID \
|
||||
{ 0x44c0d336, 0x796d, 0x42ee, \
|
||||
{ 0xb8, 0xb7, 0x6f, 0xa3, 0xde, 0x37, 0x2e, 0x7e } }
|
||||
|
||||
|
||||
#define NS_MESSAGE_MAILBOX_PROGID \
|
||||
NS_RDF_RESOURCE_FACTORY_PROGID_PREFIX "mailbox_message"
|
||||
|
||||
#define NS_MESSAGE_NEWS_PROGID \
|
||||
NS_RDF_RESOURCE_FACTORY_PROGID_PREFIX "news_message"
|
||||
|
||||
#define NS_MESSAGE_IMAP_PROGID \
|
||||
NS_RDF_RESOURCE_FACTORY_PROGID_PREFIX "imap_message"
|
||||
|
||||
|
||||
|
||||
//
|
||||
//nsMsgViewNavigationService
|
||||
//
|
||||
|
|
|
@ -73,6 +73,7 @@
|
|||
#include "nsMsgFilterDelegateFactory.h"
|
||||
#include "nsMessageView.h"
|
||||
#include "nsMsgWindow.h"
|
||||
#include "nsMessage.h"
|
||||
#include "nsMsgViewNavigationService.h"
|
||||
|
||||
#include "nsMsgServiceProvider.h"
|
||||
|
@ -113,6 +114,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgFolderCache)
|
|||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgStatusFeedback)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMessageView,Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMsgWindow,Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMessage)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMsgViewNavigationService,Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMsgServiceProviderService, Init);
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSubscribeDataSource, Init);
|
||||
|
@ -250,6 +252,18 @@ static nsModuleComponentInfo gComponents[] = {
|
|||
NS_MSGWINDOW_PROGID,
|
||||
nsMsgWindowConstructor,
|
||||
},
|
||||
{ "Message Resource", NS_MESSAGE_CID,
|
||||
NS_MESSAGE_MAILBOX_PROGID,
|
||||
nsMessageConstructor,
|
||||
},
|
||||
{ "Message Resource", NS_MESSAGE_CID,
|
||||
NS_MESSAGE_IMAP_PROGID,
|
||||
nsMessageConstructor,
|
||||
},
|
||||
{ "Message Resource", NS_MESSAGE_CID,
|
||||
NS_MESSAGE_NEWS_PROGID,
|
||||
nsMessageConstructor,
|
||||
},
|
||||
{ "Mail/News Message Navigation Service", NS_MSGVIEWNAVIGATIONSERVICE_CID,
|
||||
NS_MSGVIEWNAVIGATIONSERVICE_PROGID,
|
||||
nsMsgViewNavigationServiceConstructor,
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
/* -*- 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.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#include "nsIMsgHdr.idl"
|
||||
interface nsIMsgFolder;
|
||||
|
||||
[scriptable, uuid(5B926BB4-F839-11d2-8A5F-0060B0FC04D2)]
|
||||
interface nsIMessage : nsIMsgHdr {
|
||||
|
||||
readonly attribute nsMsgKey msgKey;
|
||||
attribute nsIMsgFolder msgFolder;
|
||||
|
||||
//I hate to do this, but I really don't want to use a string due to all of the
|
||||
//copying around so I'm using these constants and making them part of the base interface.
|
||||
const unsigned long MailMessage = 0;
|
||||
const unsigned long NewsMessage = 1;
|
||||
readonly attribute unsigned long messageType;
|
||||
|
||||
};
|
||||
|
||||
[scriptable, uuid(82702556-01A2-11d3-8A69-0060B0FC04D2)]
|
||||
interface nsIDBMessage : nsIMessage {
|
||||
|
||||
attribute nsIMsgDBHdr msgDBHdr;
|
||||
};
|
||||
|
|
@ -592,7 +592,13 @@ NS_IMETHODIMP nsMessage::GetMsgKey(nsMsgKey *aMsgKey)
|
|||
|
||||
NS_IMETHODIMP nsMessage::GetMessageType(PRUint32 *aMessageType)
|
||||
{
|
||||
// base classes need to define this
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
NS_ENSURE_ARG_POINTER(aMessageType);
|
||||
*aMessageType = mMessageType;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsMessage::SetMessageType(PRUint32 aMessageType)
|
||||
{
|
||||
mMessageType = aMessageType;
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
/* -*- 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.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
/********************************************************************************************************
|
||||
|
||||
Interface for representing Messenger folders.
|
||||
|
||||
*********************************************************************************************************/
|
||||
|
||||
#ifndef nsMessage_h__
|
||||
#define nsMessage_h__
|
||||
|
||||
#include "msgCore.h"
|
||||
#include "nsIMessage.h" /* include the interface we are going to support */
|
||||
#include "nsRDFResource.h"
|
||||
#include "nsIMsgHdr.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsWeakPtr.h"
|
||||
|
||||
class NS_MSG_BASE nsMessage: public nsRDFResource, public nsIDBMessage
|
||||
{
|
||||
public:
|
||||
nsMessage(void);
|
||||
virtual ~nsMessage(void);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIMESSAGE
|
||||
NS_DECL_NSIDBMESSAGE
|
||||
NS_DECL_NSIMSGHDR
|
||||
|
||||
NS_IMETHOD Init(const char *aURI);
|
||||
|
||||
protected:
|
||||
nsCOMPtr<nsIMsgDBHdr> mMsgHdr;
|
||||
|
||||
private:
|
||||
nsWeakPtr mFolder;
|
||||
nsMsgKey mMsgKey;
|
||||
PRBool mMsgKeyValid;
|
||||
};
|
||||
|
||||
#endif //nsMessage_h__
|
||||
|
|
@ -40,7 +40,6 @@ EXPORTS= nsImapUrl.h \
|
|||
nsImapIncomingServer.h \
|
||||
nsIMAPNamespace.h \
|
||||
nsImapMailFolder.h \
|
||||
nsImapMessage.h \
|
||||
$(NULL)
|
||||
|
||||
################################################################################
|
||||
|
@ -61,7 +60,6 @@ CPP_OBJS= .\$(OBJDIR)\nsImapUrl.obj \
|
|||
.\$(OBJDIR)\nsImapService.obj \
|
||||
.\$(OBJDIR)\nsImapIncomingServer.obj \
|
||||
.\$(OBJDIR)\nsImapMailFolder.obj \
|
||||
.\$(OBJDIR)\nsImapMessage.obj \
|
||||
.\$(OBJDIR)\nsImapMoveCoalescer.obj \
|
||||
.\$(OBJDIR)\nsImapUtils.obj \
|
||||
.\$(OBJDIR)\nsImapUndoTxn.obj \
|
||||
|
|
|
@ -700,7 +700,8 @@ NS_IMETHODIMP nsIMAPHostSessionList::GetOnlineInboxPathForHost(const char *serve
|
|||
ns = host->fNamespaceList->GetDefaultNamespaceOfType(kPersonalNamespace);
|
||||
if (ns)
|
||||
{
|
||||
result.AssignWithConversion(PR_smprintf("%sINBOX",ns->GetPrefix()));
|
||||
result.AssignWithConversion(ns->GetPrefix());
|
||||
result.AppendWithConversion("INBOX");
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
#include "nsImapUtils.h"
|
||||
#include "nsMsgUtils.h"
|
||||
#include "nsIMsgMailSession.h"
|
||||
#include "nsImapMessage.h"
|
||||
#include "nsMsgBaseCID.h"
|
||||
#include "nsMsgLocalCID.h"
|
||||
#include "nsImapUndoTxn.h"
|
||||
|
@ -1159,7 +1158,7 @@ nsImapMailFolder::MarkMessagesRead(nsISupportsArray *messages, PRBool markRead)
|
|||
rv = nsMsgFolder::MarkMessagesRead(messages, markRead);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
nsCString messageIds;
|
||||
nsCAutoString messageIds;
|
||||
nsMsgKeyArray keysToMarkRead;
|
||||
rv = BuildIdsAndKeyArray(messages, messageIds, keysToMarkRead);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
@ -1248,7 +1247,7 @@ nsImapMailFolder::MarkMessagesFlagged(nsISupportsArray *messages, PRBool markFla
|
|||
rv = nsMsgFolder::MarkMessagesFlagged(messages, markFlagged);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
nsCString messageIds;
|
||||
nsCAutoString messageIds;
|
||||
nsMsgKeyArray keysToMarkFlagged;
|
||||
rv = BuildIdsAndKeyArray(messages, messageIds, keysToMarkFlagged);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
@ -1454,9 +1453,9 @@ NS_IMETHODIMP nsImapMailFolder::DeleteMessages(nsISupportsArray *messages,
|
|||
// *** jt - assuming delete is move to the trash folder for now
|
||||
nsCOMPtr<nsIEnumerator> aEnumerator;
|
||||
nsCOMPtr<nsIRDFResource> res;
|
||||
nsCString uri;
|
||||
nsCAutoString uri;
|
||||
PRBool deleteImmediatelyNoTrash = PR_FALSE;
|
||||
nsCString messageIds;
|
||||
nsCAutoString messageIds;
|
||||
nsMsgKeyArray srcKeyArray;
|
||||
|
||||
nsMsgImapDeleteModel deleteModel = nsMsgImapDeleteModels::MoveToTrash;
|
||||
|
@ -1523,21 +1522,23 @@ NS_IMETHODIMP nsImapMailFolder::DeleteMessages(nsISupportsArray *messages,
|
|||
rv = StoreImapFlags(kImapMsgDeletedFlag, PR_TRUE, srcKeyArray);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
if (mDatabase)
|
||||
{
|
||||
if (deleteModel == nsMsgImapDeleteModels::IMAPDelete)
|
||||
if (mDatabase)
|
||||
{
|
||||
MarkMessagesImapDeleted(&srcKeyArray, PR_TRUE, mDatabase);
|
||||
if (deleteModel == nsMsgImapDeleteModels::IMAPDelete)
|
||||
{
|
||||
MarkMessagesImapDeleted(&srcKeyArray, PR_TRUE, mDatabase);
|
||||
}
|
||||
else
|
||||
{
|
||||
mDatabase->DeleteMessages(&srcKeyArray,NULL);
|
||||
NotifyFolderEvent(mDeleteOrMoveMsgCompletedAtom);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mDatabase->DeleteMessages(&srcKeyArray,NULL);
|
||||
NotifyFolderEvent(mDeleteOrMoveMsgCompletedAtom);
|
||||
}
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
// have to move the messages to the trash
|
||||
else
|
||||
{
|
||||
if(trashFolder)
|
||||
|
@ -2069,6 +2070,7 @@ NS_IMETHODIMP nsImapMailFolder::CreateMessageFromMsgDBHdr(nsIMsgDBHdr *msgDBHdr,
|
|||
if(messageResource)
|
||||
{
|
||||
messageResource->SetMsgDBHdr(msgDBHdr);
|
||||
messageResource->SetMessageType(nsIMessage::MailMessage);
|
||||
*message = messageResource;
|
||||
NS_IF_ADDREF(*message);
|
||||
}
|
||||
|
@ -2394,19 +2396,16 @@ nsresult nsImapMailFolder::StoreImapFlags(imapMessageFlagsType flags, PRBool add
|
|||
NS_WITH_SERVICE(nsIImapService, imapService, kCImapService, &rv);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
nsCAutoString msgIds;
|
||||
AllocateUidStringFromKeyArray(keysToFlag, msgIds);
|
||||
|
||||
if (addFlags)
|
||||
{
|
||||
nsCString msgIds;
|
||||
|
||||
AllocateUidStringFromKeyArray(keysToFlag, msgIds);
|
||||
imapService->AddMessageFlags(m_eventQueue, this, this,
|
||||
nsnull, msgIds, flags, PR_TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
nsCString msgIds;
|
||||
|
||||
AllocateUidStringFromKeyArray(keysToFlag, msgIds);
|
||||
imapService->SubtractMessageFlags(m_eventQueue, this, this,
|
||||
nsnull, msgIds, flags,
|
||||
PR_TRUE);
|
||||
|
@ -2743,7 +2742,7 @@ nsImapMailFolder::SetupMsgWriteStream(const char * aNativeString, PRBool addDumm
|
|||
m_tempMessageStream = do_QueryInterface(supports);
|
||||
if (m_tempMessageStream && addDummyEnvelope)
|
||||
{
|
||||
nsCString result;
|
||||
nsCAutoString result;
|
||||
char *ct;
|
||||
PRUint32 writeCount;
|
||||
time_t now = time ((time_t*) 0);
|
||||
|
@ -3887,7 +3886,7 @@ nsImapMailFolder::CopyMessagesWithStream(nsIMsgFolder* srcFolder,
|
|||
m_copyState->m_isCrossServerOp = isCrossServerOp;
|
||||
|
||||
// ** jt - needs to create server to server move/copy undo msg txn
|
||||
nsCString messageIds;
|
||||
nsCAutoString messageIds;
|
||||
nsMsgKeyArray srcKeyArray;
|
||||
nsCOMPtr<nsIUrlListener> urlListener;
|
||||
|
||||
|
@ -3941,7 +3940,7 @@ nsImapMailFolder::CopyMessages(nsIMsgFolder* srcFolder,
|
|||
nsIMsgCopyServiceListener* listener)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
nsCString messageIds;
|
||||
nsCAutoString messageIds;
|
||||
nsMsgKeyArray srcKeyArray;
|
||||
nsCOMPtr<nsIUrlListener> urlListener;
|
||||
nsCOMPtr<nsISupports> srcSupport;
|
||||
|
@ -4032,7 +4031,7 @@ nsImapMailFolder::SetTransactionManager(nsITransactionManager* txnMgr)
|
|||
{
|
||||
nsresult rv = NS_OK;
|
||||
if (txnMgr && !m_transactionManager)
|
||||
m_transactionManager = do_QueryInterface(txnMgr, &rv);
|
||||
m_transactionManager = txnMgr;
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
@ -4045,7 +4044,7 @@ nsImapMailFolder::CopyFileMessage(nsIFileSpec* fileSpec,
|
|||
{
|
||||
nsresult rv = NS_ERROR_NULL_POINTER;
|
||||
nsMsgKey key = 0xffffffff;
|
||||
nsCString messageId;
|
||||
nsCAutoString messageId;
|
||||
nsCOMPtr<nsIUrlListener> urlListener;
|
||||
nsCOMPtr<nsISupports> srcSupport;
|
||||
nsCOMPtr<nsISupportsArray> messages;
|
||||
|
|
|
@ -65,16 +65,6 @@
|
|||
0xca5ffe7e, 0x5f47, 0x11d3, \
|
||||
{0x9a, 0x51, 0x00, 0x40, 0x05, 0x26, 0x30, 0x78}}
|
||||
|
||||
//
|
||||
// nsMailboxMessageResource
|
||||
//
|
||||
#define NS_MAILBOXMESSAGERESOURCE_PROGID \
|
||||
NS_RDF_RESOURCE_FACTORY_PROGID_PREFIX "mailbox_message"
|
||||
#define NS_MAILBOXMESSAGERESOURCE_CID \
|
||||
{ /* b0908e06-dc06-11d2-8a46-0060b0fc04d2*/ \
|
||||
0xb0908e06,0xdc06, 0x11d2, \
|
||||
{0x8a, 0x46, 0x00, 0x60, 0xb0, 0xfc, 0x4, 0xd2} }
|
||||
|
||||
|
||||
//
|
||||
// nsMsgMailboxService
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
#include "nsNoneService.h"
|
||||
#include "nsPop3IncomingServer.h"
|
||||
#include "nsNoIncomingServer.h"
|
||||
#include "nsLocalMessage.h"
|
||||
#include "nsLocalStringBundle.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
|
@ -44,7 +43,6 @@ static NS_DEFINE_CID(kMailboxUrlCID, NS_MAILBOXURL_CID);
|
|||
static NS_DEFINE_CID(kMailboxParserCID, NS_MAILBOXPARSER_CID);
|
||||
static NS_DEFINE_CID(kMailboxServiceCID, NS_MAILBOXSERVICE_CID);
|
||||
static NS_DEFINE_CID(kLocalMailFolderResourceCID, NS_LOCALMAILFOLDERRESOURCE_CID);
|
||||
static NS_DEFINE_CID(kMailboxMessageResourceCID, NS_MAILBOXMESSAGERESOURCE_CID);
|
||||
static NS_DEFINE_CID(kPop3ServiceCID, NS_POP3SERVICE_CID);
|
||||
static NS_DEFINE_CID(kNoneServiceCID, NS_NONESERVICE_CID);
|
||||
static NS_DEFINE_CID(kPop3UrlCID, NS_POP3URL_CID);
|
||||
|
@ -63,7 +61,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsMailboxService)
|
|||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsPop3Service)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsNoneService)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgLocalMailFolder)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsLocalMessage)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsParseMailMessageState)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsPop3IncomingServer)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsNoIncomingServer)
|
||||
|
@ -93,7 +90,6 @@ protected:
|
|||
nsCOMPtr<nsIGenericFactory> mPop3ServiceFactory;
|
||||
nsCOMPtr<nsIGenericFactory> mNoneServiceFactory;
|
||||
nsCOMPtr<nsIGenericFactory> mLocalMailFolderFactory;
|
||||
nsCOMPtr<nsIGenericFactory> mLocalMessageFactory;
|
||||
nsCOMPtr<nsIGenericFactory> mParseMailMsgStateFactory;
|
||||
nsCOMPtr<nsIGenericFactory> mPop3IncomingServerFactory;
|
||||
nsCOMPtr<nsIGenericFactory> mNoIncomingServerFactory;
|
||||
|
@ -135,7 +131,6 @@ void nsMsgLocalModule::Shutdown()
|
|||
mPop3ServiceFactory = null_nsCOMPtr();
|
||||
mNoneServiceFactory = null_nsCOMPtr();
|
||||
mLocalMailFolderFactory = null_nsCOMPtr();
|
||||
mLocalMessageFactory = null_nsCOMPtr();
|
||||
mParseMailMsgStateFactory = null_nsCOMPtr();
|
||||
mPop3IncomingServerFactory = null_nsCOMPtr();
|
||||
mNoIncomingServerFactory = null_nsCOMPtr();
|
||||
|
@ -210,12 +205,6 @@ NS_IMETHODIMP nsMsgLocalModule::GetClassObject(nsIComponentManager *aCompMgr,
|
|||
rv = NS_NewGenericFactory(getter_AddRefs(mLocalMailFolderFactory), &nsMsgLocalMailFolderConstructor);
|
||||
fact = mLocalMailFolderFactory;
|
||||
}
|
||||
else if (aClass.Equals(kMailboxMessageResourceCID))
|
||||
{
|
||||
if (!mLocalMessageFactory)
|
||||
rv = NS_NewGenericFactory(getter_AddRefs(mLocalMessageFactory), &nsLocalMessageConstructor);
|
||||
fact = mLocalMessageFactory;
|
||||
}
|
||||
else if (aClass.Equals(kParseMailMsgStateCID))
|
||||
{
|
||||
if (!mParseMailMsgStateFactory)
|
||||
|
@ -281,8 +270,6 @@ static Components gComponents[] = {
|
|||
NS_NONEPROTOCOLINFO_PROGID },
|
||||
{ "Local Mail Folder Resource Factory", &kLocalMailFolderResourceCID,
|
||||
NS_LOCALMAILFOLDERRESOURCE_PROGID },
|
||||
{ "Local Message Resource Factory", &kMailboxMessageResourceCID,
|
||||
NS_MAILBOXMESSAGERESOURCE_PROGID },
|
||||
{ "Pop3 Incoming Server", &kPop3IncomingServerCID,
|
||||
NS_POP3INCOMINGSERVER_PROGID },
|
||||
{ "No Incoming Server", &kNoIncomingServerCID,
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# This is a list of local files which get copied to the mozilla:dist:mailnews directory
|
||||
#
|
||||
|
||||
nsPop3Protocol.h
|
||||
nsPop3URL.h
|
||||
nsPop3Sink.h
|
||||
nsMailboxUrl.h
|
||||
nsParseMailbox.h
|
||||
nsMailboxProtocol.h
|
||||
nsMailboxService.h
|
||||
nsPop3Service.h
|
||||
nsPop3IncomingServer.h
|
||||
nsLocalMessage.h
|
||||
nsLocalStringBundle.h
|
||||
nsNoneService.h
|
||||
nsNoIncomingServer.h
|
|
@ -37,7 +37,6 @@ EXPORTS= \
|
|||
nsMailboxService.h \
|
||||
nsPop3Service.h \
|
||||
nsPop3IncomingServer.h \
|
||||
nsLocalMessage.h \
|
||||
nsLocalMailFolder.h \
|
||||
nsLocalUtils.h \
|
||||
nsLocalStringBundle.h \
|
||||
|
@ -62,7 +61,6 @@ CPP_OBJS= \
|
|||
.\$(OBJDIR)\nsNoneService.obj \
|
||||
.\$(OBJDIR)\nsLocalMailFolder.obj \
|
||||
.\$(OBJDIR)\nsPop3IncomingServer.obj \
|
||||
.\$(OBJDIR)\nsLocalMessage.obj \
|
||||
.\$(OBJDIR)\nsLocalUtils.obj \
|
||||
.\$(OBJDIR)\nsLocalUndoTxn.obj \
|
||||
.\$(OBJDIR)\nsLocalStringBundle.obj \
|
||||
|
|
|
@ -792,7 +792,8 @@ nsresult nsMsgLocalMailFolder::GetDatabase(nsIMsgWindow *aMsgWindow)
|
|||
mDatabase->AddListener(this);
|
||||
|
||||
// if we have to regenerate the folder, run the parser url.
|
||||
if(folderOpen == NS_MSG_ERROR_FOLDER_SUMMARY_MISSING || folderOpen == NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE)
|
||||
if(folderOpen == NS_MSG_ERROR_FOLDER_SUMMARY_MISSING ||
|
||||
folderOpen == NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE)
|
||||
{
|
||||
if(NS_FAILED(rv = ParseFolder(aMsgWindow, this)))
|
||||
return rv;
|
||||
|
@ -2054,6 +2055,7 @@ nsMsgLocalMailFolder::CreateMessageFromMsgDBHdr(nsIMsgDBHdr *msgDBHdr,
|
|||
//We know from our factory that mailbox message resources are going to be
|
||||
//nsLocalMessages.
|
||||
dbMessage->SetMsgDBHdr(msgDBHdr);
|
||||
dbMessage->SetMessageType(nsIMessage::MailMessage);
|
||||
*message = dbMessage;
|
||||
NS_IF_ADDREF(*message);
|
||||
}
|
||||
|
|
|
@ -42,9 +42,9 @@ LLIBS= \
|
|||
$(DIST)\lib\xpcom.lib \
|
||||
$(DIST)\lib\js32$(VERSION_NUMBER).lib \
|
||||
$(DIST)\lib\msgbsutl.lib \
|
||||
$(DIST)\lib\rdfutil_s.lib \
|
||||
$(DIST)\lib\msgnews_s.lib \
|
||||
$(LIBNSPR) \
|
||||
$(DIST)\lib\rdfutil_s.lib \
|
||||
$(DIST)\lib\timer_s.lib \
|
||||
$(NULL)
|
||||
|
||||
|
|
|
@ -38,17 +38,6 @@
|
|||
{0x88, 0x0d, 0x00, 0x40, 0x05, 0x26, 0x30, 0x78} \
|
||||
}
|
||||
|
||||
//
|
||||
// nsNewsMessage
|
||||
//
|
||||
#define NS_NEWSMESSAGERESOURCE_PROGID \
|
||||
NS_RDF_RESOURCE_FACTORY_PROGID_PREFIX "news_message"
|
||||
#define NS_NEWSMESSAGERESOURCE_CID \
|
||||
{ /* 2dae7f80-f104-11d2-973b-00805f916fd3 */ \
|
||||
0x2dae7f80, 0xf104, 0x11d2, \
|
||||
{0x97, 0x3b, 0x00, 0x80, 0x5f, 0x91, 0x6f, 0xd3} \
|
||||
}
|
||||
|
||||
//
|
||||
// nsNntpIncomingServer
|
||||
//
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include "nsNntpUrl.h"
|
||||
#include "nsNntpService.h"
|
||||
#include "nsNntpIncomingServer.h"
|
||||
#include "nsNewsMessage.h"
|
||||
#include "nsNNTPNewsgroup.h"
|
||||
#include "nsNNTPNewsgroupPost.h"
|
||||
#include "nsNNTPNewsgroupList.h"
|
||||
|
@ -56,7 +55,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsNNTPHost)
|
|||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsNNTPNewsgroup)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsNNTPNewsgroupPost)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsNNTPNewsgroupList)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsNewsMessage)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgNewsFolder)
|
||||
|
||||
static nsModuleComponentInfo components[] =
|
||||
|
@ -103,10 +101,6 @@ static nsModuleComponentInfo components[] =
|
|||
NS_NEWSFOLDERRESOURCE_CID,
|
||||
NS_NEWSFOLDERRESOURCE_PROGID,
|
||||
nsMsgNewsFolderConstructor },
|
||||
{ "News Message Resource",
|
||||
NS_NEWSMESSAGERESOURCE_CID,
|
||||
NS_NEWSMESSAGERESOURCE_PROGID,
|
||||
nsNewsMessageConstructor },
|
||||
{ "NNTP Incoming Servier",
|
||||
NS_NNTPINCOMINGSERVER_CID,
|
||||
NS_NNTPINCOMINGSERVER_PROGID,
|
||||
|
|
|
@ -37,7 +37,6 @@ EXPORTS= nsNNTPProtocol.h \
|
|||
nsNntpService.h \
|
||||
nsNewsFolder.h \
|
||||
nsNntpIncomingServer.h \
|
||||
nsNewsMessage.h \
|
||||
nsNewsUtils.h \
|
||||
nsNNTPHost.h \
|
||||
nsNNTPCategoryContainer.h \
|
||||
|
@ -59,7 +58,6 @@ CPP_OBJS= .\$(OBJDIR)\nsNNTPProtocol.obj \
|
|||
.\$(OBJDIR)\nsNntpService.obj \
|
||||
.\$(OBJDIR)\nsNewsFolder.obj \
|
||||
.\$(OBJDIR)\nsNntpIncomingServer.obj \
|
||||
.\$(OBJDIR)\nsNewsMessage.obj \
|
||||
.\$(OBJDIR)\nsNewsUtils.obj \
|
||||
$(NULL)
|
||||
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
#include "nsFileStream.h"
|
||||
#include "nsMsgDBCID.h"
|
||||
#include "nsMsgNewsCID.h"
|
||||
#include "nsNewsMessage.h"
|
||||
#include "nsMsgUtils.h"
|
||||
#include "nsNewsUtils.h"
|
||||
|
||||
|
@ -986,6 +985,7 @@ NS_IMETHODIMP nsMsgNewsFolder::CreateMessageFromMsgDBHdr(nsIMsgDBHdr *msgDBHdr,
|
|||
nsCOMPtr<nsIDBMessage> messageResource = do_QueryInterface(res);
|
||||
if(messageResource) {
|
||||
messageResource->SetMsgDBHdr(msgDBHdr);
|
||||
messageResource->SetMessageType(nsIMessage::NewsMessage);
|
||||
*message = messageResource;
|
||||
NS_IF_ADDREF(*message);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче