Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

[836a32]: dom / bindings / test / TestBindingHeader.h Maximize Restore History

Repo status: analyzing...

Download this file

TestBindingHeader.h    1030 lines (906 with data), 43.2 kB

   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
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef TestBindingHeader_h
#define TestBindingHeader_h
#include "nsWrapperCache.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/dom/BindingUtils.h"
#include "mozilla/dom/TypedArray.h"
#include "nsCOMPtr.h"
#include "mozilla/dom/UnionTypes.h"
// Forward declare this before we include TestCodeGenBinding.h, because that header relies on including
// this one for it, for ParentDict. Hopefully it won't begin to rely on it in more fundamental ways.
namespace mozilla {
namespace dom {
class TestExternalInterface;
} // namespace dom
} // namespace mozilla
// We don't export TestCodeGenBinding.h, but it's right in our parent dir.
#include "../TestCodeGenBinding.h"
extern bool TestFuncControlledMember(JSContext*, JSObject*);
namespace mozilla {
namespace dom {
// IID for nsRenamedInterface
#define NS_RENAMED_INTERFACE_IID \
{ 0xd4b19ef3, 0xe68b, 0x4e3f, \
{ 0x94, 0xbc, 0xc9, 0xde, 0x3a, 0x69, 0xb0, 0xe8 } }
class nsRenamedInterface : public nsISupports,
public nsWrapperCache
{
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_RENAMED_INTERFACE_IID)
NS_DECL_ISUPPORTS
// We need a GetParentObject to make binding codegen happy
virtual nsISupports* GetParentObject();
};
// IID for the IndirectlyImplementedInterface
#define NS_INDIRECTLY_IMPLEMENTED_INTERFACE_IID \
{ 0xfed55b69, 0x7012, 0x4849, \
{ 0xaf, 0x56, 0x4b, 0xa9, 0xee, 0x41, 0x30, 0x89 } }
class IndirectlyImplementedInterface : public nsISupports,
public nsWrapperCache
{
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_INDIRECTLY_IMPLEMENTED_INTERFACE_IID)
NS_DECL_ISUPPORTS
// We need a GetParentObject to make binding codegen happy
virtual nsISupports* GetParentObject();
bool IndirectlyImplementedProperty();
void IndirectlyImplementedProperty(bool);
void IndirectlyImplementedMethod();
};
// IID for the TestExternalInterface
#define NS_TEST_EXTERNAL_INTERFACE_IID \
{ 0xd5ba0c99, 0x9b1d, 0x4e71, \
{ 0x8a, 0x94, 0x56, 0x38, 0x6c, 0xa3, 0xda, 0x3d } }
class TestExternalInterface : public nsISupports
{
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_TEST_EXTERNAL_INTERFACE_IID)
NS_DECL_ISUPPORTS
};
class TestNonWrapperCacheInterface : public nsISupports
{
public:
NS_DECL_ISUPPORTS
virtual JSObject* WrapObject(JSContext* cx, JS::Handle<JSObject*> scope);
};
class OnlyForUseInConstructor : public nsISupports,
public nsWrapperCache
{
public:
NS_DECL_ISUPPORTS
// We need a GetParentObject to make binding codegen happy
virtual nsISupports* GetParentObject();
};
class TestInterface : public nsISupports,
public nsWrapperCache
{
public:
NS_DECL_ISUPPORTS
// We need a GetParentObject to make binding codegen happy
virtual nsISupports* GetParentObject();
// And now our actual WebIDL API
// Constructors
static
already_AddRefed<TestInterface>
Constructor(const GlobalObject&, ErrorResult&);
static
already_AddRefed<TestInterface>
Constructor(const GlobalObject&, const nsAString&, ErrorResult&);
static
already_AddRefed<TestInterface>
Constructor(const GlobalObject&, uint32_t, const Nullable<bool>&,
ErrorResult&);
static
already_AddRefed<TestInterface>
Constructor(const GlobalObject&, TestInterface*, ErrorResult&);
static
already_AddRefed<TestInterface>
Constructor(const GlobalObject&, uint32_t, IndirectlyImplementedInterface&, ErrorResult&);
static
already_AddRefed<TestInterface>
Constructor(const GlobalObject&, Date&, ErrorResult&);
/* static
already_AddRefed<TestInterface>
Constructor(const GlobalObject&, uint32_t, uint32_t,
const TestInterfaceOrOnlyForUseInConstructor&, ErrorResult&);
*/
static
already_AddRefed<TestInterface> Test(const GlobalObject&, ErrorResult&);
static
already_AddRefed<TestInterface> Test(const GlobalObject&, const nsAString&,
ErrorResult&);
static
already_AddRefed<TestInterface> Test2(const GlobalObject&,
JSContext*,
const DictForConstructor&,
JS::Value,
JS::Handle<JSObject*>,
JS::Handle<JSObject*>,
const Sequence<Dict>&,
const Optional<JS::Handle<JS::Value> >&,
const Optional<JS::Handle<JSObject*> >&,
const Optional<JS::Handle<JSObject*> >&,
ErrorResult&);
// Integer types
int8_t ReadonlyByte();
int8_t WritableByte();
void SetWritableByte(int8_t);
void PassByte(int8_t);
int8_t ReceiveByte();
void PassOptionalByte(const Optional<int8_t>&);
void PassOptionalUndefinedMissingByte(const Optional<int8_t>&);
void PassOptionalByteWithDefault(int8_t);
void PassOptionalUndefinedMissingByteWithDefault(int8_t);
void PassNullableByte(const Nullable<int8_t>&);
void PassOptionalNullableByte(const Optional< Nullable<int8_t> >&);
void PassVariadicByte(const Sequence<int8_t>&);
int16_t ReadonlyShort();
int16_t WritableShort();
void SetWritableShort(int16_t);
void PassShort(int16_t);
int16_t ReceiveShort();
void PassOptionalShort(const Optional<int16_t>&);
void PassOptionalShortWithDefault(int16_t);
int32_t ReadonlyLong();
int32_t WritableLong();
void SetWritableLong(int32_t);
void PassLong(int32_t);
int16_t ReceiveLong();
void PassOptionalLong(const Optional<int32_t>&);
void PassOptionalLongWithDefault(int32_t);
int64_t ReadonlyLongLong();
int64_t WritableLongLong();
void SetWritableLongLong(int64_t);
void PassLongLong(int64_t);
int64_t ReceiveLongLong();
void PassOptionalLongLong(const Optional<int64_t>&);
void PassOptionalLongLongWithDefault(int64_t);
uint8_t ReadonlyOctet();
uint8_t WritableOctet();
void SetWritableOctet(uint8_t);
void PassOctet(uint8_t);
uint8_t ReceiveOctet();
void PassOptionalOctet(const Optional<uint8_t>&);
void PassOptionalOctetWithDefault(uint8_t);
uint16_t ReadonlyUnsignedShort();
uint16_t WritableUnsignedShort();
void SetWritableUnsignedShort(uint16_t);
void PassUnsignedShort(uint16_t);
uint16_t ReceiveUnsignedShort();
void PassOptionalUnsignedShort(const Optional<uint16_t>&);
void PassOptionalUnsignedShortWithDefault(uint16_t);
uint32_t ReadonlyUnsignedLong();
uint32_t WritableUnsignedLong();
void SetWritableUnsignedLong(uint32_t);
void PassUnsignedLong(uint32_t);
uint32_t ReceiveUnsignedLong();
void PassOptionalUnsignedLong(const Optional<uint32_t>&);
void PassOptionalUnsignedLongWithDefault(uint32_t);
uint64_t ReadonlyUnsignedLongLong();
uint64_t WritableUnsignedLongLong();
void SetWritableUnsignedLongLong(uint64_t);
void PassUnsignedLongLong(uint64_t);
uint64_t ReceiveUnsignedLongLong();
void PassOptionalUnsignedLongLong(const Optional<uint64_t>&);
void PassOptionalUnsignedLongLongWithDefault(uint64_t);
float WritableFloat() const;
void SetWritableFloat(float);
float WritableUnrestrictedFloat() const;
void SetWritableUnrestrictedFloat(float);
Nullable<float> GetWritableNullableFloat() const;
void SetWritableNullableFloat(Nullable<float>);
Nullable<float> GetWritableNullableUnrestrictedFloat() const;
void SetWritableNullableUnrestrictedFloat(Nullable<float>);
double WritableDouble() const;
void SetWritableDouble(double);
double WritableUnrestrictedDouble() const;
void SetWritableUnrestrictedDouble(double);
Nullable<double> GetWritableNullableDouble() const;
void SetWritableNullableDouble(Nullable<double>);
Nullable<double> GetWritableNullableUnrestrictedDouble() const;
void SetWritableNullableUnrestrictedDouble(Nullable<double>);
void PassFloat(float, float, Nullable<float>, Nullable<float>,
double, double, Nullable<double>, Nullable<double>,
const Sequence<float>&, const Sequence<float>&,
const Sequence<Nullable<float> >&,
const Sequence<Nullable<float> >&,
const Sequence<double>&, const Sequence<double>&,
const Sequence<Nullable<double> >&,
const Sequence<Nullable<double> >&);
void PassLenientFloat(float, float, Nullable<float>, Nullable<float>,
double, double, Nullable<double>, Nullable<double>,
const Sequence<float>&, const Sequence<float>&,
const Sequence<Nullable<float> >&,
const Sequence<Nullable<float> >&,
const Sequence<double>&, const Sequence<double>&,
const Sequence<Nullable<double> >&,
const Sequence<Nullable<double> >&);
float LenientFloatAttr() const;
void SetLenientFloatAttr(float);
double LenientDoubleAttr() const;
void SetLenientDoubleAttr(double);
void PassUnrestricted(float arg1,
float arg2,
float arg3,
float arg4,
double arg5,
double arg6,
double arg7,
double arg8);
// Interface types
already_AddRefed<TestInterface> ReceiveSelf();
already_AddRefed<TestInterface> ReceiveNullableSelf();
TestInterface* ReceiveWeakSelf();
TestInterface* ReceiveWeakNullableSelf();
void PassSelf(TestInterface&);
void PassSelf2(NonNull<TestInterface>&);
void PassNullableSelf(TestInterface*);
already_AddRefed<TestInterface> NonNullSelf();
void SetNonNullSelf(TestInterface&);
already_AddRefed<TestInterface> GetNullableSelf();
void SetNullableSelf(TestInterface*);
void PassOptionalSelf(const Optional<TestInterface*> &);
void PassOptionalNonNullSelf(const Optional<NonNull<TestInterface> >&);
void PassOptionalSelfWithDefault(TestInterface*);
already_AddRefed<TestNonWrapperCacheInterface> ReceiveNonWrapperCacheInterface();
already_AddRefed<TestNonWrapperCacheInterface> ReceiveNullableNonWrapperCacheInterface();
void ReceiveNonWrapperCacheInterfaceSequence(nsTArray<nsRefPtr<TestNonWrapperCacheInterface> >&);
void ReceiveNullableNonWrapperCacheInterfaceSequence(nsTArray<nsRefPtr<TestNonWrapperCacheInterface> >&);
void ReceiveNonWrapperCacheInterfaceNullableSequence(Nullable<nsTArray<nsRefPtr<TestNonWrapperCacheInterface> > >&);
void ReceiveNullableNonWrapperCacheInterfaceNullableSequence(Nullable<nsTArray<nsRefPtr<TestNonWrapperCacheInterface> > >&);
already_AddRefed<IndirectlyImplementedInterface> ReceiveOther();
already_AddRefed<IndirectlyImplementedInterface> ReceiveNullableOther();
IndirectlyImplementedInterface* ReceiveWeakOther();
IndirectlyImplementedInterface* ReceiveWeakNullableOther();
void PassOther(IndirectlyImplementedInterface&);
void PassOther2(NonNull<IndirectlyImplementedInterface>&);
void PassNullableOther(IndirectlyImplementedInterface*);
already_AddRefed<IndirectlyImplementedInterface> NonNullOther();
void SetNonNullOther(IndirectlyImplementedInterface&);
already_AddRefed<IndirectlyImplementedInterface> GetNullableOther();
void SetNullableOther(IndirectlyImplementedInterface*);
void PassOptionalOther(const Optional<IndirectlyImplementedInterface*>&);
void PassOptionalNonNullOther(const Optional<NonNull<IndirectlyImplementedInterface> >&);
void PassOptionalOtherWithDefault(IndirectlyImplementedInterface*);
already_AddRefed<TestExternalInterface> ReceiveExternal();
already_AddRefed<TestExternalInterface> ReceiveNullableExternal();
TestExternalInterface* ReceiveWeakExternal();
TestExternalInterface* ReceiveWeakNullableExternal();
void PassExternal(TestExternalInterface*);
void PassExternal2(TestExternalInterface*);
void PassNullableExternal(TestExternalInterface*);
already_AddRefed<TestExternalInterface> NonNullExternal();
void SetNonNullExternal(TestExternalInterface*);
already_AddRefed<TestExternalInterface> GetNullableExternal();
void SetNullableExternal(TestExternalInterface*);
void PassOptionalExternal(const Optional<TestExternalInterface*>&);
void PassOptionalNonNullExternal(const Optional<TestExternalInterface*>&);
void PassOptionalExternalWithDefault(TestExternalInterface*);
already_AddRefed<TestCallbackInterface> ReceiveCallbackInterface();
already_AddRefed<TestCallbackInterface> ReceiveNullableCallbackInterface();
TestCallbackInterface* ReceiveWeakCallbackInterface();
TestCallbackInterface* ReceiveWeakNullableCallbackInterface();
void PassCallbackInterface(TestCallbackInterface&);
void PassCallbackInterface2(OwningNonNull<TestCallbackInterface>);
void PassNullableCallbackInterface(TestCallbackInterface*);
already_AddRefed<TestCallbackInterface> NonNullCallbackInterface();
void SetNonNullCallbackInterface(TestCallbackInterface&);
already_AddRefed<TestCallbackInterface> GetNullableCallbackInterface();
void SetNullableCallbackInterface(TestCallbackInterface*);
void PassOptionalCallbackInterface(const Optional<nsRefPtr<TestCallbackInterface> >&);
void PassOptionalNonNullCallbackInterface(const Optional<OwningNonNull<TestCallbackInterface> >&);
void PassOptionalCallbackInterfaceWithDefault(TestCallbackInterface*);
already_AddRefed<IndirectlyImplementedInterface> ReceiveConsequentialInterface();
void PassConsequentialInterface(IndirectlyImplementedInterface&);
// Sequence types
void ReceiveSequence(nsTArray<int32_t>&);
void ReceiveNullableSequence(Nullable< nsTArray<int32_t> >&);
void ReceiveSequenceOfNullableInts(nsTArray< Nullable<int32_t> >&);
void ReceiveNullableSequenceOfNullableInts(Nullable< nsTArray< Nullable<int32_t> > >&);
void PassSequence(const Sequence<int32_t> &);
void PassNullableSequence(const Nullable< Sequence<int32_t> >&);
void PassSequenceOfNullableInts(const Sequence<Nullable<int32_t> >&);
void PassOptionalSequenceOfNullableInts(const Optional<Sequence<Nullable<int32_t> > > &);
void PassOptionalNullableSequenceOfNullableInts(const Optional<Nullable<Sequence<Nullable<int32_t> > > > &);
void ReceiveCastableObjectSequence(nsTArray< nsRefPtr<TestInterface> > &);
void ReceiveCallbackObjectSequence(nsTArray< nsRefPtr<TestCallbackInterface> > &);
void ReceiveNullableCastableObjectSequence(nsTArray< nsRefPtr<TestInterface> > &);
void ReceiveNullableCallbackObjectSequence(nsTArray< nsRefPtr<TestCallbackInterface> > &);
void ReceiveCastableObjectNullableSequence(Nullable< nsTArray< nsRefPtr<TestInterface> > >&);
void ReceiveNullableCastableObjectNullableSequence(Nullable< nsTArray< nsRefPtr<TestInterface> > >&);
void ReceiveWeakCastableObjectSequence(nsTArray<TestInterface*> &);
void ReceiveWeakNullableCastableObjectSequence(nsTArray<TestInterface*> &);
void ReceiveWeakCastableObjectNullableSequence(Nullable< nsTArray<TestInterface*> >&);
void ReceiveWeakNullableCastableObjectNullableSequence(Nullable< nsTArray<TestInterface*> >&);
void PassCastableObjectSequence(const Sequence< OwningNonNull<TestInterface> >&);
void PassNullableCastableObjectSequence(const Sequence< nsRefPtr<TestInterface> > &);
void PassCastableObjectNullableSequence(const Nullable< Sequence< OwningNonNull<TestInterface> > >&);
void PassNullableCastableObjectNullableSequence(const Nullable< Sequence< nsRefPtr<TestInterface> > >&);
void PassOptionalSequence(const Optional<Sequence<int32_t> >&);
void PassOptionalNullableSequence(const Optional<Nullable<Sequence<int32_t> > >&);
void PassOptionalNullableSequenceWithDefaultValue(const Nullable< Sequence<int32_t> >&);
void PassOptionalObjectSequence(const Optional<Sequence<OwningNonNull<TestInterface> > >&);
void PassExternalInterfaceSequence(const Sequence<nsRefPtr<TestExternalInterface> >&);
void PassNullableExternalInterfaceSequence(const Sequence<nsRefPtr<TestExternalInterface> >&);
void ReceiveStringSequence(nsTArray<nsString>&);
void PassStringSequence(const Sequence<nsString>&);
void ReceiveAnySequence(JSContext*, nsTArray<JS::Value>&);
void ReceiveNullableAnySequence(JSContext*, Nullable<nsTArray<JS::Value> >&);
void ReceiveAnySequenceSequence(JSContext*, nsTArray<nsTArray<JS::Value> >&);
void ReceiveObjectSequence(JSContext*, nsTArray<JSObject*>&);
void ReceiveNullableObjectSequence(JSContext*, nsTArray<JSObject*>&);
void PassSequenceOfSequences(const Sequence< Sequence<int32_t> >&);
void ReceiveSequenceOfSequences(nsTArray< nsTArray<int32_t> >&);
// Typed array types
void PassArrayBuffer(ArrayBuffer&);
void PassNullableArrayBuffer(ArrayBuffer*);
void PassOptionalArrayBuffer(const Optional<ArrayBuffer>&);
void PassOptionalNullableArrayBuffer(const Optional<ArrayBuffer*>&);
void PassOptionalNullableArrayBufferWithDefaultValue(ArrayBuffer*);
void PassArrayBufferView(ArrayBufferView&);
void PassInt8Array(Int8Array&);
void PassInt16Array(Int16Array&);
void PassInt32Array(Int32Array&);
void PassUint8Array(Uint8Array&);
void PassUint16Array(Uint16Array&);
void PassUint32Array(Uint32Array&);
void PassUint8ClampedArray(Uint8ClampedArray&);
void PassFloat32Array(Float32Array&);
void PassFloat64Array(Float64Array&);
JSObject* ReceiveUint8Array(JSContext*);
// String types
void PassString(const nsAString&);
void PassNullableString(const nsAString&);
void PassOptionalString(const Optional<nsAString>&);
void PassOptionalUndefinedMissingString(const Optional<nsAString>&);
void PassOptionalStringWithDefaultValue(const nsAString&);
void PassOptionalUndefinedMissingStringWithDefaultValue(const nsAString&);
void PassOptionalNullableString(const Optional<nsAString>&);
void PassOptionalNullableStringWithDefaultValue(const nsAString&);
void PassVariadicString(const Sequence<nsString>&);
// Enumerated types
void PassEnum(TestEnum);
void PassNullableEnum(const Nullable<TestEnum>&);
void PassOptionalEnum(const Optional<TestEnum>&);
void PassEnumWithDefault(TestEnum);
void PassOptionalNullableEnum(const Optional<Nullable<TestEnum> >&);
void PassOptionalNullableEnumWithDefaultValue(const Nullable<TestEnum>&);
void PassOptionalNullableEnumWithDefaultValue2(const Nullable<TestEnum>&);
TestEnum ReceiveEnum();
Nullable<TestEnum> ReceiveNullableEnum();
TestEnum EnumAttribute();
TestEnum ReadonlyEnumAttribute();
void SetEnumAttribute(TestEnum);
// Callback types
void PassCallback(TestCallback&);
void PassNullableCallback(TestCallback*);
void PassOptionalCallback(const Optional<OwningNonNull<TestCallback> >&);
void PassOptionalNullableCallback(const Optional<nsRefPtr<TestCallback> >&);
void PassOptionalNullableCallbackWithDefaultValue(TestCallback*);
already_AddRefed<TestCallback> ReceiveCallback();
already_AddRefed<TestCallback> ReceiveNullableCallback();
void PassNullableTreatAsNullCallback(TestTreatAsNullCallback*);
void PassOptionalNullableTreatAsNullCallback(const Optional<nsRefPtr<TestTreatAsNullCallback> >&);
void PassOptionalNullableTreatAsNullCallbackWithDefaultValue(TestTreatAsNullCallback*);
void SetTreatAsNullCallback(TestTreatAsNullCallback&);
already_AddRefed<TestTreatAsNullCallback> TreatAsNullCallback();
void SetNullableTreatAsNullCallback(TestTreatAsNullCallback*);
already_AddRefed<TestTreatAsNullCallback> GetNullableTreatAsNullCallback();
// Any types
void PassAny(JSContext*, JS::Handle<JS::Value>);
void PassVariadicAny(JSContext*, const Sequence<JS::Value>&);
void PassOptionalAny(JSContext*, const Optional<JS::Handle<JS::Value> >&);
void PassAnyDefaultNull(JSContext*, JS::Handle<JS::Value>);
void PassSequenceOfAny(JSContext*, const Sequence<JS::Value>&);
void PassNullableSequenceOfAny(JSContext*, const Nullable<Sequence<JS::Value> >&);
void PassOptionalSequenceOfAny(JSContext*, const Optional<Sequence<JS::Value> >&);
void PassOptionalNullableSequenceOfAny(JSContext*, const Optional<Nullable<Sequence<JS::Value> > >&);
void PassOptionalSequenceOfAnyWithDefaultValue(JSContext*, const Nullable<Sequence<JS::Value> >&);
void PassSequenceOfSequenceOfAny(JSContext*, const Sequence<Sequence<JS::Value> >&);
void PassSequenceOfNullableSequenceOfAny(JSContext*, const Sequence<Nullable<Sequence<JS::Value> > >&);
void PassNullableSequenceOfNullableSequenceOfAny(JSContext*, const Nullable<Sequence<Nullable<Sequence<JS::Value> > > >&);
void PassOptionalNullableSequenceOfNullableSequenceOfAny(JSContext*, const Optional<Nullable<Sequence<Nullable<Sequence<JS::Value> > > > >&);
JS::Value ReceiveAny(JSContext*);
// object types
void PassObject(JSContext*, JS::Handle<JSObject*>);
void PassVariadicObject(JSContext*, const Sequence<JSObject*>&);
void PassNullableObject(JSContext*, JS::Handle<JSObject*>);
void PassVariadicNullableObject(JSContext*, const Sequence<JSObject*>&);
void PassOptionalObject(JSContext*, const Optional<JS::Handle<JSObject*> >&);
void PassOptionalNullableObject(JSContext*, const Optional<JS::Handle<JSObject*> >&);
void PassOptionalNullableObjectWithDefaultValue(JSContext*, JS::Handle<JSObject*>);
void PassSequenceOfObject(JSContext*, const Sequence<JSObject*>&);
void PassSequenceOfNullableObject(JSContext*, const Sequence<JSObject*>&);
void PassOptionalNullableSequenceOfNullableSequenceOfObject(JSContext*, const Optional<Nullable<Sequence<Nullable<Sequence<JSObject*> > > > >&);
void PassOptionalNullableSequenceOfNullableSequenceOfNullableObject(JSContext*, const Optional<Nullable<Sequence<Nullable<Sequence<JSObject*> > > > >&);
JSObject* ReceiveObject(JSContext*);
JSObject* ReceiveNullableObject(JSContext*);
// Union types
void PassUnion(JSContext*, const ObjectOrLong& arg);
void PassUnionWithNullable(JSContext* cx, const ObjectOrNullOrLong& arg)
{
ObjectOrLong returnValue;
if (arg.IsNull()) {
} else if (arg.IsObject()) {
JS::Rooted<JSObject*> obj(cx, arg.GetAsObject());
JS_GetClass(obj);
//returnValue.SetAsObject(&obj);
} else {
int32_t i = arg.GetAsLong();
i += 1;
}
}
void PassNullableUnion(JSContext*, const Nullable<ObjectOrLong>&);
void PassOptionalUnion(JSContext*, const Optional<ObjectOrLong>&);
void PassOptionalNullableUnion(JSContext*, const Optional<Nullable<ObjectOrLong> >&);
void PassOptionalNullableUnionWithDefaultValue(JSContext*, const Nullable<ObjectOrLong>&);
//void PassUnionWithInterfaces(const TestInterfaceOrTestExternalInterface& arg);
//void PassUnionWithInterfacesAndNullable(const TestInterfaceOrNullOrTestExternalInterface& arg);
void PassUnionWithArrayBuffer(const ArrayBufferOrLong&);
void PassUnionWithString(JSContext*, const StringOrObject&);
//void PassUnionWithEnum(JSContext*, const TestEnumOrObject&);
//void PassUnionWithCallback(JSContext*, const TestCallbackOrLong&);
void PassUnionWithObject(JSContext*, const ObjectOrLong&);
// Date types
void PassDate(Date);
void PassNullableDate(const Nullable<Date>&);
void PassOptionalDate(const Optional<Date>&);
void PassOptionalNullableDate(const Optional<Nullable<Date> >&);
void PassOptionalNullableDateWithDefaultValue(const Nullable<Date>&);
void PassDateSequence(const Sequence<Date>&);
void PassNullableDateSequence(const Sequence<Nullable<Date> >&);
Date ReceiveDate();
Nullable<Date> ReceiveNullableDate();
// binaryNames tests
void MethodRenamedTo();
void MethodRenamedTo(int8_t);
int8_t AttributeGetterRenamedTo();
int8_t AttributeRenamedTo();
void SetAttributeRenamedTo(int8_t);
// Dictionary tests
void PassDictionary(JSContext*, const Dict&);
void ReceiveDictionary(JSContext*, Dict&);
void ReceiveNullableDictionary(JSContext*, Nullable<DictInitializer>&);
void PassOtherDictionary(const GrandparentDict&);
void PassSequenceOfDictionaries(JSContext*, const Sequence<Dict>&);
void PassDictionaryOrLong(JSContext*, const Dict&);
void PassDictionaryOrLong(int32_t);
void PassDictContainingDict(JSContext*, const DictContainingDict&);
void PassDictContainingSequence(JSContext*, const DictContainingSequence&);
void ReceiveDictContainingSequence(JSContext*, DictContainingSequence&);
// Typedefs
void ExerciseTypedefInterfaces1(TestInterface&);
already_AddRefed<TestInterface> ExerciseTypedefInterfaces2(TestInterface*);
void ExerciseTypedefInterfaces3(TestInterface&);
// Static methods and attributes
static void StaticMethod(const GlobalObject&, bool);
static void StaticMethodWithContext(const GlobalObject&, JSContext*,
JS::Value);
static bool StaticAttribute(const GlobalObject&);
static void SetStaticAttribute(const GlobalObject&, bool);
// Overload resolution tests
bool Overload1(TestInterface&);
TestInterface* Overload1(const nsAString&, TestInterface&);
void Overload2(TestInterface&);
void Overload2(JSContext*, const Dict&);
void Overload2(const nsAString&);
void Overload2(Date);
void Overload3(TestInterface&);
void Overload3(const TestCallback&);
void Overload3(const nsAString&);
void Overload4(TestInterface&);
void Overload4(TestCallbackInterface&);
void Overload4(const nsAString&);
// Variadic handling
void PassVariadicThirdArg(const nsAString&, int32_t,
const Sequence<OwningNonNull<TestInterface> >&);
// Conditionally exposed methods/attributes
bool Prefable1();
bool Prefable2();
bool Prefable3();
bool Prefable4();
bool Prefable5();
bool Prefable6();
bool Prefable7();
bool Prefable8();
bool Prefable9();
void Prefable10();
void Prefable11();
bool Prefable12();
void Prefable13();
bool Prefable14();
bool Prefable15();
bool Prefable16();
void Prefable17();
void Prefable18();
void Prefable19();
// Miscellania
int32_t AttrWithLenientThis();
void SetAttrWithLenientThis(int32_t);
uint32_t UnforgeableAttr();
uint32_t UnforgeableAttr2();
void Stringify(nsString&);
void PassRenamedInterface(nsRenamedInterface&);
TestInterface* PutForwardsAttr();
TestInterface* PutForwardsAttr2();
TestInterface* PutForwardsAttr3();
void ThrowingMethod(ErrorResult& aRv);
bool GetThrowingAttr(ErrorResult& aRv) const;
void SetThrowingAttr(bool arg, ErrorResult& aRv);
bool GetThrowingGetterAttr(ErrorResult& aRv) const;
void SetThrowingGetterAttr(bool arg);
bool ThrowingSetterAttr() const;
void SetThrowingSetterAttr(bool arg, ErrorResult& aRv);
int16_t LegacyCall(JS::Value, uint32_t, TestInterface&);
// Methods and properties imported via "implements"
bool ImplementedProperty();
void SetImplementedProperty(bool);
void ImplementedMethod();
bool ImplementedParentProperty();
void SetImplementedParentProperty(bool);
void ImplementedParentMethod();
bool IndirectlyImplementedProperty();
void SetIndirectlyImplementedProperty(bool);
void IndirectlyImplementedMethod();
uint32_t DiamondImplementedProperty();
// Test EnforceRange/Clamp
void DontEnforceRangeOrClamp(int8_t);
void DoEnforceRange(int8_t);
void DoClamp(int8_t);
private:
// We add signatures here that _could_ start matching if the codegen
// got data types wrong. That way if it ever does we'll have a call
// to these private deleted methods and compilation will fail.
void SetReadonlyByte(int8_t) MOZ_DELETE;
template<typename T>
void SetWritableByte(T) MOZ_DELETE;
template<typename T>
void PassByte(T) MOZ_DELETE;
void PassNullableByte(Nullable<int8_t>&) MOZ_DELETE;
template<typename T>
void PassOptionalByte(const Optional<T>&) MOZ_DELETE;
template<typename T>
void PassOptionalByteWithDefault(T) MOZ_DELETE;
void PassVariadicByte(Sequence<int8_t>&) MOZ_DELETE;
void SetReadonlyShort(int16_t) MOZ_DELETE;
template<typename T>
void SetWritableShort(T) MOZ_DELETE;
template<typename T>
void PassShort(T) MOZ_DELETE;
template<typename T>
void PassOptionalShort(const Optional<T>&) MOZ_DELETE;
template<typename T>
void PassOptionalShortWithDefault(T) MOZ_DELETE;
void SetReadonlyLong(int32_t) MOZ_DELETE;
template<typename T>
void SetWritableLong(T) MOZ_DELETE;
template<typename T>
void PassLong(T) MOZ_DELETE;
template<typename T>
void PassOptionalLong(const Optional<T>&) MOZ_DELETE;
template<typename T>
void PassOptionalLongWithDefault(T) MOZ_DELETE;
void SetReadonlyLongLong(int64_t) MOZ_DELETE;
template<typename T>
void SetWritableLongLong(T) MOZ_DELETE;
template<typename T>
void PassLongLong(T) MOZ_DELETE;
template<typename T>
void PassOptionalLongLong(const Optional<T>&) MOZ_DELETE;
template<typename T>
void PassOptionalLongLongWithDefault(T) MOZ_DELETE;
void SetReadonlyOctet(uint8_t) MOZ_DELETE;
template<typename T>
void SetWritableOctet(T) MOZ_DELETE;
template<typename T>
void PassOctet(T) MOZ_DELETE;
template<typename T>
void PassOptionalOctet(const Optional<T>&) MOZ_DELETE;
template<typename T>
void PassOptionalOctetWithDefault(T) MOZ_DELETE;
void SetReadonlyUnsignedShort(uint16_t) MOZ_DELETE;
template<typename T>
void SetWritableUnsignedShort(T) MOZ_DELETE;
template<typename T>
void PassUnsignedShort(T) MOZ_DELETE;
template<typename T>
void PassOptionalUnsignedShort(const Optional<T>&) MOZ_DELETE;
template<typename T>
void PassOptionalUnsignedShortWithDefault(T) MOZ_DELETE;
void SetReadonlyUnsignedLong(uint32_t) MOZ_DELETE;
template<typename T>
void SetWritableUnsignedLong(T) MOZ_DELETE;
template<typename T>
void PassUnsignedLong(T) MOZ_DELETE;
template<typename T>
void PassOptionalUnsignedLong(const Optional<T>&) MOZ_DELETE;
template<typename T>
void PassOptionalUnsignedLongWithDefault(T) MOZ_DELETE;
void SetReadonlyUnsignedLongLong(uint64_t) MOZ_DELETE;
template<typename T>
void SetWritableUnsignedLongLong(T) MOZ_DELETE;
template<typename T>
void PassUnsignedLongLong(T) MOZ_DELETE;
template<typename T>
void PassOptionalUnsignedLongLong(const Optional<T>&) MOZ_DELETE;
template<typename T>
void PassOptionalUnsignedLongLongWithDefault(T) MOZ_DELETE;
// Enforce that only const things are passed for sequences
void PassSequence(Sequence<int32_t> &) MOZ_DELETE;
void PassNullableSequence(Nullable< Sequence<int32_t> >&) MOZ_DELETE;
void PassOptionalNullableSequenceWithDefaultValue(Nullable< Sequence<int32_t> >&) MOZ_DELETE;
void PassSequenceOfAny(JSContext*, Sequence<JS::Value>&) MOZ_DELETE;
void PassNullableSequenceOfAny(JSContext*, Nullable<Sequence<JS::Value> >&) MOZ_DELETE;
void PassOptionalSequenceOfAny(JSContext*, Optional<Sequence<JS::Value> >&) MOZ_DELETE;
void PassOptionalNullableSequenceOfAny(JSContext*, Optional<Nullable<Sequence<JS::Value> > >&) MOZ_DELETE;
void PassOptionalSequenceOfAnyWithDefaultValue(JSContext*, Nullable<Sequence<JS::Value> >&) MOZ_DELETE;
void PassSequenceOfSequenceOfAny(JSContext*, Sequence<Sequence<JS::Value> >&) MOZ_DELETE;
void PassSequenceOfNullableSequenceOfAny(JSContext*, Sequence<Nullable<Sequence<JS::Value> > >&) MOZ_DELETE;
void PassNullableSequenceOfNullableSequenceOfAny(JSContext*, Nullable<Sequence<Nullable<Sequence<JS::Value> > > >&) MOZ_DELETE;
void PassOptionalNullableSequenceOfNullableSequenceOfAny(JSContext*, Optional<Nullable<Sequence<Nullable<Sequence<JS::Value> > > > >&) MOZ_DELETE;
void PassSequenceOfObject(JSContext*, Sequence<JSObject*>&) MOZ_DELETE;
void PassSequenceOfNullableObject(JSContext*, Sequence<JSObject*>&) MOZ_DELETE;
void PassOptionalNullableSequenceOfNullableSequenceOfObject(JSContext*, Optional<Nullable<Sequence<Nullable<Sequence<JSObject*> > > > >&) MOZ_DELETE;
void PassOptionalNullableSequenceOfNullableSequenceOfNullableObject(JSContext*, Optional<Nullable<Sequence<Nullable<Sequence<JSObject*> > > > >&) MOZ_DELETE;
// Enforce that only const things are passed for optional
void PassOptionalByte(Optional<int8_t>&) MOZ_DELETE;
void PassOptionalNullableByte(Optional<Nullable<int8_t> >&) MOZ_DELETE;
void PassOptionalShort(Optional<int16_t>&) MOZ_DELETE;
void PassOptionalLong(Optional<int32_t>&) MOZ_DELETE;
void PassOptionalLongLong(Optional<int64_t>&) MOZ_DELETE;
void PassOptionalOctet(Optional<uint8_t>&) MOZ_DELETE;
void PassOptionalUnsignedShort(Optional<uint16_t>&) MOZ_DELETE;
void PassOptionalUnsignedLong(Optional<uint32_t>&) MOZ_DELETE;
void PassOptionalUnsignedLongLong(Optional<uint64_t>&) MOZ_DELETE;
void PassOptionalSelf(Optional<TestInterface*> &) MOZ_DELETE;
void PassOptionalNonNullSelf(Optional<NonNull<TestInterface> >&) MOZ_DELETE;
void PassOptionalOther(Optional<IndirectlyImplementedInterface*>&);
void PassOptionalNonNullOther(Optional<NonNull<IndirectlyImplementedInterface> >&);
void PassOptionalExternal(Optional<TestExternalInterface*>&) MOZ_DELETE;
void PassOptionalNonNullExternal(Optional<TestExternalInterface*>&) MOZ_DELETE;
void PassOptionalSequence(Optional<Sequence<int32_t> >&) MOZ_DELETE;
void PassOptionalNullableSequence(Optional<Nullable<Sequence<int32_t> > >&) MOZ_DELETE;
void PassOptionalObjectSequence(Optional<Sequence<OwningNonNull<TestInterface> > >&) MOZ_DELETE;
void PassOptionalArrayBuffer(Optional<ArrayBuffer>&) MOZ_DELETE;
void PassOptionalNullableArrayBuffer(Optional<ArrayBuffer*>&) MOZ_DELETE;
void PassOptionalEnum(Optional<TestEnum>&) MOZ_DELETE;
void PassOptionalCallback(JSContext*, Optional<OwningNonNull<TestCallback> >&) MOZ_DELETE;
void PassOptionalNullableCallback(JSContext*, Optional<nsRefPtr<TestCallback> >&) MOZ_DELETE;
void PassOptionalAny(Optional<JS::Handle<JS::Value> >&) MOZ_DELETE;
// And test that string stuff is always const
void PassString(nsAString&) MOZ_DELETE;
void PassNullableString(nsAString&) MOZ_DELETE;
void PassOptionalString(Optional<nsAString>&) MOZ_DELETE;
void PassOptionalStringWithDefaultValue(nsAString&) MOZ_DELETE;
void PassOptionalNullableString(Optional<nsAString>&) MOZ_DELETE;
void PassOptionalNullableStringWithDefaultValue(nsAString&) MOZ_DELETE;
void PassVariadicString(Sequence<nsString>&) MOZ_DELETE;
// Make sure dictionary arguments are always const
void PassDictionary(JSContext*, Dict&) MOZ_DELETE;
void PassOtherDictionary(GrandparentDict&) MOZ_DELETE;
void PassSequenceOfDictionaries(JSContext*, Sequence<Dict>&) MOZ_DELETE;
void PassDictionaryOrLong(JSContext*, Dict&) MOZ_DELETE;
void PassDictContainingDict(JSContext*, DictContainingDict&) MOZ_DELETE;
void PassDictContainingSequence(DictContainingSequence&) MOZ_DELETE;
// Make sure various nullable things are always const
void PassNullableEnum(Nullable<TestEnum>&) MOZ_DELETE;
// Make sure unions are always const
void PassUnion(JSContext*, ObjectOrLong& arg) MOZ_DELETE;
void PassUnionWithNullable(JSContext*, ObjectOrNullOrLong& arg) MOZ_DELETE;
void PassNullableUnion(JSContext*, Nullable<ObjectOrLong>&) MOZ_DELETE;
void PassOptionalUnion(JSContext*, Optional<ObjectOrLong>&) MOZ_DELETE;
void PassOptionalNullableUnion(JSContext*, Optional<Nullable<ObjectOrLong> >&) MOZ_DELETE;
void PassOptionalNullableUnionWithDefaultValue(JSContext*, Nullable<ObjectOrLong>&) MOZ_DELETE;
// Make sure various date stuff is const as needed
void PassNullableDate(Nullable<Date>&) MOZ_DELETE;
void PassOptionalDate(Optional<Date>&) MOZ_DELETE;
void PassOptionalNullableDate(Optional<Nullable<Date> >&) MOZ_DELETE;
void PassOptionalNullableDateWithDefaultValue(Nullable<Date>&) MOZ_DELETE;
void PassDateSequence(Sequence<Date>&) MOZ_DELETE;
void PassNullableDateSequence(Sequence<Nullable<Date> >&) MOZ_DELETE;
// Make sure variadics are const as needed
void PassVariadicAny(JSContext*, Sequence<JS::Value>&) MOZ_DELETE;
void PassVariadicObject(JSContext*, Sequence<JSObject*>&) MOZ_DELETE;
void PassVariadicNullableObject(JSContext*, Sequence<JSObject*>&) MOZ_DELETE;
};
class TestIndexedGetterInterface : public nsISupports,
public nsWrapperCache
{
public:
NS_DECL_ISUPPORTS
// We need a GetParentObject to make binding codegen happy
virtual nsISupports* GetParentObject();
uint32_t IndexedGetter(uint32_t, bool&);
uint32_t IndexedGetter(uint32_t&) MOZ_DELETE;
uint32_t Item(uint32_t&);
uint32_t Item(uint32_t, bool&) MOZ_DELETE;
uint32_t Length();
};
class TestNamedGetterInterface : public nsISupports,
public nsWrapperCache
{
public:
NS_DECL_ISUPPORTS
// We need a GetParentObject to make binding codegen happy
virtual nsISupports* GetParentObject();
void NamedGetter(const nsAString&, bool&, nsAString&);
void GetSupportedNames(nsTArray<nsString>&);
};
class TestIndexedGetterAndSetterAndNamedGetterInterface : public nsISupports,
public nsWrapperCache
{
public:
NS_DECL_ISUPPORTS
// We need a GetParentObject to make binding codegen happy
virtual nsISupports* GetParentObject();
void NamedGetter(const nsAString&, bool&, nsAString&);
void GetSupportedNames(nsTArray<nsString>&);
int32_t IndexedGetter(uint32_t, bool&);
void IndexedSetter(uint32_t, int32_t);
uint32_t Length();
};
class TestIndexedAndNamedGetterInterface : public nsISupports,
public nsWrapperCache
{
public:
NS_DECL_ISUPPORTS
// We need a GetParentObject to make binding codegen happy
virtual nsISupports* GetParentObject();
uint32_t IndexedGetter(uint32_t, bool&);
void NamedGetter(const nsAString&, bool&, nsAString&);
void NamedItem(const nsAString&, nsAString&);
uint32_t Length();
void GetSupportedNames(nsTArray<nsString>&);
};
class TestIndexedSetterInterface : public nsISupports,
public nsWrapperCache
{
public:
NS_DECL_ISUPPORTS
// We need a GetParentObject to make binding codegen happy
virtual nsISupports* GetParentObject();
void IndexedSetter(uint32_t, const nsAString&);
void IndexedGetter(uint32_t, bool&, nsString&);
uint32_t Length();
void SetItem(uint32_t, const nsAString&);
};
class TestNamedSetterInterface : public nsISupports,
public nsWrapperCache
{
public:
NS_DECL_ISUPPORTS
// We need a GetParentObject to make binding codegen happy
virtual nsISupports* GetParentObject();
void NamedSetter(const nsAString&, TestIndexedSetterInterface&);
TestIndexedSetterInterface* NamedGetter(const nsAString&, bool&);
void GetSupportedNames(nsTArray<nsString>&);
};
class TestIndexedAndNamedSetterInterface : public nsISupports,
public nsWrapperCache
{
public:
NS_DECL_ISUPPORTS
// We need a GetParentObject to make binding codegen happy
virtual nsISupports* GetParentObject();
void IndexedSetter(uint32_t, TestIndexedSetterInterface&);
TestIndexedSetterInterface* IndexedGetter(uint32_t, bool&);
uint32_t Length();
void NamedSetter(const nsAString&, TestIndexedSetterInterface&);
TestIndexedSetterInterface* NamedGetter(const nsAString&, bool&);
void SetNamedItem(const nsAString&, TestIndexedSetterInterface&);
void GetSupportedNames(nsTArray<nsString>&);
};
class TestIndexedAndNamedGetterAndSetterInterface : public TestIndexedSetterInterface
{
public:
uint32_t IndexedGetter(uint32_t, bool&);
uint32_t Item(uint32_t);
void NamedGetter(const nsAString&, bool&, nsAString&);
void NamedItem(const nsAString&, nsAString&);
void IndexedSetter(uint32_t, int32_t&);
void IndexedSetter(uint32_t, const nsAString&) MOZ_DELETE;
void NamedSetter(const nsAString&, const nsAString&);
void Stringify(nsAString&);
uint32_t Length();
void GetSupportedNames(nsTArray<nsString>&);
};
class TestCppKeywordNamedMethodsInterface : public nsISupports,
public nsWrapperCache
{
public:
NS_DECL_ISUPPORTS
// We need a GetParentObject to make binding codegen happy
virtual nsISupports* GetParentObject();
bool Continue();
bool Delete();
int32_t Volatile();
};
class TestIndexedDeleterInterface : public nsISupports,
public nsWrapperCache
{
public:
NS_DECL_ISUPPORTS
// We need a GetParentObject to make binding codegen happy
virtual nsISupports* GetParentObject();
void IndexedDeleter(uint32_t, bool&);
void IndexedDeleter(uint32_t) MOZ_DELETE;
long IndexedGetter(uint32_t, bool&);
uint32_t Length();
void DelItem(uint32_t);
void DelItem(uint32_t, bool&) MOZ_DELETE;
};
class TestIndexedDeleterWithRetvalInterface : public nsISupports,
public nsWrapperCache
{
public:
NS_DECL_ISUPPORTS
// We need a GetParentObject to make binding codegen happy
virtual nsISupports* GetParentObject();
bool IndexedDeleter(uint32_t, bool&);
bool IndexedDeleter(uint32_t) MOZ_DELETE;
long IndexedGetter(uint32_t, bool&);
uint32_t Length();
bool DelItem(uint32_t);
bool DelItem(uint32_t, bool&) MOZ_DELETE;
};
class TestNamedDeleterInterface : public nsISupports,
public nsWrapperCache
{
public:
NS_DECL_ISUPPORTS
// We need a GetParentObject to make binding codegen happy
virtual nsISupports* GetParentObject();
void NamedDeleter(const nsAString&, bool&);
long NamedGetter(const nsAString&, bool&);
void GetSupportedNames(nsTArray<nsString>&);
};
class TestNamedDeleterWithRetvalInterface : public nsISupports,
public nsWrapperCache
{
public:
NS_DECL_ISUPPORTS
// We need a GetParentObject to make binding codegen happy
virtual nsISupports* GetParentObject();
bool NamedDeleter(const nsAString&, bool&);
bool NamedDeleter(const nsAString&) MOZ_DELETE;
long NamedGetter(const nsAString&, bool&);
bool DelNamedItem(const nsAString&);
bool DelNamedItem(const nsAString&, bool&) MOZ_DELETE;
void GetSupportedNames(nsTArray<nsString>&);
};
class TestIndexedAndNamedDeleterInterface : public nsISupports,
public nsWrapperCache
{
public:
NS_DECL_ISUPPORTS
// We need a GetParentObject to make binding codegen happy
virtual nsISupports* GetParentObject();
void IndexedDeleter(uint32_t, bool&);
long IndexedGetter(uint32_t, bool&);
uint32_t Length();
void NamedDeleter(const nsAString&, bool&);
void NamedDeleter(const nsAString&) MOZ_DELETE;
long NamedGetter(const nsAString&, bool&);
void DelNamedItem(const nsAString&);
void DelNamedItem(const nsAString&, bool&) MOZ_DELETE;
void GetSupportedNames(nsTArray<nsString>&);
};
class TestParentInterface : public nsISupports,
public nsWrapperCache
{
public:
NS_DECL_ISUPPORTS
// We need a GetParentObject to make binding codegen happy
virtual nsISupports* GetParentObject();
};
class TestChildInterface : public TestParentInterface
{
};
} // namespace dom
} // namespace mozilla
#endif /* TestBindingHeader_h */