This file is indexed.

/usr/share/idl/thunderbird-11.0.1/nsIImapService.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
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** 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) 2000
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *
 * 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 ***** */

////////////////////////////////////////////////////////////////////////////////////////
// The IMAP Service is an interfaced designed to make building and running imap urls
// easier. Clients typically go to the imap service and ask it do things such as:
// get new mail, etc....
//
// Oh and in case you couldn't tell by the name, the imap service is a service! and you
// should go through the service manager to obtain an instance of it.
////////////////////////////////////////////////////////////////////////////////////////

#include "nsISupports.idl"
#include "nsIImapUrl.idl"

interface nsIImapProtocol;
interface nsIImapMessageSink;
interface nsIUrlListener;
interface nsIURI;
interface nsIEventTarget;
interface nsIFile;
interface nsIMsgFolder;
interface nsIMsgWindow;
interface nsIImapIncomingServer;
interface nsICacheSession;

[scriptable, uuid(7ff02a19-f402-436a-a6cc-c4c454f0b86f)]
interface nsIImapService : nsISupports
{
  // You can pass in null for the url listener and the url if you don't require either.....
  // aClientEventTarget is the event queue of the event sinks. We post events into this queue.
  void selectFolder(in nsIEventTarget aClientEventTarget,
                    in nsIMsgFolder aImapMailFolder,
                    in nsIUrlListener aUrlListener,
                    in nsIMsgWindow   aMsgWindow,
                    out nsIURI aURL);

  /**
   * Select the folder on the imap server without doing a sync of flags or
   * headers. This is used for offline playback, where we don't want to
   * download hdrs we don't have, because they may have been offline deleted.
   *
   * @param aClientEventTarget  the event target of the ui thread
   * @param aImapMailFolder     the folder to select
   * @param aUrlListener        url listener, can be null
   * @param aMsgWindow          msg window url is running in, can be null
   *
   * @returns the url created to run the lite select in.
   */
  nsIURI liteSelectFolder(in nsIEventTarget aClientEventTarget,
                        in nsIMsgFolder aImapMailFolder,
                        in nsIUrlListener aUrlListener,
                        in nsIMsgWindow aMsgWindow);

  void addImapFetchToUrl(in nsIURI aURL,
                         in nsIMsgFolder aImapMailFolder,
                         in ACString aMessageIdentifierList,
                         in ACString aAdditionalHeader);

  void fetchMessage(in nsIImapUrl aUrl,
                    in nsImapState aImapAction,
                    in nsIMsgFolder aImapMailFolder,
                    in nsIImapMessageSink aImapMessageSink,
                    in nsIMsgWindow aMsgWindow,
                    in nsISupports aConsumer,
                    in ACString aMessageIdentifierList,
                    in boolean convertDataToText,
                    in ACString additionalHeader,
                    out nsIURI aOutURL);

  void noop(in nsIEventTarget aClientEventTarget,
            in nsIMsgFolder aImapMailFolder,
            in nsIUrlListener aUrlListener,
            out nsIURI aURL);

  void getHeaders(in nsIEventTarget aClientEventTarget,
                  in nsIMsgFolder aImapMailFolder,
                  in nsIUrlListener aUrlListener,
                  out nsIURI aURL,
                  in ACString aMessageIdentifierList,
                  in boolean aMessageIdsAreUID);

  nsIURI getBodyStart(in nsIEventTarget aClientEventTarget,
                  in nsIMsgFolder aImapMailFolder,
                  in nsIUrlListener aUrlListener,
                  in ACString aMessageIdentifierList,
                  in long numBytes);

  /**
   * Issue an EXPUNGE on the target folder.
   *
   * @param aClientEventTarget  the event target of the ui thread
   * @param aImapMailFolder     the folder to expunge
   * @param aUrlListener        url listener, can be null
   * @param aMsgWindow          msg window url is running in, can be null
   *
   * @returns the url created to run the expunge.
   */
  void expunge(in nsIEventTarget aClientEventTarget,
               in nsIMsgFolder aImapMailFolder,
               in nsIUrlListener aUrlListener,
               in nsIMsgWindow aMsgWindow,
               out nsIURI aURL);

  /**
   * Issue a STATUS on the target folder.
   *
   * @param aClientEventTarget  the event target of the ui thread
   * @param aImapMailFolder     the folder to expunge
   * @param aUrlListener        url listener, can be null
   *
   * @returns the url created to run the status.
   */
  nsIURI updateFolderStatus(in nsIEventTarget aClientEventTarget,
                            in nsIMsgFolder aImapMailFolder,
                            in nsIUrlListener aUrlListener);

  /**
   * Verify that we can login.
   *
   * @param aImapMailFolder - any old imap folder - we just need it to
   *                          set url sinks.
   * @param aMsgWindow    - nsIMsgWindow to use for notification callbacks.
   * @return - the url that we run.
   */
  nsIURI verifyLogon(in nsIMsgFolder aImapMailFolder,
                     in nsIUrlListener aUrlListener,
                     in nsIMsgWindow aMsgWindow);

  void biff(in nsIEventTarget aClientEventTarget,
            in nsIMsgFolder aImapMailFolder,
            in nsIUrlListener aUrlListener,
            out nsIURI aURL,
            in unsigned long aUidHighWater);

  void deleteMessages(in nsIEventTarget aClientEventTarget,
                      in nsIMsgFolder aImapMailFolder,
                      in nsIUrlListener aUrlListener,
                      out nsIURI aURL,
                      in ACString aMessageIdentifierList,
                      in boolean aMessageIdsAreUID);

  void deleteAllMessages(in nsIEventTarget aClientEventTarget,
                         in nsIMsgFolder aImapMailFolder,
                         in nsIUrlListener aUrlListener,
                         out nsIURI aURL);

  void addMessageFlags(in nsIEventTarget aClientEventTarget,
                         in nsIMsgFolder aImapMailFolder,
                         in nsIUrlListener aUrlListener,
                         out nsIURI aURL,
                         in ACString aMessageIdentifierList,
                         in imapMessageFlagsType aFlags,
                         in boolean aMessageIdsAreUID);

  void subtractMessageFlags(in nsIEventTarget aClientEventTarget,
                            in nsIMsgFolder aImapMailFolder,
                            in nsIUrlListener aUrlListener,
                            out nsIURI aURL,
                            in ACString aMessageIdentifierList,
                            in imapMessageFlagsType aFlags,
                            in boolean aMessageIdsAreUID);

  void setMessageFlags(in nsIEventTarget aClientEventTarget,
                       in nsIMsgFolder aImapMailFolder,
                       in nsIUrlListener aUrlListener,
                       out nsIURI aURL,
                       in ACString aMessageIdentifierList,
                       in imapMessageFlagsType aFlags,
                       in boolean aMessageIdsAreUID);

  void discoverAllFolders(in nsIEventTarget aClientEventTarget,
                          in nsIMsgFolder aImapMailFolder,
                          in nsIUrlListener aUrlListener,
                          in nsIMsgWindow aMsgWindow,
                          out nsIURI aURL);

  void discoverAllAndSubscribedFolders(in nsIEventTarget aClientEventTarget,
                                       in nsIMsgFolder aImapMailFolder,
                                       in nsIUrlListener aUrlListener,
                                       out nsIURI aURL);
  void discoverChildren(in nsIEventTarget aClientEventTarget,
                        in nsIMsgFolder aImapMailFolder,
                        in nsIUrlListener aUrlListener,
                        in ACString folderPath,
                        out nsIURI aURL);

  void onlineMessageCopy(in nsIEventTarget aClientEventTarget,
                         in nsIMsgFolder aSrcFolder,
                         in ACString aMessageIds,
                         in nsIMsgFolder aDstFolder,
                         in boolean aIdsAreUids,
                         in boolean aIsMove,
                         in nsIUrlListener aUrlListener,
                         out nsIURI aURL,
                         in nsISupports aCopyState,
                         in nsIMsgWindow aWindow);


  void appendMessageFromFile(in nsIEventTarget aClientEventTarget,
                             in nsIFile aFile,
                             in nsIMsgFolder aDstFolder,
                             in ACString aMessageId,
                             in boolean idsAreUids,
                             in boolean aInSelectedState,
                             in nsIUrlListener aUrlListener,
                             out nsIURI aURL,
                             in nsISupports aCopyState,
                             in nsIMsgWindow aMsgWindow);

  void downloadMessagesForOffline(in ACString aMessageIds, in nsIMsgFolder aSrcFolder,
                      in nsIUrlListener aListener, in nsIMsgWindow   aMsgWindow);

  nsIURI moveFolder(in nsIEventTarget aClientEventTarget,
                    in nsIMsgFolder aSrcFolder,
                    in nsIMsgFolder aDstFolder,
                    in nsIUrlListener aUrlListener,
                    in nsIMsgWindow msgWindow);

  nsIURI renameLeaf(in nsIEventTarget aClientEventTarget,
                    in nsIMsgFolder aSrcFolder,
                    in AString aLeafName,
                    in nsIUrlListener aUrlListener,
                    in nsIMsgWindow msgWindow);

  nsIURI deleteFolder(in nsIEventTarget aClientEventTarget,
                      in nsIMsgFolder aFolder,
                      in nsIUrlListener aUrlListener,
                      in nsIMsgWindow aMsgWindow);

  nsIURI createFolder(in nsIEventTarget aClientEventTarget,
                      in nsIMsgFolder aParentFolder,
                      in AString aLeafName,
                      in nsIUrlListener aUrlListener);

  nsIURI listFolder(in nsIEventTarget aClientEventTarget,
                    in nsIMsgFolder aMailFolder,
                    in nsIUrlListener aUrlListener);

  nsIURI subscribeFolder(in nsIEventTarget aClientEventTarget,
                         in nsIMsgFolder aMailFolder,
                         in AString mailboxName,
                         in nsIUrlListener aUrlListener);

  nsIURI unsubscribeFolder(in nsIEventTarget aClientEventTarget,
                           in nsIMsgFolder aMailFolder,
                           in AString mailboxName,
                           in nsIUrlListener aUrlListener);

  // this method will first check if the folder exists but is
  // not subscribed to, in which case it will subscribe to the folder.
  // otherwise, it will try to create the folder. It will try to do this
  // with one url.
  nsIURI ensureFolderExists(in nsIEventTarget aClientEventTarget,
                            in nsIMsgFolder aParentFolder,
                            in AString aLeafName,
                            in nsIUrlListener aUrlListener);


  nsIURI getFolderAdminUrl(in nsIEventTarget aClientEventTarget,
                      in nsIMsgFolder aMailFolder,
                      in nsIMsgWindow   aMsgWindow,
                      in nsIUrlListener aUrlListener);

  nsIURI issueCommandOnMsgs(in nsIEventTarget aClientEventTarget,
                      in nsIMsgFolder aMailFolder,
                      in nsIMsgWindow aMsgWindow,
                      in ACString aCommand,
                      in ACString aMessageIdentifierList);

  nsIURI fetchCustomMsgAttribute(in nsIEventTarget aClientEventTarget,
                      in nsIMsgFolder aMailFolder,
                      in nsIMsgWindow aMsgWindow,
                      in ACString aAttribute,
                      in ACString aMessageIdentifierList);

  nsIURI storeCustomKeywords(in nsIEventTarget aClientEventTarget,
                      in nsIMsgFolder aMailFolder,
                      in nsIMsgWindow aMsgWindow,
                      in ACString flagsToAdd,
                      in ACString flagsToSubtract,
                      in ACString aMessageIdentifierList);

  void getListOfFoldersOnServer(in nsIImapIncomingServer aServer, in nsIMsgWindow aMsgWindow);
  void getListOfFoldersWithPath(in nsIImapIncomingServer aServer, in nsIMsgWindow aMsgWindow, in ACString folderPath);

  nsISupports playbackAllOfflineOperations(in nsIMsgWindow aMsgWindow, in nsIUrlListener aListener);
  void downloadAllOffineImapFolders(in nsIMsgWindow aMsgWindow, in nsIUrlListener aListener);

  readonly attribute nsICacheSession cacheSession;
};