1999-02-05 05:43:21 +00:00
|
|
|
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
|
|
*
|
1999-11-06 03:43:54 +00:00
|
|
|
* The contents of this file are subject to the Netscape Public
|
|
|
|
* License Version 1.1 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.mozilla.org/NPL/
|
1999-02-05 05:43:21 +00:00
|
|
|
*
|
1999-11-06 03:43:54 +00:00
|
|
|
* Software distributed under the License is distributed on an "AS
|
|
|
|
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
|
|
|
* implied. See the License for the specific language governing
|
|
|
|
* rights and limitations under the License.
|
1999-02-05 05:43:21 +00:00
|
|
|
*
|
1999-11-06 03:43:54 +00:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is Netscape
|
1999-02-05 05:43:21 +00:00
|
|
|
* Communications Corporation. Portions created by Netscape are
|
1999-11-06 03:43:54 +00:00
|
|
|
* Copyright (C) 1998 Netscape Communications Corporation. All
|
|
|
|
* Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
1999-02-05 05:43:21 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* 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"
|
1999-09-15 21:29:30 +00:00
|
|
|
#include "nsIFileSpec.idl"
|
1999-02-05 05:43:21 +00:00
|
|
|
|
1999-05-30 00:12:41 +00:00
|
|
|
[scriptable, uuid(c4164a20-bc74-11d2-b7f2-00805f05ffa5)]
|
1999-02-05 05:43:21 +00:00
|
|
|
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;
|
|
|
|
|
1999-08-25 07:17:21 +00:00
|
|
|
boolean isValid();
|
1999-02-05 05:43:21 +00:00
|
|
|
|
|
|
|
/* 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 */
|
1999-02-05 07:50:40 +00:00
|
|
|
attribute string body;
|
1999-02-05 05:43:21 +00:00
|
|
|
|
1999-05-18 00:36:49 +00:00
|
|
|
/* the path to the message */
|
|
|
|
/* attribute nsFilePath postMessageFile; */
|
|
|
|
|
1999-02-05 05:43:21 +00:00
|
|
|
/* 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();
|
1999-07-23 06:26:09 +00:00
|
|
|
|
1999-09-15 21:29:30 +00:00
|
|
|
attribute nsIFileSpec postMessageFile;
|
1999-02-05 05:43:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|