1999-10-05 03:50:56 +04:00
|
|
|
/* -*- Mode: idl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
1999-02-09 03:08:18 +03:00
|
|
|
*
|
1999-11-06 06:43:54 +03:00
|
|
|
* The contents of this file are subject to the Netscape 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/NPL/
|
1999-02-09 03:08:18 +03:00
|
|
|
*
|
1999-11-06 06:43:54 +03: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-02-09 03:08:18 +03:00
|
|
|
*
|
1999-11-06 06:43:54 +03:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is Netscape
|
1999-02-09 03:08:18 +03:00
|
|
|
* Communications Corporation. Portions created by Netscape are
|
1999-11-06 06:43:54 +03:00
|
|
|
* Copyright (C) 1998 Netscape Communications Corporation. All
|
|
|
|
* Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
1999-02-09 03:08:18 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
1999-06-11 02:04:21 +04:00
|
|
|
#include "domstubs.idl"
|
1999-02-09 03:08:18 +03:00
|
|
|
#include "nsIMsgCompFields.idl"
|
1999-06-15 18:25:26 +04:00
|
|
|
#include "nsIEditorShell.idl"
|
1999-06-22 00:28:39 +04:00
|
|
|
#include "nsIMsgIdentity.idl"
|
1999-02-09 03:08:18 +03:00
|
|
|
|
Fixes related to message compose UI, save attachment, edit message as new and draft message. Those changes fix bug 14868, 23627, 24185, 24864, 24930, 26087, 26733, 27171, 27762, 27931, 27932, 29119, 29176, 30279, 31546 and 28677. R=alecf, rhp, jefft
2000-03-23 09:39:19 +03:00
|
|
|
|
1999-06-11 02:04:21 +04:00
|
|
|
%{ C++
|
|
|
|
#include "nsIDOMWindow.h"
|
1999-06-12 00:28:39 +04:00
|
|
|
#include "nsIEditorShell.h"
|
1999-06-11 02:04:21 +04:00
|
|
|
%}
|
1999-02-09 03:08:18 +03:00
|
|
|
|
1999-06-11 02:04:21 +04:00
|
|
|
|
|
|
|
typedef long MSG_ComposeType;
|
1999-10-05 03:50:56 +04:00
|
|
|
|
|
|
|
[scriptable, uuid(c7035852-7531-11d3-9a73-006008948010)]
|
|
|
|
interface nsIMsgCompType {
|
Fixes related to message compose UI, save attachment, edit message as new and draft message. Those changes fix bug 14868, 23627, 24185, 24864, 24930, 26087, 26733, 27171, 27762, 27931, 27932, 29119, 29176, 30279, 31546 and 28677. R=alecf, rhp, jefft
2000-03-23 09:39:19 +03:00
|
|
|
const long New = 0;
|
|
|
|
const long Reply = 1;
|
|
|
|
const long ReplyAll = 2;
|
|
|
|
const long ForwardAsAttachment = 3;
|
|
|
|
const long ForwardInline = 4;
|
|
|
|
const long NewsPost = 5;
|
|
|
|
const long ReplyToGroup = 6;
|
|
|
|
const long ReplyToSenderAndGroup = 7;
|
|
|
|
const long Draft = 8;
|
|
|
|
const long Template = 9;
|
|
|
|
const long MailToUrl = 10;
|
1999-06-11 02:04:21 +04:00
|
|
|
};
|
1999-10-05 03:50:56 +04:00
|
|
|
|
1999-06-11 02:04:21 +04:00
|
|
|
|
|
|
|
typedef long MSG_ComposeFormat;
|
1999-10-05 03:50:56 +04:00
|
|
|
|
|
|
|
[scriptable, uuid(a28325e8-7531-11d3-8f1c-006008948010)]
|
|
|
|
interface nsIMsgCompFormat {
|
|
|
|
const long Default = 0;
|
|
|
|
const long HTML = 1;
|
|
|
|
const long PlainText = 2;
|
2000-03-14 05:59:13 +03:00
|
|
|
const long OppositeOfDefault = 3;
|
1999-06-11 02:04:21 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef long MSG_ComposeSaveType;
|
1999-10-05 03:50:56 +04:00
|
|
|
|
|
|
|
[scriptable, uuid(6953e50a-7531-11d3-85fe-006008948010)]
|
|
|
|
interface nsIMsgCompSaveType {
|
|
|
|
const long File = 0;
|
|
|
|
const long Template = 1;
|
|
|
|
const long Draft = 2;
|
1999-06-11 02:04:21 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef long MSG_DeliverMode;
|
1999-10-05 03:50:56 +04:00
|
|
|
|
|
|
|
[scriptable, uuid(f338eba4-7530-11d3-8833-006008948010)]
|
|
|
|
interface nsIMsgCompDeliverMode {
|
|
|
|
const long Now = 0;
|
|
|
|
const long Later = 1;
|
|
|
|
const long Save = 2;
|
|
|
|
const long SaveAs = 3;
|
|
|
|
const long SaveAsDraft = 4;
|
|
|
|
const long SaveAsTemplate = 5;
|
1999-06-11 02:04:21 +04:00
|
|
|
};
|
1999-10-05 03:50:56 +04:00
|
|
|
|
2000-02-15 09:48:13 +03:00
|
|
|
[scriptable, uuid(f38ea280-e090-11d3-a449-e3153319347c)]
|
|
|
|
interface nsIMsgCompSendFormat {
|
|
|
|
const long AskUser = 0;
|
|
|
|
const long PlainText = 1;
|
|
|
|
const long HTML = 2;
|
|
|
|
const long Both = 3;
|
|
|
|
};
|
|
|
|
|
1999-11-13 19:04:41 +03:00
|
|
|
[scriptable, uuid(e72c6981-992a-11d3-a449-eb15bb19bc7c)]
|
|
|
|
interface nsIMsgComposeStateListener : nsISupports
|
|
|
|
{
|
|
|
|
/* ... */
|
|
|
|
void NotifyComposeFieldsReady();
|
|
|
|
};
|
|
|
|
|
1999-06-11 02:04:21 +04:00
|
|
|
|
|
|
|
[scriptable, uuid(4E606270-B588-11D2-8289-00805F2A0107)]
|
1999-02-09 03:08:18 +03:00
|
|
|
interface nsIMsgCompose : nsISupports {
|
|
|
|
|
1999-06-11 02:04:21 +04:00
|
|
|
/* ... */
|
|
|
|
void Initialize(in nsIDOMWindow aWindow, in wstring originalMsgURI,
|
1999-09-21 09:37:23 +04:00
|
|
|
in MSG_ComposeType type, in MSG_ComposeFormat format,
|
|
|
|
in nsIMsgCompFields compFields,
|
|
|
|
in nsIMsgIdentity identity);
|
1999-06-11 02:04:21 +04:00
|
|
|
|
|
|
|
/* ... */
|
|
|
|
void SetDocumentCharset(in wstring charset);
|
1999-11-13 19:04:41 +03:00
|
|
|
|
|
|
|
/* ... */
|
|
|
|
void RegisterStateListener(in nsIMsgComposeStateListener stateListener);
|
|
|
|
|
|
|
|
/* ... */
|
|
|
|
void UnregisterStateListener(in nsIMsgComposeStateListener stateListener);
|
1999-06-11 02:04:21 +04:00
|
|
|
|
|
|
|
/* ... */
|
1999-06-29 08:45:11 +04:00
|
|
|
void SendMsg(in MSG_DeliverMode deliverMode,
|
|
|
|
in nsIMsgIdentity identity,
|
|
|
|
in wstring callback);
|
1999-06-11 02:04:21 +04:00
|
|
|
|
|
|
|
/* ... */
|
1999-06-29 08:45:11 +04:00
|
|
|
void SendMsgEx(in MSG_DeliverMode deliverMode,
|
|
|
|
in nsIMsgIdentity identity,
|
|
|
|
in wstring addrTo, in wstring addrCc, in wstring addrBcc,
|
|
|
|
in wstring newsgroup, in wstring subject, in wstring body,
|
|
|
|
in wstring callback);
|
1999-06-22 00:28:39 +04:00
|
|
|
|
1999-06-11 02:04:21 +04:00
|
|
|
/* ... */
|
|
|
|
void CloseWindow();
|
|
|
|
|
2000-01-15 04:33:18 +03:00
|
|
|
/*
|
|
|
|
AttachmentPrettyName will return only the leafName if the it's a file URL.
|
|
|
|
It will also convert the filename to the right character set.
|
|
|
|
This UI utility function should probably go into it's own class
|
|
|
|
*/
|
|
|
|
wstring AttachmentPrettyName(in wstring url);
|
|
|
|
|
2000-02-15 09:48:13 +03:00
|
|
|
/* GetNoHtmlRecipients: if null is passed as recipient, the function will automatically
|
|
|
|
looks for all the recipients (to, cc, bcc) stored in the compose fields
|
|
|
|
*/
|
|
|
|
wstring GetNoHtmlRecipients(in wstring recipients);
|
|
|
|
|
|
|
|
/* GetNoHtmlNewsgroups: if null is passed as recipient, the function will automatically
|
|
|
|
looks for newsgroups stored in compose fields
|
|
|
|
*/
|
|
|
|
wstring GetNoHtmlNewsgroups(in wstring newsgroups);
|
Fixes related to message compose UI, save attachment, edit message as new and draft message. Those changes fix bug 14868, 23627, 24185, 24864, 24930, 26087, 26733, 27171, 27762, 27931, 27932, 29119, 29176, 30279, 31546 and 28677. R=alecf, rhp, jefft
2000-03-23 09:39:19 +03:00
|
|
|
|
2000-05-07 00:14:23 +04:00
|
|
|
/* BodyContainsHTMLTag: will return true if the node passed contains any HTML tag that really affect the formating
|
|
|
|
*/
|
|
|
|
boolean BodyContainsHTMLTag(in nsIDOMNode node);
|
|
|
|
|
Fixes related to message compose UI, save attachment, edit message as new and draft message. Those changes fix bug 14868, 23627, 24185, 24864, 24930, 26087, 26733, 27171, 27762, 27931, 27932, 29119, 29176, 30279, 31546 and 28677. R=alecf, rhp, jefft
2000-03-23 09:39:19 +03:00
|
|
|
/* ResetNodeEventHandlers: Temporary API to go around bug 26528. THis API will be removed when bug 26528 is fixed.
|
|
|
|
*/
|
|
|
|
void ResetNodeEventHandlers(in nsIDOMNode node);
|
2000-02-15 09:48:13 +03:00
|
|
|
|
1999-06-11 02:04:21 +04:00
|
|
|
/* ... */
|
1999-06-15 18:25:26 +04:00
|
|
|
attribute nsIEditorShell editor;
|
1999-06-11 02:04:21 +04:00
|
|
|
|
|
|
|
/* ... */
|
|
|
|
readonly attribute nsIDOMWindow domWindow;
|
|
|
|
|
|
|
|
/* ... */
|
|
|
|
readonly attribute nsIMsgCompFields compFields;
|
|
|
|
|
|
|
|
/* ... */
|
|
|
|
readonly attribute boolean composeHTML;
|
|
|
|
|
|
|
|
/* ... */
|
|
|
|
readonly attribute long wrapLength;
|
2000-03-16 03:03:43 +03:00
|
|
|
|
|
|
|
/* by reading this value, you can determine if yes or not the message has been mofified
|
|
|
|
by the user. When you set this value to false, you reset the modification count
|
|
|
|
of the body to 0 (clean).
|
|
|
|
*/
|
|
|
|
attribute boolean bodyModified;
|
1999-02-09 03:08:18 +03:00
|
|
|
};
|
|
|
|
|