зеркало из https://github.com/mozilla/pjs.git
support SaveMessageToDisk (stub right now)
replace nsAutoCString with more efficient nsAutoString
This commit is contained in:
Родитель
abdfa488d7
Коммит
3bd71496f6
|
@ -144,12 +144,12 @@ nsMailboxService::CopyMessage(const char * aSrcMailboxURI,
|
||||||
{
|
{
|
||||||
// okay now generate the url string
|
// okay now generate the url string
|
||||||
char * urlSpec = nsnull;
|
char * urlSpec = nsnull;
|
||||||
nsString folderURI;
|
nsString folderURI (eOneByte);
|
||||||
nsFileSpec folderPath ("");
|
nsFileSpec folderPath ("");
|
||||||
nsMsgKey msgKey;
|
nsMsgKey msgKey;
|
||||||
|
|
||||||
nsParseLocalMessageURI(aSrcMailboxURI, folderURI, &msgKey);
|
nsParseLocalMessageURI(aSrcMailboxURI, folderURI, &msgKey);
|
||||||
nsLocalURI2Path(kMailboxMessageRootURI, (const char *) nsAutoCString(folderURI), folderPath);
|
nsLocalURI2Path(kMailboxMessageRootURI, folderURI.GetBuffer(), folderPath);
|
||||||
|
|
||||||
nsFilePath filePath(folderPath); // convert to file url representation...
|
nsFilePath filePath(folderPath); // convert to file url representation...
|
||||||
urlSpec = PR_smprintf("mailboxMessage://%s?number=%d", (const char *) filePath, msgKey);
|
urlSpec = PR_smprintf("mailboxMessage://%s?number=%d", (const char *) filePath, msgKey);
|
||||||
|
@ -205,12 +205,12 @@ nsresult nsMailboxService::DisplayMessage(const char* aMessageURI,
|
||||||
char * urlSpec = nsnull;
|
char * urlSpec = nsnull;
|
||||||
|
|
||||||
// decompose the uri into a full path and message id...
|
// decompose the uri into a full path and message id...
|
||||||
nsString folderURI;
|
nsAutoString folderURI (eOneByte);
|
||||||
nsFileSpec folderSpec;
|
nsFileSpec folderSpec;
|
||||||
nsMsgKey msgIndex;
|
nsMsgKey msgIndex;
|
||||||
|
|
||||||
nsParseLocalMessageURI(aMessageURI, folderURI, &msgIndex);
|
nsParseLocalMessageURI(aMessageURI, folderURI, &msgIndex);
|
||||||
nsLocalURI2Path(kMailboxMessageRootURI, (const char *) nsAutoCString(folderURI), folderSpec);
|
nsLocalURI2Path(kMailboxMessageRootURI, folderURI.GetBuffer(), folderSpec);
|
||||||
|
|
||||||
nsFilePath filePath(folderSpec); // convert to file url representation...
|
nsFilePath filePath(folderSpec); // convert to file url representation...
|
||||||
urlSpec = PR_smprintf("mailboxMessage://%s?number=%d", (const char *) filePath, msgIndex);
|
urlSpec = PR_smprintf("mailboxMessage://%s?number=%d", (const char *) filePath, msgIndex);
|
||||||
|
@ -286,3 +286,13 @@ nsresult nsMailboxService::DisplayMessageNumber(const char *url,
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NS_IMETHODIMP nsMailboxService::SaveMessageToDisk(const char *aMessageURI, nsIFileSpec *aFile,
|
||||||
|
PRBool aAppendToFile, nsIUrlListener *aUrlListener, nsIURL **aURL)
|
||||||
|
{
|
||||||
|
|
||||||
|
nsresult rv = NS_OK;
|
||||||
|
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,6 +72,9 @@ public:
|
||||||
NS_IMETHOD DisplayMessage(const char* aMessageURI, nsISupports * aDisplayConsumer,
|
NS_IMETHOD DisplayMessage(const char* aMessageURI, nsISupports * aDisplayConsumer,
|
||||||
nsIUrlListener * aUrlListener, nsIURL ** aURL);
|
nsIUrlListener * aUrlListener, nsIURL ** aURL);
|
||||||
|
|
||||||
|
NS_IMETHOD SaveMessageToDisk(const char *aMessageURI, nsIFileSpec *aFile, PRBool aAppendToFile,
|
||||||
|
nsIUrlListener *aUrlListener, nsIURL **aURL);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* nsMailboxService_h___ */
|
#endif /* nsMailboxService_h___ */
|
||||||
|
|
Загрузка…
Ссылка в новой задаче