mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
add folder attribute to mailnews urls, part of extensibility hooks, r=cavin, sr=sspitzer 161226
This commit is contained in:
parent
c25e74319b
commit
ba3502ac84
@ -49,6 +49,7 @@ interface nsICacheEntryDescriptor;
|
||||
interface nsICacheSession;
|
||||
interface nsIMimeHeaders;
|
||||
interface nsIStreamListener;
|
||||
interface nsIMsgFolder;
|
||||
|
||||
[scriptable, uuid(6CFFCEB0-CB8C-11d2-8065-006008128C4E)]
|
||||
interface nsIMsgMailNewsUrl : nsIURL {
|
||||
@ -71,6 +72,7 @@ interface nsIMsgMailNewsUrl : nsIURL {
|
||||
void GetUrlState(out boolean runningUrl);
|
||||
|
||||
readonly attribute nsIMsgIncomingServer server;
|
||||
attribute nsIMsgFolder folder;
|
||||
|
||||
// the ownership model for msg feedback
|
||||
attribute nsIMsgStatusFeedback statusFeedback;
|
||||
|
@ -996,3 +996,13 @@ NS_IMETHODIMP nsMsgMailNewsUrl::GetSaveAsListener(PRBool addDummyEnvelope,
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP nsMsgMailNewsUrl::SetFolder(nsIMsgFolder * /* aFolder */)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsMsgMailNewsUrl::GetFolder(nsIMsgFolder ** /* aFolder */)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
@ -472,7 +472,7 @@ char * extractAttributeValue(const char * searchString, const char * attributeNa
|
||||
|
||||
// nsIMsgI18NUrl support
|
||||
|
||||
nsresult nsMailboxUrl::GetMsgFolder(nsIMsgFolder **msgFolder)
|
||||
nsresult nsMailboxUrl::GetFolder(nsIMsgFolder **msgFolder)
|
||||
{
|
||||
// if we have a RDF URI, then try to get the folder for that URI and then ask the folder
|
||||
// for it's charset....
|
||||
@ -493,7 +493,7 @@ nsresult nsMailboxUrl::GetMsgFolder(nsIMsgFolder **msgFolder)
|
||||
NS_IMETHODIMP nsMailboxUrl::GetFolderCharset(PRUnichar ** aCharacterSet)
|
||||
{
|
||||
nsCOMPtr<nsIMsgFolder> folder;
|
||||
nsresult rv = GetMsgFolder(getter_AddRefs(folder));
|
||||
nsresult rv = GetFolder(getter_AddRefs(folder));
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
NS_ENSURE_TRUE(folder, NS_ERROR_FAILURE);
|
||||
folder->GetCharset(aCharacterSet);
|
||||
@ -503,7 +503,7 @@ NS_IMETHODIMP nsMailboxUrl::GetFolderCharset(PRUnichar ** aCharacterSet)
|
||||
NS_IMETHODIMP nsMailboxUrl::GetFolderCharsetOverride(PRBool * aCharacterSetOverride)
|
||||
{
|
||||
nsCOMPtr<nsIMsgFolder> folder;
|
||||
nsresult rv = GetMsgFolder(getter_AddRefs(folder));
|
||||
nsresult rv = GetFolder(getter_AddRefs(folder));
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
NS_ENSURE_TRUE(folder, NS_ERROR_FAILURE);
|
||||
folder->GetCharsetOverride(aCharacterSetOverride);
|
||||
|
@ -71,6 +71,8 @@ public:
|
||||
NS_IMETHOD GetNumMoveCopyMsgs(PRUint32 *numMsgs);
|
||||
NS_IMPL_CLASS_GETSET(CurMoveCopyMsgIndex, PRUint32, m_curMsgIndex);
|
||||
|
||||
NS_IMETHOD GetFolder(nsIMsgFolder **msgFolder);
|
||||
|
||||
// nsMailboxUrl
|
||||
nsMailboxUrl();
|
||||
virtual ~nsMailboxUrl();
|
||||
@ -104,7 +106,6 @@ protected:
|
||||
// for multiple msg move/copy
|
||||
nsMsgKeyArray m_keys;
|
||||
PRInt32 m_curMsgIndex;
|
||||
nsresult GetMsgFolder(nsIMsgFolder **msgFolder);
|
||||
|
||||
// truncated message support
|
||||
nsXPIDLCString m_originalSpec;
|
||||
|
@ -320,7 +320,7 @@ nsNntpUrl::SetOriginalSpec(const char *aSpec)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsNntpUrl::GetMsgFolder(nsIMsgFolder **msgFolder)
|
||||
NS_IMETHODIMP nsNntpUrl::GetFolder(nsIMsgFolder **msgFolder)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
@ -345,7 +345,7 @@ NS_IMETHODIMP
|
||||
nsNntpUrl::GetFolderCharset(PRUnichar **aCharacterSet)
|
||||
{
|
||||
nsCOMPtr<nsIMsgFolder> folder;
|
||||
nsresult rv = GetMsgFolder(getter_AddRefs(folder));
|
||||
nsresult rv = GetFolder(getter_AddRefs(folder));
|
||||
// don't assert here. this can happen if there is no message folder
|
||||
// like when we display a news://host/message-id url
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
@ -359,7 +359,7 @@ nsNntpUrl::GetFolderCharset(PRUnichar **aCharacterSet)
|
||||
NS_IMETHODIMP nsNntpUrl::GetFolderCharsetOverride(PRBool * aCharacterSetOverride)
|
||||
{
|
||||
nsCOMPtr<nsIMsgFolder> folder;
|
||||
nsresult rv = GetMsgFolder(getter_AddRefs(folder));
|
||||
nsresult rv = GetFolder(getter_AddRefs(folder));
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
NS_ENSURE_TRUE(folder, NS_ERROR_FAILURE);
|
||||
rv = folder->GetCharsetOverride(aCharacterSetOverride);
|
||||
|
@ -56,6 +56,9 @@ public:
|
||||
|
||||
NS_IMETHOD IsUrlType(PRUint32 type, PRBool *isType);
|
||||
|
||||
// nsIMsgFolder override
|
||||
NS_IMETHOD GetFolder(nsIMsgFolder **msgFolder);
|
||||
|
||||
// nsNntpUrl
|
||||
nsNntpUrl();
|
||||
virtual ~nsNntpUrl();
|
||||
@ -64,7 +67,6 @@ public:
|
||||
|
||||
private:
|
||||
virtual const char * GetUserName() { return nsnull; }
|
||||
nsresult GetMsgFolder(nsIMsgFolder **msgFolder);
|
||||
nsresult DetermineNewsAction();
|
||||
|
||||
nsINNTPNewsgroupPost *m_newsgroupPost;
|
||||
|
Loading…
Reference in New Issue
Block a user