rev the interface, update char* to const char*

This commit is contained in:
alecf%netscape.com 1999-03-10 22:32:46 +00:00
Родитель 02574d59fa
Коммит f1d9ff0baa
2 изменённых файлов: 10 добавлений и 16 удалений

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

@ -6,17 +6,11 @@
#define __gen_nsINNTPNewsgroupPost_h__
#include "nsISupports.h" /* interface nsISupports */
#include "nsID.h" /* interface nsID */
#ifdef XPIDL_JS_STUBS
#include "jsapi.h"
#endif
#include "nsDebug.h"
#include "nsTraceRefcnt.h"
#include "nsID.h"
#include "nsIID.h"
#include "nsError.h"
#include "nsISupportsUtils.h"
/* starting interface nsINNTPNewsgroupPost */
@ -50,7 +44,7 @@ class nsINNTPNewsgroupPost : public nsISupports {
NS_IMETHOD SetDate(char * aDate) = 0;
/* void AddNewsgroup (in string newsgroupName); */
NS_IMETHOD AddNewsgroup(char *newsgroupName) = 0;
NS_IMETHOD AddNewsgroup(const char *newsgroupName) = 0;
/* readonly attribute string newsgroups; */
NS_IMETHOD GetNewsgroups(char * *aNewsgroups) = 0;
@ -90,7 +84,7 @@ class nsINNTPNewsgroupPost : public nsISupports {
NS_IMETHOD SetExpires(char * aExpires) = 0;
/* void AddReference (in string referenceID); */
NS_IMETHOD AddReference(char *referenceID) = 0;
NS_IMETHOD AddReference(const char *referenceID) = 0;
/* readonly attribute string references; */
NS_IMETHOD GetReferences(char * *aReferences) = 0;
@ -112,7 +106,7 @@ class nsINNTPNewsgroupPost : public nsISupports {
NS_IMETHOD SetBody(char * aBody) = 0;
/* void MakeControlCancel (in string messageID); */
NS_IMETHOD MakeControlCancel(char *messageID) = 0;
NS_IMETHOD MakeControlCancel(const char *messageID) = 0;
/* readonly attribute boolean isControl; */
NS_IMETHOD GetIsControl(PRBool *aIsControl) = 0;

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

@ -72,7 +72,7 @@ public:
NS_IMPL_CLASS_GETSET_STR(Date, m_header[HEADER_DATE]);
NS_IMPL_CLASS_GETSET_STR(Subject, m_header[HEADER_SUBJECT]);
NS_IMETHOD AddNewsgroup(char *newsgroupName);
NS_IMETHOD AddNewsgroup(const char *newsgroupName);
NS_IMPL_CLASS_GETTER_STR(GetNewsgroups, m_header[HEADER_NEWSGROUPS]);
NS_IMETHOD GetMessageID(char * *aMessageID);
@ -90,13 +90,13 @@ public:
NS_IMPL_CLASS_GETSET_STR(Organization, m_header[HEADER_ORGANIZATION]);
NS_IMPL_CLASS_GETSET_STR(Body, m_body);
NS_IMETHOD AddReference(char *referenceID);
NS_IMETHOD AddReference(const char *referenceID);
NS_IMPL_CLASS_GETTER_STR(GetReferences, m_header[HEADER_REFERENCES]);
NS_IMETHOD isValid(PRBool *_retval);
NS_IMETHOD MakeControlCancel(char *messageID);
NS_IMETHOD MakeControlCancel(const char *messageID);
NS_IMPL_CLASS_GETTER(GetIsControl, PRBool, m_isControl);
@ -189,7 +189,7 @@ nsNNTPNewsgroupPost::isValid(PRBool *_retval)
/* XXX - I'm just guessing at how this works, see RFC850 for more */
nsresult
nsNNTPNewsgroupPost::MakeControlCancel(char *messageID)
nsNNTPNewsgroupPost::MakeControlCancel(const char *messageID)
{
char *new_subject = (char *)PR_Calloc(PL_strlen(messageID) +
PL_strlen("CANCEL ") + 1,
@ -272,13 +272,13 @@ nsNNTPNewsgroupPost::appendAndAlloc(char *string,
}
nsresult
nsNNTPNewsgroupPost::AddNewsgroup(char *newsgroup)
nsNNTPNewsgroupPost::AddNewsgroup(const char *newsgroup)
{
m_header[HEADER_NEWSGROUPS]=appendAndAlloc(m_header[HEADER_NEWSGROUPS], newsgroup, PR_TRUE);
return NS_OK;
}
nsresult
nsNNTPNewsgroupPost::AddReference(char *reference)
nsNNTPNewsgroupPost::AddReference(const char *reference)
{
m_header[HEADER_REFERENCES]=appendAndAlloc(m_header[HEADER_REFERENCES], reference, PR_FALSE);
return NS_OK;