mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-05 22:05:40 +00:00
Add GetServerURI interface method to fix imap build and synch up with the latest changes to the incoming server interface.
This commit is contained in:
parent
c3bd0744bd
commit
5ed73a3528
@ -18,6 +18,8 @@
|
||||
|
||||
#include "msgCore.h"
|
||||
|
||||
#include "nsString2.h"
|
||||
|
||||
#include "nsIImapIncomingServer.h"
|
||||
#include "nsIMAPHostSessionList.h"
|
||||
#include "nsImapIncomingServer.h"
|
||||
@ -45,6 +47,7 @@ public:
|
||||
NS_IMETHOD GetRootFolderPath(char **);
|
||||
NS_IMETHOD SetRootFolderPath(char *);
|
||||
NS_IMETHOD SetKey(char * aKey); // override nsMsgIncomingServer's implementation...
|
||||
NS_IMETHOD GetServerURI(char * *aServerURI);
|
||||
|
||||
private:
|
||||
char *m_rootFolderPath;
|
||||
@ -94,6 +97,26 @@ NS_IMETHODIMP nsImapIncomingServer::SetKey(char * aKey) // override nsMsgIncomi
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsImapIncomingServer::GetServerURI(char ** aServerURI)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
nsString2 serverUri("imap://", eOneByte);
|
||||
char * hostName = nsnull;
|
||||
rv = GetHostName(&hostName);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
serverUri += hostName;
|
||||
if (aServerURI)
|
||||
*aServerURI = PL_strdup(serverUri.GetBuffer());
|
||||
|
||||
|
||||
PR_FREEIF(hostName);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
nsresult NS_NewImapIncomingServer(const nsIID& iid,
|
||||
void **result)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user