Bug 464710 - remove RDF datasources nsMsgFolderDataSource.cpp and nsMsgAccountManagerDS.cpp. r=mkmelin,frg rs=bustage-fix
This commit is contained in:
Родитель
32c8afe214
Коммит
4f7aa27edd
|
@ -10,53 +10,6 @@
|
|||
#include "nsIFactory.h"
|
||||
#include "nsIComponentManager.h"
|
||||
|
||||
//
|
||||
// nsMsgFolderDataSource
|
||||
//
|
||||
#define NS_MAILNEWSFOLDERDATASOURCE_CONTRACTID \
|
||||
NS_RDF_DATASOURCE_CONTRACTID_PREFIX "mailnewsfolders"
|
||||
|
||||
#define NS_MAILNEWSFOLDERDATASOURCE_CID \
|
||||
{ /* 2B8ED4A4-F684-11d2-8A5D-0060B0FC04D2 */ \
|
||||
0x2b8ed4a4, \
|
||||
0xf684, \
|
||||
0x11d2, \
|
||||
{0x8a, 0x5d, 0x0, 0x60, 0xb0, 0xfc, 0x4, 0xd2} \
|
||||
}
|
||||
|
||||
#define NS_MAILNEWSUNREADFOLDERDATASOURCE_CONTRACTID \
|
||||
NS_RDF_DATASOURCE_CONTRACTID_PREFIX "mailnewsunreadfolders"
|
||||
|
||||
#define NS_MAILNEWSUNREADFOLDERDATASOURCE_CID \
|
||||
{ /* 39b6b638-5b9d-45aa-b645-77fe56bbddb7 */ \
|
||||
0x39b6b638, \
|
||||
0x5b9d, \
|
||||
0x45aa, \
|
||||
{0xb6, 0x45, 0x77, 0xfe, 0x56, 0xbb, 0xdd, 0xb7} \
|
||||
}
|
||||
|
||||
#define NS_MAILNEWSFAVORITEFOLDERDATASOURCE_CONTRACTID \
|
||||
NS_RDF_DATASOURCE_CONTRACTID_PREFIX "mailnewsfavefolders"
|
||||
|
||||
#define NS_MAILNEWSFAVORITEFOLDERDATASOURCE_CID \
|
||||
{ /* dfdedc28-1b0c-4b7a-bbff-c98808034242 */ \
|
||||
0xdfdedc28, \
|
||||
0x1b0c, \
|
||||
0x4b7a, \
|
||||
{0xbb, 0xff, 0xc9, 0x88, 0x08, 0x03, 0x42, 0x42} \
|
||||
}
|
||||
|
||||
#define NS_MAILNEWSRECENTFOLDERDATASOURCE_CONTRACTID \
|
||||
NS_RDF_DATASOURCE_CONTRACTID_PREFIX "mailnewsrecentfolders"
|
||||
|
||||
#define NS_MAILNEWSRECENTFOLDERDATASOURCE_CID \
|
||||
{ /* 64921b82-24bb-4473-ada9-dc89426129a6 */ \
|
||||
0x64921b82, \
|
||||
0x24bb, \
|
||||
0x4473, \
|
||||
{0xad, 0xa9, 0xdc, 0x89, 0x42, 0x61, 0x29, 0xa6} \
|
||||
}
|
||||
|
||||
//
|
||||
// nsMsgAccountManager
|
||||
//
|
||||
|
|
|
@ -20,7 +20,6 @@ SOURCES += [
|
|||
'nsMessengerContentHandler.cpp',
|
||||
'nsMsgAccount.cpp',
|
||||
'nsMsgAccountManager.cpp',
|
||||
'nsMsgAccountManagerDS.cpp',
|
||||
'nsMsgBiffManager.cpp',
|
||||
'nsMsgContentPolicy.cpp',
|
||||
'nsMsgCopyService.cpp',
|
||||
|
@ -28,7 +27,6 @@ SOURCES += [
|
|||
'nsMsgFolderCache.cpp',
|
||||
'nsMsgFolderCacheElement.cpp',
|
||||
'nsMsgFolderCompactor.cpp',
|
||||
'nsMsgFolderDataSource.cpp',
|
||||
'nsMsgFolderNotificationService.cpp',
|
||||
'nsMsgGroupThread.cpp',
|
||||
'nsMsgGroupView.cpp',
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,140 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef __nsMsgAccountManagerDS_h
|
||||
#define __nsMsgAccountManagerDS_h
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nscore.h"
|
||||
#include "nsError.h"
|
||||
#include "nsIID.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIStringBundle.h"
|
||||
|
||||
#include "nsMsgRDFDataSource.h"
|
||||
#include "nsIMsgAccountManager.h"
|
||||
#include "nsIIncomingServerListener.h"
|
||||
#include "nsIMsgProtocolInfo.h"
|
||||
#include "nsWeakPtr.h"
|
||||
#include "nsIMutableArray.h"
|
||||
#include "nsCOMArray.h"
|
||||
|
||||
/* {3f989ca4-f77a-11d2-969d-006008948010} */
|
||||
#define NS_MSGACCOUNTMANAGERDATASOURCE_CID \
|
||||
{0x3f989ca4, 0xf77a, 0x11d2, \
|
||||
{0x96, 0x9d, 0x00, 0x60, 0x08, 0x94, 0x80, 0x10}}
|
||||
|
||||
class nsMsgAccountManagerDataSource : public nsMsgRDFDataSource,
|
||||
public nsIFolderListener,
|
||||
public nsIIncomingServerListener
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
nsMsgAccountManagerDataSource();
|
||||
virtual nsresult Init() override;
|
||||
|
||||
virtual void Cleanup() override;
|
||||
// service manager shutdown method
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIFOLDERLISTENER
|
||||
NS_DECL_NSIINCOMINGSERVERLISTENER
|
||||
NS_DECL_NSIOBSERVER
|
||||
// RDF datasource methods
|
||||
NS_IMETHOD GetTarget(nsIRDFResource *source,
|
||||
nsIRDFResource *property,
|
||||
bool aTruthValue,
|
||||
nsIRDFNode **_retval) override;
|
||||
NS_IMETHOD GetTargets(nsIRDFResource *source,
|
||||
nsIRDFResource *property,
|
||||
bool aTruthValue,
|
||||
nsISimpleEnumerator **_retval) override;
|
||||
NS_IMETHOD ArcLabelsOut(nsIRDFResource *source,
|
||||
nsISimpleEnumerator **_retval) override;
|
||||
|
||||
NS_IMETHOD HasAssertion(nsIRDFResource *aSource, nsIRDFResource *aProperty,
|
||||
nsIRDFNode *aTarget, bool aTruthValue,
|
||||
bool *_retval) override;
|
||||
NS_IMETHOD HasArcOut(nsIRDFResource *source, nsIRDFResource *aArc,
|
||||
bool *result) override;
|
||||
|
||||
protected:
|
||||
virtual ~nsMsgAccountManagerDataSource();
|
||||
|
||||
nsresult HasAssertionServer(nsIMsgIncomingServer *aServer,
|
||||
nsIRDFResource *aProperty,
|
||||
nsIRDFNode *aTarget,
|
||||
bool aTruthValue, bool *_retval);
|
||||
|
||||
nsresult HasAssertionAccountRoot(nsIRDFResource *aProperty,
|
||||
nsIRDFNode *aTarget,
|
||||
bool aTruthValue, bool *_retval);
|
||||
|
||||
bool isDefaultServer(nsIMsgIncomingServer *aServer);
|
||||
bool supportsFilters(nsIMsgIncomingServer *aServer);
|
||||
bool canGetMessages(nsIMsgIncomingServer *aServer);
|
||||
bool canGetIncomingMessages(nsIMsgIncomingServer *aServer);
|
||||
|
||||
static bool isContainment(nsIRDFResource *aProperty);
|
||||
nsresult getServerForFolderNode(nsIRDFNode *aResource,
|
||||
nsIMsgIncomingServer **aResult);
|
||||
|
||||
nsresult createRootResources(nsIRDFResource *aProperty,
|
||||
nsCOMArray<nsIRDFResource> *aNodeArray);
|
||||
nsresult createSettingsResources(nsIRDFResource *aSource,
|
||||
nsCOMArray<nsIRDFResource> *aNodeArray);
|
||||
nsresult appendGenericSettingsResources(nsIMsgIncomingServer *server,\
|
||||
nsCOMArray<nsIRDFResource> *aNodeArray);
|
||||
nsresult appendGenericSetting(const char *name,
|
||||
nsCOMArray<nsIRDFResource> *aNodeArray);
|
||||
|
||||
static nsIRDFResource* kNC_Name;
|
||||
static nsIRDFResource* kNC_FolderTreeName;
|
||||
static nsIRDFResource* kNC_FolderTreeSimpleName;
|
||||
static nsIRDFResource* kNC_NameSort;
|
||||
static nsIRDFResource* kNC_FolderTreeNameSort;
|
||||
static nsIRDFResource* kNC_PageTag;
|
||||
static nsIRDFResource* kNC_IsDefaultServer;
|
||||
static nsIRDFResource* kNC_SupportsFilters;
|
||||
static nsIRDFResource* kNC_CanGetMessages;
|
||||
static nsIRDFResource* kNC_CanGetIncomingMessages;
|
||||
|
||||
static nsIRDFResource* kNC_Child;
|
||||
static nsIRDFResource* kNC_AccountRoot;
|
||||
|
||||
static nsIRDFResource* kNC_Account;
|
||||
static nsIRDFResource* kNC_Server;
|
||||
static nsIRDFResource* kNC_Identity;
|
||||
static nsIRDFResource* kNC_Settings;
|
||||
static nsIRDFResource* kNC_Junk;
|
||||
|
||||
static nsIRDFResource* kNC_PageTitleMain;
|
||||
static nsIRDFResource* kNC_PageTitleServer;
|
||||
static nsIRDFResource* kNC_PageTitleCopies;
|
||||
static nsIRDFResource* kNC_PageTitleSynchronization;
|
||||
static nsIRDFResource* kNC_PageTitleDiskSpace;
|
||||
static nsIRDFResource* kNC_PageTitleAddressing;
|
||||
static nsIRDFResource* kNC_PageTitleSMTP;
|
||||
static nsIRDFResource* kNC_PageTitleJunk;
|
||||
|
||||
static nsIRDFLiteral* kTrueLiteral;
|
||||
|
||||
static nsrefcnt gAccountManagerResourceRefCnt;
|
||||
|
||||
static nsresult getAccountArcs(nsIMutableArray **aResult);
|
||||
static nsresult getAccountRootArcs(nsIMutableArray **aResult);
|
||||
|
||||
private:
|
||||
nsresult serverHasIdentities(nsIMsgIncomingServer *aServer, bool *aResult);
|
||||
nsresult getStringBundle();
|
||||
|
||||
static nsCOMPtr<nsIMutableArray> mAccountArcsOut;
|
||||
static nsCOMPtr<nsIMutableArray> mAccountRootArcsOut;
|
||||
nsWeakPtr mAccountManager;
|
||||
nsCOMPtr<nsIStringBundle> mStringBundle;
|
||||
};
|
||||
|
||||
#endif /* __nsMsgAccountManagerDS_h */
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,348 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsIRDFDataSource.h"
|
||||
#include "nsIRDFService.h"
|
||||
|
||||
#include "nsIFolderListener.h"
|
||||
#include "nsMsgRDFDataSource.h"
|
||||
|
||||
#include "nsITransactionManager.h"
|
||||
#include "nsCOMArray.h"
|
||||
#include "nsIMutableArray.h"
|
||||
#include "nsString.h"
|
||||
|
||||
#if 0
|
||||
// Disable deprecation warnings generated by nsISupportsArray and associated
|
||||
// classes.
|
||||
#if defined(__GNUC__)
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#elif defined(_MSC_VER)
|
||||
#pragma warning (disable : 4996)
|
||||
#endif
|
||||
#include "nsISupportsArray.h"
|
||||
#endif
|
||||
/**
|
||||
* The mail data source.
|
||||
*/
|
||||
class nsMsgFolderDataSource : public nsMsgRDFDataSource,
|
||||
public nsIFolderListener
|
||||
{
|
||||
public:
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIFOLDERLISTENER
|
||||
|
||||
nsMsgFolderDataSource(void);
|
||||
virtual nsresult Init() override;
|
||||
virtual void Cleanup() override;
|
||||
|
||||
// nsIRDFDataSource methods
|
||||
NS_IMETHOD GetURI(nsACString& uri) override;
|
||||
|
||||
NS_IMETHOD GetSource(nsIRDFResource* property,
|
||||
nsIRDFNode* target,
|
||||
bool tv,
|
||||
nsIRDFResource** source /* out */) override;
|
||||
|
||||
NS_IMETHOD GetTarget(nsIRDFResource* source,
|
||||
nsIRDFResource* property,
|
||||
bool tv,
|
||||
nsIRDFNode** target) override;
|
||||
|
||||
NS_IMETHOD GetSources(nsIRDFResource* property,
|
||||
nsIRDFNode* target,
|
||||
bool tv,
|
||||
nsISimpleEnumerator** sources) override;
|
||||
|
||||
NS_IMETHOD GetTargets(nsIRDFResource* source,
|
||||
nsIRDFResource* property,
|
||||
bool tv,
|
||||
nsISimpleEnumerator** targets) override;
|
||||
|
||||
NS_IMETHOD Assert(nsIRDFResource* source,
|
||||
nsIRDFResource* property,
|
||||
nsIRDFNode* target,
|
||||
bool tv) override;
|
||||
|
||||
NS_IMETHOD Unassert(nsIRDFResource* source,
|
||||
nsIRDFResource* property,
|
||||
nsIRDFNode* target) override;
|
||||
|
||||
NS_IMETHOD HasAssertion(nsIRDFResource* source,
|
||||
nsIRDFResource* property,
|
||||
nsIRDFNode* target,
|
||||
bool tv,
|
||||
bool* hasAssertion) override;
|
||||
|
||||
NS_IMETHOD HasArcOut(nsIRDFResource *aSource, nsIRDFResource *aArc,
|
||||
bool *result) override;
|
||||
|
||||
NS_IMETHOD ArcLabelsIn(nsIRDFNode* node,
|
||||
nsISimpleEnumerator** labels) override;
|
||||
|
||||
NS_IMETHOD ArcLabelsOut(nsIRDFResource* source,
|
||||
nsISimpleEnumerator** labels) override;
|
||||
|
||||
NS_IMETHOD GetAllResources(nsISimpleEnumerator** aResult) override;
|
||||
|
||||
NS_IMETHOD GetAllCmds(nsIRDFResource* source,
|
||||
nsISimpleEnumerator/*<nsIRDFResource>*/** commands
|
||||
) override;
|
||||
|
||||
NS_IMETHOD IsCommandEnabled(nsISupports/*nsISupportsArray<nsIRDFResource>*/* aSources,
|
||||
nsIRDFResource* aCommand,
|
||||
nsISupports/*nsISupportsArray<nsIRDFResource>*/* aArguments,
|
||||
bool* aResult) override;
|
||||
|
||||
NS_IMETHOD DoCommand(nsISupports/*nsISupportsArray<nsIRDFResource>*/* aSources,
|
||||
nsIRDFResource* aCommand,
|
||||
nsISupports/*nsISupportsArray<nsIRDFResource>*/* aArguments) override;
|
||||
protected:
|
||||
virtual ~nsMsgFolderDataSource();
|
||||
|
||||
nsresult GetSenderName(nsAutoString& sender, nsAutoString *senderUserName);
|
||||
|
||||
nsresult createFolderNode(nsIMsgFolder *folder, nsIRDFResource* property,
|
||||
nsIRDFNode **target);
|
||||
nsresult createFolderNameNode(nsIMsgFolder *folder, nsIRDFNode **target, bool sort);
|
||||
nsresult createFolderOpenNode(nsIMsgFolder *folder,nsIRDFNode **target);
|
||||
nsresult createFolderTreeNameNode(nsIMsgFolder *folder, nsIRDFNode **target);
|
||||
nsresult createFolderTreeSimpleNameNode(nsIMsgFolder *folder, nsIRDFNode **target);
|
||||
nsresult createFolderSpecialNode(nsIMsgFolder *folder, nsIRDFNode **target);
|
||||
nsresult createFolderServerTypeNode(nsIMsgFolder *folder,
|
||||
nsIRDFNode **target);
|
||||
nsresult createServerIsDeferredNode(nsIMsgFolder* folder,
|
||||
nsIRDFNode **target);
|
||||
nsresult createFolderCanCreateFoldersOnServerNode(nsIMsgFolder *folder,
|
||||
nsIRDFNode **target);
|
||||
nsresult createFolderCanFileMessagesOnServerNode(nsIMsgFolder *folder,
|
||||
nsIRDFNode **target);
|
||||
nsresult createFolderIsServerNode(nsIMsgFolder *folder,
|
||||
nsIRDFNode **target);
|
||||
nsresult createFolderIsSecureNode(nsIMsgFolder *folder,
|
||||
nsIRDFNode **target);
|
||||
nsresult createFolderCanSubscribeNode(nsIMsgFolder *folder,
|
||||
nsIRDFNode **target);
|
||||
nsresult createFolderSupportsOfflineNode(nsIMsgFolder *folder,
|
||||
nsIRDFNode **target);
|
||||
nsresult createFolderCanFileMessagesNode(nsIMsgFolder *folder,
|
||||
nsIRDFNode **target);
|
||||
nsresult createFolderCanCreateSubfoldersNode(nsIMsgFolder *folder,
|
||||
nsIRDFNode **target);
|
||||
nsresult createFolderCanRenameNode(nsIMsgFolder *folder,
|
||||
nsIRDFNode **target);
|
||||
nsresult createFolderCanCompactNode(nsIMsgFolder *folder,
|
||||
nsIRDFNode **target);
|
||||
nsresult createTotalMessagesNode(nsIMsgFolder *folder, nsIRDFNode **target);
|
||||
nsresult createUnreadMessagesNode(nsIMsgFolder *folder, nsIRDFNode **target);
|
||||
nsresult createFolderSizeNode(nsIMsgFolder *folder, nsIRDFNode **target);
|
||||
nsresult createCharsetNode(nsIMsgFolder *folder, nsIRDFNode **target);
|
||||
nsresult createBiffStateNodeFromFolder(nsIMsgFolder *folder, nsIRDFNode **target);
|
||||
nsresult createBiffStateNodeFromFlag(uint32_t flag, nsIRDFNode **target);
|
||||
nsresult createHasUnreadMessagesNode(nsIMsgFolder *folder, bool aIncludeSubfolders, nsIRDFNode **target);
|
||||
nsresult createNewMessagesNode(nsIMsgFolder *folder, nsIRDFNode **target);
|
||||
nsresult createFolderNoSelectNode(nsIMsgFolder *folder,
|
||||
nsIRDFNode **target);
|
||||
nsresult createFolderVirtualNode(nsIMsgFolder *folder,
|
||||
nsIRDFNode **target);
|
||||
nsresult createInVFEditSearchScopeNode(nsIMsgFolder* folder,
|
||||
nsIRDFNode **target);
|
||||
nsresult createFolderImapSharedNode(nsIMsgFolder *folder,
|
||||
nsIRDFNode **target);
|
||||
nsresult createFolderSynchronizeNode(nsIMsgFolder *folder, nsIRDFNode **target);
|
||||
nsresult createFolderSyncDisabledNode(nsIMsgFolder *folder, nsIRDFNode **target);
|
||||
nsresult createCanSearchMessages(nsIMsgFolder *folder,
|
||||
nsIRDFNode **target);
|
||||
nsresult createFolderChildNode(nsIMsgFolder *folder, nsIRDFNode **target);
|
||||
|
||||
nsresult getFolderArcLabelsOut(nsCOMArray<nsIRDFResource> &aArcs);
|
||||
|
||||
#if 0
|
||||
nsresult DoDeleteFromFolder(nsIMsgFolder *folder,
|
||||
nsISupportsArray *arguments, nsIMsgWindow *msgWindow, bool reallyDelete);
|
||||
|
||||
nsresult DoCopyToFolder(nsIMsgFolder *dstFolder, nsISupportsArray *arguments,
|
||||
nsIMsgWindow *msgWindow, bool isMove);
|
||||
|
||||
nsresult DoFolderCopyToFolder(nsIMsgFolder *dstFolder, nsISupportsArray *arguments,
|
||||
nsIMsgWindow *msgWindow, bool isMoveFolder);
|
||||
|
||||
nsresult DoNewFolder(nsIMsgFolder *folder, nsISupportsArray *arguments,
|
||||
nsIMsgWindow *window);
|
||||
#endif
|
||||
|
||||
nsresult DoFolderAssert(nsIMsgFolder *folder, nsIRDFResource *property, nsIRDFNode *target);
|
||||
nsresult DoFolderUnassert(nsIMsgFolder *folder, nsIRDFResource *property, nsIRDFNode *target);
|
||||
|
||||
nsresult DoFolderHasAssertion(nsIMsgFolder *folder, nsIRDFResource *property, nsIRDFNode *target,
|
||||
bool tv, bool *hasAssertion);
|
||||
|
||||
nsresult GetBiffStateString(uint32_t biffState, nsAutoCString & biffStateStr);
|
||||
|
||||
nsresult CreateUnreadMessagesNameString(int32_t unreadMessages, nsAutoString &nameString);
|
||||
nsresult CreateArcsOutEnumerator();
|
||||
|
||||
virtual nsresult OnItemAddedOrRemoved(nsIMsgFolder *parentItem, nsISupports *item, bool added);
|
||||
|
||||
nsresult OnUnreadMessagePropertyChanged(nsIRDFResource *folderResource, int32_t oldValue, int32_t newValue);
|
||||
nsresult OnTotalMessagePropertyChanged(nsIRDFResource *folderResource, int32_t oldValue, int32_t newValue);
|
||||
nsresult OnFolderSizePropertyChanged(nsIRDFResource *folderResource, int64_t oldValue, int64_t newValue);
|
||||
nsresult OnFolderSortOrderPropertyChanged(nsIRDFResource *folderResource, int32_t oldValue, int32_t newValue);
|
||||
nsresult NotifyFolderTreeNameChanged(nsIMsgFolder *folder, nsIRDFResource *folderResource, int32_t aUnreadMessages);
|
||||
nsresult NotifyFolderTreeSimpleNameChanged(nsIMsgFolder *folder, nsIRDFResource *folderResource);
|
||||
nsresult NotifyFolderNameChanged(nsIMsgFolder *folder, nsIRDFResource *folderResource);
|
||||
nsresult NotifyAncestors(nsIMsgFolder *aFolder, nsIRDFResource *aPropertyResource, nsIRDFNode *aNode);
|
||||
nsresult GetNumMessagesNode(int32_t numMessages, nsIRDFNode **node);
|
||||
nsresult GetFolderSizeNode(int64_t folderSize, nsIRDFNode **node);
|
||||
nsresult CreateLiterals(nsIRDFService *rdf);
|
||||
|
||||
virtual nsresult GetFolderDisplayName(nsIMsgFolder *folder, nsString& folderName);
|
||||
|
||||
static nsIRDFResource* kNC_Child;
|
||||
static nsIRDFResource* kNC_Folder;
|
||||
static nsIRDFResource* kNC_Name;
|
||||
static nsIRDFResource* kNC_Open;
|
||||
static nsIRDFResource* kNC_FolderTreeName;
|
||||
static nsIRDFResource* kNC_FolderTreeSimpleName;
|
||||
static nsIRDFResource* kNC_NameSort;
|
||||
static nsIRDFResource* kNC_FolderTreeNameSort;
|
||||
static nsIRDFResource* kNC_Columns;
|
||||
static nsIRDFResource* kNC_MSGFolderRoot;
|
||||
static nsIRDFResource* kNC_SpecialFolder;
|
||||
static nsIRDFResource* kNC_ServerType;
|
||||
static nsIRDFResource* kNC_IsDeferred;
|
||||
static nsIRDFResource* kNC_CanCreateFoldersOnServer;
|
||||
static nsIRDFResource* kNC_CanFileMessagesOnServer;
|
||||
static nsIRDFResource* kNC_IsServer;
|
||||
static nsIRDFResource* kNC_IsSecure;
|
||||
static nsIRDFResource* kNC_CanSubscribe;
|
||||
static nsIRDFResource* kNC_SupportsOffline;
|
||||
static nsIRDFResource* kNC_CanFileMessages;
|
||||
static nsIRDFResource* kNC_CanCreateSubfolders;
|
||||
static nsIRDFResource* kNC_CanRename;
|
||||
static nsIRDFResource* kNC_CanCompact;
|
||||
static nsIRDFResource* kNC_TotalMessages;
|
||||
static nsIRDFResource* kNC_TotalUnreadMessages;
|
||||
static nsIRDFResource* kNC_FolderSize;
|
||||
static nsIRDFResource* kNC_Charset;
|
||||
static nsIRDFResource* kNC_BiffState;
|
||||
static nsIRDFResource* kNC_HasUnreadMessages;
|
||||
static nsIRDFResource* kNC_NewMessages;
|
||||
static nsIRDFResource* kNC_SubfoldersHaveUnreadMessages;
|
||||
static nsIRDFResource* kNC_NoSelect;
|
||||
static nsIRDFResource* kNC_ImapShared;
|
||||
static nsIRDFResource* kNC_Synchronize;
|
||||
static nsIRDFResource* kNC_SyncDisabled;
|
||||
static nsIRDFResource* kNC_CanSearchMessages;
|
||||
static nsIRDFResource* kNC_VirtualFolder;
|
||||
static nsIRDFResource* kNC_InVFEditSearchScope;
|
||||
static nsIRDFResource* kNC_UnreadFolders; // maybe should be in nsMsgFlatFolderDataSource?
|
||||
static nsIRDFResource* kNC_FavoriteFolders; // maybe should be in nsMsgFlatFolderDataSource?
|
||||
static nsIRDFResource* kNC_RecentFolders; // maybe should be in nsMsgFlatFolderDataSource?
|
||||
// commands
|
||||
static nsIRDFResource* kNC_Delete;
|
||||
static nsIRDFResource* kNC_ReallyDelete;
|
||||
static nsIRDFResource* kNC_NewFolder;
|
||||
static nsIRDFResource* kNC_GetNewMessages;
|
||||
static nsIRDFResource* kNC_Copy;
|
||||
static nsIRDFResource* kNC_Move;
|
||||
static nsIRDFResource* kNC_CopyFolder;
|
||||
static nsIRDFResource* kNC_MoveFolder;
|
||||
static nsIRDFResource* kNC_MarkAllMessagesRead;
|
||||
static nsIRDFResource* kNC_Compact;
|
||||
static nsIRDFResource* kNC_CompactAll;
|
||||
static nsIRDFResource* kNC_Rename;
|
||||
static nsIRDFResource* kNC_EmptyTrash;
|
||||
static nsIRDFResource* kNC_DownloadFlagged;
|
||||
//Cached literals
|
||||
nsCOMPtr<nsIRDFNode> kTrueLiteral;
|
||||
nsCOMPtr<nsIRDFNode> kFalseLiteral;
|
||||
|
||||
static nsrefcnt gFolderResourceRefCnt;
|
||||
|
||||
nsCOMArray<nsIRDFResource> kFolderArcsOutArray;
|
||||
|
||||
};
|
||||
|
||||
|
||||
class nsMsgFlatFolderDataSource : public nsMsgFolderDataSource
|
||||
{
|
||||
public:
|
||||
// constructor could take a filter to filter out folders.
|
||||
nsMsgFlatFolderDataSource();
|
||||
virtual ~nsMsgFlatFolderDataSource();
|
||||
virtual nsresult Init() override;
|
||||
virtual void Cleanup() override;
|
||||
|
||||
NS_IMETHOD GetURI(nsACString& uri) override;
|
||||
NS_IMETHOD GetTargets(nsIRDFResource* source,
|
||||
nsIRDFResource* property,
|
||||
bool tv,
|
||||
nsISimpleEnumerator** targets) override;
|
||||
NS_IMETHOD GetTarget(nsIRDFResource* source,
|
||||
nsIRDFResource* property,
|
||||
bool tv,
|
||||
nsIRDFNode** target) override;
|
||||
|
||||
NS_IMETHOD HasAssertion(nsIRDFResource* source,
|
||||
nsIRDFResource* property,
|
||||
nsIRDFNode* target,
|
||||
bool tv,
|
||||
bool* hasAssertion) override;
|
||||
protected:
|
||||
virtual nsresult GetFolderDisplayName(nsIMsgFolder *folder,
|
||||
nsString& folderName) override;
|
||||
virtual void EnsureFolders();
|
||||
virtual bool WantsThisFolder(nsIMsgFolder *folder);
|
||||
bool ResourceIsOurRoot(nsIRDFResource *resource);
|
||||
virtual nsresult OnItemAddedOrRemoved(nsIMsgFolder *parentItem, nsISupports *item,
|
||||
bool added) override;
|
||||
|
||||
nsCOMArray <nsIMsgFolder> m_folders;
|
||||
nsCOMPtr<nsIRDFResource> m_rootResource; // the resource for our root
|
||||
nsCString m_dsName;
|
||||
bool m_builtFolders;
|
||||
};
|
||||
|
||||
|
||||
class nsMsgUnreadFoldersDataSource : public nsMsgFlatFolderDataSource
|
||||
{
|
||||
public:
|
||||
nsMsgUnreadFoldersDataSource() {m_dsName = "mailnewsunreadfolders";}
|
||||
virtual ~nsMsgUnreadFoldersDataSource() {}
|
||||
virtual nsresult NotifyPropertyChanged(nsIRDFResource *resource,
|
||||
nsIRDFResource *propertyResource, nsIRDFNode *newNode,
|
||||
nsIRDFNode *oldNode = nullptr) override;
|
||||
protected:
|
||||
virtual bool WantsThisFolder(nsIMsgFolder *folder) override;
|
||||
};
|
||||
|
||||
class nsMsgFavoriteFoldersDataSource : public nsMsgFlatFolderDataSource
|
||||
{
|
||||
public:
|
||||
nsMsgFavoriteFoldersDataSource() {m_dsName = "mailnewsfavefolders";}
|
||||
virtual ~nsMsgFavoriteFoldersDataSource() {}
|
||||
protected:
|
||||
virtual bool WantsThisFolder(nsIMsgFolder *folder) override;
|
||||
};
|
||||
|
||||
class nsMsgRecentFoldersDataSource : public nsMsgFlatFolderDataSource
|
||||
{
|
||||
public:
|
||||
nsMsgRecentFoldersDataSource() {m_dsName = "mailnewsrecentfolders";
|
||||
m_cutOffDate = 0; m_maxNumFolders = 15;}
|
||||
virtual ~nsMsgRecentFoldersDataSource() {}
|
||||
virtual nsresult NotifyPropertyChanged(nsIRDFResource *resource,
|
||||
nsIRDFResource *property, nsIRDFNode *newNode,
|
||||
nsIRDFNode *oldNode) override;
|
||||
NS_IMETHOD OnItemAdded(nsIMsgFolder *parentItem, nsISupports *item) override;
|
||||
virtual void Cleanup() override;
|
||||
protected:
|
||||
virtual void EnsureFolders() override;
|
||||
uint32_t m_cutOffDate;
|
||||
uint32_t m_maxNumFolders;
|
||||
};
|
|
@ -59,8 +59,6 @@
|
|||
#include "nsMsgAccountManager.h"
|
||||
#include "nsMsgIdentity.h"
|
||||
#include "nsMsgIncomingServer.h"
|
||||
#include "nsMsgFolderDataSource.h"
|
||||
#include "nsMsgAccountManagerDS.h"
|
||||
#include "nsMsgBiffManager.h"
|
||||
#include "nsMsgPurgeService.h"
|
||||
#include "nsStatusBarBiffManager.h"
|
||||
|
@ -329,11 +327,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsMessenger)
|
|||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMsgAccountManager, Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgAccount)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgIdentity)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMsgFolderDataSource, Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMsgUnreadFoldersDataSource, Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMsgFavoriteFoldersDataSource, Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMsgRecentFoldersDataSource, Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMsgAccountManagerDataSource, Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgSearchSession)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgSearchTerm)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgSearchValidityManager)
|
||||
|
@ -391,11 +384,6 @@ NS_DEFINE_NAMED_CID(NS_MESSENGER_CID);
|
|||
NS_DEFINE_NAMED_CID(NS_MSGACCOUNTMANAGER_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_MSGACCOUNT_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_MSGIDENTITY_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_MAILNEWSFOLDERDATASOURCE_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_MAILNEWSUNREADFOLDERDATASOURCE_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_MAILNEWSFAVORITEFOLDERDATASOURCE_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_MAILNEWSRECENTFOLDERDATASOURCE_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_MSGACCOUNTMANAGERDATASOURCE_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_MSGFILTERSERVICE_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_MSGSEARCHSESSION_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_MSGSEARCHTERM_CID);
|
||||
|
@ -862,11 +850,6 @@ const mozilla::Module::CIDEntry kMailNewsCIDs[] = {
|
|||
{ &kNS_MSGACCOUNTMANAGER_CID, false, NULL, nsMsgAccountManagerConstructor},
|
||||
{ &kNS_MSGACCOUNT_CID, false, NULL, nsMsgAccountConstructor},
|
||||
{ &kNS_MSGIDENTITY_CID, false, NULL, nsMsgIdentityConstructor},
|
||||
{ &kNS_MAILNEWSFOLDERDATASOURCE_CID, false, NULL, nsMsgFolderDataSourceConstructor},
|
||||
{ &kNS_MAILNEWSUNREADFOLDERDATASOURCE_CID, false, NULL, nsMsgUnreadFoldersDataSourceConstructor},
|
||||
{ &kNS_MAILNEWSFAVORITEFOLDERDATASOURCE_CID, false, NULL, nsMsgFavoriteFoldersDataSourceConstructor},
|
||||
{ &kNS_MAILNEWSRECENTFOLDERDATASOURCE_CID, false, NULL, nsMsgRecentFoldersDataSourceConstructor},
|
||||
{ &kNS_MSGACCOUNTMANAGERDATASOURCE_CID, false, NULL, nsMsgAccountManagerDataSourceConstructor},
|
||||
{ &kNS_MSGFILTERSERVICE_CID, false, NULL, nsMsgFilterServiceConstructor},
|
||||
{ &kNS_MSGSEARCHSESSION_CID, false, NULL, nsMsgSearchSessionConstructor},
|
||||
{ &kNS_MSGSEARCHTERM_CID, false, NULL, nsMsgSearchTermConstructor},
|
||||
|
@ -1077,11 +1060,6 @@ const mozilla::Module::ContractIDEntry kMailNewsContracts[] = {
|
|||
{ NS_MSGACCOUNTMANAGER_CONTRACTID, &kNS_MSGACCOUNTMANAGER_CID },
|
||||
{ NS_MSGACCOUNT_CONTRACTID, &kNS_MSGACCOUNT_CID },
|
||||
{ NS_MSGIDENTITY_CONTRACTID, &kNS_MSGIDENTITY_CID },
|
||||
{ NS_MAILNEWSFOLDERDATASOURCE_CONTRACTID, &kNS_MAILNEWSFOLDERDATASOURCE_CID },
|
||||
{ NS_MAILNEWSUNREADFOLDERDATASOURCE_CONTRACTID, &kNS_MAILNEWSUNREADFOLDERDATASOURCE_CID },
|
||||
{ NS_MAILNEWSFAVORITEFOLDERDATASOURCE_CONTRACTID, &kNS_MAILNEWSFAVORITEFOLDERDATASOURCE_CID },
|
||||
{ NS_MAILNEWSRECENTFOLDERDATASOURCE_CONTRACTID, &kNS_MAILNEWSRECENTFOLDERDATASOURCE_CID },
|
||||
{ NS_RDF_DATASOURCE_CONTRACTID_PREFIX "msgaccountmanager", &kNS_MSGACCOUNTMANAGERDATASOURCE_CID },
|
||||
{ NS_MSGFILTERSERVICE_CONTRACTID, &kNS_MSGFILTERSERVICE_CID },
|
||||
{ NS_MSGSEARCHSESSION_CONTRACTID, &kNS_MSGSEARCHSESSION_CID },
|
||||
{ NS_MSGSEARCHTERM_CONTRACTID, &kNS_MSGSEARCHTERM_CID },
|
||||
|
|
Загрузка…
Ссылка в новой задаче