make copying an offline imap message copy the offline msg body while offline r=naving, sr=sspitzer 78809

This commit is contained in:
bienvenu%netscape.com 2001-07-02 21:36:48 +00:00
Родитель bfad3e92cc
Коммит 593ca9dc9e
3 изменённых файлов: 8 добавлений и 14 удалений

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

@ -350,7 +350,9 @@ const nsMsgBiffState nsMsgBiffState_Unknown = 2; // We dunno whether there is ne
boolean shouldStoreMsgOffline(in nsMsgKey msgKey);
boolean hasMsgOffline(in nsMsgKey msgKey);
nsITransport getOfflineFileTransport(in nsMsgKey msgKey, out PRUint32 offset, out PRUint32 size);
nsITransport getOfflineFileTransport(in nsMsgKey msgKey, out PRUint32 offset, out PRUint32 size);
readonly attribute nsIOutputStream offlineStoreOutputStream;
readonly attribute nsIInputStream offlineStoreInputStream;
void DownloadMessagesForOffline(in nsISupportsArray messages, in nsIMsgWindow window);
nsIMsgFolder getChildWithURI(in string uri, in boolean deep, in boolean caseInsensitive);
void downloadAllForOffline(in nsIUrlListener listener, in nsIMsgWindow window);

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

@ -476,18 +476,11 @@ NS_IMETHODIMP nsMsgDBFolder:: DownloadAllForOffline(nsIUrlListener *listener, ns
return NS_OK;
}
nsresult nsMsgDBFolder::GetOfflineStoreInputStream(nsIInputStream **stream)
NS_IMETHODIMP nsMsgDBFolder::GetOfflineStoreInputStream(nsIInputStream **stream)
{
nsresult rv = NS_ERROR_NULL_POINTER;
if (mPath)
{
nsFileSpec pathFileSpec;
mPath->GetFileSpec(&pathFileSpec);
nsCOMPtr<nsISupports> supports;
rv = NS_NewIOFileStream(getter_AddRefs(supports), pathFileSpec, PR_CREATE_FILE, 00700);
if (NS_SUCCEEDED(rv))
rv = supports->QueryInterface(NS_GET_IID(nsIInputStream), (void**)stream);
}
rv = mPath->GetInputStream(stream);
return rv;
}
@ -534,7 +527,7 @@ NS_IMETHODIMP nsMsgDBFolder::GetOfflineFileTransport(nsMsgKey msgKey, PRUint32 *
return rv;
}
nsresult nsMsgDBFolder::GetOfflineStoreOutputStream(nsIOutputStream **outputStream)
NS_IMETHODIMP nsMsgDBFolder::GetOfflineStoreOutputStream(nsIOutputStream **outputStream)
{
nsresult rv = NS_ERROR_NULL_POINTER;
if (mPath)

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

@ -95,7 +95,8 @@ public:
NS_IMETHOD SetRetentionSettings(nsIMsgRetentionSettings *settings);
NS_IMETHOD GetDownloadSettings(nsIMsgDownloadSettings **settings);
NS_IMETHOD SetDownloadSettings(nsIMsgDownloadSettings *settings);
NS_IMETHOD GetOfflineStoreOutputStream(nsIOutputStream **outputStream);
NS_IMETHOD GetOfflineStoreInputStream(nsIInputStream **outputStream);
protected:
virtual nsresult ReadDBFolderInfo(PRBool force);
virtual nsresult FlushToFolderCache();
@ -110,8 +111,6 @@ protected:
nsresult GetFolderCacheElemFromFileSpec(nsIFileSpec *fileSpec, nsIMsgFolderCacheElement **cacheElement);
nsresult NotifyStoreClosedAllHeaders();
virtual nsresult GetOfflineStoreInputStream(nsIInputStream **inputStream);
virtual nsresult GetOfflineStoreOutputStream(nsIOutputStream **outputStream);
// offline support methods.
nsresult StartNewOfflineMessage();
nsresult WriteStartOfNewLocalMessage();