This file is indexed.

/usr/include/firefox/nsIVariant.h is in firefox-dev 11.0+build1-0ubuntu4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
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
/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /build/buildd/firefox-11.0+build1/build-tree/mozilla/xpcom/ds/nsIVariant.idl
 */

#ifndef __gen_nsIVariant_h__
#define __gen_nsIVariant_h__


#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif

#include "jspubtd.h"

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif

/* starting interface:    nsIDataType */
#define NS_IDATATYPE_IID_STR "4d12e540-83d7-11d5-90ed-0010a4e73d9a"

#define NS_IDATATYPE_IID \
  {0x4d12e540, 0x83d7, 0x11d5, \
    { 0x90, 0xed, 0x00, 0x10, 0xa4, 0xe7, 0x3d, 0x9a }}

class NS_NO_VTABLE NS_SCRIPTABLE nsIDataType : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDATATYPE_IID)

  enum {
    VTYPE_INT8 = 0U,
    VTYPE_INT16 = 1U,
    VTYPE_INT32 = 2U,
    VTYPE_INT64 = 3U,
    VTYPE_UINT8 = 4U,
    VTYPE_UINT16 = 5U,
    VTYPE_UINT32 = 6U,
    VTYPE_UINT64 = 7U,
    VTYPE_FLOAT = 8U,
    VTYPE_DOUBLE = 9U,
    VTYPE_BOOL = 10U,
    VTYPE_CHAR = 11U,
    VTYPE_WCHAR = 12U,
    VTYPE_VOID = 13U,
    VTYPE_ID = 14U,
    VTYPE_DOMSTRING = 15U,
    VTYPE_CHAR_STR = 16U,
    VTYPE_WCHAR_STR = 17U,
    VTYPE_INTERFACE = 18U,
    VTYPE_INTERFACE_IS = 19U,
    VTYPE_ARRAY = 20U,
    VTYPE_STRING_SIZE_IS = 21U,
    VTYPE_WSTRING_SIZE_IS = 22U,
    VTYPE_UTF8STRING = 23U,
    VTYPE_CSTRING = 24U,
    VTYPE_ASTRING = 25U,
    VTYPE_EMPTY_ARRAY = 254U,
    VTYPE_EMPTY = 255U
  };

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIDataType, NS_IDATATYPE_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIDATATYPE \

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIDATATYPE(_to) \

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIDATATYPE(_to) \

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

/* Header file */
class nsDataType : public nsIDataType
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIDATATYPE

  nsDataType();

private:
  ~nsDataType();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsDataType, nsIDataType)

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

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

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


/* starting interface:    nsIVariant */
#define NS_IVARIANT_IID_STR "81e4c2de-acac-4ad6-901a-b5fb1b851a0d"

#define NS_IVARIANT_IID \
  {0x81e4c2de, 0xacac, 0x4ad6, \
    { 0x90, 0x1a, 0xb5, 0xfb, 0x1b, 0x85, 0x1a, 0x0d }}

class NS_NO_VTABLE NS_SCRIPTABLE nsIVariant : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IVARIANT_IID)

  /* [noscript] readonly attribute PRUint16 dataType; */
  NS_IMETHOD GetDataType(PRUint16 *aDataType) = 0;

  /* [noscript] PRUint8 getAsInt8 (); */
  NS_IMETHOD GetAsInt8(PRUint8 *_retval NS_OUTPARAM) = 0;

  /* [noscript] PRInt16 getAsInt16 (); */
  NS_IMETHOD GetAsInt16(PRInt16 *_retval NS_OUTPARAM) = 0;

  /* [noscript] PRInt32 getAsInt32 (); */
  NS_IMETHOD GetAsInt32(PRInt32 *_retval NS_OUTPARAM) = 0;

  /* [noscript] PRInt64 getAsInt64 (); */
  NS_IMETHOD GetAsInt64(PRInt64 *_retval NS_OUTPARAM) = 0;

  /* [noscript] PRUint8 getAsUint8 (); */
  NS_IMETHOD GetAsUint8(PRUint8 *_retval NS_OUTPARAM) = 0;

  /* [noscript] PRUint16 getAsUint16 (); */
  NS_IMETHOD GetAsUint16(PRUint16 *_retval NS_OUTPARAM) = 0;

  /* [noscript] PRUint32 getAsUint32 (); */
  NS_IMETHOD GetAsUint32(PRUint32 *_retval NS_OUTPARAM) = 0;

  /* [noscript] PRUint64 getAsUint64 (); */
  NS_IMETHOD GetAsUint64(PRUint64 *_retval NS_OUTPARAM) = 0;

  /* [noscript] float getAsFloat (); */
  NS_IMETHOD GetAsFloat(float *_retval NS_OUTPARAM) = 0;

  /* [noscript] double getAsDouble (); */
  NS_IMETHOD GetAsDouble(double *_retval NS_OUTPARAM) = 0;

  /* [noscript] boolean getAsBool (); */
  NS_IMETHOD GetAsBool(bool *_retval NS_OUTPARAM) = 0;

  /* [noscript] char getAsChar (); */
  NS_IMETHOD GetAsChar(char *_retval NS_OUTPARAM) = 0;

  /* [noscript] wchar getAsWChar (); */
  NS_IMETHOD GetAsWChar(PRUnichar *_retval NS_OUTPARAM) = 0;

  /* [notxpcom] nsresult getAsID (out nsID retval); */
  NS_IMETHOD_(nsresult) GetAsID(nsID *retval NS_OUTPARAM) = 0;

  /* [noscript] AString getAsAString (); */
  NS_IMETHOD GetAsAString(nsAString & _retval NS_OUTPARAM) = 0;

  /* [noscript] DOMString getAsDOMString (); */
  NS_IMETHOD GetAsDOMString(nsAString & _retval NS_OUTPARAM) = 0;

  /* [noscript] ACString getAsACString (); */
  NS_IMETHOD GetAsACString(nsACString & _retval NS_OUTPARAM) = 0;

  /* [noscript] AUTF8String getAsAUTF8String (); */
  NS_IMETHOD GetAsAUTF8String(nsACString & _retval NS_OUTPARAM) = 0;

  /* [noscript] string getAsString (); */
  NS_IMETHOD GetAsString(char * *_retval NS_OUTPARAM) = 0;

  /* [noscript] wstring getAsWString (); */
  NS_IMETHOD GetAsWString(PRUnichar * *_retval NS_OUTPARAM) = 0;

  /* [noscript] nsISupports getAsISupports (); */
  NS_IMETHOD GetAsISupports(nsISupports * *_retval NS_OUTPARAM) = 0;

  /* [noscript] jsval getAsJSVal (); */
  NS_IMETHOD GetAsJSVal(JS::Value *_retval NS_OUTPARAM) = 0;

  /* [noscript] void getAsInterface (out nsIIDPtr iid, [iid_is (iid), retval] out nsQIResult iface); */
  NS_IMETHOD GetAsInterface(nsIID **iid NS_OUTPARAM, void **iface NS_OUTPARAM) = 0;

  /* [notxpcom] nsresult getAsArray (out PRUint16 type, out nsIID iid, out PRUint32 count, out voidPtr ptr); */
  NS_IMETHOD_(nsresult) GetAsArray(PRUint16 *type NS_OUTPARAM, nsIID *iid NS_OUTPARAM, PRUint32 *count NS_OUTPARAM, void **ptr NS_OUTPARAM) = 0;

  /* [noscript] void getAsStringWithSize (out PRUint32 size, [size_is (size), retval] out string str); */
  NS_IMETHOD GetAsStringWithSize(PRUint32 *size NS_OUTPARAM, char * *str NS_OUTPARAM) = 0;

  /* [noscript] void getAsWStringWithSize (out PRUint32 size, [size_is (size), retval] out wstring str); */
  NS_IMETHOD GetAsWStringWithSize(PRUint32 *size NS_OUTPARAM, PRUnichar * *str NS_OUTPARAM) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIVariant, NS_IVARIANT_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIVARIANT \
  NS_IMETHOD GetDataType(PRUint16 *aDataType); \
  NS_IMETHOD GetAsInt8(PRUint8 *_retval NS_OUTPARAM); \
  NS_IMETHOD GetAsInt16(PRInt16 *_retval NS_OUTPARAM); \
  NS_IMETHOD GetAsInt32(PRInt32 *_retval NS_OUTPARAM); \
  NS_IMETHOD GetAsInt64(PRInt64 *_retval NS_OUTPARAM); \
  NS_IMETHOD GetAsUint8(PRUint8 *_retval NS_OUTPARAM); \
  NS_IMETHOD GetAsUint16(PRUint16 *_retval NS_OUTPARAM); \
  NS_IMETHOD GetAsUint32(PRUint32 *_retval NS_OUTPARAM); \
  NS_IMETHOD GetAsUint64(PRUint64 *_retval NS_OUTPARAM); \
  NS_IMETHOD GetAsFloat(float *_retval NS_OUTPARAM); \
  NS_IMETHOD GetAsDouble(double *_retval NS_OUTPARAM); \
  NS_IMETHOD GetAsBool(bool *_retval NS_OUTPARAM); \
  NS_IMETHOD GetAsChar(char *_retval NS_OUTPARAM); \
  NS_IMETHOD GetAsWChar(PRUnichar *_retval NS_OUTPARAM); \
  NS_IMETHOD_(nsresult) GetAsID(nsID *retval NS_OUTPARAM); \
  NS_IMETHOD GetAsAString(nsAString & _retval NS_OUTPARAM); \
  NS_IMETHOD GetAsDOMString(nsAString & _retval NS_OUTPARAM); \
  NS_IMETHOD GetAsACString(nsACString & _retval NS_OUTPARAM); \
  NS_IMETHOD GetAsAUTF8String(nsACString & _retval NS_OUTPARAM); \
  NS_IMETHOD GetAsString(char * *_retval NS_OUTPARAM); \
  NS_IMETHOD GetAsWString(PRUnichar * *_retval NS_OUTPARAM); \
  NS_IMETHOD GetAsISupports(nsISupports * *_retval NS_OUTPARAM); \
  NS_IMETHOD GetAsJSVal(JS::Value *_retval NS_OUTPARAM); \
  NS_IMETHOD GetAsInterface(nsIID **iid NS_OUTPARAM, void **iface NS_OUTPARAM); \
  NS_IMETHOD_(nsresult) GetAsArray(PRUint16 *type NS_OUTPARAM, nsIID *iid NS_OUTPARAM, PRUint32 *count NS_OUTPARAM, void **ptr NS_OUTPARAM); \
  NS_IMETHOD GetAsStringWithSize(PRUint32 *size NS_OUTPARAM, char * *str NS_OUTPARAM); \
  NS_IMETHOD GetAsWStringWithSize(PRUint32 *size NS_OUTPARAM, PRUnichar * *str NS_OUTPARAM); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIVARIANT(_to) \
  NS_IMETHOD GetDataType(PRUint16 *aDataType) { return _to GetDataType(aDataType); } \
  NS_IMETHOD GetAsInt8(PRUint8 *_retval NS_OUTPARAM) { return _to GetAsInt8(_retval); } \
  NS_IMETHOD GetAsInt16(PRInt16 *_retval NS_OUTPARAM) { return _to GetAsInt16(_retval); } \
  NS_IMETHOD GetAsInt32(PRInt32 *_retval NS_OUTPARAM) { return _to GetAsInt32(_retval); } \
  NS_IMETHOD GetAsInt64(PRInt64 *_retval NS_OUTPARAM) { return _to GetAsInt64(_retval); } \
  NS_IMETHOD GetAsUint8(PRUint8 *_retval NS_OUTPARAM) { return _to GetAsUint8(_retval); } \
  NS_IMETHOD GetAsUint16(PRUint16 *_retval NS_OUTPARAM) { return _to GetAsUint16(_retval); } \
  NS_IMETHOD GetAsUint32(PRUint32 *_retval NS_OUTPARAM) { return _to GetAsUint32(_retval); } \
  NS_IMETHOD GetAsUint64(PRUint64 *_retval NS_OUTPARAM) { return _to GetAsUint64(_retval); } \
  NS_IMETHOD GetAsFloat(float *_retval NS_OUTPARAM) { return _to GetAsFloat(_retval); } \
  NS_IMETHOD GetAsDouble(double *_retval NS_OUTPARAM) { return _to GetAsDouble(_retval); } \
  NS_IMETHOD GetAsBool(bool *_retval NS_OUTPARAM) { return _to GetAsBool(_retval); } \
  NS_IMETHOD GetAsChar(char *_retval NS_OUTPARAM) { return _to GetAsChar(_retval); } \
  NS_IMETHOD GetAsWChar(PRUnichar *_retval NS_OUTPARAM) { return _to GetAsWChar(_retval); } \
  NS_IMETHOD_(nsresult) GetAsID(nsID *retval NS_OUTPARAM) { return _to GetAsID(retval); } \
  NS_IMETHOD GetAsAString(nsAString & _retval NS_OUTPARAM) { return _to GetAsAString(_retval); } \
  NS_IMETHOD GetAsDOMString(nsAString & _retval NS_OUTPARAM) { return _to GetAsDOMString(_retval); } \
  NS_IMETHOD GetAsACString(nsACString & _retval NS_OUTPARAM) { return _to GetAsACString(_retval); } \
  NS_IMETHOD GetAsAUTF8String(nsACString & _retval NS_OUTPARAM) { return _to GetAsAUTF8String(_retval); } \
  NS_IMETHOD GetAsString(char * *_retval NS_OUTPARAM) { return _to GetAsString(_retval); } \
  NS_IMETHOD GetAsWString(PRUnichar * *_retval NS_OUTPARAM) { return _to GetAsWString(_retval); } \
  NS_IMETHOD GetAsISupports(nsISupports * *_retval NS_OUTPARAM) { return _to GetAsISupports(_retval); } \
  NS_IMETHOD GetAsJSVal(JS::Value *_retval NS_OUTPARAM) { return _to GetAsJSVal(_retval); } \
  NS_IMETHOD GetAsInterface(nsIID **iid NS_OUTPARAM, void **iface NS_OUTPARAM) { return _to GetAsInterface(iid, iface); } \
  NS_IMETHOD_(nsresult) GetAsArray(PRUint16 *type NS_OUTPARAM, nsIID *iid NS_OUTPARAM, PRUint32 *count NS_OUTPARAM, void **ptr NS_OUTPARAM) { return _to GetAsArray(type, iid, count, ptr); } \
  NS_IMETHOD GetAsStringWithSize(PRUint32 *size NS_OUTPARAM, char * *str NS_OUTPARAM) { return _to GetAsStringWithSize(size, str); } \
  NS_IMETHOD GetAsWStringWithSize(PRUint32 *size NS_OUTPARAM, PRUnichar * *str NS_OUTPARAM) { return _to GetAsWStringWithSize(size, str); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIVARIANT(_to) \
  NS_IMETHOD GetDataType(PRUint16 *aDataType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDataType(aDataType); } \
  NS_IMETHOD GetAsInt8(PRUint8 *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsInt8(_retval); } \
  NS_IMETHOD GetAsInt16(PRInt16 *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsInt16(_retval); } \
  NS_IMETHOD GetAsInt32(PRInt32 *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsInt32(_retval); } \
  NS_IMETHOD GetAsInt64(PRInt64 *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsInt64(_retval); } \
  NS_IMETHOD GetAsUint8(PRUint8 *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsUint8(_retval); } \
  NS_IMETHOD GetAsUint16(PRUint16 *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsUint16(_retval); } \
  NS_IMETHOD GetAsUint32(PRUint32 *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsUint32(_retval); } \
  NS_IMETHOD GetAsUint64(PRUint64 *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsUint64(_retval); } \
  NS_IMETHOD GetAsFloat(float *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsFloat(_retval); } \
  NS_IMETHOD GetAsDouble(double *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsDouble(_retval); } \
  NS_IMETHOD GetAsBool(bool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsBool(_retval); } \
  NS_IMETHOD GetAsChar(char *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsChar(_retval); } \
  NS_IMETHOD GetAsWChar(PRUnichar *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsWChar(_retval); } \
  NS_IMETHOD_(nsresult) GetAsID(nsID *retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsID(retval); } \
  NS_IMETHOD GetAsAString(nsAString & _retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsAString(_retval); } \
  NS_IMETHOD GetAsDOMString(nsAString & _retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsDOMString(_retval); } \
  NS_IMETHOD GetAsACString(nsACString & _retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsACString(_retval); } \
  NS_IMETHOD GetAsAUTF8String(nsACString & _retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsAUTF8String(_retval); } \
  NS_IMETHOD GetAsString(char * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsString(_retval); } \
  NS_IMETHOD GetAsWString(PRUnichar * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsWString(_retval); } \
  NS_IMETHOD GetAsISupports(nsISupports * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsISupports(_retval); } \
  NS_IMETHOD GetAsJSVal(JS::Value *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsJSVal(_retval); } \
  NS_IMETHOD GetAsInterface(nsIID **iid NS_OUTPARAM, void **iface NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsInterface(iid, iface); } \
  NS_IMETHOD_(nsresult) GetAsArray(PRUint16 *type NS_OUTPARAM, nsIID *iid NS_OUTPARAM, PRUint32 *count NS_OUTPARAM, void **ptr NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsArray(type, iid, count, ptr); } \
  NS_IMETHOD GetAsStringWithSize(PRUint32 *size NS_OUTPARAM, char * *str NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsStringWithSize(size, str); } \
  NS_IMETHOD GetAsWStringWithSize(PRUint32 *size NS_OUTPARAM, PRUnichar * *str NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAsWStringWithSize(size, str); } 

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

/* Header file */
class nsVariant : public nsIVariant
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIVARIANT

  nsVariant();

private:
  ~nsVariant();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsVariant, nsIVariant)

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

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

/* [noscript] readonly attribute PRUint16 dataType; */
NS_IMETHODIMP nsVariant::GetDataType(PRUint16 *aDataType)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] PRUint8 getAsInt8 (); */
NS_IMETHODIMP nsVariant::GetAsInt8(PRUint8 *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] PRInt16 getAsInt16 (); */
NS_IMETHODIMP nsVariant::GetAsInt16(PRInt16 *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] PRInt32 getAsInt32 (); */
NS_IMETHODIMP nsVariant::GetAsInt32(PRInt32 *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] PRInt64 getAsInt64 (); */
NS_IMETHODIMP nsVariant::GetAsInt64(PRInt64 *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] PRUint8 getAsUint8 (); */
NS_IMETHODIMP nsVariant::GetAsUint8(PRUint8 *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] PRUint16 getAsUint16 (); */
NS_IMETHODIMP nsVariant::GetAsUint16(PRUint16 *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] PRUint32 getAsUint32 (); */
NS_IMETHODIMP nsVariant::GetAsUint32(PRUint32 *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] PRUint64 getAsUint64 (); */
NS_IMETHODIMP nsVariant::GetAsUint64(PRUint64 *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] float getAsFloat (); */
NS_IMETHODIMP nsVariant::GetAsFloat(float *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] double getAsDouble (); */
NS_IMETHODIMP nsVariant::GetAsDouble(double *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] boolean getAsBool (); */
NS_IMETHODIMP nsVariant::GetAsBool(bool *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] char getAsChar (); */
NS_IMETHODIMP nsVariant::GetAsChar(char *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] wchar getAsWChar (); */
NS_IMETHODIMP nsVariant::GetAsWChar(PRUnichar *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [notxpcom] nsresult getAsID (out nsID retval); */
NS_IMETHODIMP_(nsresult) nsVariant::GetAsID(nsID *retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] AString getAsAString (); */
NS_IMETHODIMP nsVariant::GetAsAString(nsAString & _retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] DOMString getAsDOMString (); */
NS_IMETHODIMP nsVariant::GetAsDOMString(nsAString & _retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] ACString getAsACString (); */
NS_IMETHODIMP nsVariant::GetAsACString(nsACString & _retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] AUTF8String getAsAUTF8String (); */
NS_IMETHODIMP nsVariant::GetAsAUTF8String(nsACString & _retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] string getAsString (); */
NS_IMETHODIMP nsVariant::GetAsString(char * *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] wstring getAsWString (); */
NS_IMETHODIMP nsVariant::GetAsWString(PRUnichar * *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] nsISupports getAsISupports (); */
NS_IMETHODIMP nsVariant::GetAsISupports(nsISupports * *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] jsval getAsJSVal (); */
NS_IMETHODIMP nsVariant::GetAsJSVal(JS::Value *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void getAsInterface (out nsIIDPtr iid, [iid_is (iid), retval] out nsQIResult iface); */
NS_IMETHODIMP nsVariant::GetAsInterface(nsIID **iid NS_OUTPARAM, void **iface NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [notxpcom] nsresult getAsArray (out PRUint16 type, out nsIID iid, out PRUint32 count, out voidPtr ptr); */
NS_IMETHODIMP_(nsresult) nsVariant::GetAsArray(PRUint16 *type NS_OUTPARAM, nsIID *iid NS_OUTPARAM, PRUint32 *count NS_OUTPARAM, void **ptr NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void getAsStringWithSize (out PRUint32 size, [size_is (size), retval] out string str); */
NS_IMETHODIMP nsVariant::GetAsStringWithSize(PRUint32 *size NS_OUTPARAM, char * *str NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void getAsWStringWithSize (out PRUint32 size, [size_is (size), retval] out wstring str); */
NS_IMETHODIMP nsVariant::GetAsWStringWithSize(PRUint32 *size NS_OUTPARAM, PRUnichar * *str NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsIWritableVariant */
#define NS_IWRITABLEVARIANT_IID_STR "5586a590-8c82-11d5-90f3-0010a4e73d9a"

#define NS_IWRITABLEVARIANT_IID \
  {0x5586a590, 0x8c82, 0x11d5, \
    { 0x90, 0xf3, 0x00, 0x10, 0xa4, 0xe7, 0x3d, 0x9a }}

class NS_NO_VTABLE NS_SCRIPTABLE nsIWritableVariant : public nsIVariant {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IWRITABLEVARIANT_IID)

  /* attribute boolean writable; */
  NS_SCRIPTABLE NS_IMETHOD GetWritable(bool *aWritable) = 0;
  NS_SCRIPTABLE NS_IMETHOD SetWritable(bool aWritable) = 0;

  /* void setAsInt8 (in PRUint8 aValue); */
  NS_SCRIPTABLE NS_IMETHOD SetAsInt8(PRUint8 aValue) = 0;

  /* void setAsInt16 (in PRInt16 aValue); */
  NS_SCRIPTABLE NS_IMETHOD SetAsInt16(PRInt16 aValue) = 0;

  /* void setAsInt32 (in PRInt32 aValue); */
  NS_SCRIPTABLE NS_IMETHOD SetAsInt32(PRInt32 aValue) = 0;

  /* void setAsInt64 (in PRInt64 aValue); */
  NS_SCRIPTABLE NS_IMETHOD SetAsInt64(PRInt64 aValue) = 0;

  /* void setAsUint8 (in PRUint8 aValue); */
  NS_SCRIPTABLE NS_IMETHOD SetAsUint8(PRUint8 aValue) = 0;

  /* void setAsUint16 (in PRUint16 aValue); */
  NS_SCRIPTABLE NS_IMETHOD SetAsUint16(PRUint16 aValue) = 0;

  /* void setAsUint32 (in PRUint32 aValue); */
  NS_SCRIPTABLE NS_IMETHOD SetAsUint32(PRUint32 aValue) = 0;

  /* void setAsUint64 (in PRUint64 aValue); */
  NS_SCRIPTABLE NS_IMETHOD SetAsUint64(PRUint64 aValue) = 0;

  /* void setAsFloat (in float aValue); */
  NS_SCRIPTABLE NS_IMETHOD SetAsFloat(float aValue) = 0;

  /* void setAsDouble (in double aValue); */
  NS_SCRIPTABLE NS_IMETHOD SetAsDouble(double aValue) = 0;

  /* void setAsBool (in boolean aValue); */
  NS_SCRIPTABLE NS_IMETHOD SetAsBool(bool aValue) = 0;

  /* void setAsChar (in char aValue); */
  NS_SCRIPTABLE NS_IMETHOD SetAsChar(char aValue) = 0;

  /* void setAsWChar (in wchar aValue); */
  NS_SCRIPTABLE NS_IMETHOD SetAsWChar(PRUnichar aValue) = 0;

  /* void setAsID (in nsIDRef aValue); */
  NS_SCRIPTABLE NS_IMETHOD SetAsID(const nsID & aValue) = 0;

  /* void setAsAString (in AString aValue); */
  NS_SCRIPTABLE NS_IMETHOD SetAsAString(const nsAString & aValue) = 0;

  /* void setAsDOMString (in DOMString aValue); */
  NS_SCRIPTABLE NS_IMETHOD SetAsDOMString(const nsAString & aValue) = 0;

  /* void setAsACString (in ACString aValue); */
  NS_SCRIPTABLE NS_IMETHOD SetAsACString(const nsACString & aValue) = 0;

  /* void setAsAUTF8String (in AUTF8String aValue); */
  NS_SCRIPTABLE NS_IMETHOD SetAsAUTF8String(const nsACString & aValue) = 0;

  /* void setAsString (in string aValue); */
  NS_SCRIPTABLE NS_IMETHOD SetAsString(const char * aValue) = 0;

  /* void setAsWString (in wstring aValue); */
  NS_SCRIPTABLE NS_IMETHOD SetAsWString(const PRUnichar * aValue) = 0;

  /* void setAsISupports (in nsISupports aValue); */
  NS_SCRIPTABLE NS_IMETHOD SetAsISupports(nsISupports *aValue) = 0;

  /* void setAsInterface (in nsIIDRef iid, [iid_is (iid)] in nsQIResult iface); */
  NS_SCRIPTABLE NS_IMETHOD SetAsInterface(const nsIID & iid, void *iface) = 0;

  /* [noscript] void setAsArray (in PRUint16 type, in nsIIDPtr iid, in PRUint32 count, in voidPtr ptr); */
  NS_IMETHOD SetAsArray(PRUint16 type, const nsIID *iid, PRUint32 count, void *ptr) = 0;

  /* void setAsStringWithSize (in PRUint32 size, [size_is (size)] in string str); */
  NS_SCRIPTABLE NS_IMETHOD SetAsStringWithSize(PRUint32 size, const char * str) = 0;

  /* void setAsWStringWithSize (in PRUint32 size, [size_is (size)] in wstring str); */
  NS_SCRIPTABLE NS_IMETHOD SetAsWStringWithSize(PRUint32 size, const PRUnichar * str) = 0;

  /* void setAsVoid (); */
  NS_SCRIPTABLE NS_IMETHOD SetAsVoid(void) = 0;

  /* void setAsEmpty (); */
  NS_SCRIPTABLE NS_IMETHOD SetAsEmpty(void) = 0;

  /* void setAsEmptyArray (); */
  NS_SCRIPTABLE NS_IMETHOD SetAsEmptyArray(void) = 0;

  /* void setFromVariant (in nsIVariant aValue); */
  NS_SCRIPTABLE NS_IMETHOD SetFromVariant(nsIVariant *aValue) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIWritableVariant, NS_IWRITABLEVARIANT_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIWRITABLEVARIANT \
  NS_SCRIPTABLE NS_IMETHOD GetWritable(bool *aWritable); \
  NS_SCRIPTABLE NS_IMETHOD SetWritable(bool aWritable); \
  NS_SCRIPTABLE NS_IMETHOD SetAsInt8(PRUint8 aValue); \
  NS_SCRIPTABLE NS_IMETHOD SetAsInt16(PRInt16 aValue); \
  NS_SCRIPTABLE NS_IMETHOD SetAsInt32(PRInt32 aValue); \
  NS_SCRIPTABLE NS_IMETHOD SetAsInt64(PRInt64 aValue); \
  NS_SCRIPTABLE NS_IMETHOD SetAsUint8(PRUint8 aValue); \
  NS_SCRIPTABLE NS_IMETHOD SetAsUint16(PRUint16 aValue); \
  NS_SCRIPTABLE NS_IMETHOD SetAsUint32(PRUint32 aValue); \
  NS_SCRIPTABLE NS_IMETHOD SetAsUint64(PRUint64 aValue); \
  NS_SCRIPTABLE NS_IMETHOD SetAsFloat(float aValue); \
  NS_SCRIPTABLE NS_IMETHOD SetAsDouble(double aValue); \
  NS_SCRIPTABLE NS_IMETHOD SetAsBool(bool aValue); \
  NS_SCRIPTABLE NS_IMETHOD SetAsChar(char aValue); \
  NS_SCRIPTABLE NS_IMETHOD SetAsWChar(PRUnichar aValue); \
  NS_SCRIPTABLE NS_IMETHOD SetAsID(const nsID & aValue); \
  NS_SCRIPTABLE NS_IMETHOD SetAsAString(const nsAString & aValue); \
  NS_SCRIPTABLE NS_IMETHOD SetAsDOMString(const nsAString & aValue); \
  NS_SCRIPTABLE NS_IMETHOD SetAsACString(const nsACString & aValue); \
  NS_SCRIPTABLE NS_IMETHOD SetAsAUTF8String(const nsACString & aValue); \
  NS_SCRIPTABLE NS_IMETHOD SetAsString(const char * aValue); \
  NS_SCRIPTABLE NS_IMETHOD SetAsWString(const PRUnichar * aValue); \
  NS_SCRIPTABLE NS_IMETHOD SetAsISupports(nsISupports *aValue); \
  NS_SCRIPTABLE NS_IMETHOD SetAsInterface(const nsIID & iid, void *iface); \
  NS_IMETHOD SetAsArray(PRUint16 type, const nsIID *iid, PRUint32 count, void *ptr); \
  NS_SCRIPTABLE NS_IMETHOD SetAsStringWithSize(PRUint32 size, const char * str); \
  NS_SCRIPTABLE NS_IMETHOD SetAsWStringWithSize(PRUint32 size, const PRUnichar * str); \
  NS_SCRIPTABLE NS_IMETHOD SetAsVoid(void); \
  NS_SCRIPTABLE NS_IMETHOD SetAsEmpty(void); \
  NS_SCRIPTABLE NS_IMETHOD SetAsEmptyArray(void); \
  NS_SCRIPTABLE NS_IMETHOD SetFromVariant(nsIVariant *aValue); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIWRITABLEVARIANT(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetWritable(bool *aWritable) { return _to GetWritable(aWritable); } \
  NS_SCRIPTABLE NS_IMETHOD SetWritable(bool aWritable) { return _to SetWritable(aWritable); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsInt8(PRUint8 aValue) { return _to SetAsInt8(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsInt16(PRInt16 aValue) { return _to SetAsInt16(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsInt32(PRInt32 aValue) { return _to SetAsInt32(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsInt64(PRInt64 aValue) { return _to SetAsInt64(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsUint8(PRUint8 aValue) { return _to SetAsUint8(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsUint16(PRUint16 aValue) { return _to SetAsUint16(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsUint32(PRUint32 aValue) { return _to SetAsUint32(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsUint64(PRUint64 aValue) { return _to SetAsUint64(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsFloat(float aValue) { return _to SetAsFloat(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsDouble(double aValue) { return _to SetAsDouble(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsBool(bool aValue) { return _to SetAsBool(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsChar(char aValue) { return _to SetAsChar(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsWChar(PRUnichar aValue) { return _to SetAsWChar(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsID(const nsID & aValue) { return _to SetAsID(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsAString(const nsAString & aValue) { return _to SetAsAString(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsDOMString(const nsAString & aValue) { return _to SetAsDOMString(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsACString(const nsACString & aValue) { return _to SetAsACString(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsAUTF8String(const nsACString & aValue) { return _to SetAsAUTF8String(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsString(const char * aValue) { return _to SetAsString(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsWString(const PRUnichar * aValue) { return _to SetAsWString(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsISupports(nsISupports *aValue) { return _to SetAsISupports(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsInterface(const nsIID & iid, void *iface) { return _to SetAsInterface(iid, iface); } \
  NS_IMETHOD SetAsArray(PRUint16 type, const nsIID *iid, PRUint32 count, void *ptr) { return _to SetAsArray(type, iid, count, ptr); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsStringWithSize(PRUint32 size, const char * str) { return _to SetAsStringWithSize(size, str); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsWStringWithSize(PRUint32 size, const PRUnichar * str) { return _to SetAsWStringWithSize(size, str); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsVoid(void) { return _to SetAsVoid(); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsEmpty(void) { return _to SetAsEmpty(); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsEmptyArray(void) { return _to SetAsEmptyArray(); } \
  NS_SCRIPTABLE NS_IMETHOD SetFromVariant(nsIVariant *aValue) { return _to SetFromVariant(aValue); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIWRITABLEVARIANT(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetWritable(bool *aWritable) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWritable(aWritable); } \
  NS_SCRIPTABLE NS_IMETHOD SetWritable(bool aWritable) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWritable(aWritable); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsInt8(PRUint8 aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsInt8(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsInt16(PRInt16 aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsInt16(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsInt32(PRInt32 aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsInt32(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsInt64(PRInt64 aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsInt64(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsUint8(PRUint8 aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsUint8(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsUint16(PRUint16 aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsUint16(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsUint32(PRUint32 aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsUint32(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsUint64(PRUint64 aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsUint64(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsFloat(float aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsFloat(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsDouble(double aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsDouble(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsBool(bool aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsBool(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsChar(char aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsChar(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsWChar(PRUnichar aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsWChar(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsID(const nsID & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsID(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsAString(const nsAString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsAString(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsDOMString(const nsAString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsDOMString(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsACString(const nsACString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsACString(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsAUTF8String(const nsACString & aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsAUTF8String(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsString(const char * aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsString(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsWString(const PRUnichar * aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsWString(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsISupports(nsISupports *aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsISupports(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsInterface(const nsIID & iid, void *iface) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsInterface(iid, iface); } \
  NS_IMETHOD SetAsArray(PRUint16 type, const nsIID *iid, PRUint32 count, void *ptr) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsArray(type, iid, count, ptr); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsStringWithSize(PRUint32 size, const char * str) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsStringWithSize(size, str); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsWStringWithSize(PRUint32 size, const PRUnichar * str) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsWStringWithSize(size, str); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsVoid(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsVoid(); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsEmpty(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsEmpty(); } \
  NS_SCRIPTABLE NS_IMETHOD SetAsEmptyArray(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAsEmptyArray(); } \
  NS_SCRIPTABLE NS_IMETHOD SetFromVariant(nsIVariant *aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFromVariant(aValue); } 

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

/* Header file */
class nsWritableVariant : public nsIWritableVariant
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIWRITABLEVARIANT

  nsWritableVariant();

private:
  ~nsWritableVariant();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsWritableVariant, nsIWritableVariant)

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

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

/* attribute boolean writable; */
NS_IMETHODIMP nsWritableVariant::GetWritable(bool *aWritable)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsWritableVariant::SetWritable(bool aWritable)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAsInt8 (in PRUint8 aValue); */
NS_IMETHODIMP nsWritableVariant::SetAsInt8(PRUint8 aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAsInt16 (in PRInt16 aValue); */
NS_IMETHODIMP nsWritableVariant::SetAsInt16(PRInt16 aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAsInt32 (in PRInt32 aValue); */
NS_IMETHODIMP nsWritableVariant::SetAsInt32(PRInt32 aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAsInt64 (in PRInt64 aValue); */
NS_IMETHODIMP nsWritableVariant::SetAsInt64(PRInt64 aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAsUint8 (in PRUint8 aValue); */
NS_IMETHODIMP nsWritableVariant::SetAsUint8(PRUint8 aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAsUint16 (in PRUint16 aValue); */
NS_IMETHODIMP nsWritableVariant::SetAsUint16(PRUint16 aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAsUint32 (in PRUint32 aValue); */
NS_IMETHODIMP nsWritableVariant::SetAsUint32(PRUint32 aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAsUint64 (in PRUint64 aValue); */
NS_IMETHODIMP nsWritableVariant::SetAsUint64(PRUint64 aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAsFloat (in float aValue); */
NS_IMETHODIMP nsWritableVariant::SetAsFloat(float aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAsDouble (in double aValue); */
NS_IMETHODIMP nsWritableVariant::SetAsDouble(double aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAsBool (in boolean aValue); */
NS_IMETHODIMP nsWritableVariant::SetAsBool(bool aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAsChar (in char aValue); */
NS_IMETHODIMP nsWritableVariant::SetAsChar(char aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAsWChar (in wchar aValue); */
NS_IMETHODIMP nsWritableVariant::SetAsWChar(PRUnichar aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAsID (in nsIDRef aValue); */
NS_IMETHODIMP nsWritableVariant::SetAsID(const nsID & aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAsAString (in AString aValue); */
NS_IMETHODIMP nsWritableVariant::SetAsAString(const nsAString & aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAsDOMString (in DOMString aValue); */
NS_IMETHODIMP nsWritableVariant::SetAsDOMString(const nsAString & aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAsACString (in ACString aValue); */
NS_IMETHODIMP nsWritableVariant::SetAsACString(const nsACString & aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAsAUTF8String (in AUTF8String aValue); */
NS_IMETHODIMP nsWritableVariant::SetAsAUTF8String(const nsACString & aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAsString (in string aValue); */
NS_IMETHODIMP nsWritableVariant::SetAsString(const char * aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAsWString (in wstring aValue); */
NS_IMETHODIMP nsWritableVariant::SetAsWString(const PRUnichar * aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAsISupports (in nsISupports aValue); */
NS_IMETHODIMP nsWritableVariant::SetAsISupports(nsISupports *aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAsInterface (in nsIIDRef iid, [iid_is (iid)] in nsQIResult iface); */
NS_IMETHODIMP nsWritableVariant::SetAsInterface(const nsIID & iid, void *iface)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void setAsArray (in PRUint16 type, in nsIIDPtr iid, in PRUint32 count, in voidPtr ptr); */
NS_IMETHODIMP nsWritableVariant::SetAsArray(PRUint16 type, const nsIID *iid, PRUint32 count, void *ptr)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAsStringWithSize (in PRUint32 size, [size_is (size)] in string str); */
NS_IMETHODIMP nsWritableVariant::SetAsStringWithSize(PRUint32 size, const char * str)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAsWStringWithSize (in PRUint32 size, [size_is (size)] in wstring str); */
NS_IMETHODIMP nsWritableVariant::SetAsWStringWithSize(PRUint32 size, const PRUnichar * str)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAsVoid (); */
NS_IMETHODIMP nsWritableVariant::SetAsVoid()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAsEmpty (); */
NS_IMETHODIMP nsWritableVariant::SetAsEmpty()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setAsEmptyArray (); */
NS_IMETHODIMP nsWritableVariant::SetAsEmptyArray()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setFromVariant (in nsIVariant aValue); */
NS_IMETHODIMP nsWritableVariant::SetFromVariant(nsIVariant *aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

// The contractID for the generic implementation built in to xpcom.
#define NS_VARIANT_CONTRACTID "@mozilla.org/variant;1"

#endif /* __gen_nsIVariant_h__ */