2001-09-29 00:14:13 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
2004-04-17 22:33:16 +04:00
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
1999-06-10 04:41:28 +04:00
|
|
|
*
|
2004-04-17 22:33:16 +04:00
|
|
|
* The contents of this file are subject to the Mozilla 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/MPL/
|
1999-06-10 04:41:28 +04:00
|
|
|
*
|
2001-09-29 00:14:13 +04: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-06-10 04:41:28 +04:00
|
|
|
*
|
1999-11-06 06:43:54 +03:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
2004-04-17 22:33:16 +04:00
|
|
|
* The Initial Developer of the Original Code is
|
2001-09-29 00:14:13 +04:00
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
1999-11-06 06:43:54 +03:00
|
|
|
*
|
2001-09-29 00:14:13 +04:00
|
|
|
* Contributor(s):
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
2004-04-17 22:33:16 +04:00
|
|
|
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
|
|
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
2001-09-29 00:14:13 +04:00
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
2004-04-17 22:33:16 +04:00
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
2001-09-29 00:14:13 +04:00
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
2004-04-17 22:33:16 +04:00
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
2001-09-29 00:14:13 +04:00
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
1999-06-10 04:41:28 +04:00
|
|
|
|
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
#include "nsIMsgCompose.idl"
|
2000-12-06 22:56:27 +03:00
|
|
|
#include "nsIMsgComposeParams.idl"
|
1999-06-10 04:41:28 +04:00
|
|
|
|
1999-11-18 11:36:39 +03:00
|
|
|
interface nsIURI;
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 21:42:36 +04:00
|
|
|
interface nsIDOMWindowInternal;
|
2001-10-01 22:45:16 +04:00
|
|
|
interface nsIMsgWindow;
|
2001-11-03 07:42:19 +03:00
|
|
|
interface nsIMsgIdentity;
|
2005-06-01 22:10:52 +04:00
|
|
|
interface nsIMsgIncomingServer;
|
2005-06-13 22:10:20 +04:00
|
|
|
interface nsIMsgDBHdr;
|
1999-06-10 04:41:28 +04:00
|
|
|
|
2006-10-27 00:26:43 +04:00
|
|
|
[scriptable, uuid(BC1C0379-82EF-45ae-9710-DD4FA93252F7)]
|
1999-06-10 04:41:28 +04:00
|
|
|
interface nsIMsgComposeService : nsISupports {
|
|
|
|
|
2001-10-30 17:42:41 +03:00
|
|
|
/* we need a msg window because when we forward inline we may need progress */
|
2005-06-01 22:10:52 +04:00
|
|
|
void OpenComposeWindow(in string msgComposeWindowURL, in string originalMsgURI, in MSG_ComposeType type,
|
|
|
|
in MSG_ComposeFormat format,
|
|
|
|
in nsIMsgIdentity identity,
|
|
|
|
in nsIMsgWindow aMsgWindow);
|
1999-11-18 11:36:39 +03:00
|
|
|
|
|
|
|
/* use this method to invoke a compose window given a mailto url.
|
2001-10-30 17:42:41 +03:00
|
|
|
aMsgComposeWindowURL --> can be null in most cases. If you have your own chrome
|
|
|
|
url you want to use in brining up a compose window, pass it in here.
|
|
|
|
aURI --> the mailto url you want to use as the foundation for the data inside
|
|
|
|
the compose window */
|
|
|
|
void OpenComposeWindowWithURI(in string msgComposeWindowURL, in nsIURI aURI);
|
1999-06-10 04:41:28 +04:00
|
|
|
|
2001-10-30 17:42:41 +03:00
|
|
|
/* ... */
|
|
|
|
void OpenComposeWindowWithParams(in string msgComposeWindowURL, in nsIMsgComposeParams params);
|
2001-08-16 02:40:14 +04:00
|
|
|
|
2001-10-30 17:42:41 +03:00
|
|
|
/* ... */
|
|
|
|
nsIMsgCompose InitCompose(in nsIDOMWindowInternal aWindow, in nsIMsgComposeParams params);
|
1999-06-10 04:41:28 +04:00
|
|
|
|
2001-11-20 06:09:41 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* defaultIdentity
|
|
|
|
*
|
|
|
|
* @return the default identity, in case no identity has been setup yet, will return null
|
|
|
|
*/
|
|
|
|
readonly attribute nsIMsgIdentity defaultIdentity;
|
|
|
|
|
2001-10-30 17:42:41 +03:00
|
|
|
/* This function is use for debugging purpose only and may go away at anytime without warning */
|
|
|
|
void TimeStamp(in string label, in boolean resetTime);
|
2001-09-13 00:47:38 +04:00
|
|
|
|
|
|
|
/* This attribute is use for debugging purposes for determining whether to PR_LOG or not */
|
|
|
|
readonly attribute boolean logComposePerformance;
|
2001-11-03 07:42:19 +03:00
|
|
|
|
|
|
|
[noscript] boolean determineComposeHTML(in nsIMsgIdentity aIdentity, in MSG_ComposeFormat aFormat);
|
|
|
|
[noscript] void cacheWindow(in nsIDOMWindowInternal aWindow, in boolean aComposeHTML, in nsIMsgComposeRecyclingListener listener);
|
|
|
|
boolean isCachedWindow(in nsIDOMWindowInternal aWindow);
|
2003-06-17 06:17:52 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* given a mailto url, parse the attributes and turn them into a nsIMsgComposeParams object
|
|
|
|
* @return nsIMsgComposeParams which corresponds to the passed in mailto url
|
|
|
|
*/
|
|
|
|
nsIMsgComposeParams getParamsForMailto(in nsIURI aURI);
|
2005-06-01 22:10:52 +04:00
|
|
|
|
|
|
|
void forwardMessage(in AString forwardTo, in nsIMsgDBHdr aMsgHdr,
|
2006-10-27 00:26:43 +04:00
|
|
|
in nsIMsgWindow aMsgWindow, in nsIMsgIncomingServer aServer);
|
2005-06-01 22:10:52 +04:00
|
|
|
|
|
|
|
void replyWithTemplate(in nsIMsgDBHdr msgHdr, in string templateUri,
|
2006-10-27 00:26:43 +04:00
|
|
|
in nsIMsgWindow aMsgWindow, in nsIMsgIncomingServer server);
|
1999-06-10 04:41:28 +04:00
|
|
|
|
2006-10-27 00:26:43 +04:00
|
|
|
/**
|
|
|
|
* Every open compose window registers itself with the compose service
|
|
|
|
* This allows consumers to get the msg compose object associated with a dom window
|
|
|
|
*
|
|
|
|
* @param aWindow The DOM Window
|
|
|
|
* @param aMsgCompose The compose object associated with the compose window
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
void registerComposeWindow(in nsIDOMWindowInternal aWindow, in nsIMsgCompose aMsgCompose);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* When a compose window is being closed (or recyled), it unregisters itself
|
|
|
|
* from the compose service.
|
|
|
|
*
|
|
|
|
* @param aWindow The DOM Window
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
void unregisterComposeWindow(in nsIDOMWindowInternal aWindow);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* For aWindow, returns the nsIMsgCompose object associated with the window.
|
|
|
|
*
|
|
|
|
* @param aWindow The DOMWindow associated with the compose window.
|
|
|
|
*
|
|
|
|
* @return NS_ERROR_FAILURE if we could not find a nsIMsgCompose for the passed in
|
|
|
|
* DOM Window.
|
|
|
|
*/
|
|
|
|
nsIMsgCompose getMsgComposeForWindow(in nsIDOMWindowInternal aWindow);
|
|
|
|
};
|