more work for message post to nntp server

This commit is contained in:
sspitzer%netscape.com 1999-05-16 04:18:51 +00:00
Родитель 39b816f4cd
Коммит b085b955cf
3 изменённых файлов: 38 добавлений и 3 удалений

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

@ -74,7 +74,11 @@ public:
NS_IMETHOD SetMessageToPost (nsINNTPNewsgroupPost *post) = 0;
NS_IMETHOD GetMessageToPost (nsINNTPNewsgroupPost **post) = 0;
// the message can be stored in a file....allow accessors for getting and setting
// the file name to post...
NS_IMETHOD SetPostMessageFile(const nsFilePath& aFileName) = 0;
NS_IMETHOD GetPostMessageFile(const nsFilePath ** aFileName) = 0;
};
#endif /* nsIHttpURL_h___ */

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

@ -42,7 +42,8 @@
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
static NS_DEFINE_CID(kUrlListenerManagerCID, NS_URLLISTENERMANAGER_CID);
nsNntpUrl::nsNntpUrl(nsISupports* aContainer, nsIURLGroup* aGroup)
nsNntpUrl::nsNntpUrl(nsISupports* aContainer, nsIURLGroup* aGroup):
m_fileName("")
{
NS_INIT_REFCNT();
@ -346,6 +347,30 @@ nsresult nsNntpUrl::GetErrorMessage (char ** errorMessage) const
return NS_OK;
}
// the message can be stored in a file....allow accessors for getting and setting
// the file name to post...
nsresult nsNntpUrl::SetPostMessageFile(const nsFilePath& aFileName)
{
#ifdef DEBUG_sspitzer
printf("SetPostMessageFile(%s)\n",(const char *)aFileName);
#endif
nsresult rv = NS_OK;
if (aFileName)
m_fileName = aFileName;
return rv;
}
nsresult nsNntpUrl::GetPostMessageFile(const nsFilePath ** aFileName)
{
nsresult rv = NS_OK;
if (aFileName)
*aFileName = &m_fileName;
return rv;
}
nsresult
nsNntpUrl::GetFilePath(const nsFileSpec ** aFilePath)
{

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

@ -79,6 +79,11 @@ public:
NS_IMETHOD SetMessageToPost(nsINNTPNewsgroupPost *post);
NS_IMETHOD GetMessageToPost(nsINNTPNewsgroupPost **post);
// the message can be stored in a file....allow accessors for getting and setting
// the file name to post...
NS_IMETHOD SetPostMessageFile(const nsFilePath& aFileName);
NS_IMETHOD GetPostMessageFile(const nsFilePath ** aFileName);
NS_IMETHOD GetFilePath(const nsFileSpec ** aFilePath);
@ -116,7 +121,8 @@ protected:
char *m_ref;
char *m_search;
char *m_errorMessage;
nsFilePath m_fileName;
PRBool m_runningUrl;
nsINNTPNewsgroupPost *m_newsgroupPost;