-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathns_xulrunner_20.h
6006 lines (5101 loc) · 270 KB
/
ns_xulrunner_20.h
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
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM ns_xulrunner_20.idl
*/
#ifndef __gen_ns_xulrunner_20_h__
#define __gen_ns_xulrunner_20_h__
#ifndef __gen_ns_generic_h__
#include "ns_generic.h"
#endif
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIDOMDOMConfiguration; /* forward declaration */
/* starting interface: nsIDOM3Document */
#define NS_IDOM3DOCUMENT_IID_STR "c0568f22-b9d5-427a-9642-b6a797edc5cd"
#define NS_IDOM3DOCUMENT_IID \
{0xc0568f22, 0xb9d5, 0x427a, \
{ 0x96, 0x42, 0xb6, 0xa7, 0x97, 0xed, 0xc5, 0xcd }}
/**
* For more information on this interface, please see
* http://www.w3.org/TR/DOM-Level-3-Core/
*/
class NS_NO_VTABLE nsIDOM3Document : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOM3DOCUMENT_IID)
/* readonly attribute DOMString inputEncoding; */
NS_IMETHOD GetInputEncoding(nsAString & aInputEncoding) = 0;
/* readonly attribute DOMString xmlEncoding; */
NS_IMETHOD GetXmlEncoding(nsAString & aXmlEncoding) = 0;
/* attribute boolean xmlStandalone; */
NS_IMETHOD GetXmlStandalone(PRBool *aXmlStandalone) = 0;
NS_IMETHOD SetXmlStandalone(PRBool aXmlStandalone) = 0;
/* attribute DOMString xmlVersion; */
NS_IMETHOD GetXmlVersion(nsAString & aXmlVersion) = 0;
NS_IMETHOD SetXmlVersion(const nsAString & aXmlVersion) = 0;
/* attribute boolean strictErrorChecking; */
NS_IMETHOD GetStrictErrorChecking(PRBool *aStrictErrorChecking) = 0;
NS_IMETHOD SetStrictErrorChecking(PRBool aStrictErrorChecking) = 0;
/* attribute DOMString documentURI; */
NS_IMETHOD GetDocumentURI(nsAString & aDocumentURI) = 0;
NS_IMETHOD SetDocumentURI(const nsAString & aDocumentURI) = 0;
/* nsIDOMNode adoptNode (in nsIDOMNode source) raises (DOMException); */
NS_IMETHOD AdoptNode(nsIDOMNode *source, nsIDOMNode **_retval) = 0;
/* readonly attribute nsIDOMDOMConfiguration domConfig; */
NS_IMETHOD GetDomConfig(nsIDOMDOMConfiguration * *aDomConfig) = 0;
/* void normalizeDocument (); */
NS_IMETHOD NormalizeDocument(void) = 0;
/* nsIDOMNode renameNode (in nsIDOMNode node, in DOMString namespaceURI, in DOMString qualifiedName) raises (DOMException); */
NS_IMETHOD RenameNode(nsIDOMNode *node, const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMNode **_retval) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIDOM3DOCUMENT \
NS_IMETHOD GetInputEncoding(nsAString & aInputEncoding); \
NS_IMETHOD GetXmlEncoding(nsAString & aXmlEncoding); \
NS_IMETHOD GetXmlStandalone(PRBool *aXmlStandalone); \
NS_IMETHOD SetXmlStandalone(PRBool aXmlStandalone); \
NS_IMETHOD GetXmlVersion(nsAString & aXmlVersion); \
NS_IMETHOD SetXmlVersion(const nsAString & aXmlVersion); \
NS_IMETHOD GetStrictErrorChecking(PRBool *aStrictErrorChecking); \
NS_IMETHOD SetStrictErrorChecking(PRBool aStrictErrorChecking); \
NS_IMETHOD GetDocumentURI(nsAString & aDocumentURI); \
NS_IMETHOD SetDocumentURI(const nsAString & aDocumentURI); \
NS_IMETHOD AdoptNode(nsIDOMNode *source, nsIDOMNode **_retval); \
NS_IMETHOD GetDomConfig(nsIDOMDOMConfiguration * *aDomConfig); \
NS_IMETHOD NormalizeDocument(void); \
NS_IMETHOD RenameNode(nsIDOMNode *node, const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMNode **_retval);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIDOM3DOCUMENT(_to) \
NS_IMETHOD GetInputEncoding(nsAString & aInputEncoding) { return _to GetInputEncoding(aInputEncoding); } \
NS_IMETHOD GetXmlEncoding(nsAString & aXmlEncoding) { return _to GetXmlEncoding(aXmlEncoding); } \
NS_IMETHOD GetXmlStandalone(PRBool *aXmlStandalone) { return _to GetXmlStandalone(aXmlStandalone); } \
NS_IMETHOD SetXmlStandalone(PRBool aXmlStandalone) { return _to SetXmlStandalone(aXmlStandalone); } \
NS_IMETHOD GetXmlVersion(nsAString & aXmlVersion) { return _to GetXmlVersion(aXmlVersion); } \
NS_IMETHOD SetXmlVersion(const nsAString & aXmlVersion) { return _to SetXmlVersion(aXmlVersion); } \
NS_IMETHOD GetStrictErrorChecking(PRBool *aStrictErrorChecking) { return _to GetStrictErrorChecking(aStrictErrorChecking); } \
NS_IMETHOD SetStrictErrorChecking(PRBool aStrictErrorChecking) { return _to SetStrictErrorChecking(aStrictErrorChecking); } \
NS_IMETHOD GetDocumentURI(nsAString & aDocumentURI) { return _to GetDocumentURI(aDocumentURI); } \
NS_IMETHOD SetDocumentURI(const nsAString & aDocumentURI) { return _to SetDocumentURI(aDocumentURI); } \
NS_IMETHOD AdoptNode(nsIDOMNode *source, nsIDOMNode **_retval) { return _to AdoptNode(source, _retval); } \
NS_IMETHOD GetDomConfig(nsIDOMDOMConfiguration * *aDomConfig) { return _to GetDomConfig(aDomConfig); } \
NS_IMETHOD NormalizeDocument(void) { return _to NormalizeDocument(); } \
NS_IMETHOD RenameNode(nsIDOMNode *node, const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMNode **_retval) { return _to RenameNode(node, namespaceURI, qualifiedName, _retval); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIDOM3DOCUMENT(_to) \
NS_IMETHOD GetInputEncoding(nsAString & aInputEncoding) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInputEncoding(aInputEncoding); } \
NS_IMETHOD GetXmlEncoding(nsAString & aXmlEncoding) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetXmlEncoding(aXmlEncoding); } \
NS_IMETHOD GetXmlStandalone(PRBool *aXmlStandalone) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetXmlStandalone(aXmlStandalone); } \
NS_IMETHOD SetXmlStandalone(PRBool aXmlStandalone) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetXmlStandalone(aXmlStandalone); } \
NS_IMETHOD GetXmlVersion(nsAString & aXmlVersion) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetXmlVersion(aXmlVersion); } \
NS_IMETHOD SetXmlVersion(const nsAString & aXmlVersion) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetXmlVersion(aXmlVersion); } \
NS_IMETHOD GetStrictErrorChecking(PRBool *aStrictErrorChecking) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStrictErrorChecking(aStrictErrorChecking); } \
NS_IMETHOD SetStrictErrorChecking(PRBool aStrictErrorChecking) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetStrictErrorChecking(aStrictErrorChecking); } \
NS_IMETHOD GetDocumentURI(nsAString & aDocumentURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDocumentURI(aDocumentURI); } \
NS_IMETHOD SetDocumentURI(const nsAString & aDocumentURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDocumentURI(aDocumentURI); } \
NS_IMETHOD AdoptNode(nsIDOMNode *source, nsIDOMNode **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->AdoptNode(source, _retval); } \
NS_IMETHOD GetDomConfig(nsIDOMDOMConfiguration * *aDomConfig) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDomConfig(aDomConfig); } \
NS_IMETHOD NormalizeDocument(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->NormalizeDocument(); } \
NS_IMETHOD RenameNode(nsIDOMNode *node, const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMNode **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->RenameNode(node, namespaceURI, qualifiedName, _retval); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsDOM3Document : public nsIDOM3Document
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIDOM3DOCUMENT
nsDOM3Document();
private:
~nsDOM3Document();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS1(nsDOM3Document, nsIDOM3Document)
nsDOM3Document::nsDOM3Document()
{
/* member initializers and constructor code */
}
nsDOM3Document::~nsDOM3Document()
{
/* destructor code */
}
/* readonly attribute DOMString inputEncoding; */
NS_IMETHODIMP nsDOM3Document::GetInputEncoding(nsAString & aInputEncoding)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute DOMString xmlEncoding; */
NS_IMETHODIMP nsDOM3Document::GetXmlEncoding(nsAString & aXmlEncoding)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute boolean xmlStandalone; */
NS_IMETHODIMP nsDOM3Document::GetXmlStandalone(PRBool *aXmlStandalone)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsDOM3Document::SetXmlStandalone(PRBool aXmlStandalone)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute DOMString xmlVersion; */
NS_IMETHODIMP nsDOM3Document::GetXmlVersion(nsAString & aXmlVersion)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsDOM3Document::SetXmlVersion(const nsAString & aXmlVersion)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute boolean strictErrorChecking; */
NS_IMETHODIMP nsDOM3Document::GetStrictErrorChecking(PRBool *aStrictErrorChecking)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsDOM3Document::SetStrictErrorChecking(PRBool aStrictErrorChecking)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute DOMString documentURI; */
NS_IMETHODIMP nsDOM3Document::GetDocumentURI(nsAString & aDocumentURI)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsDOM3Document::SetDocumentURI(const nsAString & aDocumentURI)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIDOMNode adoptNode (in nsIDOMNode source) raises (DOMException); */
NS_IMETHODIMP nsDOM3Document::AdoptNode(nsIDOMNode *source, nsIDOMNode **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute nsIDOMDOMConfiguration domConfig; */
NS_IMETHODIMP nsDOM3Document::GetDomConfig(nsIDOMDOMConfiguration * *aDomConfig)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void normalizeDocument (); */
NS_IMETHODIMP nsDOM3Document::NormalizeDocument()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIDOMNode renameNode (in nsIDOMNode node, in DOMString namespaceURI, in DOMString qualifiedName) raises (DOMException); */
NS_IMETHODIMP nsDOM3Document::RenameNode(nsIDOMNode *node, const nsAString & namespaceURI, const nsAString & qualifiedName, nsIDOMNode **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
class nsIDOMEventTarget; /* forward declaration */
class nsIDOMOfflineResourceList; /* forward declaration */
class nsIDOMBlob; /* forward declaration */
/* starting interface: nsIDOMWindow2 */
#define NS_IDOMWINDOW2_IID_STR "efff0d88-3b94-4375-bdeb-676a847ecd7d"
#define NS_IDOMWINDOW2_IID \
{0xefff0d88, 0x3b94, 0x4375, \
{ 0xbd, 0xeb, 0x67, 0x6a, 0x84, 0x7e, 0xcd, 0x7d }}
class NS_NO_VTABLE nsIDOMWindow2 : public nsIDOMWindow {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMWINDOW2_IID)
/**
* Get the window root for this window. This is useful for hooking
* up event listeners to this window and every other window nested
* in the window root.
*/
/* [noscript] readonly attribute nsIDOMEventTarget windowRoot; */
NS_IMETHOD GetWindowRoot(nsIDOMEventTarget * *aWindowRoot) = 0;
/**
* Get the application cache object for this window.
*/
/* readonly attribute nsIDOMOfflineResourceList applicationCache; */
NS_IMETHOD GetApplicationCache(nsIDOMOfflineResourceList * *aApplicationCache) = 0;
/**
* Deprecated, but can't remove yet since we don't want to change interfaces.
*/
/* [noscript] DOMString createBlobURL (in nsIDOMBlob blob); */
NS_IMETHOD CreateBlobURL(nsIDOMBlob *blob, nsAString & _retval) = 0;
/* [noscript] void revokeBlobURL (in DOMString URL); */
NS_IMETHOD RevokeBlobURL(const nsAString & URL) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIDOMWINDOW2 \
NS_IMETHOD GetWindowRoot(nsIDOMEventTarget * *aWindowRoot); \
NS_IMETHOD GetApplicationCache(nsIDOMOfflineResourceList * *aApplicationCache); \
NS_IMETHOD CreateBlobURL(nsIDOMBlob *blob, nsAString & _retval); \
NS_IMETHOD RevokeBlobURL(const nsAString & URL);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIDOMWINDOW2(_to) \
NS_IMETHOD GetWindowRoot(nsIDOMEventTarget * *aWindowRoot) { return _to GetWindowRoot(aWindowRoot); } \
NS_IMETHOD GetApplicationCache(nsIDOMOfflineResourceList * *aApplicationCache) { return _to GetApplicationCache(aApplicationCache); } \
NS_IMETHOD CreateBlobURL(nsIDOMBlob *blob, nsAString & _retval) { return _to CreateBlobURL(blob, _retval); } \
NS_IMETHOD RevokeBlobURL(const nsAString & URL) { return _to RevokeBlobURL(URL); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIDOMWINDOW2(_to) \
NS_IMETHOD GetWindowRoot(nsIDOMEventTarget * *aWindowRoot) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWindowRoot(aWindowRoot); } \
NS_IMETHOD GetApplicationCache(nsIDOMOfflineResourceList * *aApplicationCache) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetApplicationCache(aApplicationCache); } \
NS_IMETHOD CreateBlobURL(nsIDOMBlob *blob, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateBlobURL(blob, _retval); } \
NS_IMETHOD RevokeBlobURL(const nsAString & URL) { return !_to ? NS_ERROR_NULL_POINTER : _to->RevokeBlobURL(URL); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsDOMWindow2 : public nsIDOMWindow2
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIDOMWINDOW2
nsDOMWindow2();
private:
~nsDOMWindow2();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS1(nsDOMWindow2, nsIDOMWindow2)
nsDOMWindow2::nsDOMWindow2()
{
/* member initializers and constructor code */
}
nsDOMWindow2::~nsDOMWindow2()
{
/* destructor code */
}
/* [noscript] readonly attribute nsIDOMEventTarget windowRoot; */
NS_IMETHODIMP nsDOMWindow2::GetWindowRoot(nsIDOMEventTarget * *aWindowRoot)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute nsIDOMOfflineResourceList applicationCache; */
NS_IMETHODIMP nsDOMWindow2::GetApplicationCache(nsIDOMOfflineResourceList * *aApplicationCache)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [noscript] DOMString createBlobURL (in nsIDOMBlob blob); */
NS_IMETHODIMP nsDOMWindow2::CreateBlobURL(nsIDOMBlob *blob, nsAString & _retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [noscript] void revokeBlobURL (in DOMString URL); */
NS_IMETHODIMP nsDOMWindow2::RevokeBlobURL(const nsAString & URL)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
class nsIURI; /* forward declaration */
class nsICancelable; /* forward declaration */
class nsIMIMEInfo; /* forward declaration */
class nsILocalFile; /* forward declaration */
/* starting interface: nsITransfer */
#define NS_ITRANSFER_IID_STR "3a982955-dc44-422e-8734-8462bf8d2121"
#define NS_ITRANSFER_IID \
{0x3a982955, 0xdc44, 0x422e, \
{ 0x87, 0x34, 0x84, 0x62, 0xbf, 0x8d, 0x21, 0x21 }}
class NS_NO_VTABLE nsITransfer : public nsIWebProgressListener2 {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ITRANSFER_IID)
/**
* Initializes the transfer with certain properties. This function must
* be called prior to accessing any properties on this interface.
*
* @param aSource The source URI of the transfer. Must not be null.
*
* @param aTarget The target URI of the transfer. Must not be null.
*
* @param aDisplayName The user-readable description of the transfer.
* Can be empty.
*
* @param aMIMEInfo The MIME info associated with the target,
* including MIME type and helper app when appropriate.
* This parameter is optional.
*
* @param startTime Time when the download started (ie, when the first
* response from the server was received)
* XXX presumably wbp and exthandler do this differently
*
* @param aTempFile The location of a temporary file; i.e. a file in which
* the received data will be stored, but which is not
* equal to the target file. (will be moved to the real
* target by the caller, when the download is finished)
* May be null.
*
* @param aCancelable An object that can be used to abort the download.
* Must not be null.
* Implementations are expected to hold a strong
* reference to this object until the download is
* finished, at which point they should release the
* reference.
*/
/* void init (in nsIURI aSource, in nsIURI aTarget, in AString aDisplayName, in nsIMIMEInfo aMIMEInfo, in PRTime startTime, in nsILocalFile aTempFile, in nsICancelable aCancelable); */
NS_IMETHOD Init(nsIURI *aSource, nsIURI *aTarget, const nsAString & aDisplayName, nsIMIMEInfo *aMIMEInfo, PRTime startTime, nsILocalFile *aTempFile, nsICancelable *aCancelable) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSITRANSFER \
NS_IMETHOD Init(nsIURI *aSource, nsIURI *aTarget, const nsAString & aDisplayName, nsIMIMEInfo *aMIMEInfo, PRTime startTime, nsILocalFile *aTempFile, nsICancelable *aCancelable);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSITRANSFER(_to) \
NS_IMETHOD Init(nsIURI *aSource, nsIURI *aTarget, const nsAString & aDisplayName, nsIMIMEInfo *aMIMEInfo, PRTime startTime, nsILocalFile *aTempFile, nsICancelable *aCancelable) { return _to Init(aSource, aTarget, aDisplayName, aMIMEInfo, startTime, aTempFile, aCancelable); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSITRANSFER(_to) \
NS_IMETHOD Init(nsIURI *aSource, nsIURI *aTarget, const nsAString & aDisplayName, nsIMIMEInfo *aMIMEInfo, PRTime startTime, nsILocalFile *aTempFile, nsICancelable *aCancelable) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(aSource, aTarget, aDisplayName, aMIMEInfo, startTime, aTempFile, aCancelable); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsTransfer : public nsITransfer
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSITRANSFER
nsTransfer();
private:
~nsTransfer();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS1(nsTransfer, nsITransfer)
nsTransfer::nsTransfer()
{
/* member initializers and constructor code */
}
nsTransfer::~nsTransfer()
{
/* destructor code */
}
/* void init (in nsIURI aSource, in nsIURI aTarget, in AString aDisplayName, in nsIMIMEInfo aMIMEInfo, in PRTime startTime, in nsILocalFile aTempFile, in nsICancelable aCancelable); */
NS_IMETHODIMP nsTransfer::Init(nsIURI *aSource, nsIURI *aTarget, const nsAString & aDisplayName, nsIMIMEInfo *aMIMEInfo, PRTime startTime, nsILocalFile *aTempFile, nsICancelable *aCancelable)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
class nsIURI; /* forward declaration */
class nsIFile; /* forward declaration */
class nsIUTF8StringEnumerator; /* forward declaration */
class nsIHandlerApp; /* forward declaration */
class nsIArray; /* forward declaration */
class nsIMutableArray; /* forward declaration */
class nsIInterfaceRequestor; /* forward declaration */
typedef PRInt32 nsHandlerInfoAction;
/* starting interface: nsIHandlerInfo */
#define NS_IHANDLERINFO_IID_STR "325e56a7-3762-4312-aec7-f1fcf84b4145"
#define NS_IHANDLERINFO_IID \
{0x325e56a7, 0x3762, 0x4312, \
{ 0xae, 0xc7, 0xf1, 0xfc, 0xf8, 0x4b, 0x41, 0x45 }}
/**
* nsIHandlerInfo gives access to the information about how a given protocol
* scheme or MIME-type is handled.
*/
class NS_NO_VTABLE nsIHandlerInfo : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IHANDLERINFO_IID)
/**
* The type of this handler info. For MIME handlers, this is the MIME type.
* For protocol handlers, it's the scheme.
*
* @return String representing the type.
*/
/* readonly attribute ACString type; */
NS_IMETHOD GetType(nsACString & aType) = 0;
/**
* A human readable description of the handler type
*/
/* attribute AString description; */
NS_IMETHOD GetDescription(nsAString & aDescription) = 0;
NS_IMETHOD SetDescription(const nsAString & aDescription) = 0;
/**
* The application the user has said they want associated with this content
* type. This is not always guaranteed to be set!!
*/
/* attribute nsIHandlerApp preferredApplicationHandler; */
NS_IMETHOD GetPreferredApplicationHandler(nsIHandlerApp * *aPreferredApplicationHandler) = 0;
NS_IMETHOD SetPreferredApplicationHandler(nsIHandlerApp * aPreferredApplicationHandler) = 0;
/**
* Applications that can handle this content type.
*
* The list will include the preferred handler, if any. Elements of this
* array are nsIHandlerApp objects, and this attribute will always reference
* an array, whether or not there are any possible handlers. If there are
* no possible handlers, the array will contain no elements, so just check
* its length (nsIArray::length) to see if there are any possible handlers.
*/
/* readonly attribute nsIMutableArray possibleApplicationHandlers; */
NS_IMETHOD GetPossibleApplicationHandlers(nsIMutableArray * *aPossibleApplicationHandlers) = 0;
/**
* Indicates whether a default application handler exists,
* i.e. whether launchWithFile with action = useSystemDefault is possible
* and defaultDescription will contain usable information.
*/
/* readonly attribute boolean hasDefaultHandler; */
NS_IMETHOD GetHasDefaultHandler(PRBool *aHasDefaultHandler) = 0;
/**
* A pretty name description of the associated default application. Only
* usable if hasDefaultHandler is true.
*/
/* readonly attribute AString defaultDescription; */
NS_IMETHOD GetDefaultDescription(nsAString & aDefaultDescription) = 0;
/**
* Launches the application with the specified URI, in a way that
* depends on the value of preferredAction. preferredAction must be
* useHelperApp or useSystemDefault.
*
* @note Only the URI scheme is used to determine how to launch. This is
* essentially a pass-by-value operation. This means that in the case of
* a file: URI, the handler that is registered for file: will be launched
* and our code will not make any decision based on the content-type or
* extension, though the invoked file: handler is free to do so.
*
* @param aURI
* The URI to launch this application with
*
* @param aWindowContext
* The window to parent the dialog against, and, if a web handler
* is chosen, it is loaded in this window as well. See
* nsIHandlerApp.launchWithURI for more details.
*
* @throw NS_ERROR_INVALID_ARG if preferredAction is not valid for this
* call. Other exceptions may be thrown.
*/
/* void launchWithURI (in nsIURI aURI, [optional] in nsIInterfaceRequestor aWindowContext); */
NS_IMETHOD LaunchWithURI(nsIURI *aURI, nsIInterfaceRequestor *aWindowContext) = 0;
/**
* preferredAction is how the user specified they would like to handle
* this content type: save to disk, use specified helper app, use OS
* default handler or handle using navigator; possible value constants
* listed below
*/
/* attribute nsHandlerInfoAction preferredAction; */
NS_IMETHOD GetPreferredAction(nsHandlerInfoAction *aPreferredAction) = 0;
NS_IMETHOD SetPreferredAction(nsHandlerInfoAction aPreferredAction) = 0;
enum { saveToDisk = 0 };
/**
* Used to indicate that we know nothing about what to do with this. You
* could consider this to be not initialized.
*/
enum { alwaysAsk = 1 };
enum { useHelperApp = 2 };
enum { handleInternally = 3 };
enum { useSystemDefault = 4 };
/**
* alwaysAskBeforeHandling: if true, we should always give the user a
* dialog asking how to dispose of this content.
*/
/* attribute boolean alwaysAskBeforeHandling; */
NS_IMETHOD GetAlwaysAskBeforeHandling(PRBool *aAlwaysAskBeforeHandling) = 0;
NS_IMETHOD SetAlwaysAskBeforeHandling(PRBool aAlwaysAskBeforeHandling) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIHANDLERINFO \
NS_IMETHOD GetType(nsACString & aType); \
NS_IMETHOD GetDescription(nsAString & aDescription); \
NS_IMETHOD SetDescription(const nsAString & aDescription); \
NS_IMETHOD GetPreferredApplicationHandler(nsIHandlerApp * *aPreferredApplicationHandler); \
NS_IMETHOD SetPreferredApplicationHandler(nsIHandlerApp * aPreferredApplicationHandler); \
NS_IMETHOD GetPossibleApplicationHandlers(nsIMutableArray * *aPossibleApplicationHandlers); \
NS_IMETHOD GetHasDefaultHandler(PRBool *aHasDefaultHandler); \
NS_IMETHOD GetDefaultDescription(nsAString & aDefaultDescription); \
NS_IMETHOD LaunchWithURI(nsIURI *aURI, nsIInterfaceRequestor *aWindowContext); \
NS_IMETHOD GetPreferredAction(nsHandlerInfoAction *aPreferredAction); \
NS_IMETHOD SetPreferredAction(nsHandlerInfoAction aPreferredAction); \
NS_IMETHOD GetAlwaysAskBeforeHandling(PRBool *aAlwaysAskBeforeHandling); \
NS_IMETHOD SetAlwaysAskBeforeHandling(PRBool aAlwaysAskBeforeHandling);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIHANDLERINFO(_to) \
NS_IMETHOD GetType(nsACString & aType) { return _to GetType(aType); } \
NS_IMETHOD GetDescription(nsAString & aDescription) { return _to GetDescription(aDescription); } \
NS_IMETHOD SetDescription(const nsAString & aDescription) { return _to SetDescription(aDescription); } \
NS_IMETHOD GetPreferredApplicationHandler(nsIHandlerApp * *aPreferredApplicationHandler) { return _to GetPreferredApplicationHandler(aPreferredApplicationHandler); } \
NS_IMETHOD SetPreferredApplicationHandler(nsIHandlerApp * aPreferredApplicationHandler) { return _to SetPreferredApplicationHandler(aPreferredApplicationHandler); } \
NS_IMETHOD GetPossibleApplicationHandlers(nsIMutableArray * *aPossibleApplicationHandlers) { return _to GetPossibleApplicationHandlers(aPossibleApplicationHandlers); } \
NS_IMETHOD GetHasDefaultHandler(PRBool *aHasDefaultHandler) { return _to GetHasDefaultHandler(aHasDefaultHandler); } \
NS_IMETHOD GetDefaultDescription(nsAString & aDefaultDescription) { return _to GetDefaultDescription(aDefaultDescription); } \
NS_IMETHOD LaunchWithURI(nsIURI *aURI, nsIInterfaceRequestor *aWindowContext) { return _to LaunchWithURI(aURI, aWindowContext); } \
NS_IMETHOD GetPreferredAction(nsHandlerInfoAction *aPreferredAction) { return _to GetPreferredAction(aPreferredAction); } \
NS_IMETHOD SetPreferredAction(nsHandlerInfoAction aPreferredAction) { return _to SetPreferredAction(aPreferredAction); } \
NS_IMETHOD GetAlwaysAskBeforeHandling(PRBool *aAlwaysAskBeforeHandling) { return _to GetAlwaysAskBeforeHandling(aAlwaysAskBeforeHandling); } \
NS_IMETHOD SetAlwaysAskBeforeHandling(PRBool aAlwaysAskBeforeHandling) { return _to SetAlwaysAskBeforeHandling(aAlwaysAskBeforeHandling); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIHANDLERINFO(_to) \
NS_IMETHOD GetType(nsACString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \
NS_IMETHOD GetDescription(nsAString & aDescription) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDescription(aDescription); } \
NS_IMETHOD SetDescription(const nsAString & aDescription) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDescription(aDescription); } \
NS_IMETHOD GetPreferredApplicationHandler(nsIHandlerApp * *aPreferredApplicationHandler) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPreferredApplicationHandler(aPreferredApplicationHandler); } \
NS_IMETHOD SetPreferredApplicationHandler(nsIHandlerApp * aPreferredApplicationHandler) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPreferredApplicationHandler(aPreferredApplicationHandler); } \
NS_IMETHOD GetPossibleApplicationHandlers(nsIMutableArray * *aPossibleApplicationHandlers) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPossibleApplicationHandlers(aPossibleApplicationHandlers); } \
NS_IMETHOD GetHasDefaultHandler(PRBool *aHasDefaultHandler) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHasDefaultHandler(aHasDefaultHandler); } \
NS_IMETHOD GetDefaultDescription(nsAString & aDefaultDescription) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultDescription(aDefaultDescription); } \
NS_IMETHOD LaunchWithURI(nsIURI *aURI, nsIInterfaceRequestor *aWindowContext) { return !_to ? NS_ERROR_NULL_POINTER : _to->LaunchWithURI(aURI, aWindowContext); } \
NS_IMETHOD GetPreferredAction(nsHandlerInfoAction *aPreferredAction) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPreferredAction(aPreferredAction); } \
NS_IMETHOD SetPreferredAction(nsHandlerInfoAction aPreferredAction) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPreferredAction(aPreferredAction); } \
NS_IMETHOD GetAlwaysAskBeforeHandling(PRBool *aAlwaysAskBeforeHandling) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlwaysAskBeforeHandling(aAlwaysAskBeforeHandling); } \
NS_IMETHOD SetAlwaysAskBeforeHandling(PRBool aAlwaysAskBeforeHandling) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAlwaysAskBeforeHandling(aAlwaysAskBeforeHandling); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsHandlerInfo : public nsIHandlerInfo
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIHANDLERINFO
nsHandlerInfo();
private:
~nsHandlerInfo();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS1(nsHandlerInfo, nsIHandlerInfo)
nsHandlerInfo::nsHandlerInfo()
{
/* member initializers and constructor code */
}
nsHandlerInfo::~nsHandlerInfo()
{
/* destructor code */
}
/* readonly attribute ACString type; */
NS_IMETHODIMP nsHandlerInfo::GetType(nsACString & aType)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute AString description; */
NS_IMETHODIMP nsHandlerInfo::GetDescription(nsAString & aDescription)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsHandlerInfo::SetDescription(const nsAString & aDescription)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute nsIHandlerApp preferredApplicationHandler; */
NS_IMETHODIMP nsHandlerInfo::GetPreferredApplicationHandler(nsIHandlerApp * *aPreferredApplicationHandler)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsHandlerInfo::SetPreferredApplicationHandler(nsIHandlerApp * aPreferredApplicationHandler)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute nsIMutableArray possibleApplicationHandlers; */
NS_IMETHODIMP nsHandlerInfo::GetPossibleApplicationHandlers(nsIMutableArray * *aPossibleApplicationHandlers)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute boolean hasDefaultHandler; */
NS_IMETHODIMP nsHandlerInfo::GetHasDefaultHandler(PRBool *aHasDefaultHandler)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute AString defaultDescription; */
NS_IMETHODIMP nsHandlerInfo::GetDefaultDescription(nsAString & aDefaultDescription)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void launchWithURI (in nsIURI aURI, [optional] in nsIInterfaceRequestor aWindowContext); */
NS_IMETHODIMP nsHandlerInfo::LaunchWithURI(nsIURI *aURI, nsIInterfaceRequestor *aWindowContext)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute nsHandlerInfoAction preferredAction; */
NS_IMETHODIMP nsHandlerInfo::GetPreferredAction(nsHandlerInfoAction *aPreferredAction)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsHandlerInfo::SetPreferredAction(nsHandlerInfoAction aPreferredAction)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute boolean alwaysAskBeforeHandling; */
NS_IMETHODIMP nsHandlerInfo::GetAlwaysAskBeforeHandling(PRBool *aAlwaysAskBeforeHandling)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsHandlerInfo::SetAlwaysAskBeforeHandling(PRBool aAlwaysAskBeforeHandling)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
/* starting interface: nsIMIMEInfo */
#define NS_IMIMEINFO_IID_STR "1c21acef-c7a1-40c6-9d40-a20480ee53a1"
#define NS_IMIMEINFO_IID \
{0x1c21acef, 0xc7a1, 0x40c6, \
{ 0x9d, 0x40, 0xa2, 0x04, 0x80, 0xee, 0x53, 0xa1 }}
class NS_NO_VTABLE nsIMIMEInfo : public nsIHandlerInfo {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IMIMEINFO_IID)
/**
* nsIMIMEInfo extends nsIHandlerInfo with a bunch of information specific to
* MIME content-types. There is a one-to-many relationship between MIME types
* and file extensions. This means that a MIMEInfo object may have multiple
* file extensions associated with it. However, the reverse is not true.
*
* MIMEInfo objects are generally retrieved from the MIME Service
* @see nsIMIMEService
*/
/**
* Gives you an array of file types associated with this type.
*
* @return Number of elements in the array.
* @return Array of extensions.
*/
/* nsIUTF8StringEnumerator getFileExtensions (); */
NS_IMETHOD GetFileExtensions(nsIUTF8StringEnumerator **_retval) = 0;
/**
* Set File Extensions. Input is a comma delimited list of extensions.
*/
/* void setFileExtensions (in AUTF8String aExtensions); */
NS_IMETHOD SetFileExtensions(const nsACString & aExtensions) = 0;
/**
* Returns whether or not the given extension is
* associated with this MIME info.
*
* @return TRUE if the association exists.
*/
/* boolean extensionExists (in AUTF8String aExtension); */
NS_IMETHOD ExtensionExists(const nsACString & aExtension, PRBool *_retval) = 0;
/**
* Append a given extension to the set of extensions
*/
/* void appendExtension (in AUTF8String aExtension); */
NS_IMETHOD AppendExtension(const nsACString & aExtension) = 0;
/**
* Returns the first extension association in
* the internal set of extensions.
*
* @return The first extension.
*/
/* attribute AUTF8String primaryExtension; */
NS_IMETHOD GetPrimaryExtension(nsACString & aPrimaryExtension) = 0;
NS_IMETHOD SetPrimaryExtension(const nsACString & aPrimaryExtension) = 0;
/**
* The MIME type of this MIMEInfo.
*
* @return String representing the MIME type.
*
* @deprecated use nsIHandlerInfo::type instead.
*/
/* readonly attribute ACString MIMEType; */
NS_IMETHOD GetMIMEType(nsACString & aMIMEType) = 0;
/**
* Returns whether or not these two nsIMIMEInfos are logically
* equivalent.
*
* @returns PR_TRUE if the two are considered equal
*/
/* boolean equals (in nsIMIMEInfo aMIMEInfo); */
NS_IMETHOD Equals(nsIMIMEInfo *aMIMEInfo, PRBool *_retval) = 0;
/**
* Returns a list of nsILocalHandlerApp objects containing
* handlers associated with this mimeinfo. Implemented per
* platform using information in this object to generate the
* best list. Typically used for an "open with" style user
* option.
*
* @return nsIArray of nsILocalHandlerApp
*/
/* readonly attribute nsIArray possibleLocalHandlers; */
NS_IMETHOD GetPossibleLocalHandlers(nsIArray * *aPossibleLocalHandlers) = 0;
/**
* Launches the application with the specified file, in a way that
* depends on the value of preferredAction. preferredAction must be
* useHelperApp or useSystemDefault.
*
* @param aFile The file to launch this application with.
*
* @throw NS_ERROR_INVALID_ARG if action is not valid for this function.
* Other exceptions may be thrown.
*/
/* void launchWithFile (in nsIFile aFile); */
NS_IMETHOD LaunchWithFile(nsIFile *aFile) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIMIMEINFO \
NS_IMETHOD GetFileExtensions(nsIUTF8StringEnumerator **_retval); \
NS_IMETHOD SetFileExtensions(const nsACString & aExtensions); \
NS_IMETHOD ExtensionExists(const nsACString & aExtension, PRBool *_retval); \
NS_IMETHOD AppendExtension(const nsACString & aExtension); \
NS_IMETHOD GetPrimaryExtension(nsACString & aPrimaryExtension); \
NS_IMETHOD SetPrimaryExtension(const nsACString & aPrimaryExtension); \
NS_IMETHOD GetMIMEType(nsACString & aMIMEType); \
NS_IMETHOD Equals(nsIMIMEInfo *aMIMEInfo, PRBool *_retval); \
NS_IMETHOD GetPossibleLocalHandlers(nsIArray * *aPossibleLocalHandlers); \
NS_IMETHOD LaunchWithFile(nsIFile *aFile);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIMIMEINFO(_to) \
NS_IMETHOD GetFileExtensions(nsIUTF8StringEnumerator **_retval) { return _to GetFileExtensions(_retval); } \
NS_IMETHOD SetFileExtensions(const nsACString & aExtensions) { return _to SetFileExtensions(aExtensions); } \
NS_IMETHOD ExtensionExists(const nsACString & aExtension, PRBool *_retval) { return _to ExtensionExists(aExtension, _retval); } \
NS_IMETHOD AppendExtension(const nsACString & aExtension) { return _to AppendExtension(aExtension); } \
NS_IMETHOD GetPrimaryExtension(nsACString & aPrimaryExtension) { return _to GetPrimaryExtension(aPrimaryExtension); } \
NS_IMETHOD SetPrimaryExtension(const nsACString & aPrimaryExtension) { return _to SetPrimaryExtension(aPrimaryExtension); } \
NS_IMETHOD GetMIMEType(nsACString & aMIMEType) { return _to GetMIMEType(aMIMEType); } \
NS_IMETHOD Equals(nsIMIMEInfo *aMIMEInfo, PRBool *_retval) { return _to Equals(aMIMEInfo, _retval); } \
NS_IMETHOD GetPossibleLocalHandlers(nsIArray * *aPossibleLocalHandlers) { return _to GetPossibleLocalHandlers(aPossibleLocalHandlers); } \
NS_IMETHOD LaunchWithFile(nsIFile *aFile) { return _to LaunchWithFile(aFile); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIMIMEINFO(_to) \
NS_IMETHOD GetFileExtensions(nsIUTF8StringEnumerator **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFileExtensions(_retval); } \
NS_IMETHOD SetFileExtensions(const nsACString & aExtensions) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFileExtensions(aExtensions); } \
NS_IMETHOD ExtensionExists(const nsACString & aExtension, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ExtensionExists(aExtension, _retval); } \
NS_IMETHOD AppendExtension(const nsACString & aExtension) { return !_to ? NS_ERROR_NULL_POINTER : _to->AppendExtension(aExtension); } \
NS_IMETHOD GetPrimaryExtension(nsACString & aPrimaryExtension) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPrimaryExtension(aPrimaryExtension); } \
NS_IMETHOD SetPrimaryExtension(const nsACString & aPrimaryExtension) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPrimaryExtension(aPrimaryExtension); } \
NS_IMETHOD GetMIMEType(nsACString & aMIMEType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMIMEType(aMIMEType); } \
NS_IMETHOD Equals(nsIMIMEInfo *aMIMEInfo, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Equals(aMIMEInfo, _retval); } \
NS_IMETHOD GetPossibleLocalHandlers(nsIArray * *aPossibleLocalHandlers) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPossibleLocalHandlers(aPossibleLocalHandlers); } \
NS_IMETHOD LaunchWithFile(nsIFile *aFile) { return !_to ? NS_ERROR_NULL_POINTER : _to->LaunchWithFile(aFile); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsMIMEInfo : public nsIMIMEInfo
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIMIMEINFO
nsMIMEInfo();
private:
~nsMIMEInfo();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS1(nsMIMEInfo, nsIMIMEInfo)
nsMIMEInfo::nsMIMEInfo()
{
/* member initializers and constructor code */
}
nsMIMEInfo::~nsMIMEInfo()
{
/* destructor code */
}
/* nsIUTF8StringEnumerator getFileExtensions (); */
NS_IMETHODIMP nsMIMEInfo::GetFileExtensions(nsIUTF8StringEnumerator **_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void setFileExtensions (in AUTF8String aExtensions); */
NS_IMETHODIMP nsMIMEInfo::SetFileExtensions(const nsACString & aExtensions)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* boolean extensionExists (in AUTF8String aExtension); */
NS_IMETHODIMP nsMIMEInfo::ExtensionExists(const nsACString & aExtension, PRBool *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void appendExtension (in AUTF8String aExtension); */
NS_IMETHODIMP nsMIMEInfo::AppendExtension(const nsACString & aExtension)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute AUTF8String primaryExtension; */
NS_IMETHODIMP nsMIMEInfo::GetPrimaryExtension(nsACString & aPrimaryExtension)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsMIMEInfo::SetPrimaryExtension(const nsACString & aPrimaryExtension)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute ACString MIMEType; */
NS_IMETHODIMP nsMIMEInfo::GetMIMEType(nsACString & aMIMEType)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* boolean equals (in nsIMIMEInfo aMIMEInfo); */
NS_IMETHODIMP nsMIMEInfo::Equals(nsIMIMEInfo *aMIMEInfo, PRBool *_retval)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute nsIArray possibleLocalHandlers; */
NS_IMETHODIMP nsMIMEInfo::GetPossibleLocalHandlers(nsIArray * *aPossibleLocalHandlers)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void launchWithFile (in nsIFile aFile); */
NS_IMETHODIMP nsMIMEInfo::LaunchWithFile(nsIFile *aFile)
{
return NS_ERROR_NOT_IMPLEMENTED;
}