This file is indexed.

/usr/share/idl/thunderbird-11.0.1/nsIMsgCompose.idl is in thunderbird-dev 11.0.1+build1-0ubuntu2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
/* -*- Mode: idl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 *
 * 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/
 *
 * 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.
 *
 * The Original Code is mozilla.org code.
 *
 * The Initial Developer of the Original Code is
 * Netscape Communications Corporation.
 * Portions created by the Initial Developer are Copyright (C) 1998
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *   David Bienvenu - bienvenu@nventure.com
 *
 * Alternatively, the contents of this file may be used under the terms of
 * 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"),
 * 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
 * use your version of this file under the terms of the MPL, indicate your
 * 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
 * the terms of any one of the MPL, the GPL or the LGPL.
 *
 * ***** END LICENSE BLOCK ***** */

#include "nsISupports.idl"
#include "nsIMsgCompFields.idl"
#include "nsIMsgComposeParams.idl"
#include "nsIMsgSendListener.idl"

%{C++
#include "nsStringGlue.h"
%}

interface nsIMsgSend;
interface nsIMsgIdentity;
interface nsIMsgProgress;
interface nsIDocShell;
interface nsIDOMWindow;
interface nsIDOMNode;
interface nsIEditor;
interface nsIMsgWindow;

typedef long MSG_ComposeSaveType;

[scriptable, uuid(6953e50a-7531-11d3-85fe-006008948010)]
interface nsIMsgCompSaveType {
    const long File     = 0;
    const long Template = 1;
    const long Draft    = 2;
};

typedef long MSG_DeliverMode;

[scriptable, uuid(a9f27dd7-8f89-4de3-8fbf-41b789c16ee5)]
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;
    const long SendUnsent = 6;
    const long AutoSaveAsDraft = 7;
    const long Background = 8;
};

[scriptable, uuid(f38ea280-e090-11d3-a449-e3153319347c)]
interface nsIMsgCompSendFormat {
    const long AskUser = 4;     /* Hack: Bug 44512. If this is 0 and passed
                                   as results.action to the askSendFormat
                                   dialog, the args object gets destroyed.*/
    const long PlainText = 1;
    const long HTML = 2;
    const long Both = 3;
};

[scriptable, uuid(9638af92-1dd1-11b2-bef1-ca5fee0abc62)]
interface nsIMsgCompConvertible/*ToTXT*/ {
    const long Plain = 1;  // Like 4.x: Only <html>, <p>, <br>, ...
    const long Yes = 2;  // *Minor* alterations of the look: <ol>, <dd>, ...
    const long Altering = 3;  /* Look altered: <strong>, <i>, <h1>, ...
                                 Can be expressed in plaintext, but not in
                                 the way it looked in the HTML composer. */
    const long No = 4;  /* Will lose data: <font>, ...
                           Really *requires* visual formatting or
                           is not supported by our HTML->TXT converter. */
    /* The values here have meaning, they are "levels":
       convertible({a; b}) == max(convertible({a}), convertible({b}))
       must be true, i.e. the higher value counts. */
};

[scriptable, uuid(6ce49b2a-07dc-4783-b307-9a355423163f)]
interface nsIMsgComposeStateListener : nsISupports
{
	/* ... */
	void        NotifyComposeFieldsReady();
	void        ComposeProcessDone(in nsresult aResult);
	void        SaveInFolderDone(in string folderName);
	void        NotifyComposeBodyReady();
};

[scriptable, uuid(061aae23-7e0a-4818-9a15-1b5db3ceb7f4)]
interface nsIMsgComposeNotificationType
{
    const long ComposeFieldsReady = 0;
    const long ComposeProcessDone = 1;
    const long SaveInFolderDone   = 2;
    const long ComposeBodyReady   = 3;
};

native nsString(nsString);
[ref] native nsStringRef(nsString);

/* recycling listener interface */
[scriptable, uuid(0b28cc56-1dd2-11b2-bbe4-99e6a314f8ba)]
interface nsIMsgComposeRecyclingListener : nsISupports {
  void onClose();
  void onReopen(in nsIMsgComposeParams params);
};

[scriptable, uuid(fc9dc1dc-7726-4d29-bb92-a0227f526651)]
interface nsIMsgCompose : nsIMsgSendListener {

  /**
   * Initializes the msg compose object.
   *
   * @param aParams   An nsIMsgComposeParams object containing the initial
   *                  details for the compose.
   * @param aWindow   The optional window associated with this compose object.
   * @param aDocShell The optional docShell of the editor element that is used
   *                  for composing.
   */
  void initialize(in nsIMsgComposeParams aParams,
                  [optional] in nsIDOMWindow aWindow,
                  [optional] in nsIDocShell aDocShell); 

  /* ... */
  void SetDocumentCharset(in string charset);
  
  /* ... */
  void RegisterStateListener(in nsIMsgComposeStateListener stateListener);

  /* ... */
  void UnregisterStateListener(in nsIMsgComposeStateListener stateListener);

  /* ... */
  void SendMsg(in MSG_DeliverMode deliverMode, in nsIMsgIdentity identity, in string accountKey, in nsIMsgWindow aMsgWindow, in nsIMsgProgress progress);

  /* ... */
  void CloseWindow(in boolean reclycleIt);

  /* ... */
  void abort();
    
  /* ... */
  void quoteMessage(in string msgURI);

  /*
    AttachmentPrettyName will return only the leafName if the it's a file URL.
    It will also convert the filename to Unicode assuming it's in  the file system 
    charset. In case of URL, |charset| parameter will be used in the conversion.
    This UI utility function should probably go into it's own class
  */
  AUTF8String AttachmentPrettyName(in AUTF8String url, in string charset);

  /**
   * checkAndPopulateRecipients can perform several tasks (see params), the
   * main task is to determine the lowest common format preferred by recipients.
   *
   * @param aPopulateMailList        If true, this function will populate
   *                                 mailing lists present in the compose field.
   * @param aReturnNonHTMLRecipients If true, will build a list of the non
   *                                 HTML receipients.
   * @param aNonHTMLRecipients       This will contain any non-HTML recipients,
   *                                 if aReturnNonHTMLRecipients is true
   *                                 (comma-separated).
   * @return                         The lowest common format preferred by
   *                                 recipients (unknown, plaintext or html).
   *                                 See nsIAbPreferMailFormat.
   */
  unsigned long checkAndPopulateRecipients(in boolean aPopulateMailList,
                                           in boolean aReturnNonHTMLRecipients,
                                           out AString aNonHTMLRecipients);

  /* bodyConvertible: The level of "convertibility" to plaintext
   * @return a value from nsIMsgCompConvertible.
  */
  long bodyConvertible();

  /**
   * The identity currently selected for the message compose object. When set
   * this may change the signature on a message being composed. Note that
   * typically SendMsg will be called with the same identity as is set here, but
   * if it is different the SendMsg version will overwrite this identity.
   */
  attribute nsIMsgIdentity identity;

  /* Check if the composing mail headers (and identity) can be converted to a mail charset.
  */
  boolean checkCharsetConversion(in nsIMsgIdentity identity, out string fallbackCharset);

  /* Retreive the message send object */
  readonly attribute nsIMsgSend messageSend;
  
	/* ... */
  readonly attribute nsIEditor editor;

	/* ... */
  readonly attribute nsIDOMWindow domWindow;

	/* ... */
  readonly attribute nsIMsgCompFields compFields;
    
	/* ... */
  readonly attribute boolean composeHTML;

	/* ... */
  attribute MSG_ComposeType type;

	/* ... */
  readonly attribute long wrapLength;

  /* 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;


  /**
   *  Init the editor THIS USED TO BE [noscript]
   *  Now, this is called after editor is created,
   *  which is triggered by loading startup url from JS.
   *  The completion of document loading is detected by observing 
   *  the "obs_documentCreated" command
   */
  void initEditor(in nsIEditor editor, in nsIDOMWindow contentWindow);

  /* The following functions are for internal use, essentially for the listener */

  /* Clear the editor */
  [noscript] void clearEditor();

  /* ... */
  [noscript] void setCiteReference(in nsString citeReference);

  /* Set the URI of the folder where the message has been saved */
  attribute string savedFolderURI;

  /* Append the signature defined in the identity to the msgBody */
  [noscript] void processSignature(in nsIMsgIdentity identity,
                                   in boolean aQuoted,
                                   inout nsString aMsgBody);

  /* set any reply flags on the original message's folder */
  [noscript] void processReplyFlags();
  [noscript] void rememberQueuedDisposition();

  /* ... */
  [noscript] void convertAndLoadComposeWindow(in nsStringRef aPrefix,
                                              in nsStringRef aBuf, 
                                              in nsStringRef aSignature,
                                              in boolean aQuoted,
                                              in boolean aHTMLEditor);

  /* Tell the doc state listeners that the doc state has changed
   * aNotificationType is from nsIMsgComposeNotificationType
   */
  [noscript] void notifyStateListeners(in long aNotificationType, in nsresult aResult);

  /* Retreive the progress object */
  readonly attribute nsIMsgProgress progress;
  
	/* ... */
  [noscript] void buildBodyMessageAndSignature();
  
	/* ... */
  [noscript] void buildQuotedMessageAndSignature();

 	/* ... */
  [noscript] void getQuotingToFollow(out boolean quotingToFollow);

 	/* ... */
  attribute nsIMsgComposeRecyclingListener recyclingListener;
  
  /* ... */
  attribute boolean recycledWindow;
  
  readonly attribute string originalMsgURI;

  attribute boolean deleteDraft;

  /* true when the compose window is in the process of inserting quoted content
     (i.e. via reply, forward inline or a quoting operation) into the document 
   */
  attribute boolean insertingQuotedContent;

  /* for easier use of nsIMsgSendListener */
  void addMsgSendListener(in nsIMsgSendListener sendListener);

  /* for easier use of nsIMsgSendListener */
  void removeMsgSendListener(in nsIMsgSendListener sendListener);

};

/* send listener interface */
[uuid(ACC72780-2CEA-11D5-9DAA-BACDEAC1EEFC)]
interface nsIMsgComposeSendListener : nsISupports {

  void setMsgCompose(in nsIMsgCompose msgCompose);
  void setDeliverMode(in MSG_DeliverMode deliverMode);
 
};