/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsISupports.idl" interface calIItipItem; interface nsIMailProgressListener; interface nsIMimeHeaders; interface nsIMsgOpenPGPSink; interface nsIMsgSMIMESink; interface nsIPropertyBag2; interface nsIRequest; interface nsIWebProgress; /** * An interface that email-streaming channels can use to provide access to * parsed message headers, message attachment info, and other metadata. * The intended use is by QIing nsIChannel to nsIMailChannel. */ [scriptable, uuid(e4abdb58-54fa-4deb-8c43-714a69519b3a)] interface nsIMailChannel : nsISupports { /** * Called by MIME emitters to add a header to this mail channel. * Do not call otherwise. */ void addHeaderFromMIME(in AUTF8String name, in AUTF8String value); /** * Header names for this request, available at onHeadersComplete. * The number of header names is the same as the number of header values, * and they are in the same order. */ readonly attribute Array headerNames; /** * Header values for this request, available at onHeadersComplete. */ readonly attribute Array headerValues; /** * Headers in nsIMimeHeaders form, available at onHeadersComplete. */ attribute nsIMimeHeaders mimeHeaders; /** * Called by MIME emitters to add attachment info to this mail channel. * Do not call otherwise. */ void handleAttachmentFromMIME(in AUTF8String contentType, in AUTF8String url, in AUTF8String displayName, in AUTF8String uri, in boolean aNotDownloaded); /** * Called by MIME emitters to add attachment info to this mail channel. * Do not call otherwise. */ void addAttachmentFieldFromMIME(in AUTF8String field, in AUTF8String value); /** * Attachments for this request, available at onAttachmentsComplete. */ readonly attribute Array attachments; /** * The character set of the message, according to the MIME parser. Not the * character set of the channel, which should always be UTF-8. */ attribute AUTF8String mailCharacterSet; /** * The method property of iMIP attachments, as determined by the MIME parser. * Not to be set after onAttachmentsComplete. */ attribute AUTF8String imipMethod; /** * The actual iMIP invitation, as created by CalMIMEConverter. * Not to be set after onAttachmentsComplete. */ attribute calIItipItem imipItem; /** * Set this in onStartRequest. Allows reactions based on OpenPGP * status changes. */ attribute nsIMsgOpenPGPSink openpgpSink; /** * Set this in onStartRequest. Allows reactions based on S/MIME * status changes. */ attribute nsIMsgSMIMESink smimeSink; /** * A listener for progress events. This object must also implement * nsISupportsWeakReference. */ attribute nsIMailProgressListener listener; }; [scriptable, uuid(1286f969-1c20-422e-8247-233fe0d26ba5)] interface nsIMailProgressListener : nsISupports { /** * Receive a notification from the parser that it has finished outputting * the headers to the channel. */ void onHeadersComplete(in nsIMailChannel mailChannel); /** * Receive a notification from the parser that it has finished outputting * the message body to the channel. */ void onBodyComplete(in nsIMailChannel mailChannel); /** * Receive a notification from the parser that it has finished outputting * the attachment information to the channel. */ void onAttachmentsComplete(in nsIMailChannel mailChannel); };