implement nsIMsgProtocolInfo in news

This commit is contained in:
alecf%netscape.com 1999-09-13 23:53:33 +00:00
Родитель d6afa0b61e
Коммит 92064b42f6
2 изменённых файлов: 32 добавлений и 3 удалений

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

@ -34,6 +34,7 @@
#include "nsIMessage.h"
#include "nsINetSupportDialogService.h"
#include "nsIPref.h"
#include "nsIProfile.h"
#include "nsCRT.h" // for nsCRT::strtok
#include "nsNntpService.h"
#include "nsIChannel.h"
@ -966,3 +967,27 @@ NS_IMETHODIMP nsNntpService::NewChannel(const char *verb, nsIURI *aURI, nsILoadG
return rv;
}
NS_IMETHODIMP
nsNntpService::GetDefaultLocalPath(nsIFileSpec ** aResult)
{
nsresult rv;
NS_WITH_SERVICE(nsIPref, prefs, kCPrefServiceCID, &rv);
if (NS_FAILED(rv)) return rv;
rv = prefs->GetFilePref("mail.root.nntp", aResult);
if (NS_SUCCEEDED(rv)) return rv;
NS_WITH_SERVICE(nsIProfile, profile, NS_PROFILE_PROGID, &rv);
if (NS_FAILED(rv)) return rv;
nsFileSpec dir;
rv = profile->GetCurrentProfileDir(&dir);
if (NS_FAILED(rv)) return rv;
dir += "News";
rv = NS_NewFileSpecWithSpec(dir, aResult);
return rv;
}

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

@ -25,19 +25,23 @@
#include "nsINntpIncomingServer.h"
#include "nsIFileSpec.h"
#include "MailNewsTypes.h"
#include "nsIMsgProtocolInfo.h"
class nsIURI;
class nsIUrlListener;
class nsNntpService : public nsINntpService, public nsIMsgMessageService, public nsIProtocolHandler
class nsNntpService : public nsINntpService,
public nsIMsgMessageService,
public nsIProtocolHandler,
public nsIMsgProtocolInfo
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSINNTPSERVICE
NS_DECL_NSIMSGMESSAGESERVICE
NS_DECL_NSIPROTOCOLHANDLER
NS_DECL_ISUPPORTS
NS_DECL_NSIMSGPROTOCOLINFO
// nsNntpService
nsNntpService();