Back to index

lightning-sunbird  0.9+nobinonly
nsIMimeMiscStatus.idl
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either of the GNU General Public License Version 2 or later (the "GPL"),
00026  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 #include "nsISupports.idl"
00038 #include "nsrootidl.idl"
00039 
00040 interface nsIOutputStream;
00041 interface nsIInputStream;
00042 interface nsIURI;
00043 interface nsIStreamListener;
00044 interface nsIChannel;
00045 interface nsIMsgMailNewsUrl;
00046 interface nsIUTF8StringEnumerator;
00047 interface nsIMsgDBHdr;
00048 interface nsIWritablePropertyBag2;
00049 
00050 [scriptable, uuid(4644FB25-5255-11d3-82B8-444553540002)] 
00051 interface nsIMimeMiscStatus : nsISupports{
00052 
00053     string  GetWindowXULandJS();
00054     string  GetGlobalXULandJS();
00055     string  GetIndividualXUL(in string aName, in string aHeader, in string aEmail);
00056 
00057     long    GetMiscStatus(in string aName, in string aEmail);
00058     string  GetImageURL(in long aStatus);
00059 };
00060 
00061 // this is a simple interface which allows someone to listen to all the headers 
00062 // that are discovered by mime. We can use this when displaying a message to update
00063 // the msg header in JS. 
00064 [scriptable, uuid(C3C4473C-FE01-4AFC-BF91-C811BAEBEF63)] 
00065 interface nsIMsgHeaderSink : nsISupports 
00066 {
00067   // You must finish consuming the iterators before returning from processHeaders. aHeaderNames and aHeaderValues will ALWAYS have the same
00068   // number of elements in them
00069   void processHeaders(in nsIUTF8StringEnumerator aHeaderNames, in nsIUTF8StringEnumerator aHeaderValues, in boolean dontCollectAddress);
00070 
00071   void handleAttachment(in string contentType, in string url, in wstring displayName, in string uri,
00072                         in boolean aNotDownloaded);
00073   void onEndAllAttachments();
00074     
00075   // onEndMsgHeaders is called after libmime is done processing a message. At this point it is safe for
00076   // elements like the UI to update junk status, process return receipts, etc.
00077   void onEndMsgHeaders(in nsIMsgMailNewsUrl url);
00078 
00079   // onEndMsgDownload is triggered when layout says it is actually done rendering 
00080   // the message body in the UI. 
00081   void onEndMsgDownload(in nsIMsgMailNewsUrl url);
00082 
00083   attribute nsISupports securityInfo;
00084 
00085   void onMsgHasRemoteContent(in nsIMsgDBHdr aMsgHdr);
00086   nsIMsgDBHdr getDummyMsgHeader();
00087   
00088   // used as a hook for extension mime content handlers to store data that can later
00089   // be accessed by other parts of the code, e.g., UI code.
00090   // TODO - Should replace securityInfo
00091   readonly attribute nsIWritablePropertyBag2 properties;
00092 };