1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 *
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
9 *
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
14 *
15 * The Original Code is mozilla.org code.
16 *
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1998
20 * the Initial Developer. All Rights Reserved.
21 *
22 * Contributor(s):
23 * Olivier Parniere BT Global Services / Etat francais Ministere de la Defense
24 *
25 * Alternatively, the contents of this file may be used under the terms of
26 * either of the GNU General Public License Version 2 or later (the "GPL"),
27 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 * in which case the provisions of the GPL or the LGPL are applicable instead
29 * of those above. If you wish to allow use of your version of this file only
30 * under the terms of either the GPL or the LGPL, and not to allow others to
31 * use your version of this file under the terms of the MPL, indicate your
32 * decision by deleting the provisions above and replace them with the notice
33 * and other provisions required by the GPL or the LGPL. If you do not delete
34 * the provisions above, a recipient may use your version of this file under
35 * the terms of any one of the MPL, the GPL or the LGPL.
36 *
37 * ***** END LICENSE BLOCK ***** */
38
39 #include "nsISupports.idl"
40 #include "nsIMsgRecipientArray.idl"
41 #include "nsIMsgAttachment.idl"
42 #include "nsISupportsArray.idl"
43
44 [scriptable, uuid(afe5fedc-7ef9-44dd-8f19-b59286357675)]
45 interface nsIMsgCompFields : nsISupports {
46
47 attribute AString from;
48 attribute AString replyTo;
49 attribute AString to;
50 attribute AString cc;
51 attribute AString bcc;
52
53 attribute AString fcc;
54 attribute AString fcc2;
55
56 attribute AString newsgroups;
57 attribute string newshost;
58 attribute string newspostUrl;
59 attribute string followupTo;
60
61 attribute AString subject;
62
63 /**
64 * attachments
65 *
66 * @OBSOLETE, DO NOT USE ANYMORE
67 */
68 attribute string attachments;
69
70 attribute AString organization;
71 attribute string references;
72 attribute string priority;
73 attribute string messageId;
74 attribute string characterSet;
75 readonly attribute string defaultCharacterSet;
76
77 attribute AString templateName;
78 attribute string draftId;
79
80 attribute boolean returnReceipt;
81 attribute long receiptHeaderType;
82 attribute boolean DSN;
83 attribute boolean attachVCard;
84 attribute boolean forcePlainText;
85 attribute boolean useMultipartAlternative;
86 attribute boolean uuEncodeAttachments;
87 attribute boolean bodyIsAsciiOnly;
88 attribute boolean forceMsgEncoding;
89
90 attribute AString otherRandomHeaders;
91
92 attribute AString body;
93
94 /**
95 * temporaryFiles
96 *
97 * @OBSOLETE, DO NOT USE ANYMORE
98 */
99 attribute string temporaryFiles;
100
101 readonly attribute nsISupportsArray attachmentsArray;
102 void addAttachment(in nsIMsgAttachment attachment);
103 void removeAttachment(in nsIMsgAttachment attachment);
104 void removeAttachments();
105
106 /* some utility functions */
107 nsIMsgRecipientArray SplitRecipients(in wstring recipients, in boolean emailAddressOnly);
108 void ConvertBodyToPlainText();
109
110 // Check if the composing mail headers can be converted to a mail charset.
111 boolean checkCharsetConversion(out string fallbackCharset);
112
113 /**
114 * Indicates whether we need to check if the current |DocumentCharset|
115 * can represent all the characters in the message body. It should be
116 * initialized to true and set to false when 'Send Anyway' is selected
117 * by a user. (bug 249530)
118 */
119 attribute boolean needToCheckCharset;
120
121 attribute nsISupports securityInfo;
122 };