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
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
//
// DO NOT EDIT.  THIS FILE IS GENERATED FROM ../../../dist/idl/nsIHttpChannelInternal.idl
//


/// `interface nsIHttpUpgradeListener : nsISupports`
///

/// ```text
/// /**
///  * The callback interface for nsIHttpChannelInternal::HTTPUpgrade()
///  */
/// ```
///

// The actual type definition for the interface. This struct has methods
// declared on it which will call through its vtable. You never want to pass
// this type around by value, always pass it behind a reference.

#[repr(C)]
pub struct nsIHttpUpgradeListener {
    vtable: *const nsIHttpUpgradeListenerVTable,

    /// This field is a phantomdata to ensure that the VTable type and any
    /// struct containing it is not safe to send across threads, as XPCOM is
    /// generally not threadsafe.
    ///
    /// XPCOM interfaces in general are not safe to send across threads.
    __nosync: ::std::marker::PhantomData<::std::rc::Rc<u8>>,
}

// Implementing XpCom for an interface exposes its IID, which allows for easy
// use of the `.query_interface<T>` helper method. This also defines that
// method for nsIHttpUpgradeListener.
unsafe impl XpCom for nsIHttpUpgradeListener {
    const IID: nsIID = nsID(0x5b515449, 0xab64, 0x4dba,
        [0xb3, 0xcd, 0xda, 0x8f, 0xc2, 0xf8, 0x30, 0x64]);
}

// We need to implement the RefCounted trait so we can be used with `RefPtr`.
// This trait teaches `RefPtr` how to manage our memory.
unsafe impl RefCounted for nsIHttpUpgradeListener {
    #[inline]
    unsafe fn addref(&self) {
        self.AddRef();
    }
    #[inline]
    unsafe fn release(&self) {
        self.Release();
    }
}

// This trait is implemented on all types which can be coerced to from nsIHttpUpgradeListener.
// It is used in the implementation of `fn coerce<T>`. We hide it from the
// documentation, because it clutters it up a lot.
#[doc(hidden)]
pub trait nsIHttpUpgradeListenerCoerce {
    /// Cheaply cast a value of this type from a `nsIHttpUpgradeListener`.
    fn coerce_from(v: &nsIHttpUpgradeListener) -> &Self;
}

// The trivial implementation: We can obviously coerce ourselves to ourselves.
impl nsIHttpUpgradeListenerCoerce for nsIHttpUpgradeListener {
    #[inline]
    fn coerce_from(v: &nsIHttpUpgradeListener) -> &Self {
        v
    }
}

impl nsIHttpUpgradeListener {
    /// Cast this `nsIHttpUpgradeListener` to one of its base interfaces.
    #[inline]
    pub fn coerce<T: nsIHttpUpgradeListenerCoerce>(&self) -> &T {
        T::coerce_from(self)
    }
}

// Every interface struct type implements `Deref` to its base interface. This
// causes methods on the base interfaces to be directly avaliable on the
// object. For example, you can call `.AddRef` or `.QueryInterface` directly
// on any interface which inherits from `nsISupports`.
impl ::std::ops::Deref for nsIHttpUpgradeListener {
    type Target = nsISupports;
    #[inline]
    fn deref(&self) -> &nsISupports {
        unsafe {
            ::std::mem::transmute(self)
        }
    }
}

// Ensure we can use .coerce() to cast to our base types as well. Any type which
// our base interface can coerce from should be coercable from us as well.
impl<T: nsISupportsCoerce> nsIHttpUpgradeListenerCoerce for T {
    #[inline]
    fn coerce_from(v: &nsIHttpUpgradeListener) -> &Self {
        T::coerce_from(v)
    }
}

// This struct represents the interface's VTable. A pointer to a statically
// allocated version of this struct is at the beginning of every nsIHttpUpgradeListener
// object. It contains one pointer field for each method in the interface. In
// the case where we can't generate a binding for a method, we include a void
// pointer.
#[doc(hidden)]
#[repr(C)]
pub struct nsIHttpUpgradeListenerVTable {
    /// We need to include the members from the base interface's vtable at the start
    /// of the VTable definition.
    pub __base: nsISupportsVTable,

    /* [must_use] void onTransportAvailable (in nsISocketTransport aTransport, in nsIAsyncInputStream aSocketIn, in nsIAsyncOutputStream aSocketOut); */
    pub OnTransportAvailable: unsafe extern "system" fn (this: *const nsIHttpUpgradeListener, aTransport: *const nsISocketTransport, aSocketIn: *const nsIAsyncInputStream, aSocketOut: *const nsIAsyncOutputStream) -> nsresult,
}


// The implementations of the function wrappers which are exposed to rust code.
// Call these methods rather than manually calling through the VTable struct.
impl nsIHttpUpgradeListener {


    /// `[must_use] void onTransportAvailable (in nsISocketTransport aTransport, in nsIAsyncInputStream aSocketIn, in nsIAsyncOutputStream aSocketOut);`
    #[inline]
    pub unsafe fn OnTransportAvailable(&self, aTransport: *const nsISocketTransport, aSocketIn: *const nsIAsyncInputStream, aSocketOut: *const nsIAsyncOutputStream) -> nsresult {
        ((*self.vtable).OnTransportAvailable)(self, aTransport, aSocketIn, aSocketOut)
    }


}


/// `interface nsIHttpChannelInternal : nsISupports`
///

/// ```text
/// /**
///  * Dumping ground for http.  This interface will never be frozen.  If you are
///  * using any feature exposed by this interface, be aware that this interface
///  * will change and you will be broken.  You have been warned.
///  */
/// ```
///

// The actual type definition for the interface. This struct has methods
// declared on it which will call through its vtable. You never want to pass
// this type around by value, always pass it behind a reference.

#[repr(C)]
pub struct nsIHttpChannelInternal {
    vtable: *const nsIHttpChannelInternalVTable,

    /// This field is a phantomdata to ensure that the VTable type and any
    /// struct containing it is not safe to send across threads, as XPCOM is
    /// generally not threadsafe.
    ///
    /// XPCOM interfaces in general are not safe to send across threads.
    __nosync: ::std::marker::PhantomData<::std::rc::Rc<u8>>,
}

// Implementing XpCom for an interface exposes its IID, which allows for easy
// use of the `.query_interface<T>` helper method. This also defines that
// method for nsIHttpChannelInternal.
unsafe impl XpCom for nsIHttpChannelInternal {
    const IID: nsIID = nsID(0x4e28263d, 0x1e03, 0x46f4,
        [0xaa, 0x5c, 0x95, 0x12, 0xf9, 0x19, 0x57, 0xf9]);
}

// We need to implement the RefCounted trait so we can be used with `RefPtr`.
// This trait teaches `RefPtr` how to manage our memory.
unsafe impl RefCounted for nsIHttpChannelInternal {
    #[inline]
    unsafe fn addref(&self) {
        self.AddRef();
    }
    #[inline]
    unsafe fn release(&self) {
        self.Release();
    }
}

// This trait is implemented on all types which can be coerced to from nsIHttpChannelInternal.
// It is used in the implementation of `fn coerce<T>`. We hide it from the
// documentation, because it clutters it up a lot.
#[doc(hidden)]
pub trait nsIHttpChannelInternalCoerce {
    /// Cheaply cast a value of this type from a `nsIHttpChannelInternal`.
    fn coerce_from(v: &nsIHttpChannelInternal) -> &Self;
}

// The trivial implementation: We can obviously coerce ourselves to ourselves.
impl nsIHttpChannelInternalCoerce for nsIHttpChannelInternal {
    #[inline]
    fn coerce_from(v: &nsIHttpChannelInternal) -> &Self {
        v
    }
}

impl nsIHttpChannelInternal {
    /// Cast this `nsIHttpChannelInternal` to one of its base interfaces.
    #[inline]
    pub fn coerce<T: nsIHttpChannelInternalCoerce>(&self) -> &T {
        T::coerce_from(self)
    }
}

// Every interface struct type implements `Deref` to its base interface. This
// causes methods on the base interfaces to be directly avaliable on the
// object. For example, you can call `.AddRef` or `.QueryInterface` directly
// on any interface which inherits from `nsISupports`.
impl ::std::ops::Deref for nsIHttpChannelInternal {
    type Target = nsISupports;
    #[inline]
    fn deref(&self) -> &nsISupports {
        unsafe {
            ::std::mem::transmute(self)
        }
    }
}

// Ensure we can use .coerce() to cast to our base types as well. Any type which
// our base interface can coerce from should be coercable from us as well.
impl<T: nsISupportsCoerce> nsIHttpChannelInternalCoerce for T {
    #[inline]
    fn coerce_from(v: &nsIHttpChannelInternal) -> &Self {
        T::coerce_from(v)
    }
}

// This struct represents the interface's VTable. A pointer to a statically
// allocated version of this struct is at the beginning of every nsIHttpChannelInternal
// object. It contains one pointer field for each method in the interface. In
// the case where we can't generate a binding for a method, we include a void
// pointer.
#[doc(hidden)]
#[repr(C)]
pub struct nsIHttpChannelInternalVTable {
    /// We need to include the members from the base interface's vtable at the start
    /// of the VTable definition.
    pub __base: nsISupportsVTable,

    /* [must_use] attribute nsIURI documentURI; */
    pub GetDocumentURI: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aDocumentURI: *mut *const nsIURI) -> nsresult,

    /* [must_use] attribute nsIURI documentURI; */
    pub SetDocumentURI: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aDocumentURI: *const nsIURI) -> nsresult,

    /* [must_use] void getRequestVersion (out unsigned long major, out unsigned long minor); */
    pub GetRequestVersion: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, major: *mut libc::uint32_t, minor: *mut libc::uint32_t) -> nsresult,

    /* [must_use] void getResponseVersion (out unsigned long major, out unsigned long minor); */
    pub GetResponseVersion: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, major: *mut libc::uint32_t, minor: *mut libc::uint32_t) -> nsresult,

    /* [must_use,noscript] void takeAllSecurityMessages (in securityMessagesArray aMessages); */
    /// Unable to generate binding because `native type nsCOMArray<nsISecurityConsoleMessage> is unsupported`
    pub TakeAllSecurityMessages: *const ::libc::c_void,

    /* [must_use] void setCookie (in string aCookieHeader); */
    pub SetCookie: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aCookieHeader: *const libc::c_char) -> nsresult,

    /* [must_use] void setupFallbackChannel (in string aFallbackKey); */
    pub SetupFallbackChannel: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aFallbackKey: *const libc::c_char) -> nsresult,

    /* [must_use] attribute unsigned long thirdPartyFlags; */
    pub GetThirdPartyFlags: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aThirdPartyFlags: *mut libc::uint32_t) -> nsresult,

    /* [must_use] attribute unsigned long thirdPartyFlags; */
    pub SetThirdPartyFlags: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aThirdPartyFlags: libc::uint32_t) -> nsresult,

    /* [must_use] attribute boolean forceAllowThirdPartyCookie; */
    pub GetForceAllowThirdPartyCookie: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aForceAllowThirdPartyCookie: *mut bool) -> nsresult,

    /* [must_use] attribute boolean forceAllowThirdPartyCookie; */
    pub SetForceAllowThirdPartyCookie: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aForceAllowThirdPartyCookie: bool) -> nsresult,

    /* [must_use] readonly attribute boolean canceled; */
    pub GetCanceled: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aCanceled: *mut bool) -> nsresult,

    /* [must_use] attribute boolean channelIsForDownload; */
    pub GetChannelIsForDownload: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aChannelIsForDownload: *mut bool) -> nsresult,

    /* [must_use] attribute boolean channelIsForDownload; */
    pub SetChannelIsForDownload: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aChannelIsForDownload: bool) -> nsresult,

    /* [must_use] readonly attribute AUTF8String localAddress; */
    pub GetLocalAddress: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aLocalAddress: &mut ::nsstring::nsACString) -> nsresult,

    /* [must_use] readonly attribute int32_t localPort; */
    pub GetLocalPort: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aLocalPort: *mut int32_t) -> nsresult,

    /* [must_use] readonly attribute AUTF8String remoteAddress; */
    pub GetRemoteAddress: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aRemoteAddress: &mut ::nsstring::nsACString) -> nsresult,

    /* [must_use] readonly attribute int32_t remotePort; */
    pub GetRemotePort: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aRemotePort: *mut int32_t) -> nsresult,

    /* [must_use,noscript] void setCacheKeysRedirectChain (in StringArray cacheKeys); */
    /// Unable to generate binding because `native type nsTArray<nsCString> is unsupported`
    pub SetCacheKeysRedirectChain: *const ::libc::c_void,

    /* [must_use] void HTTPUpgrade (in ACString aProtocolName, in nsIHttpUpgradeListener aListener); */
    pub HTTPUpgrade: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aProtocolName: &::nsstring::nsACString, aListener: *const nsIHttpUpgradeListener) -> nsresult,

    /* [must_use] attribute boolean allowSpdy; */
    pub GetAllowSpdy: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aAllowSpdy: *mut bool) -> nsresult,

    /* [must_use] attribute boolean allowSpdy; */
    pub SetAllowSpdy: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aAllowSpdy: bool) -> nsresult,

    /* [must_use] attribute boolean responseTimeoutEnabled; */
    pub GetResponseTimeoutEnabled: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aResponseTimeoutEnabled: *mut bool) -> nsresult,

    /* [must_use] attribute boolean responseTimeoutEnabled; */
    pub SetResponseTimeoutEnabled: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aResponseTimeoutEnabled: bool) -> nsresult,

    /* [must_use] attribute unsigned long initialRwin; */
    pub GetInitialRwin: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aInitialRwin: *mut libc::uint32_t) -> nsresult,

    /* [must_use] attribute unsigned long initialRwin; */
    pub SetInitialRwin: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aInitialRwin: libc::uint32_t) -> nsresult,

    /* [must_use] readonly attribute nsIURI apiRedirectToURI; */
    pub GetApiRedirectToURI: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aApiRedirectToURI: *mut *const nsIURI) -> nsresult,

    /* [must_use] attribute boolean allowAltSvc; */
    pub GetAllowAltSvc: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aAllowAltSvc: *mut bool) -> nsresult,

    /* [must_use] attribute boolean allowAltSvc; */
    pub SetAllowAltSvc: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aAllowAltSvc: bool) -> nsresult,

    /* [must_use] attribute boolean beConservative; */
    pub GetBeConservative: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aBeConservative: *mut bool) -> nsresult,

    /* [must_use] attribute boolean beConservative; */
    pub SetBeConservative: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aBeConservative: bool) -> nsresult,

    /* [must_use] attribute unsigned long tlsFlags; */
    pub GetTlsFlags: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aTlsFlags: *mut libc::uint32_t) -> nsresult,

    /* [must_use] attribute unsigned long tlsFlags; */
    pub SetTlsFlags: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aTlsFlags: libc::uint32_t) -> nsresult,

    /* [must_use] readonly attribute PRTime lastModifiedTime; */
    pub GetLastModifiedTime: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aLastModifiedTime: *mut PRTime) -> nsresult,

    /* [must_use] readonly attribute boolean responseSynthesized; */
    pub GetResponseSynthesized: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aResponseSynthesized: *mut bool) -> nsresult,

    /* [must_use] attribute boolean corsIncludeCredentials; */
    pub GetCorsIncludeCredentials: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aCorsIncludeCredentials: *mut bool) -> nsresult,

    /* [must_use] attribute boolean corsIncludeCredentials; */
    pub SetCorsIncludeCredentials: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aCorsIncludeCredentials: bool) -> nsresult,

    /* [must_use] attribute unsigned long corsMode; */
    pub GetCorsMode: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aCorsMode: *mut libc::uint32_t) -> nsresult,

    /* [must_use] attribute unsigned long corsMode; */
    pub SetCorsMode: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aCorsMode: libc::uint32_t) -> nsresult,

    /* [must_use] attribute unsigned long redirectMode; */
    pub GetRedirectMode: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aRedirectMode: *mut libc::uint32_t) -> nsresult,

    /* [must_use] attribute unsigned long redirectMode; */
    pub SetRedirectMode: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aRedirectMode: libc::uint32_t) -> nsresult,

    /* [must_use] attribute unsigned long fetchCacheMode; */
    pub GetFetchCacheMode: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aFetchCacheMode: *mut libc::uint32_t) -> nsresult,

    /* [must_use] attribute unsigned long fetchCacheMode; */
    pub SetFetchCacheMode: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aFetchCacheMode: libc::uint32_t) -> nsresult,

    /* [must_use] readonly attribute nsIURI topWindowURI; */
    pub GetTopWindowURI: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aTopWindowURI: *mut *const nsIURI) -> nsresult,

    /* [must_use] void setTopWindowURIIfUnknown (in nsIURI topWindowURI); */
    pub SetTopWindowURIIfUnknown: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, topWindowURI: *const nsIURI) -> nsresult,

    /* [must_use] attribute ACString networkInterfaceId; */
    pub GetNetworkInterfaceId: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aNetworkInterfaceId: &mut ::nsstring::nsACString) -> nsresult,

    /* [must_use] attribute ACString networkInterfaceId; */
    pub SetNetworkInterfaceId: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aNetworkInterfaceId: &::nsstring::nsACString) -> nsresult,

    /* [must_use] readonly attribute nsIURI proxyURI; */
    pub GetProxyURI: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aProxyURI: *mut *const nsIURI) -> nsresult,

    /* [noscript,nostdcall,notxpcom] void setCorsPreflightParameters (in StringArrayRef unsafeHeaders); */
    /// Unable to generate binding because `native type const nsTArray<nsCString> is unsupported`
    pub SetCorsPreflightParameters: *const ::libc::c_void,

    /* [infallible] attribute boolean blockAuthPrompt; */
    pub GetBlockAuthPrompt: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aBlockAuthPrompt: *mut bool) -> nsresult,

    /* [infallible] attribute boolean blockAuthPrompt; */
    pub SetBlockAuthPrompt: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aBlockAuthPrompt: bool) -> nsresult,

    /* [must_use] attribute AString integrityMetadata; */
    pub GetIntegrityMetadata: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aIntegrityMetadata: &mut ::nsstring::nsAString) -> nsresult,

    /* [must_use] attribute AString integrityMetadata; */
    pub SetIntegrityMetadata: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aIntegrityMetadata: &::nsstring::nsAString) -> nsresult,

    /* [must_use] readonly attribute ACString connectionInfoHashKey; */
    pub GetConnectionInfoHashKey: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aConnectionInfoHashKey: &mut ::nsstring::nsACString) -> nsresult,

    /* [infallible,noscript] attribute unsigned long lastRedirectFlags; */
    pub GetLastRedirectFlags: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aLastRedirectFlags: *mut libc::uint32_t) -> nsresult,

    /* [infallible,noscript] attribute unsigned long lastRedirectFlags; */
    pub SetLastRedirectFlags: unsafe extern "system" fn (this: *const nsIHttpChannelInternal, aLastRedirectFlags: libc::uint32_t) -> nsresult,
}


// The implementations of the function wrappers which are exposed to rust code.
// Call these methods rather than manually calling through the VTable struct.
impl nsIHttpChannelInternal {
    /// ```text
    /// /**
    ///      * This flag is set to force relevant cookies to be sent with this load
    ///      * even if normally they wouldn't be.
    ///      */
    /// ```
    ///

    pub const THIRD_PARTY_FORCE_ALLOW: i64 = 1;


    pub const CORS_MODE_SAME_ORIGIN: i64 = 0;


    pub const CORS_MODE_NO_CORS: i64 = 1;


    pub const CORS_MODE_CORS: i64 = 2;


    pub const CORS_MODE_NAVIGATE: i64 = 3;


    pub const REDIRECT_MODE_FOLLOW: i64 = 0;


    pub const REDIRECT_MODE_ERROR: i64 = 1;


    pub const REDIRECT_MODE_MANUAL: i64 = 2;


    pub const FETCH_CACHE_MODE_DEFAULT: i64 = 0;


    pub const FETCH_CACHE_MODE_NO_STORE: i64 = 1;


    pub const FETCH_CACHE_MODE_RELOAD: i64 = 2;


    pub const FETCH_CACHE_MODE_NO_CACHE: i64 = 3;


    pub const FETCH_CACHE_MODE_FORCE_CACHE: i64 = 4;


    pub const FETCH_CACHE_MODE_ONLY_IF_CACHED: i64 = 5;

    /// ```text
    /// /**
    ///      * An http channel can own a reference to the document URI
    ///      */
    /// ```
    ///

    /// `[must_use] attribute nsIURI documentURI;`
    #[inline]
    pub unsafe fn GetDocumentURI(&self, aDocumentURI: *mut *const nsIURI) -> nsresult {
        ((*self.vtable).GetDocumentURI)(self, aDocumentURI)
    }


    /// ```text
    /// /**
    ///      * An http channel can own a reference to the document URI
    ///      */
    /// ```
    ///

    /// `[must_use] attribute nsIURI documentURI;`
    #[inline]
    pub unsafe fn SetDocumentURI(&self, aDocumentURI: *const nsIURI) -> nsresult {
        ((*self.vtable).SetDocumentURI)(self, aDocumentURI)
    }


    /// ```text
    /// /**
    ///      * Get the major/minor version numbers for the request
    ///      */
    /// ```
    ///

    /// `[must_use] void getRequestVersion (out unsigned long major, out unsigned long minor);`
    #[inline]
    pub unsafe fn GetRequestVersion(&self, major: *mut libc::uint32_t, minor: *mut libc::uint32_t) -> nsresult {
        ((*self.vtable).GetRequestVersion)(self, major, minor)
    }


    /// ```text
    /// /**
    ///      * Get the major/minor version numbers for the response
    ///      */
    /// ```
    ///

    /// `[must_use] void getResponseVersion (out unsigned long major, out unsigned long minor);`
    #[inline]
    pub unsafe fn GetResponseVersion(&self, major: *mut libc::uint32_t, minor: *mut libc::uint32_t) -> nsresult {
        ((*self.vtable).GetResponseVersion)(self, major, minor)
    }



    /// `[must_use,noscript] void takeAllSecurityMessages (in securityMessagesArray aMessages);`
    const _TakeAllSecurityMessages: () = ();

    /// ```text
    /// /**
    ///      * Helper method to set a cookie with a consumer-provided
    ///      * cookie header, _but_ using the channel's other information
    ///      * (URI's, prompters, date headers etc).
    ///      *
    ///      * @param aCookieHeader
    ///      *        The cookie header to be parsed.
    ///      */
    /// ```
    ///

    /// `[must_use] void setCookie (in string aCookieHeader);`
    #[inline]
    pub unsafe fn SetCookie(&self, aCookieHeader: *const libc::c_char) -> nsresult {
        ((*self.vtable).SetCookie)(self, aCookieHeader)
    }


    /// ```text
    /// /**
    ///      * Setup this channel as an application cache fallback channel.
    ///      */
    /// ```
    ///

    /// `[must_use] void setupFallbackChannel (in string aFallbackKey);`
    #[inline]
    pub unsafe fn SetupFallbackChannel(&self, aFallbackKey: *const libc::c_char) -> nsresult {
        ((*self.vtable).SetupFallbackChannel)(self, aFallbackKey)
    }


    /// ```text
    /// /**
    ///      * When set, these flags modify the algorithm used to decide whether to
    ///      * send 3rd party cookies for a given channel.
    ///      */
    /// ```
    ///

    /// `[must_use] attribute unsigned long thirdPartyFlags;`
    #[inline]
    pub unsafe fn GetThirdPartyFlags(&self, aThirdPartyFlags: *mut libc::uint32_t) -> nsresult {
        ((*self.vtable).GetThirdPartyFlags)(self, aThirdPartyFlags)
    }


    /// ```text
    /// /**
    ///      * When set, these flags modify the algorithm used to decide whether to
    ///      * send 3rd party cookies for a given channel.
    ///      */
    /// ```
    ///

    /// `[must_use] attribute unsigned long thirdPartyFlags;`
    #[inline]
    pub unsafe fn SetThirdPartyFlags(&self, aThirdPartyFlags: libc::uint32_t) -> nsresult {
        ((*self.vtable).SetThirdPartyFlags)(self, aThirdPartyFlags)
    }


    /// ```text
    /// /**
    ///      * This attribute was added before the "flags" above and is retained here
    ///      * for compatibility. When set to true, has the same effect as
    ///      * THIRD_PARTY_FORCE_ALLOW, described above.
    ///      */
    /// ```
    ///

    /// `[must_use] attribute boolean forceAllowThirdPartyCookie;`
    #[inline]
    pub unsafe fn GetForceAllowThirdPartyCookie(&self, aForceAllowThirdPartyCookie: *mut bool) -> nsresult {
        ((*self.vtable).GetForceAllowThirdPartyCookie)(self, aForceAllowThirdPartyCookie)
    }


    /// ```text
    /// /**
    ///      * This attribute was added before the "flags" above and is retained here
    ///      * for compatibility. When set to true, has the same effect as
    ///      * THIRD_PARTY_FORCE_ALLOW, described above.
    ///      */
    /// ```
    ///

    /// `[must_use] attribute boolean forceAllowThirdPartyCookie;`
    #[inline]
    pub unsafe fn SetForceAllowThirdPartyCookie(&self, aForceAllowThirdPartyCookie: bool) -> nsresult {
        ((*self.vtable).SetForceAllowThirdPartyCookie)(self, aForceAllowThirdPartyCookie)
    }


    /// ```text
    /// /**
    ///      * True iff the channel has been canceled.
    ///      */
    /// ```
    ///

    /// `[must_use] readonly attribute boolean canceled;`
    #[inline]
    pub unsafe fn GetCanceled(&self, aCanceled: *mut bool) -> nsresult {
        ((*self.vtable).GetCanceled)(self, aCanceled)
    }


    /// ```text
    /// /**
    ///      * External handlers may set this to true to notify the channel
    ///      * that it is open on behalf of a download.
    ///      */
    /// ```
    ///

    /// `[must_use] attribute boolean channelIsForDownload;`
    #[inline]
    pub unsafe fn GetChannelIsForDownload(&self, aChannelIsForDownload: *mut bool) -> nsresult {
        ((*self.vtable).GetChannelIsForDownload)(self, aChannelIsForDownload)
    }


    /// ```text
    /// /**
    ///      * External handlers may set this to true to notify the channel
    ///      * that it is open on behalf of a download.
    ///      */
    /// ```
    ///

    /// `[must_use] attribute boolean channelIsForDownload;`
    #[inline]
    pub unsafe fn SetChannelIsForDownload(&self, aChannelIsForDownload: bool) -> nsresult {
        ((*self.vtable).SetChannelIsForDownload)(self, aChannelIsForDownload)
    }


    /// ```text
    /// /**
    ///      * The local IP address to which this channel is bound, in the
    ///      * format produced by PR_NetAddrToString. May be IPv4 or IPv6.
    ///      * Note: in the presence of NAT, this may not be the same as the
    ///      * address that the remote host thinks it's talking to.
    ///      *
    ///      * May throw NS_ERROR_NOT_AVAILABLE if accessed when the channel's
    ///      * endpoints are not yet determined, or in any case when
    ///      * nsIHttpActivityObserver.isActive is false. See bugs 534698 and 526207.
    ///      */
    /// ```
    ///

    /// `[must_use] readonly attribute AUTF8String localAddress;`
    #[inline]
    pub unsafe fn GetLocalAddress(&self, aLocalAddress: &mut ::nsstring::nsACString) -> nsresult {
        ((*self.vtable).GetLocalAddress)(self, aLocalAddress)
    }


    /// ```text
    /// /**
    ///      * The local port number to which this channel is bound.
    ///      *
    ///      * May throw NS_ERROR_NOT_AVAILABLE if accessed when the channel's
    ///      * endpoints are not yet determined, or in any case when
    ///      * nsIHttpActivityObserver.isActive is false. See bugs 534698 and 526207.
    ///      */
    /// ```
    ///

    /// `[must_use] readonly attribute int32_t localPort;`
    #[inline]
    pub unsafe fn GetLocalPort(&self, aLocalPort: *mut int32_t) -> nsresult {
        ((*self.vtable).GetLocalPort)(self, aLocalPort)
    }


    /// ```text
    /// /**
    ///      * The IP address of the remote host that this channel is
    ///      * connected to, in the format produced by PR_NetAddrToString.
    ///      *
    ///      * May throw NS_ERROR_NOT_AVAILABLE if accessed when the channel's
    ///      * endpoints are not yet determined, or in any case when
    ///      * nsIHttpActivityObserver.isActive is false. See bugs 534698 and 526207.
    ///      */
    /// ```
    ///

    /// `[must_use] readonly attribute AUTF8String remoteAddress;`
    #[inline]
    pub unsafe fn GetRemoteAddress(&self, aRemoteAddress: &mut ::nsstring::nsACString) -> nsresult {
        ((*self.vtable).GetRemoteAddress)(self, aRemoteAddress)
    }


    /// ```text
    /// /**
    ///      * The remote port number that this channel is connected to.
    ///      *
    ///      * May throw NS_ERROR_NOT_AVAILABLE if accessed when the channel's
    ///      * endpoints are not yet determined, or in any case when
    ///      * nsIHttpActivityObserver.isActive is false. See bugs 534698 and 526207.
    ///      */
    /// ```
    ///

    /// `[must_use] readonly attribute int32_t remotePort;`
    #[inline]
    pub unsafe fn GetRemotePort(&self, aRemotePort: *mut int32_t) -> nsresult {
        ((*self.vtable).GetRemotePort)(self, aRemotePort)
    }


    /// ```text
    /// /**
    ///      * Transfer chain of redirected cache-keys.
    ///      */
    /// ```
    ///

    /// `[must_use,noscript] void setCacheKeysRedirectChain (in StringArray cacheKeys);`
    const _SetCacheKeysRedirectChain: () = ();

    /// ```text
    /// /**
    ///      * HTTPUpgrade allows for the use of HTTP to bootstrap another protocol
    ///      * via the RFC 2616 Upgrade request header in conjunction with a 101 level
    ///      * response. The nsIHttpUpgradeListener will have its
    ///      * onTransportAvailable() method invoked if a matching 101 is processed.
    ///      * The arguments to onTransportAvailable provide the new protocol the low
    ///      * level tranport streams that are no longer used by HTTP.
    ///      *
    ///      * The onStartRequest and onStopRequest events are still delivered and the
    ///      * listener gets full control over the socket if and when onTransportAvailable
    ///      * is delievered.
    ///      *
    ///      * @param aProtocolName
    ///      *        The value of the HTTP Upgrade request header
    ///      * @param aListener
    ///      *        The callback object used to handle a successful upgrade
    ///      */
    /// ```
    ///

    /// `[must_use] void HTTPUpgrade (in ACString aProtocolName, in nsIHttpUpgradeListener aListener);`
    #[inline]
    pub unsafe fn HTTPUpgrade(&self, aProtocolName: &::nsstring::nsACString, aListener: *const nsIHttpUpgradeListener) -> nsresult {
        ((*self.vtable).HTTPUpgrade)(self, aProtocolName, aListener)
    }


    /// ```text
    /// /**
    ///      * Enable/Disable Spdy negotiation on per channel basis.
    ///      * The network.http.spdy.enabled preference is still a pre-requisite
    ///      * for starting spdy.
    ///      */
    /// ```
    ///

    /// `[must_use] attribute boolean allowSpdy;`
    #[inline]
    pub unsafe fn GetAllowSpdy(&self, aAllowSpdy: *mut bool) -> nsresult {
        ((*self.vtable).GetAllowSpdy)(self, aAllowSpdy)
    }


    /// ```text
    /// /**
    ///      * Enable/Disable Spdy negotiation on per channel basis.
    ///      * The network.http.spdy.enabled preference is still a pre-requisite
    ///      * for starting spdy.
    ///      */
    /// ```
    ///

    /// `[must_use] attribute boolean allowSpdy;`
    #[inline]
    pub unsafe fn SetAllowSpdy(&self, aAllowSpdy: bool) -> nsresult {
        ((*self.vtable).SetAllowSpdy)(self, aAllowSpdy)
    }


    /// ```text
    /// /**
    ///      * This attribute en/disables the timeout for the first byte of an HTTP
    ///      * response. Enabled by default.
    ///      */
    /// ```
    ///

    /// `[must_use] attribute boolean responseTimeoutEnabled;`
    #[inline]
    pub unsafe fn GetResponseTimeoutEnabled(&self, aResponseTimeoutEnabled: *mut bool) -> nsresult {
        ((*self.vtable).GetResponseTimeoutEnabled)(self, aResponseTimeoutEnabled)
    }


    /// ```text
    /// /**
    ///      * This attribute en/disables the timeout for the first byte of an HTTP
    ///      * response. Enabled by default.
    ///      */
    /// ```
    ///

    /// `[must_use] attribute boolean responseTimeoutEnabled;`
    #[inline]
    pub unsafe fn SetResponseTimeoutEnabled(&self, aResponseTimeoutEnabled: bool) -> nsresult {
        ((*self.vtable).SetResponseTimeoutEnabled)(self, aResponseTimeoutEnabled)
    }


    /// ```text
    /// /**
    ///      * If the underlying transport supports RWIN manipulation, this is the
    ///      * intiial window value for the channel. HTTP/2 implements this.
    ///      * 0 means no override from system default. Set before opening channel.
    ///      */
    /// ```
    ///

    /// `[must_use] attribute unsigned long initialRwin;`
    #[inline]
    pub unsafe fn GetInitialRwin(&self, aInitialRwin: *mut libc::uint32_t) -> nsresult {
        ((*self.vtable).GetInitialRwin)(self, aInitialRwin)
    }


    /// ```text
    /// /**
    ///      * If the underlying transport supports RWIN manipulation, this is the
    ///      * intiial window value for the channel. HTTP/2 implements this.
    ///      * 0 means no override from system default. Set before opening channel.
    ///      */
    /// ```
    ///

    /// `[must_use] attribute unsigned long initialRwin;`
    #[inline]
    pub unsafe fn SetInitialRwin(&self, aInitialRwin: libc::uint32_t) -> nsresult {
        ((*self.vtable).SetInitialRwin)(self, aInitialRwin)
    }


    /// ```text
    /// /**
    ///      * Get value of the URI passed to nsIHttpChannel.redirectTo() if any.
    ///      * May return null when redirectTo() has not been called.
    ///      */
    /// ```
    ///

    /// `[must_use] readonly attribute nsIURI apiRedirectToURI;`
    #[inline]
    pub unsafe fn GetApiRedirectToURI(&self, aApiRedirectToURI: *mut *const nsIURI) -> nsresult {
        ((*self.vtable).GetApiRedirectToURI)(self, aApiRedirectToURI)
    }


    /// ```text
    /// /**
    ///      * Enable/Disable use of Alternate Services with this channel.
    ///      * The network.http.altsvc.enabled preference is still a pre-requisite.
    ///      */
    /// ```
    ///

    /// `[must_use] attribute boolean allowAltSvc;`
    #[inline]
    pub unsafe fn GetAllowAltSvc(&self, aAllowAltSvc: *mut bool) -> nsresult {
        ((*self.vtable).GetAllowAltSvc)(self, aAllowAltSvc)
    }


    /// ```text
    /// /**
    ///      * Enable/Disable use of Alternate Services with this channel.
    ///      * The network.http.altsvc.enabled preference is still a pre-requisite.
    ///      */
    /// ```
    ///

    /// `[must_use] attribute boolean allowAltSvc;`
    #[inline]
    pub unsafe fn SetAllowAltSvc(&self, aAllowAltSvc: bool) -> nsresult {
        ((*self.vtable).SetAllowAltSvc)(self, aAllowAltSvc)
    }


    /// ```text
    /// /**
    ///      * If true, do not use newer protocol features that might have interop problems
    ///      * on the Internet. Intended only for use with critical infra like the updater.
    ///      * default is false.
    ///      */
    /// ```
    ///

    /// `[must_use] attribute boolean beConservative;`
    #[inline]
    pub unsafe fn GetBeConservative(&self, aBeConservative: *mut bool) -> nsresult {
        ((*self.vtable).GetBeConservative)(self, aBeConservative)
    }


    /// ```text
    /// /**
    ///      * If true, do not use newer protocol features that might have interop problems
    ///      * on the Internet. Intended only for use with critical infra like the updater.
    ///      * default is false.
    ///      */
    /// ```
    ///

    /// `[must_use] attribute boolean beConservative;`
    #[inline]
    pub unsafe fn SetBeConservative(&self, aBeConservative: bool) -> nsresult {
        ((*self.vtable).SetBeConservative)(self, aBeConservative)
    }


    /// ```text
    /// /**
    ///      * An opaque flags for non-standard behavior of the TLS system.
    ///      * It is unlikely this will need to be set outside of telemetry studies
    ///      * relating to the TLS implementation.
    ///      */
    /// ```
    ///

    /// `[must_use] attribute unsigned long tlsFlags;`
    #[inline]
    pub unsafe fn GetTlsFlags(&self, aTlsFlags: *mut libc::uint32_t) -> nsresult {
        ((*self.vtable).GetTlsFlags)(self, aTlsFlags)
    }


    /// ```text
    /// /**
    ///      * An opaque flags for non-standard behavior of the TLS system.
    ///      * It is unlikely this will need to be set outside of telemetry studies
    ///      * relating to the TLS implementation.
    ///      */
    /// ```
    ///

    /// `[must_use] attribute unsigned long tlsFlags;`
    #[inline]
    pub unsafe fn SetTlsFlags(&self, aTlsFlags: libc::uint32_t) -> nsresult {
        ((*self.vtable).SetTlsFlags)(self, aTlsFlags)
    }



    /// `[must_use] readonly attribute PRTime lastModifiedTime;`
    #[inline]
    pub unsafe fn GetLastModifiedTime(&self, aLastModifiedTime: *mut PRTime) -> nsresult {
        ((*self.vtable).GetLastModifiedTime)(self, aLastModifiedTime)
    }



    /// `[must_use] readonly attribute boolean responseSynthesized;`
    #[inline]
    pub unsafe fn GetResponseSynthesized(&self, aResponseSynthesized: *mut bool) -> nsresult {
        ((*self.vtable).GetResponseSynthesized)(self, aResponseSynthesized)
    }


    /// ```text
    /// /**
    ///      * Set by nsCORSListenerProxy if credentials should be included in
    ///      * cross-origin requests. false indicates "same-origin", users should still
    ///      * check flag LOAD_ANONYMOUS!
    ///      */
    /// ```
    ///

    /// `[must_use] attribute boolean corsIncludeCredentials;`
    #[inline]
    pub unsafe fn GetCorsIncludeCredentials(&self, aCorsIncludeCredentials: *mut bool) -> nsresult {
        ((*self.vtable).GetCorsIncludeCredentials)(self, aCorsIncludeCredentials)
    }


    /// ```text
    /// /**
    ///      * Set by nsCORSListenerProxy if credentials should be included in
    ///      * cross-origin requests. false indicates "same-origin", users should still
    ///      * check flag LOAD_ANONYMOUS!
    ///      */
    /// ```
    ///

    /// `[must_use] attribute boolean corsIncludeCredentials;`
    #[inline]
    pub unsafe fn SetCorsIncludeCredentials(&self, aCorsIncludeCredentials: bool) -> nsresult {
        ((*self.vtable).SetCorsIncludeCredentials)(self, aCorsIncludeCredentials)
    }


    /// ```text
    /// /**
    ///      * Set by nsCORSListenerProxy to indicate CORS load type. Defaults to CORS_MODE_NO_CORS.
    ///      */
    /// ```
    ///

    /// `[must_use] attribute unsigned long corsMode;`
    #[inline]
    pub unsafe fn GetCorsMode(&self, aCorsMode: *mut libc::uint32_t) -> nsresult {
        ((*self.vtable).GetCorsMode)(self, aCorsMode)
    }


    /// ```text
    /// /**
    ///      * Set by nsCORSListenerProxy to indicate CORS load type. Defaults to CORS_MODE_NO_CORS.
    ///      */
    /// ```
    ///

    /// `[must_use] attribute unsigned long corsMode;`
    #[inline]
    pub unsafe fn SetCorsMode(&self, aCorsMode: libc::uint32_t) -> nsresult {
        ((*self.vtable).SetCorsMode)(self, aCorsMode)
    }


    /// ```text
    /// /**
    ///      * Set to indicate Request.redirect mode exposed during ServiceWorker
    ///      * interception. No policy enforcement is performed by the channel for this
    ///      * value.
    ///      */
    /// ```
    ///

    /// `[must_use] attribute unsigned long redirectMode;`
    #[inline]
    pub unsafe fn GetRedirectMode(&self, aRedirectMode: *mut libc::uint32_t) -> nsresult {
        ((*self.vtable).GetRedirectMode)(self, aRedirectMode)
    }


    /// ```text
    /// /**
    ///      * Set to indicate Request.redirect mode exposed during ServiceWorker
    ///      * interception. No policy enforcement is performed by the channel for this
    ///      * value.
    ///      */
    /// ```
    ///

    /// `[must_use] attribute unsigned long redirectMode;`
    #[inline]
    pub unsafe fn SetRedirectMode(&self, aRedirectMode: libc::uint32_t) -> nsresult {
        ((*self.vtable).SetRedirectMode)(self, aRedirectMode)
    }


    /// ```text
    /// /**
    ///      * Set to indicate Request.cache mode, which simulates the fetch API
    ///      * semantics, and is also used for exposing this value to the Web page
    ///      * during service worker interception.
    ///      */
    /// ```
    ///

    /// `[must_use] attribute unsigned long fetchCacheMode;`
    #[inline]
    pub unsafe fn GetFetchCacheMode(&self, aFetchCacheMode: *mut libc::uint32_t) -> nsresult {
        ((*self.vtable).GetFetchCacheMode)(self, aFetchCacheMode)
    }


    /// ```text
    /// /**
    ///      * Set to indicate Request.cache mode, which simulates the fetch API
    ///      * semantics, and is also used for exposing this value to the Web page
    ///      * during service worker interception.
    ///      */
    /// ```
    ///

    /// `[must_use] attribute unsigned long fetchCacheMode;`
    #[inline]
    pub unsafe fn SetFetchCacheMode(&self, aFetchCacheMode: libc::uint32_t) -> nsresult {
        ((*self.vtable).SetFetchCacheMode)(self, aFetchCacheMode)
    }


    /// ```text
    /// /**
    ///      * The URI of the top-level window that's associated with this channel.
    ///      */
    /// ```
    ///

    /// `[must_use] readonly attribute nsIURI topWindowURI;`
    #[inline]
    pub unsafe fn GetTopWindowURI(&self, aTopWindowURI: *mut *const nsIURI) -> nsresult {
        ((*self.vtable).GetTopWindowURI)(self, aTopWindowURI)
    }


    /// ```text
    /// /**
    ///      * Set top-level window URI to this channel only when the topWindowURI
    ///      * is null and there is no window associated to this channel.
    ///      * Note that the current usage of this method is only for xpcshell test.
    ///      */
    /// ```
    ///

    /// `[must_use] void setTopWindowURIIfUnknown (in nsIURI topWindowURI);`
    #[inline]
    pub unsafe fn SetTopWindowURIIfUnknown(&self, topWindowURI: *const nsIURI) -> nsresult {
        ((*self.vtable).SetTopWindowURIIfUnknown)(self, topWindowURI)
    }


    /// ```text
    /// /**
    ///      * The network interface id that's associated with this channel.
    ///      */
    /// ```
    ///

    /// `[must_use] attribute ACString networkInterfaceId;`
    #[inline]
    pub unsafe fn GetNetworkInterfaceId(&self, aNetworkInterfaceId: &mut ::nsstring::nsACString) -> nsresult {
        ((*self.vtable).GetNetworkInterfaceId)(self, aNetworkInterfaceId)
    }


    /// ```text
    /// /**
    ///      * The network interface id that's associated with this channel.
    ///      */
    /// ```
    ///

    /// `[must_use] attribute ACString networkInterfaceId;`
    #[inline]
    pub unsafe fn SetNetworkInterfaceId(&self, aNetworkInterfaceId: &::nsstring::nsACString) -> nsresult {
        ((*self.vtable).SetNetworkInterfaceId)(self, aNetworkInterfaceId)
    }


    /// ```text
    /// /**
    ///      * Read the proxy URI, which, if non-null, will be used to resolve
    ///      * proxies for this channel.
    ///      */
    /// ```
    ///

    /// `[must_use] readonly attribute nsIURI proxyURI;`
    #[inline]
    pub unsafe fn GetProxyURI(&self, aProxyURI: *mut *const nsIURI) -> nsresult {
        ((*self.vtable).GetProxyURI)(self, aProxyURI)
    }


    /// ```text
    /// /**
    ///      * Make cross-origin CORS loads happen with a CORS preflight, and specify
    ///      * the CORS preflight parameters.
    ///      */
    /// ```
    ///

    /// `[noscript,nostdcall,notxpcom] void setCorsPreflightParameters (in StringArrayRef unsafeHeaders);`
    const _SetCorsPreflightParameters: () = ();

    /// ```text
    /// /**
    ///      * When set to true, the channel will not pop any authentication prompts up
    ///      * to the user.  When provided or cached credentials lead to an
    ///      * authentication failure, that failure will be propagated to the channel
    ///      * listener.  Must be called before opening the channel, otherwise throws.
    ///      */
    /// ```
    ///

    /// `[infallible] attribute boolean blockAuthPrompt;`
    #[inline]
    pub unsafe fn GetBlockAuthPrompt(&self) -> bool {
        let mut result = <bool as ::std::default::Default>::default();
        let _rv = ((*self.vtable).GetBlockAuthPrompt)(self, &mut result);
        debug_assert!(::nserror::NsresultExt::succeeded(_rv));
        result
    }


    /// ```text
    /// /**
    ///      * When set to true, the channel will not pop any authentication prompts up
    ///      * to the user.  When provided or cached credentials lead to an
    ///      * authentication failure, that failure will be propagated to the channel
    ///      * listener.  Must be called before opening the channel, otherwise throws.
    ///      */
    /// ```
    ///

    /// `[infallible] attribute boolean blockAuthPrompt;`
    #[inline]
    pub unsafe fn SetBlockAuthPrompt(&self, aBlockAuthPrompt: bool) -> nsresult {
        ((*self.vtable).SetBlockAuthPrompt)(self, aBlockAuthPrompt)
    }


    /// ```text
    /// /**
    ///      * Set to indicate Request.integrity.
    ///      */
    /// ```
    ///

    /// `[must_use] attribute AString integrityMetadata;`
    #[inline]
    pub unsafe fn GetIntegrityMetadata(&self, aIntegrityMetadata: &mut ::nsstring::nsAString) -> nsresult {
        ((*self.vtable).GetIntegrityMetadata)(self, aIntegrityMetadata)
    }


    /// ```text
    /// /**
    ///      * Set to indicate Request.integrity.
    ///      */
    /// ```
    ///

    /// `[must_use] attribute AString integrityMetadata;`
    #[inline]
    pub unsafe fn SetIntegrityMetadata(&self, aIntegrityMetadata: &::nsstring::nsAString) -> nsresult {
        ((*self.vtable).SetIntegrityMetadata)(self, aIntegrityMetadata)
    }


    /// ```text
    /// /**
    ///      * The connection info's hash key. We use it to test connection separation.
    ///      */
    /// ```
    ///

    /// `[must_use] readonly attribute ACString connectionInfoHashKey;`
    #[inline]
    pub unsafe fn GetConnectionInfoHashKey(&self, aConnectionInfoHashKey: &mut ::nsstring::nsACString) -> nsresult {
        ((*self.vtable).GetConnectionInfoHashKey)(self, aConnectionInfoHashKey)
    }


    /// ```text
    /// /**
    ///      * If this channel was created as the result of a redirect, then this
    ///      * value will reflect the redirect flags passed to the
    ///      * SetupReplacementChannel() method.
    ///      */
    /// ```
    ///

    /// `[infallible,noscript] attribute unsigned long lastRedirectFlags;`
    #[inline]
    pub unsafe fn GetLastRedirectFlags(&self) -> libc::uint32_t {
        let mut result = <libc::uint32_t as ::std::default::Default>::default();
        let _rv = ((*self.vtable).GetLastRedirectFlags)(self, &mut result);
        debug_assert!(::nserror::NsresultExt::succeeded(_rv));
        result
    }


    /// ```text
    /// /**
    ///      * If this channel was created as the result of a redirect, then this
    ///      * value will reflect the redirect flags passed to the
    ///      * SetupReplacementChannel() method.
    ///      */
    /// ```
    ///

    /// `[infallible,noscript] attribute unsigned long lastRedirectFlags;`
    #[inline]
    pub unsafe fn SetLastRedirectFlags(&self, aLastRedirectFlags: libc::uint32_t) -> nsresult {
        ((*self.vtable).SetLastRedirectFlags)(self, aLastRedirectFlags)
    }


}