more work for message post to nntp server

git-svn-id: svn://10.0.0.236/trunk@31832 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
sspitzer%netscape.com
1999-05-16 04:18:51 +00:00
parent 158e26895b
commit f501f426f9
3 changed files with 38 additions and 3 deletions

View File

@@ -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___ */

View File

@@ -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)
{

View File

@@ -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;