2001-09-29 00:14:13 +04:00
|
|
|
/* -*- Mode: IDL; 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-04-20 01:32:26 +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-04-20 01:32:26 +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-04-20 01:32:26 +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-04-20 01:32:26 +04:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
1999-05-12 08:40:44 +04:00
|
|
|
|
1999-06-23 07:29:44 +04:00
|
|
|
interface nsIURI;
|
1999-05-12 10:28:50 +04:00
|
|
|
interface nsIUrlListener;
|
1999-04-20 01:32:26 +04:00
|
|
|
interface nsIStreamListener;
|
2000-01-06 03:45:28 +03:00
|
|
|
interface nsIMsgWindow;
|
1999-06-05 03:00:52 +04:00
|
|
|
interface nsIFileSpec;
|
2000-01-19 01:33:35 +03:00
|
|
|
interface nsIMsgFolder;
|
2000-04-17 02:12:36 +04:00
|
|
|
interface nsIMsgSearchSession;
|
2001-03-17 04:59:34 +03:00
|
|
|
interface nsIMsgDBHdr;
|
2002-12-03 16:06:46 +03:00
|
|
|
interface nsIStreamConverter;
|
1999-04-20 01:32:26 +04:00
|
|
|
|
2000-01-13 00:43:59 +03:00
|
|
|
%{C++
|
|
|
|
#include "nsMsgKeyArray.h"
|
|
|
|
%}
|
|
|
|
|
|
|
|
[ptr] native nsMsgKeyArrayPtr(nsMsgKeyArray);
|
|
|
|
|
|
|
|
|
1999-05-27 09:19:55 +04:00
|
|
|
[scriptable, uuid(F11009C1-F697-11d2-807F-006008128C4E)]
|
1999-04-20 01:32:26 +04:00
|
|
|
interface nsIMsgMessageService : nsISupports {
|
1999-04-21 03:33:19 +04:00
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////
|
1999-06-23 07:29:44 +04:00
|
|
|
// If you want a handle on the running task, pass in a valid nsIURI
|
1999-04-21 03:33:19 +04:00
|
|
|
// ptr. You can later interrupt this action by asking the netlib
|
|
|
|
// service manager to interrupt the url you are given back.
|
|
|
|
// Remember to release aURL when you are done with it. Pass nsnull
|
|
|
|
// in for aURL if you don't care about the returned URL.
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
|
|
// CopyMessage: Pass in the URI for the message you want to have
|
|
|
|
// copied.
|
|
|
|
// aCopyListener already knows about the destination folder.
|
|
|
|
// Set aMoveMessage to PR_TRUE if you want the message to be moved.
|
|
|
|
// PR_FALSE leaves it as just a copy.
|
|
|
|
///////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
void CopyMessage(in string aSrcURI, in nsIStreamListener aCopyListener, in boolean aMoveMessage,
|
2000-08-07 00:15:32 +04:00
|
|
|
in nsIUrlListener aUrlListener, in nsIMsgWindow aMsgWindow, out nsIURI aURL);
|
1999-04-21 03:33:19 +04:00
|
|
|
|
2000-01-13 00:43:59 +03:00
|
|
|
/* copy multiple messages at a time */
|
2000-01-19 01:33:35 +03:00
|
|
|
[noscript] void CopyMessages(in nsMsgKeyArrayPtr keys, in nsIMsgFolder srcFolder, in nsIStreamListener aCopyListener, in boolean aMoveMessage,
|
2000-08-07 00:15:32 +04:00
|
|
|
in nsIUrlListener aUrlListener, in nsIMsgWindow aMsgWindow, out nsIURI aURL);
|
2000-01-13 00:43:59 +03:00
|
|
|
|
2000-05-16 02:40:01 +04:00
|
|
|
/////////////////////////////////////////////////////////////////////
|
|
|
|
// DisplayMessage: When you want a message displayed....
|
|
|
|
// aMessageURI is a uri representing the message to display.
|
2005-01-04 01:51:17 +03:00
|
|
|
// aDisplayConsumer is (for now) an nsIDocShell which we'll use to load
|
|
|
|
// the message into.
|
|
|
|
// XXXbz Should it be an nsIWebNavigation or something?
|
2003-09-11 06:57:27 +04:00
|
|
|
// aCharsetOverride (optional) character set over ride to force the message to
|
|
|
|
// use.
|
|
|
|
//
|
2000-05-16 02:40:01 +04:00
|
|
|
///////////////////////////////////////////////////////////////////
|
2000-01-26 07:08:26 +03:00
|
|
|
|
2000-05-16 02:40:01 +04:00
|
|
|
void DisplayMessage(in string aMessageURI,
|
|
|
|
in nsISupports aDisplayConsumer,
|
2000-01-06 03:45:28 +03:00
|
|
|
in nsIMsgWindow aMsgWindow,
|
|
|
|
in nsIUrlListener aUrlListener,
|
2003-06-11 22:16:03 +04:00
|
|
|
in string aCharsetOverride,
|
2000-01-06 03:45:28 +03:00
|
|
|
out nsIURI aURL);
|
1999-04-20 01:32:26 +04:00
|
|
|
|
1999-06-05 03:00:52 +04:00
|
|
|
/////////////////////////////////////////////////////////////////////
|
2000-03-29 04:58:21 +04:00
|
|
|
// OpenAttachment: When you want an attachment downloaded
|
2000-06-23 02:36:06 +04:00
|
|
|
// aContentType --> we need to know the content type of the attachment
|
2000-07-08 01:57:39 +04:00
|
|
|
// aFileName --> the name of the attachment.
|
2000-06-23 02:36:06 +04:00
|
|
|
// aUrl --> string representation of the original url associated with the msg.
|
|
|
|
// aMessageUri --> RDF resource that describes the message
|
|
|
|
// aMsgWindow --> message window
|
2000-03-29 04:58:21 +04:00
|
|
|
///////////////////////////////////////////////////////////////////
|
|
|
|
|
2000-06-23 02:36:06 +04:00
|
|
|
void openAttachment(in string aContentType,
|
2000-07-08 01:57:39 +04:00
|
|
|
in string aFileName,
|
2000-06-23 02:36:06 +04:00
|
|
|
in string aUrl,
|
|
|
|
in string aMessageUri,
|
|
|
|
in nsISupports aDisplayConsumer,
|
2000-03-29 04:58:21 +04:00
|
|
|
in nsIMsgWindow aMsgWindow,
|
2000-06-23 02:36:06 +04:00
|
|
|
in nsIUrlListener aUrlListener);
|
2000-03-29 04:58:21 +04:00
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////
|
1999-06-05 03:00:52 +04:00
|
|
|
// SaveMessageToDisk: When you want to spool a message out to a file
|
|
|
|
// on disk. This is an asynch operation of course. You must pass in a
|
|
|
|
// url listener in order to figure out when the operation is done.
|
|
|
|
// aMessageURI--> uri representing the message to spool out to disk.
|
|
|
|
// aFile - the file you want the message saved to
|
1999-09-12 09:06:19 +04:00
|
|
|
// aGenerateDummyEnvelope --> usually FALSE. Set to TRUE if you want the msg
|
1999-06-05 03:00:52 +04:00
|
|
|
// appended at the end of the file.
|
|
|
|
///////////////////////////////////////////////////////////////////
|
2000-01-26 07:08:26 +03:00
|
|
|
|
2003-09-11 06:57:27 +04:00
|
|
|
void SaveMessageToDisk(in string aMessageURI, in nsIFileSpec aFile,
|
|
|
|
in boolean aGenerateDummyEnvelope,
|
|
|
|
in nsIUrlListener aUrlListener, out nsIURI aURL,
|
|
|
|
in boolean canonicalLineEnding, in nsIMsgWindow aMsgWindow);
|
1999-10-24 03:39:57 +04:00
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////
|
|
|
|
// GetUrlForUri: when you have a uri and you would like to convert that
|
|
|
|
// to a url which can be run through necko, you can use this method.
|
|
|
|
// the Uri MUST refer to a message and not a folder!
|
2000-01-26 07:08:26 +03:00
|
|
|
/////////////////////////////////////////////////////////////////////
|
|
|
|
|
2000-03-25 03:58:20 +03:00
|
|
|
void GetUrlForUri(in string aMessageURI, out nsIURI aURL, in nsIMsgWindow aMsgWindow);
|
2000-02-16 02:05:06 +03:00
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////
|
|
|
|
// DisplayMessageForPrinting: When you want a message displayed in a
|
|
|
|
// format that is suitable for printing....
|
|
|
|
// aMessageURI is a uri representing the message to display.
|
2005-01-04 01:51:17 +03:00
|
|
|
// aDisplayConsumer is (for now) a nsIDocShell which we'll use to load
|
|
|
|
// the message into.
|
|
|
|
// XXXbz should it be an nsIWebNavigation?
|
2000-02-16 02:05:06 +03:00
|
|
|
///////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
void DisplayMessageForPrinting(in string aMessageURI, in nsISupports aDisplayConsumer,
|
|
|
|
in nsIMsgWindow aMsgWindow,
|
|
|
|
in nsIUrlListener aUrlListener,
|
|
|
|
out nsIURI aURL);
|
2000-04-17 02:12:36 +04:00
|
|
|
|
2000-04-19 05:01:08 +04:00
|
|
|
void Search(in nsIMsgSearchSession aSearchSession, in nsIMsgWindow aMsgWindow, in nsIMsgFolder aMsgFolder, in string aSearchUri);
|
2001-03-17 04:59:34 +03:00
|
|
|
|
2002-12-03 16:06:46 +03:00
|
|
|
// this method streams a message to the passed in consumer. If aConvertData is true, it
|
|
|
|
// will create a stream converter from message rfc822 to star/star. It will also tack
|
|
|
|
// aAdditionalHeader onto the url (e.g., "header=filter").
|
|
|
|
// @param aMessageURI uri of message to stream
|
|
|
|
// @param aConsumer generally, a stream listener listening to the message
|
|
|
|
// @param aMsgWindow msgWindow for give progress and status feedback
|
|
|
|
// @param aUrlListener gets notified when url starts and stops
|
|
|
|
// @param aConvertData should we create a stream converter?
|
|
|
|
// @param aAdditionalHeader added to URI, e.g., "header=filter"
|
|
|
|
// @return the URL that gets run
|
|
|
|
nsIURI streamMessage(in string aMessageURI, in nsISupports aConsumer,
|
|
|
|
in nsIMsgWindow aMsgWindow,
|
|
|
|
in nsIUrlListener aUrlListener,
|
|
|
|
in boolean aConvertData,
|
|
|
|
in string aAdditionalHeader);
|
2001-03-17 04:59:34 +03:00
|
|
|
/**
|
|
|
|
* now the the message datasource is going away
|
|
|
|
* we need away to go from message uri to go nsIMsgDBHdr
|
|
|
|
*/
|
|
|
|
nsIMsgDBHdr messageURIToMsgHdr(in string uri);
|
1999-04-21 03:33:19 +04:00
|
|
|
};
|
2000-06-23 02:36:06 +04:00
|
|
|
|
|
|
|
// Some mail protocols (like imap) allow you to fetch individual mime parts. We use this interface
|
|
|
|
// to represent message services whose protocols support this. To use this interface, you should get
|
|
|
|
// the message service then QI for this interface. If it's present, then can fetch a mime part.
|
|
|
|
[scriptable, uuid(3728C255-480C-11d4-98D0-001083010E9B)]
|
|
|
|
interface nsIMsgMessageFetchPartService : nsISupports
|
|
|
|
{
|
|
|
|
// FetchMimePart --> used to fetch an individual mime part
|
|
|
|
// aURI --> url representing the message
|
|
|
|
// aMessageURI --> RDF URI including the part to fetch
|
|
|
|
nsIURI fetchMimePart(in nsIURI aURI, in string aMessageUri, in nsISupports aDisplayConsumer,
|
|
|
|
in nsIMsgWindow aMsgWindow,
|
|
|
|
in nsIUrlListener aUrlListener);
|
2001-03-17 04:59:34 +03:00
|
|
|
};
|