This file is indexed.

/usr/include/thunderbird-11.0.1/nsNetError.h 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
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
/* ***** 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.
 *
 * The Initial Developer of the Original Code is
 * Netscape Communications Corporation.
 * Portions created by the Initial Developer are Copyright (C) 2002
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *   Darin Fisher <darin@netscape.com> (original author)
 *
 * Alternatively, the contents of this file may be used under the terms of
 * either 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 ***** */

#ifndef nsNetError_h__
#define nsNetError_h__

#include "nsError.h"


/* NETWORKING ERROR CODES */


/******************************************************************************
 * General async request error codes:
 * 
 * These error codes are commonly passed through callback methods to indicate
 * the status of some requested async request.
 *
 * For example, see nsIRequestObserver::onStopRequest.
 */

/**
 * The async request completed successfully.
 */
#define NS_BINDING_SUCCEEDED \
    NS_OK

/**
 * The async request failed for some unknown reason.
 */
#define NS_BINDING_FAILED \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 1)

/**
 * The async request failed because it was aborted by some user action.
 */
#define NS_BINDING_ABORTED \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 2)

/**
 * The async request has been "redirected" to a different async request.
 * (e.g., an HTTP redirect occurred).
 *
 * This error code is used with load groups to notify the load group observer
 * when a request in the load group is redirected to another request.
 */
#define NS_BINDING_REDIRECTED \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 3)

/**
 * The async request has been "retargeted" to a different "handler."
 *
 * This error code is used with load groups to notify the load group observer
 * when a request in the load group is removed from the load group and added
 * to a different load group.
 */
#define NS_BINDING_RETARGETED \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 4)


/******************************************************************************
 * Miscellaneous error codes:
 *
 * These errors are not typically passed via onStopRequest.
 */

/**
 * The URI is malformed.
 */
#define NS_ERROR_MALFORMED_URI \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 10)

/**
 * The URI scheme corresponds to an unknown protocol handler.
 */
#define NS_ERROR_UNKNOWN_PROTOCOL \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 18)

/**
 * Returned from nsIChannel::asyncOpen to indicate that OnDataAvailable will
 * not be called because there is no content available.
 *
 * This is used by helper app style protocols (e.g., mailto).
 *
 * XXX perhaps this should be a success code.
 */
#define NS_ERROR_NO_CONTENT \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 17)

/**
 * The requested action could not be completed while the object is busy.
 *
 * Implementations of nsIChannel::asyncOpen will commonly return this error
 * if the channel has already been opened (and has not yet been closed).
 */
#define NS_ERROR_IN_PROGRESS \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 15)

/**
 * Returned from nsIChannel::asyncOpen when trying to open the channel again
 * (reopening is not supported).
 */
#define NS_ERROR_ALREADY_OPENED \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 73)

/**
 * The content encoding of the source document was incorrect, for example
 * returning a plain HTML document advertised as Content-Encoding: gzip
 */
#define NS_ERROR_INVALID_CONTENT_ENCODING \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 27)

/**
 * A transport level corruption was found in the source document. for example
 * a document with a calculated checksum that does not match the Content-MD5
 * http header.
 */
#define NS_ERROR_CORRUPTED_CONTENT \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 29)

/**
 * While parsing for the first component of a header field using
 * syntax as in Content-Disposition or Content-Type, the first component
 * was found to be empty, such as in:
 *
 * Content-Disposition: ; filename=foo
 */
#define NS_ERROR_FIRST_HEADER_FIELD_COMPONENT_EMPTY \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 34)


/******************************************************************************
 * Connectivity error codes:
 */

/**
 * The connection is already established.
 * XXX currently unused - consider removing.
 */
#define NS_ERROR_ALREADY_CONNECTED \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 11)

/**
 * The connection does not exist.
 * XXX currently unused - consider removing.
 */
#define NS_ERROR_NOT_CONNECTED \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 12)

/**
 * The connection attempt failed, for example, because no server was listening
 * at specified host:port.
 */
#define NS_ERROR_CONNECTION_REFUSED \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 13)

/**
 * The connection attempt to a proxy failed.
 */
#define NS_ERROR_PROXY_CONNECTION_REFUSED \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 72)

/**
 * The connection was lost due to a timeout error.
 */
#define NS_ERROR_NET_TIMEOUT \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 14)

/**
 * The requested action could not be completed while the networking library
 * is in the offline state.
 */
#define NS_ERROR_OFFLINE \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 16)

/**
 * The requested action was prohibited because it would have caused the
 * networking library to establish a connection to an unsafe or otherwise
 * banned port.
 */
#define NS_ERROR_PORT_ACCESS_NOT_ALLOWED \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 19)

/**
 * The connection was established, but no data was ever received.
 */
#define NS_ERROR_NET_RESET \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 20)

/**
 * The connection was established, but the data transfer was interrupted.
 */
#define NS_ERROR_NET_INTERRUPT \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 71)

// XXX really need to better rationalize these error codes.  are consumers of
//     necko really expected to know how to discern the meaning of these??


/**
 * This request is not resumable, but it was tried to resume it, or to
 * request resume-specific data.
 */
#define NS_ERROR_NOT_RESUMABLE \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 25)

/**
 * It was attempted to resume the request, but the entity has changed in the
 * meantime.
 */
#define NS_ERROR_ENTITY_CHANGED \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 32)

/**
 * The request failed as a result of a detected redirection loop.
 */
#define NS_ERROR_REDIRECT_LOOP \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 31)

/**
 * The request failed because the content type returned by the server was
 * not a type expected by the channel (for nested channels such as the JAR
 * channel).
 */
#define NS_ERROR_UNSAFE_CONTENT_TYPE \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 74)

/**
 * The request failed because the user tried to access to a remote XUL document
 * from a website that is not in its white-list.
 */
#define NS_ERROR_REMOTE_XUL \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 75)


/******************************************************************************
 * FTP specific error codes:
 *
 * XXX document me
 */

#define NS_ERROR_FTP_LOGIN \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 21)

#define NS_ERROR_FTP_CWD \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 22)

#define NS_ERROR_FTP_PASV \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 23)

#define NS_ERROR_FTP_PWD \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 24)

#define NS_ERROR_FTP_LIST \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 28)

/******************************************************************************
 * DNS specific error codes:
 */

/**
 * The lookup of a hostname failed.  This generally refers to the hostname
 * from the URL being loaded.
 */
#define NS_ERROR_UNKNOWN_HOST \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 30)

/**
 * A low or medium priority DNS lookup failed because the pending
 * queue was already full. High priorty (the default) always
 * makes room
 */
#define NS_ERROR_DNS_LOOKUP_QUEUE_FULL \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 33)

/**
 * The lookup of a proxy hostname failed.
 *
 * If a channel is configured to speak to a proxy server, then it will
 * generate this error if the proxy hostname cannot be resolved.
 */
#define NS_ERROR_UNKNOWN_PROXY_HOST \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 42)


/******************************************************************************
 * Socket specific error codes:
 */

/**
 * The specified socket type does not exist.
 */
#define NS_ERROR_UNKNOWN_SOCKET_TYPE \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 51)

/**
 * The specified socket type could not be created.
 */
#define NS_ERROR_SOCKET_CREATE_FAILED \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 52)


/******************************************************************************
 * Cache specific error codes:
 *
 * XXX document me
 */

#define NS_ERROR_CACHE_KEY_NOT_FOUND \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 61)

#define NS_ERROR_CACHE_DATA_IS_STREAM \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 62)

#define NS_ERROR_CACHE_DATA_IS_NOT_STREAM \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 63)

#define NS_ERROR_CACHE_WAIT_FOR_VALIDATION \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 64)

#define NS_ERROR_CACHE_ENTRY_DOOMED \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 65)

#define NS_ERROR_CACHE_READ_ACCESS_DENIED \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 66)

#define NS_ERROR_CACHE_WRITE_ACCESS_DENIED \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 67)

#define NS_ERROR_CACHE_IN_USE \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 68)

/**
 * Error passed through onStopRequest if the document could not be fetched
 * from the cache.
 */
#define NS_ERROR_DOCUMENT_NOT_CACHED \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 70)


/******************************************************************************
 * Effective TLD Service specific error codes:
 */

/**
 * The requested number of domain levels exceeds those present in the host string.
 */
#define NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 80)

/**
 * The host string is an IP address.
 */
#define NS_ERROR_HOST_IS_IP_ADDRESS \
    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 81)


/******************************************************************************
 * StreamLoader specific result codes:
 */

/**
 * Result code returned by nsIStreamLoaderObserver to indicate that
 * the observer is taking over responsibility for the data buffer,
 * and the loader should NOT free it.
 */
#define NS_SUCCESS_ADOPTED_DATA \
    NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_NETWORK, 90)


#endif // !nsNetError_h__