changes for caching imap hierarchy separator, handling no inferiors flag r=jefft,a=chofmann

This commit is contained in:
bienvenu%netscape.com 1999-12-17 03:05:04 +00:00
Родитель dbbe1790f3
Коммит 537e1f7122
7 изменённых файлов: 10 добавлений и 35 удалений

Просмотреть файл

@ -302,6 +302,8 @@ interface nsIMsgImapMailFolder : nsISupports {
void CreateClientSubfolderInfo(in string folderName);
attribute boolean verifiedAsOnlineFolder;
attribute boolean explicitlyVerify;
attribute wchar hierarchyDelimiter;
attribute long boxFlags;
};

Просмотреть файл

@ -125,6 +125,8 @@
#define MSG_FOLDER_FLAG_CREATED_OFFLINE 0x2000000 /* this folder created offline */
#define MSG_FOLDER_FLAG_IMAP_NOINFERIORS 0x4000000 /* this imap folder cannot have children :-( */
#define MSG_FOLDER_PREF_CACHED 0x80000000 /* we've retrieved prefs from db */
#endif

Просмотреть файл

@ -73,7 +73,7 @@ NS_IMETHODIMP nsMsgFolderCacheElement::GetInt32Property(const char *propertyName
if (!propertyName || !aResult || !m_mdbRow)
return NS_ERROR_NULL_POINTER;
char *resultStr;
char *resultStr = nsnull;
GetStringProperty(propertyName, &resultStr);
if (!resultStr)
return NS_ERROR_NULL_POINTER;

Просмотреть файл

@ -32,7 +32,7 @@
#include "nsIMsgAccountManager.h"
#include "nsXPIDLString.h"
#if defined(XP_WIN16) || defined(XP_OS2)
#if defined(XP_OS2)
#define MAX_FILE_LENGTH_WITHOUT_EXTENSION 8
#elif defined(XP_MAC)
#define MAX_FILE_LENGTH_WITHOUT_EXTENSION 26
@ -261,7 +261,7 @@ nsresult nsMsgDBFolder::ReadDBFolderInfo(PRBool force)
result = folderCache->GetCacheElement(uri, PR_FALSE, getter_AddRefs(cacheElement));
if (NS_SUCCEEDED(result) && cacheElement)
{
result = ReadFromFolderCache(cacheElement);
result = ReadFromFolderCacheElem(cacheElement);
}
PR_Free(uri);
}
@ -339,7 +339,7 @@ nsresult nsMsgDBFolder::CreatePlatformLeafNameForDisk(const char *userLeafName,
const int charLimit = MAX_FILE_LENGTH_WITHOUT_EXTENSION; // set on platform specific basis
#if XP_MAC
nsCAutoString illegalChars = ":";
#elif defined(XP_WIN16) || defined(XP_OS2)
#elif defined(XP_OS2)
nsCAutoString illegalChars = "\"/\\[]:;=,|?<>*$. ";
#elif defined(XP_WIN32)
nsCAutoString illegalChars = "\"/\\[]:;=,|?<>*$";
@ -592,7 +592,7 @@ NS_IMETHODIMP nsMsgDBFolder::ManyHeadersToDownload(PRBool *retval)
}
nsresult nsMsgDBFolder::ReadFromFolderCache(nsIMsgFolderCacheElement *element)
NS_IMETHODIMP nsMsgDBFolder::ReadFromFolderCacheElem(nsIMsgFolderCacheElement *element)
{
nsresult rv = NS_OK;
char *charset;

Просмотреть файл

@ -63,6 +63,7 @@ public:
NS_IMETHOD WriteToFolderCache(nsIMsgFolderCache *folderCache);
NS_IMETHOD WriteToFolderCacheElem(nsIMsgFolderCacheElement *element);
NS_IMETHOD ReadFromFolderCacheElem(nsIMsgFolderCacheElement *element);
NS_IMETHOD ManyHeadersToDownload(PRBool *_retval);
NS_IMETHOD MarkAllMessagesRead(void);
@ -73,7 +74,6 @@ protected:
virtual nsresult ReadDBFolderInfo(PRBool force);
virtual nsresult GetDatabase() = 0;
virtual nsresult SendFlagNotifications(nsISupports *item, PRUint32 oldFlags, PRUint32 newFlags);
nsresult ReadFromFolderCache(nsIMsgFolderCacheElement *element);
nsresult OnKeyAddedOrDeleted(nsMsgKey aKeyChanged, nsMsgKey aParentKey , PRInt32 aFlags,
nsIDBChangeListener * aInstigator, PRBool added, PRBool doFlat, PRBool doThread);
nsresult CreatePlatformLeafNameForDisk(const char *userLeafName, nsFileSpec &baseDir, char **resultName);

Просмотреть файл

@ -1488,28 +1488,6 @@ NS_IMETHODIMP nsMsgFolder::GetLocked(PRBool *isLocked)
MSG_Master *GetMaster() {return m_master;}
#endif
#ifdef HAVE_CACHE
NS_IMETHODIMP nsMsgFolder::WriteToCache(XP_File)
{
}
NS_IMETHODIMP nsMsgFolder::ReadFromCache(char *)
{
}
NS_IMETHODIMP nsMsgFolder::IsCachable(PRBool *isCachable)
{
}
NS_IMETHODIMP nsMsgFolder::SkipCacheTokens(char **ppBuf, int numTokens)
{
}
#endif
NS_IMETHODIMP nsMsgFolder::GetRelativePathName(char **pathName)
{
if(!pathName)

Просмотреть файл

@ -202,13 +202,6 @@ public:
NS_IMETHOD ShouldPerformOperationOffline(PRBool *performOffline);
#endif
#ifdef HAVE_CACHE
virtual nsresult WriteToCache(XP_File);
virtual nsresult ReadFromCache(char *);
virtual PRBool IsCachable();
void SkipCacheTokens(char **ppBuf, int numTokens);
#endif
#ifdef DOES_FOLDEROPERATIONS
int DownloadToTempFileAndUpload(MessageCopyInfo *copyInfo, nsMsgKeyArray &keysToSave, MSG_FolderInfo *dstFolder, nsMsgDatabase *sourceDB);
void UpdateMoveCopyStatus(MWContext *context, PRBool isMove, int32 curMsgCount, int32 totMessages);