зеркало из https://github.com/mozilla/pjs.git
add new accessor for message member
This commit is contained in:
Родитель
604be293c2
Коммит
081346c526
|
@ -48,10 +48,11 @@ nsNntpUrl::nsNntpUrl(nsISupports* aContainer, nsIURLGroup* aGroup)
|
|||
m_offlineNews = nsnull;
|
||||
m_newsgroupList = nsnull;
|
||||
m_errorMessage = nsnull;
|
||||
|
||||
|
||||
// nsINetLibUrl specific state
|
||||
m_URL_s = nsnull;
|
||||
|
||||
m_messageToPost = nsnull;
|
||||
|
||||
// nsIURL specific state
|
||||
m_protocol = nsnull;
|
||||
m_host = nsnull;
|
||||
|
@ -74,6 +75,7 @@ nsNntpUrl::~nsNntpUrl()
|
|||
NS_IF_RELEASE(m_newsgroup);
|
||||
NS_IF_RELEASE(m_offlineNews);
|
||||
NS_IF_RELEASE(m_newsgroupList);
|
||||
PR_FREEIF(m_messageToPost);
|
||||
PR_FREEIF(m_errorMessage);
|
||||
|
||||
PR_FREEIF(m_spec);
|
||||
|
@ -898,6 +900,25 @@ nsresult nsNntpUrl::ToString(PRUnichar* *aString) const
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsNntpUrl::SetMessageToPost(char *aString)
|
||||
{
|
||||
NS_LOCK_INSTANCE();
|
||||
PR_FREEIF(m_messageToPost);
|
||||
m_messageToPost = PL_strdup(aString);
|
||||
NS_UNLOCK_INSTANCE();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsNntpUrl::GetMessageToPost(char **aString)
|
||||
{
|
||||
NS_LOCK_INSTANCE();
|
||||
char *result;
|
||||
if (!aString) return NS_ERROR_NULL_POINTER;
|
||||
*aString = PL_strdup(m_messageToPost);
|
||||
NS_UNLOCK_INSTANCE();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
// End of functions which should be made obsolete after modifying nsIURL
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -81,6 +81,8 @@ public:
|
|||
// caller must free using PR_FREE
|
||||
NS_IMETHOD GetErrorMessage (char ** errorMessage) const;
|
||||
|
||||
NS_IMETHOD SetMessageToPost(char *messageToPost);
|
||||
NS_IMETHOD GetMessageToPost(char **messageToPost);
|
||||
// nsNntpUrl
|
||||
|
||||
nsNntpUrl(nsISupports* aContainer, nsIURLGroup* aGroup);
|
||||
|
@ -103,7 +105,9 @@ protected:
|
|||
char *m_ref;
|
||||
char *m_search;
|
||||
char *m_errorMessage;
|
||||
|
||||
char *m_messageToPost; // temp char buffer of message to post
|
||||
// (eventually probably a message
|
||||
// instance of some kind)
|
||||
PRInt32 m_port;
|
||||
nsISupports* m_container;
|
||||
|
||||
|
@ -117,4 +121,4 @@ protected:
|
|||
void ReconstructSpec(void);
|
||||
};
|
||||
|
||||
#endif // nsNntpUrl_h__
|
||||
#endif // nsNntpUrl_h__
|
||||
|
|
Загрузка…
Ссылка в новой задаче