Back to index

lightning-sunbird  0.9+nobinonly
nsIMsgComposeService.idl
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
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 
00038 
00039 #include "nsISupports.idl"
00040 #include "nsIMsgCompose.idl"
00041 #include "nsIMsgComposeParams.idl"
00042 
00043 interface nsIURI;
00044 interface nsIDOMWindowInternal;
00045 interface nsIMsgWindow;
00046 interface nsIMsgIdentity;
00047 interface nsIMsgIncomingServer;
00048 interface nsIMsgDBHdr;
00049 
00050 [scriptable, uuid(BC1C0379-82EF-45ae-9710-DD4FA93252F7)]
00051 interface nsIMsgComposeService : nsISupports {
00052 
00053   /* we need a msg window because when we forward inline we may need progress */
00054   void OpenComposeWindow(in string msgComposeWindowURL, in string originalMsgURI, in MSG_ComposeType type, 
00055                          in MSG_ComposeFormat format,
00056                          in nsIMsgIdentity identity, 
00057                          in nsIMsgWindow aMsgWindow);
00058 
00059     /* use this method to invoke a compose window given a mailto url.
00060      aMsgComposeWindowURL --> can be null in most cases. If you have your own chrome
00061      url you want to use in brining up a compose window, pass it in here. 
00062      aURI --> the mailto url you want to use as the foundation for the data inside
00063      the compose window  */
00064   void OpenComposeWindowWithURI(in string msgComposeWindowURL, in nsIURI aURI);
00065 
00066   /* ... */
00067   void OpenComposeWindowWithParams(in string msgComposeWindowURL, in nsIMsgComposeParams params);
00068 
00069   /* ... */
00070   nsIMsgCompose InitCompose(in nsIDOMWindowInternal aWindow, in nsIMsgComposeParams params);
00071 
00072   
00078   readonly attribute nsIMsgIdentity defaultIdentity;
00079 
00080   /* This function is use for debugging purpose only and may go away at anytime without warning */
00081   void TimeStamp(in string label, in boolean resetTime);  
00082   
00083   /* This attribute is use for debugging purposes for determining whether to PR_LOG or not */
00084   readonly attribute boolean logComposePerformance;
00085 
00086   [noscript] boolean determineComposeHTML(in nsIMsgIdentity aIdentity, in MSG_ComposeFormat aFormat);
00087   [noscript] void cacheWindow(in nsIDOMWindowInternal aWindow, in boolean aComposeHTML, in nsIMsgComposeRecyclingListener listener);
00088   boolean isCachedWindow(in nsIDOMWindowInternal aWindow);
00089 
00094   nsIMsgComposeParams getParamsForMailto(in nsIURI aURI); 
00095 
00096   void forwardMessage(in AString forwardTo, in nsIMsgDBHdr aMsgHdr, 
00097                                              in nsIMsgWindow aMsgWindow, in nsIMsgIncomingServer aServer);
00098 
00099   void replyWithTemplate(in nsIMsgDBHdr msgHdr, in string templateUri,
00100                                              in nsIMsgWindow aMsgWindow, in nsIMsgIncomingServer server);
00101 
00110   void registerComposeWindow(in nsIDOMWindowInternal aWindow, in nsIMsgCompose aMsgCompose);
00111 
00119   void unregisterComposeWindow(in nsIDOMWindowInternal aWindow);
00120   
00129   nsIMsgCompose getMsgComposeForWindow(in nsIDOMWindowInternal aWindow);
00130 };