diff --git a/mailnews/news/public/nsINNTPNewsgroupPost.h b/mailnews/news/public/nsINNTPNewsgroupPost.h new file mode 100644 index 000000000000..4611fea028ae --- /dev/null +++ b/mailnews/news/public/nsINNTPNewsgroupPost.h @@ -0,0 +1,114 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nsINNTPNewsgroupPost.idl + */ + +#ifndef __gen_nsINNTPNewsgroupPost_h__ +#define __gen_nsINNTPNewsgroupPost_h__ + +#include "nsISupports.h" /* interface nsISupports */ + + +/* starting interface nsINNTPNewsgroupPost */ + +/* {c4164a20-bc74-11d2-b7f2-00805f05ffa5} */ +#define NS_INNTPNEWSGROUPPOST_IID_STR "c4164a20-bc74-11d2-b7f2-00805f05ffa5" +#define NS_INNTPNEWSGROUPPOST_IID \ + {0xc4164a20, 0xbc74, 0x11d2, \ + { 0xb7, 0xf2, 0x00, 0x80, 0x5f, 0x05, 0xff, 0xa5 }} + +class nsINNTPNewsgroupPost : public nsISupports { + public: + static const nsIID& IID() { + static nsIID iid = NS_INNTPNEWSGROUPPOST_IID; + return iid; + } + + /* */ + NS_IMETHOD GetRelayVersion(char * *aRelayVersion) = 0; + NS_IMETHOD SetRelayVersion(char * aRelayVersion) = 0; + + /* */ + NS_IMETHOD GetPostingVersion(char * *aPostingVersion) = 0; + NS_IMETHOD SetPostingVersion(char * aPostingVersion) = 0; + + /* */ + NS_IMETHOD GetFrom(char * *aFrom) = 0; + NS_IMETHOD SetFrom(char * aFrom) = 0; + + /* */ + NS_IMETHOD GetDate(char * *aDate) = 0; + NS_IMETHOD SetDate(char * aDate) = 0; + + /* */ + NS_IMETHOD AddNewsgroup(const char *newsgroupName) = 0; + + /* */ + NS_IMETHOD GetNewsgroups(char * *aNewsgroups) = 0; + + /* */ + NS_IMETHOD GetSubject(char * *aSubject) = 0; + NS_IMETHOD SetSubject(char * aSubject) = 0; + + /* */ + NS_IMETHOD GetMessageID(char * *aMessageID) = 0; + + /* */ + NS_IMETHOD GetPath(char * *aPath) = 0; + NS_IMETHOD SetPath(char * aPath) = 0; + + /* */ + NS_IMETHOD isValid(PRBool *_retval) = 0; + + /* */ + NS_IMETHOD GetReplyTo(char * *aReplyTo) = 0; + NS_IMETHOD SetReplyTo(char * aReplyTo) = 0; + + /* */ + NS_IMETHOD GetSender(char * *aSender) = 0; + NS_IMETHOD SetSender(char * aSender) = 0; + + /* */ + NS_IMETHOD GetFollowupTo(char * *aFollowupTo) = 0; + NS_IMETHOD SetFollowupTo(char * aFollowupTo) = 0; + + /* */ + NS_IMETHOD GetDateRecieved(char * *aDateRecieved) = 0; + NS_IMETHOD SetDateRecieved(char * aDateRecieved) = 0; + + /* */ + NS_IMETHOD GetExpires(char * *aExpires) = 0; + NS_IMETHOD SetExpires(char * aExpires) = 0; + + /* */ + NS_IMETHOD AddReference(const char *referenceID) = 0; + + /* */ + NS_IMETHOD GetReferences(char * *aReferences) = 0; + + /* */ + NS_IMETHOD GetControl(char * *aControl) = 0; + NS_IMETHOD SetControl(char * aControl) = 0; + + /* */ + NS_IMETHOD GetDistribution(char * *aDistribution) = 0; + NS_IMETHOD SetDistribution(char * aDistribution) = 0; + + /* */ + NS_IMETHOD GetOrganization(char * *aOrganization) = 0; + NS_IMETHOD SetOrganization(char * aOrganization) = 0; + + /* */ + NS_IMETHOD GetMessage(char * *aMessage) = 0; + NS_IMETHOD SetMessage(char * aMessage) = 0; + + /* */ + NS_IMETHOD MakeControlCancel(const char *messageID) = 0; + + /* */ + NS_IMETHOD GetIsControl(PRBool *aIsControl) = 0; + + /* */ + NS_IMETHOD GetFullMessage(char **_retval) = 0; +}; + +#endif /* __gen_nsINNTPNewsgroupPost_h__ */ diff --git a/mailnews/news/public/nsINNTPNewsgroupPost.idl b/mailnews/news/public/nsINNTPNewsgroupPost.idl new file mode 100644 index 000000000000..d475edb5dc30 --- /dev/null +++ b/mailnews/news/public/nsINNTPNewsgroupPost.idl @@ -0,0 +1,87 @@ +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +/* This object represents the stream of data which will be sent to an + NNTP server. You basically set up all the RFC850 required headers, etc, + then pass it to something that reads off the nsIInputStream interface. +*/ + +#include "nsISupports.idl" + + +[object, uuid(c4164a20-bc74-11d2-b7f2-00805f05ffa5)] +interface nsINNTPNewsgroupPost : nsISupports { + + /* from RFC850 */ + /* section 2.1 - required headers */ + attribute string relayVersion; + attribute string postingVersion; + attribute string from; + attribute string date; + + void AddNewsgroup(in string newsgroupName); + readonly attribute string newsgroups; + + attribute string subject; + readonly attribute string messageID; + attribute string path; + + boolean isValid(); + + /* Secion 2.2 - optional headers */ + attribute string replyTo; + attribute string sender; + attribute string followupTo; + attribute string dateRecieved; + attribute string expires; + + void AddReference(in string referenceID); + readonly attribute string references; + + attribute string control; + attribute string distribution; + attribute string organization; + + /* the message itself */ + attribute string message; + + /* control messages */ + void MakeControlCancel(in string messageID); + /* probably don't need these + void MakeControlNewgroup(in string groupname); + void MakeControlRmgroup(in string groupname); + void MakeControlSendsys(); + void MakeControlSenduuname(); + void MakeControlVersion(); + */ + /* is this a control message? */ + readonly attribute boolean isControl; + + /* this should return a pointer to the full text of the RFC850 message + * that gets sent to the NNTP server + * return a reference so that we are not strdup()ing an entire message + * Each call to getFullMessage will destroy the last reference and return + * a new one by reassembling the message. + * A better solution would just be to give this message an nsIOutputStream + * to write to so that it can better manage the assembled message. + */ + string GetFullMessage(); +}; + + +