summaryrefslogtreecommitdiffstats
path: root/netwerk/build/components.conf
blob: 68d7be7ec3315121e82b9fe5318e3ba3bd6148c4 (plain)
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
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

Headers = [
    '/netwerk/build/nsNetModule.h'
]

InitFunc = 'nsNetStartup'
UnloadFunc = 'nsNetShutdown'

Categories = {
    '@mozilla.org/streamconv;1': {
        '?from=application/http-index-format&to=text/html': ('', ProcessSelector.ALLOW_IN_SOCKET_PROCESS),
        '?from=multipart/x-mixed-replace&to=*/*': ('', ProcessSelector.ALLOW_IN_SOCKET_PROCESS),
        '?from=multipart/mixed&to=*/*': ('', ProcessSelector.ALLOW_IN_SOCKET_PROCESS),
        '?from=multipart/byteranges&to=*/*': ('', ProcessSelector.ALLOW_IN_SOCKET_PROCESS),
        '?from=application/x-unknown-content-type&to=*/*': ('', ProcessSelector.ALLOW_IN_SOCKET_PROCESS),
        '?from=gzip&to=uncompressed': ('', ProcessSelector.ALLOW_IN_SOCKET_PROCESS),
        '?from=x-gzip&to=uncompressed': ('', ProcessSelector.ALLOW_IN_SOCKET_PROCESS),
        '?from=br&to=uncompressed': ('', ProcessSelector.ALLOW_IN_SOCKET_PROCESS),
        '?from=compress&to=uncompressed': ('', ProcessSelector.ALLOW_IN_SOCKET_PROCESS),
        '?from=x-compress&to=uncompressed': ('', ProcessSelector.ALLOW_IN_SOCKET_PROCESS),
        '?from=deflate&to=uncompressed': ('', ProcessSelector.ALLOW_IN_SOCKET_PROCESS),
    },
}

Classes = [
    {
        'cid': '{3014dde6-aa1c-41db-87d0-48764a3710f6}',
        'contract_ids': ['@mozilla.org/io/arraybuffer-input-stream;1'],
        'type': 'ArrayBufferInputStream',
        'headers': ['/netwerk/base/ArrayBufferInputStream.h'],
    },
    {
        'js_name': 'loadContextInfo',
        'cid': '{62d4b190-3642-4450-b019-d1c1fba56025}',
        'contract_ids': ['@mozilla.org/load-context-info-factory;1'],
        'interfaces': ['nsILoadContextInfoFactory'],
        'type': 'mozilla::net::LoadContextInfoFactory',
        'headers': ['mozilla/LoadContextInfo.h'],
    },
    {
        'name': 'CacheStorage',
        'js_name': 'cache2',
        'cid': '{ea70b098-5014-4e21-aee1-75e6b2c4b8e0}',
        'contract_ids': [
            '@mozilla.org/netwerk/cache-storage-service;1',
            '@mozilla.org/network/cache-storage-service;1',
        ],
        'interfaces': ['nsICacheStorageService'],
        'singleton': True,
        'type': 'mozilla::net::CacheStorageService',
        'headers': ['CacheStorageService.h'],
    },
    {
        'cid': '{e746a8b1-c97a-4fc5-baa4-66607521bd08}',
        'contract_ids': ['@mozilla.org/network/async-stream-copier;1'],
        'type': 'nsAsyncStreamCopier',
        'headers': ['/netwerk/base/nsAsyncStreamCopier.h'],
    },
    {
        'cid': '{6eae857e-4ba9-11e3-9b39-b4036188709b}',
        'contract_ids': ['@mozilla.org/network/atomic-file-output-stream;1'],
        'type': 'nsAtomicFileOutputStream',
        'headers': ['nsFileStreams.h'],
    },
    {
        'cid': '{62147d1e-ef6a-40e8-aaf8-d039f5caaa81}',
        'contract_ids': ['@mozilla.org/network/background-file-saver;1?mode=outputstream'],
        'type': 'mozilla::net::BackgroundFileSaverOutputStream',
        'headers': ['/netwerk/base/BackgroundFileSaver.h'],
        'init_method': 'Init',
    },
    {
        'cid': '{208de7fc-a781-4031-bbae-cc0de539f61a}',
        'contract_ids': ['@mozilla.org/network/background-file-saver;1?mode=streamlistener'],
        'type': 'mozilla::net::BackgroundFileSaverStreamListener',
        'headers': ['/netwerk/base/BackgroundFileSaver.h'],
        'init_method': 'Init',
    },
    {
        'cid': '{a2027ec6-ba0d-4c72-805d-148233f5f33c}',
        'contract_ids': ['@mozilla.org/network/binary-detector;1'],
        'legacy_constructor': 'CreateNewBinaryDetectorFactory',
        'categories': {'net-content-sniffers': 'Binary Detector'}
    },
    {
        'cid': '{9226888e-da08-11d3-8cda-0060b0fc14a3}',
        'contract_ids': ['@mozilla.org/network/buffered-input-stream;1'],
        'legacy_constructor': 'nsBufferedInputStream::Create',
        'headers': ['/netwerk/base/nsBufferedStreams.h'],
    },
    {
        'cid': '{9868b4ce-da08-11d3-8cda-0060b0fc14a3}',
        'contract_ids': ['@mozilla.org/network/buffered-output-stream;1'],
        'legacy_constructor': 'nsBufferedOutputStream::Create',
        'headers': ['/netwerk/base/nsBufferedStreams.h'],
    },
    {
        'cid': '{bdbe0555-fc3d-4f7b-9205-c309ceb2d641}',
        'contract_ids': ['@mozilla.org/network/captive-portal-service;1'],
        'singleton': True,
        'type': 'nsICaptivePortalService',
        'constructor': 'mozilla::net::CaptivePortalService::GetSingleton',
        'headers': ['mozilla/net/CaptivePortalService.h'],
    },
    {
        'cid': '{c79eb3c6-091a-45a6-8544-5a8d1ab79537}',
        'contract_ids': ['@mozilla.org/network/dashboard;1'],
        'type': 'mozilla::net::Dashboard',
        'headers': ['mozilla/net/Dashboard.h'],
    },
    {
        'name': 'DNS',
        'js_name': 'dns',
        'cid': '{b0ff4572-dae4-4bef-a092-83c1b88f6be9}',
        'contract_ids': ['@mozilla.org/network/dns-service;1'],
        'interfaces': ['nsIDNSService'],
        'singleton': True,
        'type': 'nsIDNSService',
        'constructor': 'nsDNSService::GetXPCOMSingleton',
        'headers': ['/netwerk/dns/nsDNSService2.h'],
        'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
    },
    {
        'cid': '{4ffae79e-57bd-4d7a-a0c9-0045a17b3615}',
        'contract_ids': ['@mozilla.org/network/native-dns-override;1'],
        'singleton': True,
        'type': 'nsINativeDNSResolverOverride',
        'constructor': 'mozilla::net::NativeDNSResolverOverride::GetSingleton',
        'headers': ['/netwerk/dns/GetAddrInfo.h'],
        'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
    },
    {
        'cid': '{510a86bb-6019-4ed1-bb4f-965cffd23ece}',
        'contract_ids': ['@mozilla.org/network/downloader;1'],
        'type': 'nsDownloader',
        'headers': ['/netwerk/base/nsDownloader.h'],
    },
    {
        'js_name': 'eTLD',
        'cid': '{cb9abbae-66b6-4609-8594-5c4ff300888e}',
        'contract_ids': ['@mozilla.org/network/effective-tld-service;1'],
        'interfaces': ['nsIEffectiveTLDService'],
        'singleton': True,
        'type': 'nsEffectiveTLDService',
        'headers': ['/netwerk/dns/nsEffectiveTLDService.h'],
        'init_method': 'Init',
    },
    {
        'cid': '{be9a53ae-c7e9-11d3-8cda-0060b0fc14a3}',
        'contract_ids': ['@mozilla.org/network/file-input-stream;1'],
        'legacy_constructor': 'nsFileInputStream::Create',
        'headers': ['nsFileStreams.h'],
    },
    {
        'cid': '{c272fee0-c7e9-11d3-8cda-0060b0fc14a3}',
        'contract_ids': ['@mozilla.org/network/file-output-stream;1'],
        'legacy_constructor': 'nsFileOutputStream::Create',
        'headers': ['nsFileStreams.h'],
    },
    {
        'cid': '{648705e9-757a-4d4b-a5bF-0248e512c309}',
        'contract_ids': ['@mozilla.org/network/file-random-access-stream;1'],
        'legacy_constructor': 'nsFileRandomAccessStream::Create',
        'headers': ['nsFileStreams.h'],
    },
    {
        'name': 'HttpActivityDistributor',
        'cid': '{15629ada-a41c-4a09-961f-6553cd60b1a2}',
        'contract_ids': ['@mozilla.org/network/http-activity-distributor;1'],
        'type': 'mozilla::net::nsHttpActivityDistributor',
        'headers': ['/netwerk/protocol/http/nsHttpActivityDistributor.h'],
        'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
    },
    {
        'cid': '{36b63ef3-e0fa-4c49-9fd4-e065e85568f4}',
        'contract_ids': ['@mozilla.org/network/http-auth-manager;1'],
        'type': 'mozilla::net::nsHttpAuthManager',
        'headers': ['/netwerk/protocol/http/nsHttpAuthManager.h'],
        'init_method': 'Init',
    },
    {
        'cid': '{62b778a6-bce3-456b-8c31-2865fbb68c91}',
        'contract_ids': ['@mozilla.org/network/idn-service;1'],
        'type': 'nsIDNService',
        'headers': ['/netwerk/dns/nsIDNService.h'],
        'init_method': 'Init',
        'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
    },
    {
        'cid': '{a62af1ba-79b3-4896-8aaf-b148bfce4280}',
        'contract_ids': ['@mozilla.org/network/incremental-download;1'],
        'legacy_constructor': 'net_NewIncrementalDownload',
    },
    {
        'cid': '{5d6352a3-b9c3-4fa3-87aa-b2a3c6e5a501}',
        'contract_ids': ['@mozilla.org/network/incremental-stream-loader;1'],
        'legacy_constructor': 'nsIncrementalStreamLoader::Create',
        'headers': ['/netwerk/base/nsIncrementalStreamLoader.h'],
    },
    {
        'cid': '{6ddb050c-0d04-11d4-986e-00c04fa0cf4a}',
        'contract_ids': ['@mozilla.org/network/input-stream-channel;1'],
        'type': 'mozilla::net::nsInputStreamChannel',
        'headers': ['/netwerk/base/nsInputStreamChannel.h'],
    },
    {
        'cid': '{ccd0e960-7947-4635-b70e-4c661b63d675}',
        'contract_ids': ['@mozilla.org/network/input-stream-pump;1'],
        'type': 'nsInputStreamPump',
        'headers': ['nsInputStreamPump.h'],
    },
    {
        'name': 'IO',
        'js_name': 'io',
        'cid': '{9ac9e770-18bc-11d3-9337-00104ba0fd40}',
        'contract_ids': [
            '@mozilla.org/network/io-service;1',
            '@mozilla.org/network/util;1',
        ],
        'interfaces': ['nsIIOService', 'nsISpeculativeConnect', 'nsINetUtil'],
        'singleton': True,
        'type': 'mozilla::net::nsIOService',
        'headers': ['/netwerk/base/nsIOService.h'],
        'constructor': 'mozilla::net::nsIOService::GetInstance',
        'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
    },
    {
        'cid': '{e1c61582-2a84-11d3-8cce-0060b0fc14a3}',
        'contract_ids': ['@mozilla.org/network/load-group;1'],
        'legacy_constructor': 'nsLoadGroupConstructor',
    },
    {
        'cid': '{1f4dbcf7-245c-4c8c-943d-8a1da0495e8a}',
        'contract_ids': ['@mozilla.org/network/mime-hdrparam;1'],
        'type': 'nsMIMEHeaderParamImpl',
        'headers': ['/netwerk/mime/nsMIMEHeaderParamImpl.h'],
    },
    {
        'cid': '{58a1c31c-1dd2-11b2-a3f6-d36949d48268}',
        'contract_ids': ['@mozilla.org/network/mime-input-stream;1'],
        'legacy_constructor': 'nsMIMEInputStreamConstructor',
        'headers': ['nsMIMEInputStream.h'],
    },
    {
        'cid': '{2693457e-3ba5-4455-991f-5350946adb12}',
        'contract_ids': ['@mozilla.org/network/network-connectivity-service;1'],
        'singleton': True,
        'type': 'nsINetworkConnectivityService',
        'constructor': 'mozilla::net::NetworkConnectivityService::GetSingleton',
        'headers': ['mozilla/net/NetworkConnectivityService.h'],
    },
    {
        'cid': '{969adfdf-7221-4419-aecf-05f8faf00c9b}',
        'contract_ids': ['@mozilla.org/network/predictor;1'],
        'singleton': True,
        'legacy_constructor': 'mozilla::net::Predictor::Create',
        'headers': ['mozilla/net/Predictor.h'],
    },
    {
        'cid': '{e9b301c0-e0e4-11d3-a1a8-0050041caf44}',
        'contract_ids': ['@mozilla.org/network/protocol-proxy-service;1'],
        'singleton': True,
        'type': 'mozilla::net::nsProtocolProxyService',
        'headers': ['/netwerk/base/nsProtocolProxyService.h'],
        'init_method': 'Init',
    },
    {
        'cid': '{3decd6c8-30ef-11d3-8cd0-0060b0fc14a3}',
        'contract_ids': ['@mozilla.org/network/protocol/about;1?what=blank'],
        'legacy_constructor': 'nsAboutBlank::Create',
        'headers': ['/netwerk/protocol/about/nsAboutBlank.h'],
    },
    {
        'cid': '{9158c470-86e4-11d4-9be2-00e09872a416}',
        'contract_ids': ['@mozilla.org/network/protocol/about;1?what=cache'],
        'legacy_constructor': 'nsAboutCache::Create',
        'headers': ['/netwerk/protocol/about/nsAboutCache.h'],
    },
    {
        'cid': '{7fa5237d-b0eb-438f-9e50-ca0166e63788}',
        'contract_ids': ['@mozilla.org/network/protocol/about;1?what=cache-entry'],
        'type': 'nsAboutCacheEntry',
        'headers': ['/netwerk/protocol/about/nsAboutCacheEntry.h'],
    },
    {
        'cid': '{9e3b6c90-2f75-11d3-8cd0-0060b0fc14a3}',
        'contract_ids': ['@mozilla.org/network/protocol;1?name=about'],
        'singleton': True,
        'type': 'mozilla::net::nsAboutProtocolHandler',
        'headers': ['/netwerk/protocol/about/nsAboutProtocolHandler.h'],
        'protocol_config': {
            'scheme': 'about',
            'flags': [
                'URI_NORELATIVE',
                'URI_NOAUTH',
                'URI_DANGEROUS_TO_LOAD',
                'URI_SCHEME_NOT_SELF_LINKABLE',
            ],
            'has_dynamic_flags': True,
        },
    },
    {
        'cid': '{b6ed3030-6183-11d3-a178-0050041caf44}',
        'contract_ids': ['@mozilla.org/network/protocol;1?name=data'],
        'singleton': True,
        'legacy_constructor': 'nsDataHandler::Create',
        'headers': ['/netwerk/protocol/data/nsDataHandler.h'],
        'protocol_config': {
            'scheme': 'data',
            'flags': [
                'URI_NORELATIVE',
                'URI_NOAUTH',
                'URI_INHERITS_SECURITY_CONTEXT',
                'URI_LOADABLE_BY_ANYONE',
                'URI_NON_PERSISTABLE',
                'URI_IS_LOCAL_RESOURCE',
                'URI_SYNC_LOAD_IS_OK',
            ],
        },
    },
    {
        'cid': '{fbc81170-1f69-11d3-9344-00104ba0fd40}',
        'contract_ids': ['@mozilla.org/network/protocol;1?name=file'],
        'singleton': True,
        'type': 'nsFileProtocolHandler',
        'headers': ['mozilla/net/nsFileProtocolHandler.h'],
        'init_method': 'Init',
        'protocol_config': {
            'scheme': 'file',
            'flags': [
                'URI_NOAUTH',
                'URI_IS_LOCAL_FILE',
                'URI_IS_LOCAL_RESOURCE',
                'URI_IS_POTENTIALLY_TRUSTWORTHY',
            ],
        },
    },
    {
        'cid': '{4f47e42e-4d23-4dd3-bfda-eb29255e9ea3}',
        'contract_ids': ['@mozilla.org/network/protocol;1?name=http'],
        'singleton': True,
        'type': 'mozilla::net::nsHttpHandler',
        'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
        'protocol_config': {
            'scheme': 'http',
            'flags': [
                'URI_STD',
                'ALLOWS_PROXY',
                'ALLOWS_PROXY_HTTP',
                'URI_LOADABLE_BY_ANYONE',
                'URI_HAS_WEB_EXPOSED_ORIGIN',
            ],
            'default_port': 80,
        },
    },
    {
        'cid': '{dccbe7e4-7750-466b-a557-5ea36c8ff24e}',
        'contract_ids': ['@mozilla.org/network/protocol;1?name=https'],
        'singleton': True,
        'type': 'mozilla::net::nsHttpsHandler',
        'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
        'protocol_config': {
            'scheme': 'https',
            'flags': [
                'URI_STD',
                'ALLOWS_PROXY',
                'ALLOWS_PROXY_HTTP',
                'URI_LOADABLE_BY_ANYONE',
                'URI_IS_POTENTIALLY_TRUSTWORTHY',
                'URI_HAS_WEB_EXPOSED_ORIGIN',
            ],
            'default_port': 443,
        },
    },
    {
        'cid': '{aea16cd0-f020-4138-b068-0716c4a15b5a}',
        'contract_ids': ['@mozilla.org/network/protocol;1?name=moz-extension'],
        'singleton': True,
        'type': 'mozilla::net::ExtensionProtocolHandler',
        'headers': ['mozilla/net/ExtensionProtocolHandler.h'],
        'constructor': 'mozilla::net::ExtensionProtocolHandler::GetSingleton',
        'protocol_config': {
            'scheme': 'moz-extension',
            'flags': [
                'URI_STD',
                'URI_IS_LOCAL_RESOURCE',
                'URI_IS_POTENTIALLY_TRUSTWORTHY',
                'URI_HAS_WEB_EXPOSED_ORIGIN',
            ],
            'has_dynamic_flags': True,
        },
    },
    {
        'cid': '{450a2b55-620a-44b3-9f67-839b3b0c329c}',
        'contract_ids': ['@mozilla.org/network/protocol;1?name=moz-page-thumb'],
        'singleton': True,
        'type': 'mozilla::net::PageThumbProtocolHandler',
        'headers': ['mozilla/net/PageThumbProtocolHandler.h'],
        'constructor': 'mozilla::net::PageThumbProtocolHandler::GetSingleton',
        'protocol_config': {
            'scheme': 'moz-page-thumb',
            'flags': [
                'URI_STD',
                'URI_IS_UI_RESOURCE',
                'URI_IS_LOCAL_RESOURCE',
                'URI_NORELATIVE',
                'URI_NOAUTH',
            ],
        },
    },
    {
        'cid': '{1423e739-782c-4081-b5d8-fe6fba68c0ef}',
        'contract_ids': ['@mozilla.org/network/protocol;1?name=moz-safe-about'],
        'singleton': True,
        'type': 'mozilla::net::nsSafeAboutProtocolHandler',
        'headers': ['/netwerk/protocol/about/nsAboutProtocolHandler.h'],
        'protocol_config': {
            'scheme': 'moz-safe-about',
            'flags': [
                'URI_NORELATIVE',
                'URI_NOAUTH',
                'URI_LOADABLE_BY_ANYONE',
                'URI_IS_POTENTIALLY_TRUSTWORTHY',
            ],
        },
    },
    {
        'cid': '{e64f152a-9f07-11d3-8cda-0060b0fc14a3}',
        'contract_ids': ['@mozilla.org/network/protocol;1?name=resource'],
        'singleton': True,
        'type': 'nsResProtocolHandler',
        'headers': ['/netwerk/protocol/res/nsResProtocolHandler.h'],
        'constructor': 'nsResProtocolHandler::GetSingleton',
        'protocol_config': {
            'scheme': 'resource',
            'flags': [
                'URI_STD',
                'URI_IS_UI_RESOURCE',
                'URI_IS_LOCAL_RESOURCE',
                'URI_IS_POTENTIALLY_TRUSTWORTHY',
                'URI_HAS_WEB_EXPOSED_ORIGIN',
            ],
        },
    },
    {
        'cid': '{9c7ec5d1-23f9-11d5-aea8-8fcc0793e97f}',
        'contract_ids': ['@mozilla.org/network/protocol;1?name=view-source'],
        'singleton': True,
        'type': 'mozilla::net::nsViewSourceHandler',
        'headers': ['/netwerk/protocol/viewsource/nsViewSourceHandler.h'],
        'protocol_config': {
            'scheme': 'view-source',
            'flags': [
                'URI_NORELATIVE',
                'URI_NOAUTH',
                'URI_DANGEROUS_TO_LOAD',
                'URI_NON_PERSISTABLE',
            ],
            'has_dynamic_flags': True,
        },
    },
    {
        'cid': '{dc01db59-a513-4c90-824b-085cce06c0aa}',
        'contract_ids': ['@mozilla.org/network/protocol;1?name=ws'],
        'singleton': True,
        'legacy_constructor': 'mozilla::net::WebSocketChannelConstructor',
        'protocol_config': {
            'scheme': 'ws',
            'flags': [
                'URI_NORELATIVE',
                'URI_NON_PERSISTABLE',
                'ALLOWS_PROXY',
                'ALLOWS_PROXY_HTTP',
                'URI_DOES_NOT_RETURN_DATA',
                'URI_DANGEROUS_TO_LOAD',
                'URI_HAS_WEB_EXPOSED_ORIGIN',
            ],
            'default_port': 80,
        },
    },
    {
        'cid': '{dc01dbbb-a5bb-4cbb-82bb-085cce06c0bb}',
        'contract_ids': ['@mozilla.org/network/protocol;1?name=wss'],
        'singleton': True,
        'legacy_constructor': 'mozilla::net::WebSocketSSLChannelConstructor',
        'protocol_config': {
            'scheme': 'wss',
            'flags': [
                'URI_NORELATIVE',
                'URI_NON_PERSISTABLE',
                'ALLOWS_PROXY',
                'ALLOWS_PROXY_HTTP',
                'URI_DOES_NOT_RETURN_DATA',
                'URI_DANGEROUS_TO_LOAD',
                'URI_IS_POTENTIALLY_TRUSTWORTHY',
                'URI_HAS_WEB_EXPOSED_ORIGIN',
            ],
            'default_port': 443,
        },
    },
    {
        'cid': '{a181af0d-68b8-4308-94db-d4f859058215}',
        'contract_ids': ['@mozilla.org/network/safe-file-output-stream;1'],
        'type': 'nsSafeFileOutputStream',
        'headers': ['nsFileStreams.h'],
    },
    {
        'cid': '{d6ef593d-a429-4b14-a887-d9e2f765d9ed}',
        'contract_ids': ['@mozilla.org/network/serialization-helper;1'],
        'type': 'nsSerializationHelper',
        'headers': ['nsSerializationHelper.h'],
    },
    {
        'cid': '{2ec62893-3b35-48fa-ab1d-5e68a9f45f08}',
        'contract_ids': ['@mozilla.org/network/server-socket;1'],
        'type': 'mozilla::net::nsServerSocket',
        'headers': ['/netwerk/base/nsServerSocket.h'],
    },
    {
        'cid': '{fb8cbf4e-4701-4ba1-b1d6-5388e041fb67}',
        'contract_ids': ['@mozilla.org/network/simple-stream-listener;1'],
        'type': 'mozilla::net::nsSimpleStreamListener',
        'headers': ['/netwerk/base/nsSimpleStreamListener.h'],
    },
    {
        'cid': '{2be14592-28d4-4a83-8fe9-08e778849f6e}',
        'contract_ids': ['@mozilla.org/network/simple-uri-mutator;1'],
        'type': 'mozilla::net::nsSimpleURI::Mutator',
        'headers': ['nsSimpleURI.h'],
        'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
    },
    {
        'cid': '{04445aa0-fd27-4c99-bd41-6be6318ae92c}',
        'contract_ids': ['@mozilla.org/network/default-uri-mutator;1'],
        'type': 'mozilla::net::DefaultURI::Mutator',
        'headers': ['/netwerk/base/DefaultURI.h'],
        'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
    },
    {
        'name': 'SocketTransport',
        'cid': '{ad56b25f-e6bb-4db3-9f7b-5b7db33fd2b1}',
        'contract_ids': ['@mozilla.org/network/socket-transport-service;1'],
        'singleton': True,
        'type': 'mozilla::net::nsSocketTransportService',
        'headers': ['/netwerk/base/nsSocketTransportService2.h'],
        'init_method': 'Init',
        'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
    },
    {
        'cid': '{ce7d7da0-fb28-44a3-8c7b-000c165918f4}',
        'contract_ids': ['@mozilla.org/network/standard-url-mutator;1'],
        'type': 'mozilla::net::nsStandardURL::Mutator',
        'headers': ['/netwerk/base/nsStandardURL.h'],
        'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
    },
    {
        'cid': '{831f8f13-7aa8-485f-b02e-77c881cc5773}',
        'contract_ids': ['@mozilla.org/network/stream-listener-tee;1'],
        'type': 'mozilla::net::nsStreamListenerTee',
        'headers': ['/netwerk/base/nsStreamListenerTee.h'],
    },
    {
        'cid': '{9879908a-2972-40c0-890b-a91dd7dfb954}',
        'contract_ids': ['@mozilla.org/network/stream-loader;1'],
        'legacy_constructor': 'mozilla::net::nsStreamLoader::Create',
        'headers': ['/netwerk/base/nsStreamLoader.h'],
        'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
    },
    {
        'name': 'StreamTransport',
        'cid': '{0885d4f8-f7b8-4cda-902e-94ba38bc256e}',
        'contract_ids': ['@mozilla.org/network/stream-transport-service;1'],
        'type': 'mozilla::net::nsStreamTransportService',
        'headers': ['/netwerk/base/nsStreamTransportService.h'],
        'init_method': 'Init',
    },
    {
        'cid': '{4c39159c-cd90-4dd3-97a7-06af5e6d84c4}',
        'contract_ids': ['@mozilla.org/network/throttlequeue;1'],
        'type': 'nsIInputChannelThrottleQueue',
        'constructor': 'mozilla::net::ThrottleQueue::Create',
        'headers': ['/netwerk/base/ThrottleQueue.h'],
    },
    {
        'cid': '{1813cbb4-c98e-4622-8c7d-839167f3f272}',
        'contract_ids': ['@mozilla.org/network/tls-server-socket;1'],
        'type': 'mozilla::net::TLSServerSocket',
        'headers': ['/netwerk/base/TLSServerSocket.h'],
    },
    {
        'cid': '{c9f74572-7b8e-4fec-bb4a-03c0d3021bd6}',
        'contract_ids': ['@mozilla.org/network/udp-socket;1'],
        'type': 'mozilla::net::nsUDPSocket',
        'headers': ['/netwerk/base/nsUDPSocket.h'],
        'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
    },
    {
        'cid': '{ff41913b-546a-4bff-9201-dc9b2c032eba}',
        'contract_ids': ['@mozilla.org/network/url-parser;1?auth=maybe'],
        'type': 'nsStdURLParser',
        'headers': ['nsURLParsers.h'],
        'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
    },
    {
        'cid': '{78804a84-8173-42b6-bb94-789f0816a810}',
        'contract_ids': ['@mozilla.org/network/url-parser;1?auth=no'],
        'type': 'nsNoAuthURLParser',
        'headers': ['nsURLParsers.h'],
        'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
    },
    {
        'cid': '{275d800e-3f60-4896-adb7-d7f390ce0e42}',
        'contract_ids': ['@mozilla.org/network/url-parser;1?auth=yes'],
        'type': 'nsAuthURLParser',
        'headers': ['nsURLParsers.h'],
        'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
    },
    {
        'cid': '{892ffeb0-3f80-11d3-a16c-0050041caf44}',
        'contract_ids': ['@mozilla.org/streamConverters;1'],
        'legacy_constructor': 'CreateNewStreamConvServiceFactory',
        'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
    },
    {
        'cid': '{cf0f71fd-fafd-4e2b-9fdc-134d972e16e2}',
        'contract_ids': ['@mozilla.org/streamconv;1?from=application/http-index-format&to=text/html'],
        'legacy_constructor': 'nsIndexedToHTML::Create',
        'headers': ['/netwerk/streamconv/converters/nsIndexedToHTML.h'],
    },
    {
        'cid': '{7d7008a0-c49a-11d3-9b22-0080c7cb1080}',
        'contract_ids': ['@mozilla.org/streamconv;1?from=application/x-unknown-content-type&to=*/*'],
        'legacy_constructor': 'CreateNewUnknownDecoderFactory',
    },
    {
        'cid': '{66230b2b-17fa-4bd3-abf4-07986151022d}',
        'contract_ids': [
            '@mozilla.org/streamconv;1?from=br&to=uncompressed',
            '@mozilla.org/streamconv;1?from=compress&to=uncompressed',
            '@mozilla.org/streamconv;1?from=deflate&to=uncompressed',
            '@mozilla.org/streamconv;1?from=gzip&to=uncompressed',
            '@mozilla.org/streamconv;1?from=x-compress&to=uncompressed',
            '@mozilla.org/streamconv;1?from=x-gzip&to=uncompressed',
        ],
        'legacy_constructor': 'CreateNewHTTPCompressConvFactory',
        'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
    },
    {
        'cid': '{7584ce90-5b25-11d3-a175-0050041caf44}',
        'contract_ids': [
            '@mozilla.org/streamconv;1?from=multipart/byteranges&to=*/*',
            '@mozilla.org/streamconv;1?from=multipart/mixed&to=*/*',
            '@mozilla.org/streamconv;1?from=multipart/x-mixed-replace&to=*/*',
        ],
        'legacy_constructor': 'CreateNewMultiMixedConvFactory',
    },
    {
        'cid': '{77c0e42a-1dd2-11b2-8ebf-edc6606f2f4b}',
        'contract_ids': ['@mozilla.org/txttohtmlconv;1'],
        'legacy_constructor': 'CreateNewTXTToHTMLConvFactory',
    },
    {
        'cid': '{2f277c00-0eaf-4ddb-b936-41326ba48aae}',
        'contract_ids': [],
        'type': 'mozilla::net::nsNestedAboutURI::Mutator',
        'headers': ['/netwerk/protocol/about/nsAboutProtocolHandler.h'],
    },
    {
        'cid': '{56388dad-287b-4240-a785-85c394012503}',
        'contract_ids': [],
        'type': 'mozilla::net::nsSimpleNestedURI::Mutator',
        'headers': ['nsSimpleNestedURI.h'],
    },
    {
        'cid': '{9c4e9d49-ce64-4ca3-acef-3075c5e5aba7}',
        'contract_ids': [],
        'type': 'mozilla::net::nsSimpleNestedURI::Mutator',
        'headers': ['nsSimpleNestedURI.h'],
    },
    {
        'cid': '{b0054ef3-b096-483d-8242-4ee36b7b2115}',
        'contract_ids': [],
        'type': 'mozilla::net::nsNestedAboutURI::Mutator',
        'headers': ['/netwerk/protocol/about/nsAboutProtocolHandler.h'],
    },
    {
        'cid': '{b3cfeb91-332a-46c9-ad97-93ff39841494}',
        'contract_ids': [],
        'type': 'mozilla::net::SubstitutingURL::Mutator',
        'headers': ['mozilla/net/SubstitutingURL.h'],
    },
    {
        'cid': '{de9472d0-8034-11d3-9399-00104ba0fd40}',
        'contract_ids': [],
        'type': 'mozilla::net::nsStandardURL::Mutator',
        'headers': ['/netwerk/base/nsStandardURL.h'],
        'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
    },
    {
        'cid': '{dea9657c-18cf-4984-bde9-ccef5d8ab473}',
        'contract_ids': [],
        'type': 'mozilla::net::SubstitutingURL::Mutator',
        'headers': ['mozilla/net/SubstitutingURL.h'],
    },
    {
        'cid': '{50d50ddf-f16a-4652-8705-936b19c3763b}',
        'contract_ids': [],
        'type': 'mozilla::net::SubstitutingJARURI',
        'headers': ['mozilla/net/SubstitutingJARURI.h'],
        'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
    },
    {
        'cid': '{e0da1d70-2f7b-11d3-8cd0-0060b0fc14a3}',
        'contract_ids': [],
        'type': 'mozilla::net::nsSimpleURI::Mutator',
        'headers': ['nsSimpleURI.h'],
        'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
    },
    {
        'js_name': 'cookies',
        'cid': '{c375fa80-150f-11d6-a618-0010a401eb10}',
        'contract_ids': [
            '@mozilla.org/cookieService;1',
            '@mozilla.org/cookiemanager;1',
        ],
        'interfaces': ['nsICookieService', 'nsICookieManager'],
        'singleton': True,
        'type': 'nsICookieService',
        'constructor': 'mozilla::net::CookieService::GetXPCOMSingleton',
        'headers': ['/netwerk/cookie/CookieService.h'],
    },
    {
        'cid': '{e1676f84-e6e5-45d0-a4bf-d9905efc5b2e}',
        'contract_ids': ['@mozilla.org/http-sfv-service;1'],
        'singleton': True,
        'constructor': 'mozilla::net::GetSFVService',
        'headers': ['mozilla/net/SFVService.h'],
    },
    {
        'cid': '{4ce234f1-52e8-47a9-8c8d-b02f815733c7}',
        'contract_ids': ['@mozilla.org/cookieJarSettings;1'],
        'type': 'nsICookieJarSettings',
        'constructor': 'mozilla::net::CookieJarSettings::CreateForXPCOM',
        'headers': ['mozilla/net/CookieJarSettings.h'],
    },
]

if defined('NECKO_WIFI'):
    Classes += [
        {
            'cid': '{3ff8fb9f-ee63-48df-89f0-dace0242fd82}',
            'contract_ids': ['@mozilla.org/wifi/monitor;1'],
            'singleton': True,
            'type': 'nsWifiMonitor',
            'headers': ['/netwerk/wifi/nsWifiMonitor.h'],
        },
    ]

toolkit = buildconfig.substs['MOZ_WIDGET_TOOLKIT']
link_service = None
if toolkit == 'windows':
    link_service = {
        'type': 'nsNotifyAddrListener',
        'headers': ['/netwerk/system/win32/nsNotifyAddrListener.h'],
        'init_method': 'Init',
    }
elif toolkit == 'cocoa':
    link_service = {
        'type': 'nsNetworkLinkService',
        'headers': ['/netwerk/system/mac/nsNetworkLinkService.h'],
        'init_method': 'Init',
    }
elif toolkit == 'android':
    link_service = {
        'type': 'nsAndroidNetworkLinkService',
        'headers': ['/netwerk/system/android/nsAndroidNetworkLinkService.h'],
        'init_method': 'Init',
    }
elif buildconfig.substs['OS_ARCH'] == 'Linux':
    link_service = {
        'type': 'nsNetworkLinkService',
        'headers': ['/netwerk/system/linux/nsNetworkLinkService.h'],
        'init_method': 'Init',
    }

if link_service:
    Classes += [
        dict({
            'cid': '{75a500a2-0030-40f7-86f8-63f225b940ae}',
            'contract_ids': ['@mozilla.org/network/network-link-service;1'],
            'singleton': True,
        }, **link_service)
    ]

if toolkit != 'android':
    Classes += [
        {
        'cid': '{72da39cc-0b9b-4fff-8ff9-d3b9a41d0dc4}',
        'contract_ids': ['@mozilla.org/net/CachePurgeLock;1'],
        'type': 'mozilla::net::CachePurgeLock',
        'headers': ['mozilla/net/CachePurgeLock.h'],
        },
    ]