зеркало из https://github.com/mozilla/gecko-dev.git
Add support for the nsIMsgUriUrl interface.
This commit is contained in:
Родитель
2706afea7f
Коммит
7d526b8ad9
|
@ -134,6 +134,12 @@ nsresult nsMailboxUrl::QueryInterface(const nsIID &aIID, void** aInstancePtr)
|
|||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
if (aIID.Equals(nsIMsgUriUrl::GetIID()))
|
||||
{
|
||||
*aInstancePtr = (void *) ((nsIMsgUriUrl *) this);
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#if defined(NS_DEBUG)
|
||||
/*
|
||||
|
@ -298,6 +304,31 @@ nsresult nsMailboxUrl::SetUrlState(PRBool aRunningUrl, nsresult aExitCode)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsMailboxUrl::GetURI(char ** aURI)
|
||||
{
|
||||
// function not implemented yet....
|
||||
// when I get scott's function to take a path and a message id and turn it into
|
||||
// a URI then we can add that code here.....
|
||||
|
||||
if (aURI)
|
||||
{
|
||||
const nsFileSpec * filePath = nsnull;
|
||||
GetFilePath(&filePath);
|
||||
if (filePath)
|
||||
{
|
||||
char * uri = nsnull;
|
||||
nsFileSpec folder = *filePath;
|
||||
nsBuildLocalMessageURI(folder, m_messageKey, &uri);
|
||||
*aURI = uri;
|
||||
}
|
||||
else
|
||||
*aURI = nsnull;
|
||||
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
// End nsIMailboxUrl specific support
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "nsINetlibURL.h" /* this should be temporary until Network N2 project lands */
|
||||
#include "nsFileSpec.h"
|
||||
|
||||
class nsMailboxUrl : public nsIMailboxUrl, public nsINetlibURL
|
||||
class nsMailboxUrl : public nsIMailboxUrl, public nsINetlibURL, nsIMsgUriUrl
|
||||
{
|
||||
public:
|
||||
// from nsIURL:
|
||||
|
@ -85,8 +85,10 @@ public:
|
|||
NS_IMETHOD RegisterListener (nsIUrlListener * aUrlListener);
|
||||
NS_IMETHOD UnRegisterListener (nsIUrlListener * aUrlListener);
|
||||
|
||||
// nsMailboxUrl
|
||||
// from nsIMsgUriUrl
|
||||
NS_IMETHOD GetURI(char ** aURI);
|
||||
|
||||
// nsMailboxUrl
|
||||
nsMailboxUrl(nsISupports* aContainer, nsIURLGroup* aGroup);
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
|
Загрузка…
Ссылка в новой задаче