This file is indexed.

/usr/include/thunderbird/nsIDOMTCPSocket.h is in thunderbird-dev 1:38.6.0+build1-0ubuntu1.

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
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM ../../../dist/idl/nsIDOMTCPSocket.idl
 */

#ifndef __gen_nsIDOMTCPSocket_h__
#define __gen_nsIDOMTCPSocket_h__


#ifndef __gen_domstubs_h__
#include "domstubs.h"
#endif

#ifndef __gen_nsIDOMEvent_h__
#include "nsIDOMEvent.h"
#endif

#ifndef __gen_nsITCPSocketChild_h__
#include "nsITCPSocketChild.h"
#endif

#ifndef __gen_nsIDOMTCPServerSocket_h__
#include "nsIDOMTCPServerSocket.h"
#endif

#include "js/Value.h"

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsISocketTransport; /* forward declaration */


/* starting interface:    nsIDOMTCPSocket */
#define NS_IDOMTCPSOCKET_IID_STR "65f6d2c8-4be6-4695-958d-0735e8935289"

#define NS_IDOMTCPSOCKET_IID \
  {0x65f6d2c8, 0x4be6, 0x4695, \
    { 0x95, 0x8d, 0x07, 0x35, 0xe8, 0x93, 0x52, 0x89 }}

class NS_NO_VTABLE nsIDOMTCPSocket : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOMTCPSOCKET_IID)

  /* nsIDOMTCPSocket open (in DOMString host, in unsigned short port, [optional] in jsval options); */
  NS_IMETHOD Open(const nsAString & host, uint16_t port, JS::HandleValue options, nsIDOMTCPSocket * *_retval) = 0;

  /* nsIDOMTCPServerSocket listen (in unsigned short localPort, [optional] in jsval options, [optional] in unsigned short backlog); */
  NS_IMETHOD Listen(uint16_t localPort, JS::HandleValue options, uint16_t backlog, nsIDOMTCPServerSocket * *_retval) = 0;

  /* void upgradeToSecure (); */
  NS_IMETHOD UpgradeToSecure(void) = 0;

  /* readonly attribute DOMString host; */
  NS_IMETHOD GetHost(nsAString & aHost) = 0;

  /* readonly attribute unsigned short port; */
  NS_IMETHOD GetPort(uint16_t *aPort) = 0;

  /* readonly attribute boolean ssl; */
  NS_IMETHOD GetSsl(bool *aSsl) = 0;

  /* readonly attribute unsigned long bufferedAmount; */
  NS_IMETHOD GetBufferedAmount(uint32_t *aBufferedAmount) = 0;

  /* void suspend (); */
  NS_IMETHOD Suspend(void) = 0;

  /* void resume (); */
  NS_IMETHOD Resume(void) = 0;

  /* void close (); */
  NS_IMETHOD Close(void) = 0;

  /* boolean send (in jsval data, [optional] in unsigned long byteOffset, [optional] in unsigned long byteLength); */
  NS_IMETHOD Send(JS::HandleValue data, uint32_t byteOffset, uint32_t byteLength, bool *_retval) = 0;

  /* readonly attribute DOMString readyState; */
  NS_IMETHOD GetReadyState(nsAString & aReadyState) = 0;

  /* readonly attribute DOMString binaryType; */
  NS_IMETHOD GetBinaryType(nsAString & aBinaryType) = 0;

  /* attribute jsval onopen; */
  NS_IMETHOD GetOnopen(JS::MutableHandleValue aOnopen) = 0;
  NS_IMETHOD SetOnopen(JS::HandleValue aOnopen) = 0;

  /* attribute jsval ondrain; */
  NS_IMETHOD GetOndrain(JS::MutableHandleValue aOndrain) = 0;
  NS_IMETHOD SetOndrain(JS::HandleValue aOndrain) = 0;

  /* attribute jsval ondata; */
  NS_IMETHOD GetOndata(JS::MutableHandleValue aOndata) = 0;
  NS_IMETHOD SetOndata(JS::HandleValue aOndata) = 0;

  /* attribute jsval onerror; */
  NS_IMETHOD GetOnerror(JS::MutableHandleValue aOnerror) = 0;
  NS_IMETHOD SetOnerror(JS::HandleValue aOnerror) = 0;

  /* attribute jsval onclose; */
  NS_IMETHOD GetOnclose(JS::MutableHandleValue aOnclose) = 0;
  NS_IMETHOD SetOnclose(JS::HandleValue aOnclose) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIDOMTCPSocket, NS_IDOMTCPSOCKET_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIDOMTCPSOCKET \
  NS_IMETHOD Open(const nsAString & host, uint16_t port, JS::HandleValue options, nsIDOMTCPSocket * *_retval) override; \
  NS_IMETHOD Listen(uint16_t localPort, JS::HandleValue options, uint16_t backlog, nsIDOMTCPServerSocket * *_retval) override; \
  NS_IMETHOD UpgradeToSecure(void) override; \
  NS_IMETHOD GetHost(nsAString & aHost) override; \
  NS_IMETHOD GetPort(uint16_t *aPort) override; \
  NS_IMETHOD GetSsl(bool *aSsl) override; \
  NS_IMETHOD GetBufferedAmount(uint32_t *aBufferedAmount) override; \
  NS_IMETHOD Suspend(void) override; \
  NS_IMETHOD Resume(void) override; \
  NS_IMETHOD Close(void) override; \
  NS_IMETHOD Send(JS::HandleValue data, uint32_t byteOffset, uint32_t byteLength, bool *_retval) override; \
  NS_IMETHOD GetReadyState(nsAString & aReadyState) override; \
  NS_IMETHOD GetBinaryType(nsAString & aBinaryType) override; \
  NS_IMETHOD GetOnopen(JS::MutableHandleValue aOnopen) override; \
  NS_IMETHOD SetOnopen(JS::HandleValue aOnopen) override; \
  NS_IMETHOD GetOndrain(JS::MutableHandleValue aOndrain) override; \
  NS_IMETHOD SetOndrain(JS::HandleValue aOndrain) override; \
  NS_IMETHOD GetOndata(JS::MutableHandleValue aOndata) override; \
  NS_IMETHOD SetOndata(JS::HandleValue aOndata) override; \
  NS_IMETHOD GetOnerror(JS::MutableHandleValue aOnerror) override; \
  NS_IMETHOD SetOnerror(JS::HandleValue aOnerror) override; \
  NS_IMETHOD GetOnclose(JS::MutableHandleValue aOnclose) override; \
  NS_IMETHOD SetOnclose(JS::HandleValue aOnclose) override; 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIDOMTCPSOCKET(_to) \
  NS_IMETHOD Open(const nsAString & host, uint16_t port, JS::HandleValue options, nsIDOMTCPSocket * *_retval) override { return _to Open(host, port, options, _retval); } \
  NS_IMETHOD Listen(uint16_t localPort, JS::HandleValue options, uint16_t backlog, nsIDOMTCPServerSocket * *_retval) override { return _to Listen(localPort, options, backlog, _retval); } \
  NS_IMETHOD UpgradeToSecure(void) override { return _to UpgradeToSecure(); } \
  NS_IMETHOD GetHost(nsAString & aHost) override { return _to GetHost(aHost); } \
  NS_IMETHOD GetPort(uint16_t *aPort) override { return _to GetPort(aPort); } \
  NS_IMETHOD GetSsl(bool *aSsl) override { return _to GetSsl(aSsl); } \
  NS_IMETHOD GetBufferedAmount(uint32_t *aBufferedAmount) override { return _to GetBufferedAmount(aBufferedAmount); } \
  NS_IMETHOD Suspend(void) override { return _to Suspend(); } \
  NS_IMETHOD Resume(void) override { return _to Resume(); } \
  NS_IMETHOD Close(void) override { return _to Close(); } \
  NS_IMETHOD Send(JS::HandleValue data, uint32_t byteOffset, uint32_t byteLength, bool *_retval) override { return _to Send(data, byteOffset, byteLength, _retval); } \
  NS_IMETHOD GetReadyState(nsAString & aReadyState) override { return _to GetReadyState(aReadyState); } \
  NS_IMETHOD GetBinaryType(nsAString & aBinaryType) override { return _to GetBinaryType(aBinaryType); } \
  NS_IMETHOD GetOnopen(JS::MutableHandleValue aOnopen) override { return _to GetOnopen(aOnopen); } \
  NS_IMETHOD SetOnopen(JS::HandleValue aOnopen) override { return _to SetOnopen(aOnopen); } \
  NS_IMETHOD GetOndrain(JS::MutableHandleValue aOndrain) override { return _to GetOndrain(aOndrain); } \
  NS_IMETHOD SetOndrain(JS::HandleValue aOndrain) override { return _to SetOndrain(aOndrain); } \
  NS_IMETHOD GetOndata(JS::MutableHandleValue aOndata) override { return _to GetOndata(aOndata); } \
  NS_IMETHOD SetOndata(JS::HandleValue aOndata) override { return _to SetOndata(aOndata); } \
  NS_IMETHOD GetOnerror(JS::MutableHandleValue aOnerror) override { return _to GetOnerror(aOnerror); } \
  NS_IMETHOD SetOnerror(JS::HandleValue aOnerror) override { return _to SetOnerror(aOnerror); } \
  NS_IMETHOD GetOnclose(JS::MutableHandleValue aOnclose) override { return _to GetOnclose(aOnclose); } \
  NS_IMETHOD SetOnclose(JS::HandleValue aOnclose) override { return _to SetOnclose(aOnclose); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIDOMTCPSOCKET(_to) \
  NS_IMETHOD Open(const nsAString & host, uint16_t port, JS::HandleValue options, nsIDOMTCPSocket * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Open(host, port, options, _retval); } \
  NS_IMETHOD Listen(uint16_t localPort, JS::HandleValue options, uint16_t backlog, nsIDOMTCPServerSocket * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Listen(localPort, options, backlog, _retval); } \
  NS_IMETHOD UpgradeToSecure(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UpgradeToSecure(); } \
  NS_IMETHOD GetHost(nsAString & aHost) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHost(aHost); } \
  NS_IMETHOD GetPort(uint16_t *aPort) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPort(aPort); } \
  NS_IMETHOD GetSsl(bool *aSsl) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSsl(aSsl); } \
  NS_IMETHOD GetBufferedAmount(uint32_t *aBufferedAmount) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBufferedAmount(aBufferedAmount); } \
  NS_IMETHOD Suspend(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Suspend(); } \
  NS_IMETHOD Resume(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Resume(); } \
  NS_IMETHOD Close(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(); } \
  NS_IMETHOD Send(JS::HandleValue data, uint32_t byteOffset, uint32_t byteLength, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Send(data, byteOffset, byteLength, _retval); } \
  NS_IMETHOD GetReadyState(nsAString & aReadyState) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetReadyState(aReadyState); } \
  NS_IMETHOD GetBinaryType(nsAString & aBinaryType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBinaryType(aBinaryType); } \
  NS_IMETHOD GetOnopen(JS::MutableHandleValue aOnopen) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOnopen(aOnopen); } \
  NS_IMETHOD SetOnopen(JS::HandleValue aOnopen) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOnopen(aOnopen); } \
  NS_IMETHOD GetOndrain(JS::MutableHandleValue aOndrain) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOndrain(aOndrain); } \
  NS_IMETHOD SetOndrain(JS::HandleValue aOndrain) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOndrain(aOndrain); } \
  NS_IMETHOD GetOndata(JS::MutableHandleValue aOndata) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOndata(aOndata); } \
  NS_IMETHOD SetOndata(JS::HandleValue aOndata) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOndata(aOndata); } \
  NS_IMETHOD GetOnerror(JS::MutableHandleValue aOnerror) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOnerror(aOnerror); } \
  NS_IMETHOD SetOnerror(JS::HandleValue aOnerror) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOnerror(aOnerror); } \
  NS_IMETHOD GetOnclose(JS::MutableHandleValue aOnclose) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOnclose(aOnclose); } \
  NS_IMETHOD SetOnclose(JS::HandleValue aOnclose) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOnclose(aOnclose); } 

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsDOMTCPSocket : public nsIDOMTCPSocket
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIDOMTCPSOCKET

  nsDOMTCPSocket();

private:
  ~nsDOMTCPSocket();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsDOMTCPSocket, nsIDOMTCPSocket)

nsDOMTCPSocket::nsDOMTCPSocket()
{
  /* member initializers and constructor code */
}

nsDOMTCPSocket::~nsDOMTCPSocket()
{
  /* destructor code */
}

/* nsIDOMTCPSocket open (in DOMString host, in unsigned short port, [optional] in jsval options); */
NS_IMETHODIMP nsDOMTCPSocket::Open(const nsAString & host, uint16_t port, JS::HandleValue options, nsIDOMTCPSocket * *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIDOMTCPServerSocket listen (in unsigned short localPort, [optional] in jsval options, [optional] in unsigned short backlog); */
NS_IMETHODIMP nsDOMTCPSocket::Listen(uint16_t localPort, JS::HandleValue options, uint16_t backlog, nsIDOMTCPServerSocket * *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void upgradeToSecure (); */
NS_IMETHODIMP nsDOMTCPSocket::UpgradeToSecure()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute DOMString host; */
NS_IMETHODIMP nsDOMTCPSocket::GetHost(nsAString & aHost)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute unsigned short port; */
NS_IMETHODIMP nsDOMTCPSocket::GetPort(uint16_t *aPort)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute boolean ssl; */
NS_IMETHODIMP nsDOMTCPSocket::GetSsl(bool *aSsl)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute unsigned long bufferedAmount; */
NS_IMETHODIMP nsDOMTCPSocket::GetBufferedAmount(uint32_t *aBufferedAmount)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void suspend (); */
NS_IMETHODIMP nsDOMTCPSocket::Suspend()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void resume (); */
NS_IMETHODIMP nsDOMTCPSocket::Resume()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void close (); */
NS_IMETHODIMP nsDOMTCPSocket::Close()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean send (in jsval data, [optional] in unsigned long byteOffset, [optional] in unsigned long byteLength); */
NS_IMETHODIMP nsDOMTCPSocket::Send(JS::HandleValue data, uint32_t byteOffset, uint32_t byteLength, bool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute DOMString readyState; */
NS_IMETHODIMP nsDOMTCPSocket::GetReadyState(nsAString & aReadyState)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute DOMString binaryType; */
NS_IMETHODIMP nsDOMTCPSocket::GetBinaryType(nsAString & aBinaryType)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute jsval onopen; */
NS_IMETHODIMP nsDOMTCPSocket::GetOnopen(JS::MutableHandleValue aOnopen)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsDOMTCPSocket::SetOnopen(JS::HandleValue aOnopen)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute jsval ondrain; */
NS_IMETHODIMP nsDOMTCPSocket::GetOndrain(JS::MutableHandleValue aOndrain)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsDOMTCPSocket::SetOndrain(JS::HandleValue aOndrain)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute jsval ondata; */
NS_IMETHODIMP nsDOMTCPSocket::GetOndata(JS::MutableHandleValue aOndata)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsDOMTCPSocket::SetOndata(JS::HandleValue aOndata)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute jsval onerror; */
NS_IMETHODIMP nsDOMTCPSocket::GetOnerror(JS::MutableHandleValue aOnerror)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsDOMTCPSocket::SetOnerror(JS::HandleValue aOnerror)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute jsval onclose; */
NS_IMETHODIMP nsDOMTCPSocket::GetOnclose(JS::MutableHandleValue aOnclose)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsDOMTCPSocket::SetOnclose(JS::HandleValue aOnclose)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif


/* starting interface:    nsITCPSocketInternal */
#define NS_ITCPSOCKETINTERNAL_IID_STR "ac2c4b69-cb79-4767-b1ce-bcf62945cd39"

#define NS_ITCPSOCKETINTERNAL_IID \
  {0xac2c4b69, 0xcb79, 0x4767, \
    { 0xb1, 0xce, 0xbc, 0xf6, 0x29, 0x45, 0xcd, 0x39 }}

class NS_NO_VTABLE nsITCPSocketInternal : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ITCPSOCKETINTERNAL_IID)

  /* void callListenerError (in DOMString type, in DOMString name); */
  NS_IMETHOD CallListenerError(const nsAString & type, const nsAString & name) = 0;

  /* void callListenerData (in DOMString type, in DOMString data); */
  NS_IMETHOD CallListenerData(const nsAString & type, const nsAString & data) = 0;

  /* void callListenerArrayBuffer (in DOMString type, in jsval data); */
  NS_IMETHOD CallListenerArrayBuffer(const nsAString & type, JS::HandleValue data) = 0;

  /* void callListenerVoid (in DOMString type); */
  NS_IMETHOD CallListenerVoid(const nsAString & type) = 0;

  /* void updateReadyState (in DOMString readyState); */
  NS_IMETHOD UpdateReadyState(const nsAString & readyState) = 0;

  /* void updateBufferedAmount (in uint32_t bufferedAmount, in uint32_t trackingNumber); */
  NS_IMETHOD UpdateBufferedAmount(uint32_t bufferedAmount, uint32_t trackingNumber) = 0;

  /* nsIDOMTCPSocket createAcceptedParent (in nsISocketTransport transport, in DOMString binaryType, in nsIDOMWindow window); */
  NS_IMETHOD CreateAcceptedParent(nsISocketTransport *transport, const nsAString & binaryType, nsIDOMWindow *window, nsIDOMTCPSocket * *_retval) = 0;

  /* nsIDOMTCPSocket createAcceptedChild (in nsITCPSocketChild socketChild, in DOMString binaryType, in nsIDOMWindow window); */
  NS_IMETHOD CreateAcceptedChild(nsITCPSocketChild *socketChild, const nsAString & binaryType, nsIDOMWindow *window, nsIDOMTCPSocket * *_retval) = 0;

  /* void setAppId (in unsigned long appId); */
  NS_IMETHOD SetAppId(uint32_t appId) = 0;

  /* void setInBrowser (in boolean inBrowser); */
  NS_IMETHOD SetInBrowser(bool inBrowser) = 0;

  /* void setOnUpdateBufferedAmountHandler (in jsval handler); */
  NS_IMETHOD SetOnUpdateBufferedAmountHandler(JS::HandleValue handler) = 0;

  /* void onRecvSendFromChild (in jsval data, in unsigned long byteOffset, in unsigned long byteLength, in unsigned long trackingNumber); */
  NS_IMETHOD OnRecvSendFromChild(JS::HandleValue data, uint32_t byteOffset, uint32_t byteLength, uint32_t trackingNumber) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsITCPSocketInternal, NS_ITCPSOCKETINTERNAL_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSITCPSOCKETINTERNAL \
  NS_IMETHOD CallListenerError(const nsAString & type, const nsAString & name) override; \
  NS_IMETHOD CallListenerData(const nsAString & type, const nsAString & data) override; \
  NS_IMETHOD CallListenerArrayBuffer(const nsAString & type, JS::HandleValue data) override; \
  NS_IMETHOD CallListenerVoid(const nsAString & type) override; \
  NS_IMETHOD UpdateReadyState(const nsAString & readyState) override; \
  NS_IMETHOD UpdateBufferedAmount(uint32_t bufferedAmount, uint32_t trackingNumber) override; \
  NS_IMETHOD CreateAcceptedParent(nsISocketTransport *transport, const nsAString & binaryType, nsIDOMWindow *window, nsIDOMTCPSocket * *_retval) override; \
  NS_IMETHOD CreateAcceptedChild(nsITCPSocketChild *socketChild, const nsAString & binaryType, nsIDOMWindow *window, nsIDOMTCPSocket * *_retval) override; \
  NS_IMETHOD SetAppId(uint32_t appId) override; \
  NS_IMETHOD SetInBrowser(bool inBrowser) override; \
  NS_IMETHOD SetOnUpdateBufferedAmountHandler(JS::HandleValue handler) override; \
  NS_IMETHOD OnRecvSendFromChild(JS::HandleValue data, uint32_t byteOffset, uint32_t byteLength, uint32_t trackingNumber) override; 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSITCPSOCKETINTERNAL(_to) \
  NS_IMETHOD CallListenerError(const nsAString & type, const nsAString & name) override { return _to CallListenerError(type, name); } \
  NS_IMETHOD CallListenerData(const nsAString & type, const nsAString & data) override { return _to CallListenerData(type, data); } \
  NS_IMETHOD CallListenerArrayBuffer(const nsAString & type, JS::HandleValue data) override { return _to CallListenerArrayBuffer(type, data); } \
  NS_IMETHOD CallListenerVoid(const nsAString & type) override { return _to CallListenerVoid(type); } \
  NS_IMETHOD UpdateReadyState(const nsAString & readyState) override { return _to UpdateReadyState(readyState); } \
  NS_IMETHOD UpdateBufferedAmount(uint32_t bufferedAmount, uint32_t trackingNumber) override { return _to UpdateBufferedAmount(bufferedAmount, trackingNumber); } \
  NS_IMETHOD CreateAcceptedParent(nsISocketTransport *transport, const nsAString & binaryType, nsIDOMWindow *window, nsIDOMTCPSocket * *_retval) override { return _to CreateAcceptedParent(transport, binaryType, window, _retval); } \
  NS_IMETHOD CreateAcceptedChild(nsITCPSocketChild *socketChild, const nsAString & binaryType, nsIDOMWindow *window, nsIDOMTCPSocket * *_retval) override { return _to CreateAcceptedChild(socketChild, binaryType, window, _retval); } \
  NS_IMETHOD SetAppId(uint32_t appId) override { return _to SetAppId(appId); } \
  NS_IMETHOD SetInBrowser(bool inBrowser) override { return _to SetInBrowser(inBrowser); } \
  NS_IMETHOD SetOnUpdateBufferedAmountHandler(JS::HandleValue handler) override { return _to SetOnUpdateBufferedAmountHandler(handler); } \
  NS_IMETHOD OnRecvSendFromChild(JS::HandleValue data, uint32_t byteOffset, uint32_t byteLength, uint32_t trackingNumber) override { return _to OnRecvSendFromChild(data, byteOffset, byteLength, trackingNumber); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSITCPSOCKETINTERNAL(_to) \
  NS_IMETHOD CallListenerError(const nsAString & type, const nsAString & name) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CallListenerError(type, name); } \
  NS_IMETHOD CallListenerData(const nsAString & type, const nsAString & data) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CallListenerData(type, data); } \
  NS_IMETHOD CallListenerArrayBuffer(const nsAString & type, JS::HandleValue data) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CallListenerArrayBuffer(type, data); } \
  NS_IMETHOD CallListenerVoid(const nsAString & type) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CallListenerVoid(type); } \
  NS_IMETHOD UpdateReadyState(const nsAString & readyState) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UpdateReadyState(readyState); } \
  NS_IMETHOD UpdateBufferedAmount(uint32_t bufferedAmount, uint32_t trackingNumber) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UpdateBufferedAmount(bufferedAmount, trackingNumber); } \
  NS_IMETHOD CreateAcceptedParent(nsISocketTransport *transport, const nsAString & binaryType, nsIDOMWindow *window, nsIDOMTCPSocket * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateAcceptedParent(transport, binaryType, window, _retval); } \
  NS_IMETHOD CreateAcceptedChild(nsITCPSocketChild *socketChild, const nsAString & binaryType, nsIDOMWindow *window, nsIDOMTCPSocket * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateAcceptedChild(socketChild, binaryType, window, _retval); } \
  NS_IMETHOD SetAppId(uint32_t appId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAppId(appId); } \
  NS_IMETHOD SetInBrowser(bool inBrowser) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetInBrowser(inBrowser); } \
  NS_IMETHOD SetOnUpdateBufferedAmountHandler(JS::HandleValue handler) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOnUpdateBufferedAmountHandler(handler); } \
  NS_IMETHOD OnRecvSendFromChild(JS::HandleValue data, uint32_t byteOffset, uint32_t byteLength, uint32_t trackingNumber) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnRecvSendFromChild(data, byteOffset, byteLength, trackingNumber); } 

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsTCPSocketInternal : public nsITCPSocketInternal
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSITCPSOCKETINTERNAL

  nsTCPSocketInternal();

private:
  ~nsTCPSocketInternal();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsTCPSocketInternal, nsITCPSocketInternal)

nsTCPSocketInternal::nsTCPSocketInternal()
{
  /* member initializers and constructor code */
}

nsTCPSocketInternal::~nsTCPSocketInternal()
{
  /* destructor code */
}

/* void callListenerError (in DOMString type, in DOMString name); */
NS_IMETHODIMP nsTCPSocketInternal::CallListenerError(const nsAString & type, const nsAString & name)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void callListenerData (in DOMString type, in DOMString data); */
NS_IMETHODIMP nsTCPSocketInternal::CallListenerData(const nsAString & type, const nsAString & data)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void callListenerArrayBuffer (in DOMString type, in jsval data); */
NS_IMETHODIMP nsTCPSocketInternal::CallListenerArrayBuffer(const nsAString & type, JS::HandleValue data)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void callListenerVoid (in DOMString type); */
NS_IMETHODIMP nsTCPSocketInternal::CallListenerVoid(const nsAString & type)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void updateReadyState (in DOMString readyState); */
NS_IMETHODIMP nsTCPSocketInternal::UpdateReadyState(const nsAString & readyState)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void updateBufferedAmount (in uint32_t bufferedAmount, in uint32_t trackingNumber); */
NS_IMETHODIMP nsTCPSocketInternal::UpdateBufferedAmount(uint32_t bufferedAmount, uint32_t trackingNumber)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIDOMTCPSocket createAcceptedParent (in nsISocketTransport transport, in DOMString binaryType, in nsIDOMWindow window); */
NS_IMETHODIMP nsTCPSocketInternal::CreateAcceptedParent(nsISocketTransport *transport, const nsAString & binaryType, nsIDOMWindow *window, nsIDOMTCPSocket * *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIDOMTCPSocket createAcceptedChild (in nsITCPSocketChild socketChild, in DOMString binaryType, in nsIDOMWindow window); */
NS_IMETHODIMP nsTCPSocketInternal::CreateAcceptedChild(nsITCPSocketChild *socketChild, const nsAString & binaryType, nsIDOMWindow *window, nsIDOMTCPSocket * *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAppId (in unsigned long appId); */
NS_IMETHODIMP nsTCPSocketInternal::SetAppId(uint32_t appId)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setInBrowser (in boolean inBrowser); */
NS_IMETHODIMP nsTCPSocketInternal::SetInBrowser(bool inBrowser)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setOnUpdateBufferedAmountHandler (in jsval handler); */
NS_IMETHODIMP nsTCPSocketInternal::SetOnUpdateBufferedAmountHandler(JS::HandleValue handler)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onRecvSendFromChild (in jsval data, in unsigned long byteOffset, in unsigned long byteLength, in unsigned long trackingNumber); */
NS_IMETHODIMP nsTCPSocketInternal::OnRecvSendFromChild(JS::HandleValue data, uint32_t byteOffset, uint32_t byteLength, uint32_t trackingNumber)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif


/* starting interface:    nsITCPSocketEvent */
#define NS_ITCPSOCKETEVENT_IID_STR "0f2abcca-b483-4539-a3e8-345707f75c44"

#define NS_ITCPSOCKETEVENT_IID \
  {0x0f2abcca, 0xb483, 0x4539, \
    { 0xa3, 0xe8, 0x34, 0x57, 0x07, 0xf7, 0x5c, 0x44 }}

class NS_NO_VTABLE nsITCPSocketEvent : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ITCPSOCKETEVENT_IID)

  /* readonly attribute nsIDOMTCPSocket target; */
  NS_IMETHOD GetTarget(nsIDOMTCPSocket * *aTarget) = 0;

  /* readonly attribute DOMString type; */
  NS_IMETHOD GetType(nsAString & aType) = 0;

  /* readonly attribute jsval data; */
  NS_IMETHOD GetData(JS::MutableHandleValue aData) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsITCPSocketEvent, NS_ITCPSOCKETEVENT_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSITCPSOCKETEVENT \
  NS_IMETHOD GetTarget(nsIDOMTCPSocket * *aTarget) override; \
  NS_IMETHOD GetType(nsAString & aType) override; \
  NS_IMETHOD GetData(JS::MutableHandleValue aData) override; 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSITCPSOCKETEVENT(_to) \
  NS_IMETHOD GetTarget(nsIDOMTCPSocket * *aTarget) override { return _to GetTarget(aTarget); } \
  NS_IMETHOD GetType(nsAString & aType) override { return _to GetType(aType); } \
  NS_IMETHOD GetData(JS::MutableHandleValue aData) override { return _to GetData(aData); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSITCPSOCKETEVENT(_to) \
  NS_IMETHOD GetTarget(nsIDOMTCPSocket * *aTarget) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTarget(aTarget); } \
  NS_IMETHOD GetType(nsAString & aType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \
  NS_IMETHOD GetData(JS::MutableHandleValue aData) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetData(aData); } 

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsTCPSocketEvent : public nsITCPSocketEvent
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSITCPSOCKETEVENT

  nsTCPSocketEvent();

private:
  ~nsTCPSocketEvent();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsTCPSocketEvent, nsITCPSocketEvent)

nsTCPSocketEvent::nsTCPSocketEvent()
{
  /* member initializers and constructor code */
}

nsTCPSocketEvent::~nsTCPSocketEvent()
{
  /* destructor code */
}

/* readonly attribute nsIDOMTCPSocket target; */
NS_IMETHODIMP nsTCPSocketEvent::GetTarget(nsIDOMTCPSocket * *aTarget)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute DOMString type; */
NS_IMETHODIMP nsTCPSocketEvent::GetType(nsAString & aType)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute jsval data; */
NS_IMETHODIMP nsTCPSocketEvent::GetData(JS::MutableHandleValue aData)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif


#endif /* __gen_nsIDOMTCPSocket_h__ */