1999-07-08 08:09:56 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
|
|
*
|
1999-11-06 06:43:54 +03: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-07-08 08:09:56 +04:00
|
|
|
*
|
1999-11-06 06:43:54 +03: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-07-08 08:09:56 +04:00
|
|
|
*
|
1999-11-06 06:43:54 +03:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is Netscape
|
1999-07-08 08:09:56 +04:00
|
|
|
* Communications Corporation. Portions created by Netscape are
|
1999-11-06 06:43:54 +03:00
|
|
|
* Copyright (C) 1998 Netscape Communications Corporation. All
|
|
|
|
* Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
1999-07-08 08:09:56 +04:00
|
|
|
*/
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
#include "nsrootidl.idl"
|
|
|
|
|
1999-07-29 04:42:25 +04:00
|
|
|
interface nsIOutputStream;
|
|
|
|
interface nsIInputStream;
|
1999-07-08 08:09:56 +04:00
|
|
|
interface nsIURI;
|
|
|
|
interface nsIStreamListener;
|
1999-07-29 04:42:25 +04:00
|
|
|
interface nsIChannel;
|
1999-07-08 08:09:56 +04:00
|
|
|
|
1999-07-29 04:42:25 +04:00
|
|
|
[scriptable, uuid(39E329E2-357F-11d3-8EFD-00A024A7D144)]
|
|
|
|
interface nsMimeHeaderDisplayTypes
|
|
|
|
{
|
|
|
|
const long MicroHeaders = 0;
|
|
|
|
const long NormalHeaders = 1;
|
|
|
|
const long AllHeaders = 2;
|
|
|
|
};
|
1999-07-08 08:09:56 +04:00
|
|
|
|
1999-08-19 07:23:15 +04:00
|
|
|
%{C++
|
2000-09-14 03:57:52 +04:00
|
|
|
//#define NS_IMIME_MISC_STATUS_KEY "@mozilla.org/messenger/mimestatus;1?"
|
|
|
|
#define NS_IMIME_MISC_STATUS_KEY "@mozilla.org/MimeMiscStatus;1?type="
|
1999-08-19 07:23:15 +04:00
|
|
|
%}
|
|
|
|
|
1999-07-08 08:09:56 +04:00
|
|
|
[scriptable, uuid(D01D7B59-DCCD-11d2-A411-00805F613C79)]
|
|
|
|
interface nsIMimeEmitter : nsISupports{
|
|
|
|
|
|
|
|
// These will be called to start and stop the total operation
|
2000-02-10 09:48:22 +03:00
|
|
|
void Initialize(in nsIURI url, in nsIChannel aChannel, in long aFormat);
|
1999-07-08 08:09:56 +04:00
|
|
|
void Complete();
|
|
|
|
|
|
|
|
// Set the output stream/listener for processed data.
|
1999-07-29 04:42:25 +04:00
|
|
|
void SetPipe(in nsIInputStream inputStream, in nsIOutputStream outStream);
|
1999-07-08 08:09:56 +04:00
|
|
|
void SetOutputListener(in nsIStreamListener listener);
|
2001-02-01 02:22:18 +03:00
|
|
|
|
|
|
|
//Get the output listener to allow access to it from mime
|
|
|
|
nsIStreamListener GetOutputListener();
|
1999-07-08 08:09:56 +04:00
|
|
|
|
|
|
|
// Header handling routines.
|
|
|
|
void StartHeader(in PRBool rootMailHeader, in PRBool headerOnly,
|
|
|
|
[const] in string msgID, [const] in string outCharset);
|
|
|
|
void AddHeaderField([const] in string field, [const] in string value);
|
|
|
|
void EndHeader();
|
2000-01-25 06:18:36 +03:00
|
|
|
void UpdateCharacterSet([const] in string aCharset);
|
1999-07-08 08:09:56 +04:00
|
|
|
|
|
|
|
// Attachment handling routines
|
|
|
|
void StartAttachment([const] in string name, [const] in string contentType,
|
2000-03-25 00:22:53 +03:00
|
|
|
[const] in string url, in PRBool aNotDownloaded);
|
1999-07-08 08:09:56 +04:00
|
|
|
void AddAttachmentField([const] in string field, [const] in string value);
|
|
|
|
void EndAttachment();
|
|
|
|
|
2000-04-14 02:19:48 +04:00
|
|
|
void EndAllAttachments();
|
|
|
|
|
1999-07-08 08:09:56 +04:00
|
|
|
// Body handling routines
|
|
|
|
void StartBody(in PRBool bodyOnly, [const] in string msgID, [const] in string outCharset);
|
|
|
|
void WriteBody([const] in string buf, in PRUint32 size, out PRUint32 amountWritten);
|
|
|
|
void EndBody();
|
|
|
|
|
|
|
|
// Generic write routine. This is necessary for output that
|
|
|
|
// libmime needs to pass through without any particular parsing
|
|
|
|
// involved (i.e. decoded images, HTML Body Text, etc...
|
|
|
|
void Write([const] in string buf, in PRUint32 size, out PRUint32 amountWritten);
|
|
|
|
void UtilityWrite([const] in string buf);
|
|
|
|
};
|
|
|
|
|