1 /* -*- Mode: IDL; 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 * Eric Ballet Baz 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 "nsILocalFile.idl"
41
42 /*
43 * this interface contains all the personal outgoing mail information
44 * for a given person.
45 * each identity is identified by a key, which is the <id> string in
46 * the identity preferences, such as in
47 * mail.identity.<id>.replyTo
48 *
49 */
50
51
52 [scriptable, uuid(3038bec6-2a5f-4eba-977d-4e037ae5aba3)]
53 interface nsIMsgIdentity : nsISupports {
54 /* internal preferences ID */
55 attribute ACString key;
56
57 /*
58 *overriding display name for this identity. if this pref is not set
59 * then this will return some composed string from the fullname and email
60 */
61 attribute AString identityName;
62
63 /* user's full name, i.e. John Doe */
64 attribute AString fullName;
65
66 /* user's e-mail address, i.e. john@doe.com */
67 attribute ACString email;
68
69 /* optional replyTo address, i.e. johnNOSPAM@doe.com */
70 attribute ACString replyTo;
71
72 /* optional organization */
73 attribute AString organization;
74
75 /* should we compose with HTML by default? */
76 attribute boolean composeHtml;
77
78 /* should we attach a signature by default? */
79 attribute boolean attachSignature;
80
81 /* should we attach a vcard by default? */
82 attribute boolean attachVCard;
83
84 /* should we automatically quote the original message? */
85 attribute boolean autoQuote;
86
87 /* what should our quoting preference be? */
88 attribute long replyOnTop;
89
90 /* what should our signature be at the end of the quoted text when replying above it? */
91 attribute boolean sigBottom;
92
93 /* the current signature */
94 attribute nsILocalFile signature;
95 attribute long signatureDate;
96
97 attribute ACString escapedVCard;
98
99 attribute boolean doFcc;
100 attribute ACString fccFolder;
101
102 attribute ACString fccFolderPickerMode;
103 attribute boolean fccReplyFollowsParent;
104 attribute ACString draftsFolderPickerMode;
105 attribute ACString tmplFolderPickerMode;
106
107 // Don't call bccSelf, bccOthers, and bccList directly, they are
108 // only used for migration and backward compatability. Use doBcc
109 // and doBccList instead.
110 attribute boolean bccSelf;
111 attribute boolean bccOthers;
112 attribute ACString bccList;
113
114 attribute boolean doBcc;
115 attribute ACString doBccList;
116
117 attribute ACString draftFolder;
118 attribute ACString stationeryFolder;
119 attribute boolean showSaveMsgDlg;
120 attribute ACString directoryServer;
121 attribute boolean overrideGlobalPref;
122 /**
123 * If this is false, don't append the user's domain
124 * to an autocomplete address with no matches
125 */
126 attribute boolean autocompleteToMyDomain;
127 /**
128 * valid determines if the UI should use this identity
129 * and the wizard uses this to determine whether or not
130 * to ask the user to complete all the fields
131 */
132 attribute boolean valid;
133
134 /**
135 * this is really dangerous. this destroys all pref values
136 * do not call this unless you know what you're doing!
137 */
138 void clearAllValues();
139
140 /**
141 * the preferred smtp server for this identity.
142 * if this is set, this the smtp server that should be used
143 * for the message send
144 */
145 attribute ACString smtpServerKey;
146
147 /**
148 * default request for return receipt option for this identity
149 * if this is set, the Return Receipt menu item on the compose
150 * window will be checked
151 */
152 readonly attribute boolean requestReturnReceipt;
153 readonly attribute long receiptHeaderType;
154
155 /**
156 * default request for DSN option for this identity
157 * if this is set, the DSN menu item on the compose
158 * window will be checked
159 */
160 readonly attribute boolean requestDSN;
161
162 /* copy the attributes of the identity we pass in */
163 void copy(in nsIMsgIdentity identity);
164
165 /**
166 * these generic getter / setters, useful for extending mailnews
167 * note, these attributes persist across sessions
168 */
169 AString getUnicharAttribute(in string name);
170 void setUnicharAttribute(in string name, in AString value);
171
172 ACString getCharAttribute(in string name);
173 void setCharAttribute(in string name, in ACString value);
174
175 boolean getBoolAttribute(in string name);
176 void setBoolAttribute(in string name, in boolean value);
177
178 long getIntAttribute(in string name);
179 void setIntAttribute(in string name, in long value);
180
181 /* useful for debugging */
182 AString toString();
183 };