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
//
// DO NOT EDIT.  THIS FILE IS GENERATED FROM ../../../dist/idl/nsITelemetry.idl
//


/// `interface nsIFetchTelemetryDataCallback : nsISupports`
///


// 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 nsIFetchTelemetryDataCallback {
    vtable: *const nsIFetchTelemetryDataCallbackVTable,

    /// 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 nsIFetchTelemetryDataCallback.
unsafe impl XpCom for nsIFetchTelemetryDataCallback {
    const IID: nsIID = nsID(0x3d3b9075, 0x5549, 0x4244,
        [0x9c, 0x08, 0xb6, 0x4f, 0xef, 0xa1, 0xdd, 0x60]);
}

// 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 nsIFetchTelemetryDataCallback {
    #[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 nsIFetchTelemetryDataCallback.
// 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 nsIFetchTelemetryDataCallbackCoerce {
    /// Cheaply cast a value of this type from a `nsIFetchTelemetryDataCallback`.
    fn coerce_from(v: &nsIFetchTelemetryDataCallback) -> &Self;
}

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

impl nsIFetchTelemetryDataCallback {
    /// Cast this `nsIFetchTelemetryDataCallback` to one of its base interfaces.
    #[inline]
    pub fn coerce<T: nsIFetchTelemetryDataCallbackCoerce>(&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 nsIFetchTelemetryDataCallback {
    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> nsIFetchTelemetryDataCallbackCoerce for T {
    #[inline]
    fn coerce_from(v: &nsIFetchTelemetryDataCallback) -> &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 nsIFetchTelemetryDataCallback
// 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 nsIFetchTelemetryDataCallbackVTable {
    /// We need to include the members from the base interface's vtable at the start
    /// of the VTable definition.
    pub __base: nsISupportsVTable,

    /* void complete (); */
    pub Complete: unsafe extern "system" fn (this: *const nsIFetchTelemetryDataCallback) -> 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 nsIFetchTelemetryDataCallback {


    /// `void complete ();`
    #[inline]
    pub unsafe fn Complete(&self, ) -> nsresult {
        ((*self.vtable).Complete)(self, )
    }


}


/// `interface nsITelemetry : nsISupports`
///


// 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 nsITelemetry {
    vtable: *const nsITelemetryVTable,

    /// 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 nsITelemetry.
unsafe impl XpCom for nsITelemetry {
    const IID: nsIID = nsID(0x273d2dd0, 0x6c63, 0x475a,
        [0xb8, 0x64, 0xcb, 0x65, 0x16, 0x0a, 0x19, 0x09]);
}

// 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 nsITelemetry {
    #[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 nsITelemetry.
// 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 nsITelemetryCoerce {
    /// Cheaply cast a value of this type from a `nsITelemetry`.
    fn coerce_from(v: &nsITelemetry) -> &Self;
}

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

impl nsITelemetry {
    /// Cast this `nsITelemetry` to one of its base interfaces.
    #[inline]
    pub fn coerce<T: nsITelemetryCoerce>(&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 nsITelemetry {
    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> nsITelemetryCoerce for T {
    #[inline]
    fn coerce_from(v: &nsITelemetry) -> &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 nsITelemetry
// 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 nsITelemetryVTable {
    /// We need to include the members from the base interface's vtable at the start
    /// of the VTable definition.
    pub __base: nsISupportsVTable,

    /* [implicit_jscontext] jsval snapshotHistograms (in uint32_t aDataset, in boolean aSubsession, in boolean aClear); */
    /// Unable to generate binding because `jscontext is unsupported`
    pub SnapshotHistograms: *const ::libc::c_void,

    /* readonly attribute uint32_t lastShutdownDuration; */
    pub GetLastShutdownDuration: unsafe extern "system" fn (this: *const nsITelemetry, aLastShutdownDuration: *mut uint32_t) -> nsresult,

    /* readonly attribute uint32_t failedProfileLockCount; */
    pub GetFailedProfileLockCount: unsafe extern "system" fn (this: *const nsITelemetry, aFailedProfileLockCount: *mut uint32_t) -> nsresult,

    /* [implicit_jscontext] readonly attribute jsval slowSQL; */
    /// Unable to generate binding because `native type JS::Value is unsupported`
    pub GetSlowSQL: *const ::libc::c_void,

    /* [implicit_jscontext] readonly attribute jsval debugSlowSQL; */
    /// Unable to generate binding because `native type JS::Value is unsupported`
    pub GetDebugSlowSQL: *const ::libc::c_void,

    /* [implicit_jscontext] readonly attribute jsval webrtcStats; */
    /// Unable to generate binding because `native type JS::Value is unsupported`
    pub GetWebrtcStats: *const ::libc::c_void,

    /* readonly attribute uint32_t maximalNumberOfConcurrentThreads; */
    pub GetMaximalNumberOfConcurrentThreads: unsafe extern "system" fn (this: *const nsITelemetry, aMaximalNumberOfConcurrentThreads: *mut uint32_t) -> nsresult,

    /* [implicit_jscontext] readonly attribute jsval chromeHangs; */
    /// Unable to generate binding because `native type JS::Value is unsupported`
    pub GetChromeHangs: *const ::libc::c_void,

    /* void captureStack (in ACString name); */
    pub CaptureStack: unsafe extern "system" fn (this: *const nsITelemetry, name: &::nsstring::nsACString) -> nsresult,

    /* [implicit_jscontext] jsval snapshotCapturedStacks ([optional] in boolean clear); */
    /// Unable to generate binding because `jscontext is unsupported`
    pub SnapshotCapturedStacks: *const ::libc::c_void,

    /* [implicit_jscontext] nsISupports getLoadedModules (); */
    /// Unable to generate binding because `jscontext is unsupported`
    pub GetLoadedModules: *const ::libc::c_void,

    /* [implicit_jscontext] readonly attribute jsval lateWrites; */
    /// Unable to generate binding because `native type JS::Value is unsupported`
    pub GetLateWrites: *const ::libc::c_void,

    /* [implicit_jscontext] jsval getHistogramById (in ACString id); */
    /// Unable to generate binding because `jscontext is unsupported`
    pub GetHistogramById: *const ::libc::c_void,

    /* [implicit_jscontext] jsval snapshotKeyedHistograms (in uint32_t aDataset, in boolean aSubsession, in boolean aClear); */
    /// Unable to generate binding because `jscontext is unsupported`
    pub SnapshotKeyedHistograms: *const ::libc::c_void,

    /* [implicit_jscontext] jsval getKeyedHistogramById (in ACString id); */
    /// Unable to generate binding because `jscontext is unsupported`
    pub GetKeyedHistogramById: *const ::libc::c_void,

    /* attribute boolean canRecordBase; */
    pub GetCanRecordBase: unsafe extern "system" fn (this: *const nsITelemetry, aCanRecordBase: *mut bool) -> nsresult,

    /* attribute boolean canRecordBase; */
    pub SetCanRecordBase: unsafe extern "system" fn (this: *const nsITelemetry, aCanRecordBase: bool) -> nsresult,

    /* attribute boolean canRecordExtended; */
    pub GetCanRecordExtended: unsafe extern "system" fn (this: *const nsITelemetry, aCanRecordExtended: *mut bool) -> nsresult,

    /* attribute boolean canRecordExtended; */
    pub SetCanRecordExtended: unsafe extern "system" fn (this: *const nsITelemetry, aCanRecordExtended: bool) -> nsresult,

    /* readonly attribute boolean canRecordReleaseData; */
    pub GetCanRecordReleaseData: unsafe extern "system" fn (this: *const nsITelemetry, aCanRecordReleaseData: *mut bool) -> nsresult,

    /* readonly attribute boolean canRecordPrereleaseData; */
    pub GetCanRecordPrereleaseData: unsafe extern "system" fn (this: *const nsITelemetry, aCanRecordPrereleaseData: *mut bool) -> nsresult,

    /* readonly attribute boolean isOfficialTelemetry; */
    pub GetIsOfficialTelemetry: unsafe extern "system" fn (this: *const nsITelemetry, aIsOfficialTelemetry: *mut bool) -> nsresult,

    /* void setHistogramRecordingEnabled (in ACString id, in boolean enabled); */
    pub SetHistogramRecordingEnabled: unsafe extern "system" fn (this: *const nsITelemetry, id: &::nsstring::nsACString, enabled: bool) -> nsresult,

    /* void asyncFetchTelemetryData (in nsIFetchTelemetryDataCallback aCallback); */
    pub AsyncFetchTelemetryData: unsafe extern "system" fn (this: *const nsITelemetry, aCallback: *const nsIFetchTelemetryDataCallback) -> nsresult,

    /* [implicit_jscontext] readonly attribute jsval fileIOReports; */
    /// Unable to generate binding because `native type JS::Value is unsupported`
    pub GetFileIOReports: *const ::libc::c_void,

    /* double msSinceProcessStart (); */
    pub MsSinceProcessStart: unsafe extern "system" fn (this: *const nsITelemetry, _retval: *mut libc::c_double) -> nsresult,

    /* double msSystemNow (); */
    pub MsSystemNow: unsafe extern "system" fn (this: *const nsITelemetry, _retval: *mut libc::c_double) -> nsresult,

    /* [implicit_jscontext] void scalarAdd (in ACString aName, in jsval aValue); */
    /// Unable to generate binding because `native type JS::Value is unsupported`
    pub ScalarAdd: *const ::libc::c_void,

    /* [implicit_jscontext] void scalarSet (in ACString aName, in jsval aValue); */
    /// Unable to generate binding because `native type JS::Value is unsupported`
    pub ScalarSet: *const ::libc::c_void,

    /* [implicit_jscontext] void scalarSetMaximum (in ACString aName, in jsval aValue); */
    /// Unable to generate binding because `native type JS::Value is unsupported`
    pub ScalarSetMaximum: *const ::libc::c_void,

    /* [implicit_jscontext,optional_argc] jsval snapshotScalars (in uint32_t aDataset, [optional] in boolean aClear); */
    /// Unable to generate binding because `jscontext is unsupported`
    pub SnapshotScalars: *const ::libc::c_void,

    /* [implicit_jscontext] void keyedScalarAdd (in ACString aName, in AString aKey, in jsval aValue); */
    /// Unable to generate binding because `native type JS::Value is unsupported`
    pub KeyedScalarAdd: *const ::libc::c_void,

    /* [implicit_jscontext] void keyedScalarSet (in ACString aName, in AString aKey, in jsval aValue); */
    /// Unable to generate binding because `native type JS::Value is unsupported`
    pub KeyedScalarSet: *const ::libc::c_void,

    /* [implicit_jscontext] void keyedScalarSetMaximum (in ACString aName, in AString aKey, in jsval aValue); */
    /// Unable to generate binding because `native type JS::Value is unsupported`
    pub KeyedScalarSetMaximum: *const ::libc::c_void,

    /* [implicit_jscontext,optional_argc] jsval snapshotKeyedScalars (in uint32_t aDataset, [optional] in boolean aClear); */
    /// Unable to generate binding because `jscontext is unsupported`
    pub SnapshotKeyedScalars: *const ::libc::c_void,

    /* void clearScalars (); */
    pub ClearScalars: unsafe extern "system" fn (this: *const nsITelemetry) -> nsresult,

    /* void flushBatchedChildTelemetry (); */
    pub FlushBatchedChildTelemetry: unsafe extern "system" fn (this: *const nsITelemetry) -> nsresult,

    /* [implicit_jscontext,optional_argc] void recordEvent (in ACString aCategory, in ACString aMethod, in ACString aObject, [optional] in jsval aValue, [optional] in jsval extra); */
    /// Unable to generate binding because `native type JS::Value is unsupported`
    pub RecordEvent: *const ::libc::c_void,

    /* void setEventRecordingEnabled (in ACString aCategory, in boolean aEnabled); */
    pub SetEventRecordingEnabled: unsafe extern "system" fn (this: *const nsITelemetry, aCategory: &::nsstring::nsACString, aEnabled: bool) -> nsresult,

    /* [implicit_jscontext,optional_argc] jsval snapshotEvents (in uint32_t aDataset, [optional] in boolean aClear); */
    /// Unable to generate binding because `jscontext is unsupported`
    pub SnapshotEvents: *const ::libc::c_void,

    /* [implicit_jscontext] void registerEvents (in ACString aCategory, in jsval aEventData); */
    /// Unable to generate binding because `native type JS::Value is unsupported`
    pub RegisterEvents: *const ::libc::c_void,

    /* [implicit_jscontext] void registerScalars (in ACString aCategoryName, in jsval aScalarData); */
    /// Unable to generate binding because `native type JS::Value is unsupported`
    pub RegisterScalars: *const ::libc::c_void,

    /* void clearEvents (); */
    pub ClearEvents: unsafe extern "system" fn (this: *const nsITelemetry) -> 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 nsITelemetry {
    /// ```text
    /// /**
    ///    * Histogram types:
    ///    * HISTOGRAM_EXPONENTIAL - buckets increase exponentially
    ///    * HISTOGRAM_LINEAR - buckets increase linearly
    ///    * HISTOGRAM_BOOLEAN - For storing 0/1 values
    ///    * HISTOGRAM_FLAG - For storing a single value; its count is always == 1.
    ///    * HISTOGRAM_COUNT - For storing counter values without bucketing.
    ///    * HISTOGRAM_CATEGORICAL - For storing enumerated values by label.
    ///    */
    /// ```
    ///

    pub const HISTOGRAM_EXPONENTIAL: i64 = 0;


    pub const HISTOGRAM_LINEAR: i64 = 1;


    pub const HISTOGRAM_BOOLEAN: i64 = 2;


    pub const HISTOGRAM_FLAG: i64 = 3;


    pub const HISTOGRAM_COUNT: i64 = 4;


    pub const HISTOGRAM_CATEGORICAL: i64 = 5;

    /// ```text
    /// /**
    ///    * Scalar types:
    ///    * SCALAR_TYPE_COUNT - for storing a numeric value
    ///    * SCALAR_TYPE_STRING - for storing a string value
    ///    * SCALAR_TYPE_BOOLEAN - for storing a boolean value
    ///    */
    /// ```
    ///

    pub const SCALAR_TYPE_COUNT: i64 = 0;


    pub const SCALAR_TYPE_STRING: i64 = 1;


    pub const SCALAR_TYPE_BOOLEAN: i64 = 2;

    /// ```text
    /// /**
    ///    * Dataset types:
    ///    * DATASET_RELEASE_CHANNEL_OPTOUT - the basic dataset that is on-by-default on all channels
    ///    * DATASET_RELEASE_CHANNEL_OPTIN - the extended dataset that is opt-in on release,
    ///    *                                 opt-out on pre-release channels.
    ///    */
    /// ```
    ///

    pub const DATASET_RELEASE_CHANNEL_OPTOUT: i64 = 0;


    pub const DATASET_RELEASE_CHANNEL_OPTIN: i64 = 1;

    /// ```text
    /// /**
    ///    * Serializes the histograms from the given dataset to a JSON-style object.
    ///    * The returned structure looks like:
    ///    *   { process1: {name1: {histogramData1}, name2:{histogramData2}...}}
    ///    *
    ///    * Where histogramDataN has the following properties:
    ///    *   min - minimum bucket size
    ///    *   max - maximum bucket size
    ///    *   histogram_type - HISTOGRAM_EXPONENTIAL, HISTOGRAM_LINEAR, HISTOGRAM_BOOLEAN,
    ///    *                    HISTOGRAM_FLAG, HISTOGRAM_COUNT, or HISTOGRAM_CATEGORICAL
    ///    *   counts - array representing contents of the buckets in the histogram
    ///    *   ranges - array with calculated bucket sizes
    ///    *   sum - sum of the bucket contents
    ///    *
    ///    * @param aDataset DATASET_RELEASE_CHANNEL_OPTOUT or DATASET_RELEASE_CHANNEL_OPTIN.
    ///    * @param aSubsession Whether to return the internally-duplicated subsession histograms
    ///    * @param aClear Whether to clear out the subsession histograms after snapshotting (only works if aSubsession is true)
    ///    */
    /// ```
    ///

    /// `[implicit_jscontext] jsval snapshotHistograms (in uint32_t aDataset, in boolean aSubsession, in boolean aClear);`
    const _SnapshotHistograms: () = ();

    /// ```text
    /// /**
    ///    * The amount of time, in milliseconds, that the last session took
    ///    * to shutdown.  Reads as 0 to indicate failure.
    ///    */
    /// ```
    ///

    /// `readonly attribute uint32_t lastShutdownDuration;`
    #[inline]
    pub unsafe fn GetLastShutdownDuration(&self, aLastShutdownDuration: *mut uint32_t) -> nsresult {
        ((*self.vtable).GetLastShutdownDuration)(self, aLastShutdownDuration)
    }


    /// ```text
    /// /**
    ///    * The number of failed profile lock attempts that have occurred prior to
    ///    * successfully locking the profile
    ///    */
    /// ```
    ///

    /// `readonly attribute uint32_t failedProfileLockCount;`
    #[inline]
    pub unsafe fn GetFailedProfileLockCount(&self, aFailedProfileLockCount: *mut uint32_t) -> nsresult {
        ((*self.vtable).GetFailedProfileLockCount)(self, aFailedProfileLockCount)
    }



    /// `[implicit_jscontext] readonly attribute jsval slowSQL;`
    const _GetSlowSQL: () = ();


    /// `[implicit_jscontext] readonly attribute jsval debugSlowSQL;`
    const _GetDebugSlowSQL: () = ();


    /// `[implicit_jscontext] readonly attribute jsval webrtcStats;`
    const _GetWebrtcStats: () = ();

    /// ```text
    /// /**
    ///    * A number representing the highest number of concurrent threads
    ///    * reached during this session.
    ///    */
    /// ```
    ///

    /// `readonly attribute uint32_t maximalNumberOfConcurrentThreads;`
    #[inline]
    pub unsafe fn GetMaximalNumberOfConcurrentThreads(&self, aMaximalNumberOfConcurrentThreads: *mut uint32_t) -> nsresult {
        ((*self.vtable).GetMaximalNumberOfConcurrentThreads)(self, aMaximalNumberOfConcurrentThreads)
    }



    /// `[implicit_jscontext] readonly attribute jsval chromeHangs;`
    const _GetChromeHangs: () = ();


    /// `void captureStack (in ACString name);`
    #[inline]
    pub unsafe fn CaptureStack(&self, name: &::nsstring::nsACString) -> nsresult {
        ((*self.vtable).CaptureStack)(self, name)
    }



    /// `[implicit_jscontext] jsval snapshotCapturedStacks ([optional] in boolean clear);`
    const _SnapshotCapturedStacks: () = ();


    /// `[implicit_jscontext] nsISupports getLoadedModules ();`
    const _GetLoadedModules: () = ();


    /// `[implicit_jscontext] readonly attribute jsval lateWrites;`
    const _GetLateWrites: () = ();

    /// ```text
    /// /**
    ///    * Create and return a histogram registered in TelemetryHistograms.h.
    ///    *
    ///    * @param id - unique identifier from TelemetryHistograms.h
    ///    * The returned object has the following functions:
    ///    *   add(int) - Adds an int value to the appropriate bucket
    ///    *   snapshot() - Returns a snapshot of the histogram with the same data fields as in histogramSnapshots()
    ///    *   clear() - Zeros out the histogram's buckets and sum. This is intended to be only used in tests.
    ///    *   dataset() - identifies what dataset this is in: DATASET_RELEASE_CHANNEL_OPTOUT or ...OPTIN.
    ///    *               This is intended to be only used in tests.
    ///    */
    /// ```
    ///

    /// `[implicit_jscontext] jsval getHistogramById (in ACString id);`
    const _GetHistogramById: () = ();

    /// ```text
    /// /**
    ///    * Serializes the keyed histograms from the given dataset to a JSON-style object.
    ///    * The returned structure looks like:
    ///    *   { process1: {name1: {histogramData1}, name2:{histogramData2}...}}
    ///    *
    ///    * @param aDataset DATASET_RELEASE_CHANNEL_OPTOUT or DATASET_RELEASE_CHANNEL_OPTIN.
    ///    * @param aSubsession Whether to return the internally-duplicated subsession keyed histograms
    ///    * @param aClear Whether to clear out the subsession keyed histograms after snapshotting (only works if aSubsession is true)
    ///    */
    /// ```
    ///

    /// `[implicit_jscontext] jsval snapshotKeyedHistograms (in uint32_t aDataset, in boolean aSubsession, in boolean aClear);`
    const _SnapshotKeyedHistograms: () = ();

    /// ```text
    /// /**
    ///    * Create and return a histogram registered in TelemetryHistograms.h.
    ///    *
    ///    * @param id - unique identifier from TelemetryHistograms.h
    ///    * The returned object has the following functions:
    ///    *   add(string key, [optional] int) - Add an int value to the histogram for that key. If no histogram for that key exists yet, it is created.
    ///    *   snapshot([optional] string key) - If key is provided, returns a snapshot for the histogram with that key or null. If key is not provided, returns the snapshots of all the registered keys in the form {key1: snapshot1, key2: snapshot2, ...}.
    ///    *   keys() - Returns an array with the string keys of the currently registered histograms
    ///    *   clear() - Clears the registered histograms from this.
    ///    *             This is intended to be only used in tests.
    ///    *   dataset() - identifies what dataset this is in: DATASET_RELEASE_CHANNEL_OPTOUT or ...OPTIN.
    ///    *               This is intended to be only used in tests.
    ///    */
    /// ```
    ///

    /// `[implicit_jscontext] jsval getKeyedHistogramById (in ACString id);`
    const _GetKeyedHistogramById: () = ();

    /// ```text
    /// /**
    ///    * A flag indicating if Telemetry can record base data (FHR data). This is true if the
    ///    * FHR data reporting service or self-support are enabled.
    ///    *
    ///    * In the unlikely event that adding a new base probe is needed, please check the data
    ///    * collection wiki at https://wiki.mozilla.org/Firefox/Data_Collection and talk to the
    ///    * Telemetry team.
    ///    */
    /// ```
    ///

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


    /// ```text
    /// /**
    ///    * A flag indicating if Telemetry can record base data (FHR data). This is true if the
    ///    * FHR data reporting service or self-support are enabled.
    ///    *
    ///    * In the unlikely event that adding a new base probe is needed, please check the data
    ///    * collection wiki at https://wiki.mozilla.org/Firefox/Data_Collection and talk to the
    ///    * Telemetry team.
    ///    */
    /// ```
    ///

    /// `attribute boolean canRecordBase;`
    #[inline]
    pub unsafe fn SetCanRecordBase(&self, aCanRecordBase: bool) -> nsresult {
        ((*self.vtable).SetCanRecordBase)(self, aCanRecordBase)
    }


    /// ```text
    /// /**
    ///    * A flag indicating if Telemetry is allowed to record extended data. Returns false if
    ///    * the user hasn't opted into "extended Telemetry" on the Release channel, when the
    ///    * user has explicitly opted out of Telemetry on Nightly/Aurora/Beta or if manually
    ///    * set to false during tests.
    ///    *
    ///    * Set this to false in tests to disable gathering of extended telemetry statistics.
    ///    */
    /// ```
    ///

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


    /// ```text
    /// /**
    ///    * A flag indicating if Telemetry is allowed to record extended data. Returns false if
    ///    * the user hasn't opted into "extended Telemetry" on the Release channel, when the
    ///    * user has explicitly opted out of Telemetry on Nightly/Aurora/Beta or if manually
    ///    * set to false during tests.
    ///    *
    ///    * Set this to false in tests to disable gathering of extended telemetry statistics.
    ///    */
    /// ```
    ///

    /// `attribute boolean canRecordExtended;`
    #[inline]
    pub unsafe fn SetCanRecordExtended(&self, aCanRecordExtended: bool) -> nsresult {
        ((*self.vtable).SetCanRecordExtended)(self, aCanRecordExtended)
    }


    /// ```text
    /// /**
    ///    * A flag indicating whether Telemetry is recording release data, which is a
    ///    * smallish subset of our usage data that we're prepared to handle from our
    ///    * largish release population.
    ///    *
    ///    * This is true most of the time.
    ///    *
    ///    * This does not indicate whether Telemetry will send any data. That is
    ///    * governed by user preference and other mechanisms.
    ///    *
    ///    * You may use this to determine if it's okay to record your data.
    ///    */
    /// ```
    ///

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


    /// ```text
    /// /**
    ///    * A flag indicating whether Telemetry is recording prerelease data, which is
    ///    * a largish amount of usage data that we're prepared to handle from our
    ///    * smallish pre-release population.
    ///    *
    ///    * This is true on pre-release branches of Firefox.
    ///    *
    ///    * This does not indicate whether Telemetry will send any data. That is
    ///    * governed by user preference and other mechanisms.
    ///    *
    ///    * You may use this to determine if it's okay to record your data.
    ///    */
    /// ```
    ///

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


    /// ```text
    /// /**
    ///    * A flag indicating whether Telemetry can submit official results (for base or extended
        ///    * data). This is true on official, non-debug builds with built in support for Mozilla
    ///    * Telemetry reporting.
    ///    */
    /// ```
    ///

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


    /// ```text
    /// /**
    ///    * Enable/disable recording for this histogram at runtime.
    ///    * Recording is enabled by default, unless listed at kRecordingInitiallyDisabledIDs[].
    ///    * Name must be a valid Histogram identifier, otherwise an assertion will be triggered.
    ///    *
    ///    * @param id - unique identifier from histograms.json
    ///    * @param enabled - whether or not to enable recording from now on.
    ///    */
    /// ```
    ///

    /// `void setHistogramRecordingEnabled (in ACString id, in boolean enabled);`
    #[inline]
    pub unsafe fn SetHistogramRecordingEnabled(&self, id: &::nsstring::nsACString, enabled: bool) -> nsresult {
        ((*self.vtable).SetHistogramRecordingEnabled)(self, id, enabled)
    }


    /// ```text
    /// /**
    ///    * Read data from the previous run. After the callback is called, the last
    ///    * shutdown time is available in lastShutdownDuration and any late
    ///    * writes in lateWrites.
    ///    */
    /// ```
    ///

    /// `void asyncFetchTelemetryData (in nsIFetchTelemetryDataCallback aCallback);`
    #[inline]
    pub unsafe fn AsyncFetchTelemetryData(&self, aCallback: *const nsIFetchTelemetryDataCallback) -> nsresult {
        ((*self.vtable).AsyncFetchTelemetryData)(self, aCallback)
    }


    /// ```text
    /// /**
    ///    * Get statistics of file IO reports, null, if not recorded.
    ///    *
    ///    * The statistics are returned as an object whose propoerties are the names
    ///    * of the files that have been accessed and whose corresponding values are
    ///    * arrays of size three, representing startup, normal, and shutdown stages.
    ///    * Each stage's entry is either null or an array with the layout
    ///    * [total_time, #creates, #reads, #writes, #fsyncs, #stats]
    ///    */
    /// ```
    ///

    /// `[implicit_jscontext] readonly attribute jsval fileIOReports;`
    const _GetFileIOReports: () = ();

    /// ```text
    /// /**
    ///    * Return the number of milliseconds since process start using monotonic
    ///    * timestamps (unaffected by system clock changes).
    ///    * @throws NS_ERROR_NOT_AVAILABLE if TimeStamp doesn't have the data.
    ///    */
    /// ```
    ///

    /// `double msSinceProcessStart ();`
    #[inline]
    pub unsafe fn MsSinceProcessStart(&self, _retval: *mut libc::c_double) -> nsresult {
        ((*self.vtable).MsSinceProcessStart)(self, _retval)
    }


    /// ```text
    /// /**
    ///    * Time since the system wide epoch. This is not a monotonic timer but
    ///    * can be used across process boundaries.
    ///    */
    /// ```
    ///

    /// `double msSystemNow ();`
    #[inline]
    pub unsafe fn MsSystemNow(&self, _retval: *mut libc::c_double) -> nsresult {
        ((*self.vtable).MsSystemNow)(self, _retval)
    }


    /// ```text
    /// /**
    ///    * Adds the value to the given scalar.
    ///    *
    ///    * @param aName The scalar name.
    ///    * @param aValue The numeric value to add to the scalar. Only unsigned integers supported.
    ///    */
    /// ```
    ///

    /// `[implicit_jscontext] void scalarAdd (in ACString aName, in jsval aValue);`
    const _ScalarAdd: () = ();

    /// ```text
    /// /**
    ///    * Sets the scalar to the given value.
    ///    *
    ///    * @param aName The scalar name.
    ///    * @param aValue The value to set the scalar to. If the type of aValue doesn't match the
    ///    *        type of the scalar, the function will fail. For scalar string types, the this
    ///    *        is truncated to 50 characters.
    ///    */
    /// ```
    ///

    /// `[implicit_jscontext] void scalarSet (in ACString aName, in jsval aValue);`
    const _ScalarSet: () = ();

    /// ```text
    /// /**
    ///    * Sets the scalar to the maximum of the current and the passed value.
    ///    *
    ///    * @param aName The scalar name.
    ///    * @param aValue The numeric value to set the scalar to. Only unsigned integers supported.
    ///    */
    /// ```
    ///

    /// `[implicit_jscontext] void scalarSetMaximum (in ACString aName, in jsval aValue);`
    const _ScalarSetMaximum: () = ();

    /// ```text
    /// /**
    ///    * Serializes the scalars from the given dataset to a JSON-style object and resets them.
    ///    * The returned structure looks like:
    ///    *   {"process": {"category1.probe":1,"category1.other_probe":false,...}, ... }.
    ///    *
    ///    * @param aDataset DATASET_RELEASE_CHANNEL_OPTOUT or DATASET_RELEASE_CHANNEL_OPTIN.
    ///    * @param [aClear=false] Whether to clear out the scalars after snapshotting.
    ///    */
    /// ```
    ///

    /// `[implicit_jscontext,optional_argc] jsval snapshotScalars (in uint32_t aDataset, [optional] in boolean aClear);`
    const _SnapshotScalars: () = ();

    /// ```text
    /// /**
    ///    * Adds the value to the given keyed scalar.
    ///    *
    ///    * @param aName The scalar name.
    ///    * @param aKey The key name.
    ///    * @param aValue The numeric value to add to the scalar. Only unsigned integers supported.
    ///    */
    /// ```
    ///

    /// `[implicit_jscontext] void keyedScalarAdd (in ACString aName, in AString aKey, in jsval aValue);`
    const _KeyedScalarAdd: () = ();

    /// ```text
    /// /**
    ///    * Sets the keyed scalar to the given value.
    ///    *
    ///    * @param aName The scalar name.
    ///    * @param aKey The key name.
    ///    * @param aValue The value to set the scalar to. If the type of aValue doesn't match the
    ///    *        type of the scalar, the function will fail.
    ///    */
    /// ```
    ///

    /// `[implicit_jscontext] void keyedScalarSet (in ACString aName, in AString aKey, in jsval aValue);`
    const _KeyedScalarSet: () = ();

    /// ```text
    /// /**
    ///    * Sets the keyed scalar to the maximum of the current and the passed value.
    ///    *
    ///    * @param aName The scalar name.
    ///    * @param aKey The key name.
    ///    * @param aValue The numeric value to set the scalar to. Only unsigned integers supported.
    ///    */
    /// ```
    ///

    /// `[implicit_jscontext] void keyedScalarSetMaximum (in ACString aName, in AString aKey, in jsval aValue);`
    const _KeyedScalarSetMaximum: () = ();

    /// ```text
    /// /**
    ///    * Serializes the keyed scalars from the given dataset to a JSON-style object and
    ///    * resets them.
    ///    * The returned structure looks like:
    ///    *   { "process": { "category1.probe": { "key_1": 2, "key_2": 1, ... }, ... }, ... }
    ///    *
    ///    * @param aDataset DATASET_RELEASE_CHANNEL_OPTOUT or DATASET_RELEASE_CHANNEL_OPTIN.
    ///    * @param [aClear=false] Whether to clear out the scalars after snapshotting.
    ///    */
    /// ```
    ///

    /// `[implicit_jscontext,optional_argc] jsval snapshotKeyedScalars (in uint32_t aDataset, [optional] in boolean aClear);`
    const _SnapshotKeyedScalars: () = ();

    /// ```text
    /// /**
    ///    * Resets all the stored scalars. This is intended to be only used in tests.
    ///    */
    /// ```
    ///

    /// `void clearScalars ();`
    #[inline]
    pub unsafe fn ClearScalars(&self, ) -> nsresult {
        ((*self.vtable).ClearScalars)(self, )
    }


    /// ```text
    /// /**
    ///    * Immediately sends any Telemetry batched on this process to the parent
    ///    * process. This is intended only to be used on process shutdown.
    ///    */
    /// ```
    ///

    /// `void flushBatchedChildTelemetry ();`
    #[inline]
    pub unsafe fn FlushBatchedChildTelemetry(&self, ) -> nsresult {
        ((*self.vtable).FlushBatchedChildTelemetry)(self, )
    }


    /// ```text
    /// /**
    ///    * Record an event in Telemetry.
    ///    *
    ///    * @param aCategory The category name.
    ///    * @param aMethod The method name.
    ///    * @param aMethod The object name.
    ///    * @param aValue An optional string value to record.
    ///    * @param aExtra An optional object of the form (string -> string).
    ///    *               It should only contain registered extra keys.
    ///    *
    ///    * @throws NS_ERROR_INVALID_ARG When trying to record an unknown event.
    ///    */
    /// ```
    ///

    /// `[implicit_jscontext,optional_argc] void recordEvent (in ACString aCategory, in ACString aMethod, in ACString aObject, [optional] in jsval aValue, [optional] in jsval extra);`
    const _RecordEvent: () = ();

    /// ```text
    /// /**
    ///    * Enable recording of events in a category.
    ///    * Events default to recording disabled. This allows to toggle recording for all events
    ///    * in the specified category.
    ///    *
    ///    * @param aCategory The category name.
    ///    * @param aEnabled Whether recording is enabled for events in that category.
    ///    */
    /// ```
    ///

    /// `void setEventRecordingEnabled (in ACString aCategory, in boolean aEnabled);`
    #[inline]
    pub unsafe fn SetEventRecordingEnabled(&self, aCategory: &::nsstring::nsACString, aEnabled: bool) -> nsresult {
        ((*self.vtable).SetEventRecordingEnabled)(self, aCategory, aEnabled)
    }


    /// ```text
    /// /**
    ///    * Serializes the recorded events to a JSON-appropriate array and optionally resets them.
    ///    * The returned structure looks like this:
    ///    *   [
        ///    *     // [timestamp, category, method, object, stringValue, extraValues]
        ///    *     [43245, "category1", "method1", "object1", "string value", null],
        ///    *     [43258, "category1", "method2", "object1", null, {"key1": "string value"}],
        ///    *     ...
        ///    *   ]
    ///    *
    ///    * @param aDataset DATASET_RELEASE_CHANNEL_OPTOUT or DATASET_RELEASE_CHANNEL_OPTIN.
    ///    * @param [aClear=false] Whether to clear out the scalars after snapshotting.
    ///    */
    /// ```
    ///

    /// `[implicit_jscontext,optional_argc] jsval snapshotEvents (in uint32_t aDataset, [optional] in boolean aClear);`
    const _SnapshotEvents: () = ();

    /// ```text
    /// /**
    ///    * Register new events to record them from addons. This allows registering multiple
    ///    * events for a category. They will be valid only for the current Firefox session.
    ///    * Note that events shipping in Firefox should be registered in Events.yaml.
    ///    *
    ///    * @param aCategory The unique category the events are registered in.
    ///    * @param aEventData An object that contains registration data for 1-N events of the form:
    ///    *   {
        ///    *     "categoryName": {
            ///    *       "methods": ["test1"],
            ///    *       "objects": ["object1"],
            ///    *       "record_on_release": false,
            ///    *       "extra_keys": ["key1", "key2"], // optional
            ///    *       "expired": false // optional, defaults to false.
            ///    *     },
        ///    *     ...
        ///    *   }
    ///    * @param aEventData.<name>.methods List of methods for this event entry.
    ///    * @param aEventData.<name>.objects List of objects for this event entry.
    ///    * @param aEventData.<name>.extra_keys Optional, list of allowed extra keys for this event entry.
    ///    * @param aEventData.<name>.record_on_release Optional, whether to record this data on release.
    ///    *                                            Defaults to false.
    ///    * @param aEventData.<name>.expired Optional, whether this event entry is expired. This allows
    ///    *                                  recording it without error, but it will be discarded. Defaults to false.
    ///    */
    /// ```
    ///

    /// `[implicit_jscontext] void registerEvents (in ACString aCategory, in jsval aEventData);`
    const _RegisterEvents: () = ();

    /// ```text
    /// /**
    ///    * Parent process only. Register new scalars to record them from addons. This
    ///    * allows registering multiple scalars for a category. They will be valid only for
    ///    * the current Firefox session.
    ///    * Note that scalars shipping in Firefox should be registered in Scalars.yaml.
    ///    *
    ///    * @param aCategoryName The unique category the scalars are registered in.
    ///    * @param aScalarData An object that contains registration data for multiple scalars in the form:
    ///    *   {
        ///    *     "sample_scalar": {
            ///    *       "kind": Ci.nsITelemetry.SCALAR_TYPE_COUNT,
            ///    *       "keyed": true, //optional, defaults to false
            ///    *       "record_on_release: true, // optional, defaults to false
            ///    *       "expired": false // optional, defaults to false.
            ///    *     },
        ///    *     ...
        ///    *   }
    ///    * @param aScalarData.<name>.kind One of the scalar types defined in this file (SCALAR_TYPE_*)
    ///    * @param aScalarData.<name>.keyed Optional, whether this is a keyed scalar or not. Defaults to false.
    ///    * @param aScalarData.<name>.record_on_release Optional, whether to record this data on release.
    ///    *                                             Defaults to false.
    ///    * @param aScalarData.<name>.expired Optional, whether this scalar entry is expired. This allows
    ///    *                                   recording it without error, but it will be discarded. Defaults to false.
    ///    */
    /// ```
    ///

    /// `[implicit_jscontext] void registerScalars (in ACString aCategoryName, in jsval aScalarData);`
    const _RegisterScalars: () = ();

    /// ```text
    /// /**
    ///    * Resets all the stored events. This is intended to be only used in tests.
    ///    */
    /// ```
    ///

    /// `void clearEvents ();`
    #[inline]
    pub unsafe fn ClearEvents(&self, ) -> nsresult {
        ((*self.vtable).ClearEvents)(self, )
    }


}