-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnsISIP.h
1059 lines (851 loc) · 40.4 KB
/
nsISIP.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 nsISIP.idl
*/
#ifndef __gen_nsISIP_h__
#define __gen_nsISIP_h__
#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif
#ifndef __gen_nsIExtensionManager_h__
#include "nsIExtensionManager.h"
#endif
#ifndef __gen_nsIFile_h__
#include "nsIFile.h"
#endif
#ifndef __gen_nsIRunnable_h__
#include "nsIRunnable.h"
#endif
#ifndef __gen_nsIArray_h__
#include "nsIArray.h"
#endif
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
/* starting interface: nsSipStateObserver */
#define NS_SIPSTATEOBSERVER_IID_STR "3869ed55-e06a-4ac1-84ea-4c3a4b696924"
#define NS_SIPSTATEOBSERVER_IID \
{0x3869ed55, 0xe06a, 0x4ac1, \
{ 0x84, 0xea, 0x4c, 0x3a, 0x4b, 0x69, 0x69, 0x24 }}
class NS_NO_VTABLE NS_SCRIPTABLE nsSipStateObserver : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_SIPSTATEOBSERVER_IID)
/* void onStatusChange (in string status, in string data); */
NS_SCRIPTABLE NS_IMETHOD OnStatusChange(const char *status, const char *data) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsSipStateObserver, NS_SIPSTATEOBSERVER_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSSIPSTATEOBSERVER \
NS_SCRIPTABLE NS_IMETHOD OnStatusChange(const char *status, const char *data);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSSIPSTATEOBSERVER(_to) \
NS_SCRIPTABLE NS_IMETHOD OnStatusChange(const char *status, const char *data) { return _to OnStatusChange(status, data); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSSIPSTATEOBSERVER(_to) \
NS_SCRIPTABLE NS_IMETHOD OnStatusChange(const char *status, const char *data) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStatusChange(status, data); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class _MYCLASS_ : public nsSipStateObserver
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSSIPSTATEOBSERVER
_MYCLASS_();
private:
~_MYCLASS_();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS1(_MYCLASS_, nsSipStateObserver)
_MYCLASS_::_MYCLASS_()
{
/* member initializers and constructor code */
}
_MYCLASS_::~_MYCLASS_()
{
/* destructor code */
}
/* void onStatusChange (in string status, in string data); */
NS_IMETHODIMP _MYCLASS_::OnStatusChange(const char *status, const char *data)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
/* starting interface: nsICallLog */
#define NS_ICALLLOG_IID_STR "248eaceb-8910-49a5-a775-f06b62eaa2cd"
#define NS_ICALLLOG_IID \
{0x248eaceb, 0x8910, 0x49a5, \
{ 0xa7, 0x75, 0xf0, 0x6b, 0x62, 0xea, 0xa2, 0xcd }}
class NS_NO_VTABLE NS_SCRIPTABLE nsICallLog : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICALLLOG_IID)
/* attribute short direction; */
NS_SCRIPTABLE NS_IMETHOD GetDirection(PRInt16 *aDirection) = 0;
NS_SCRIPTABLE NS_IMETHOD SetDirection(PRInt16 aDirection) = 0;
/* attribute short status; */
NS_SCRIPTABLE NS_IMETHOD GetStatus(PRInt16 *aStatus) = 0;
NS_SCRIPTABLE NS_IMETHOD SetStatus(PRInt16 aStatus) = 0;
/* attribute long duration; */
NS_SCRIPTABLE NS_IMETHOD GetDuration(PRInt32 *aDuration) = 0;
NS_SCRIPTABLE NS_IMETHOD SetDuration(PRInt32 aDuration) = 0;
/* attribute ACString from; */
NS_SCRIPTABLE NS_IMETHOD GetFrom(nsACString & aFrom) = 0;
NS_SCRIPTABLE NS_IMETHOD SetFrom(const nsACString & aFrom) = 0;
/* attribute ACString to; */
NS_SCRIPTABLE NS_IMETHOD GetTo(nsACString & aTo) = 0;
NS_SCRIPTABLE NS_IMETHOD SetTo(const nsACString & aTo) = 0;
/* attribute ACString date; */
NS_SCRIPTABLE NS_IMETHOD GetDate(nsACString & aDate) = 0;
NS_SCRIPTABLE NS_IMETHOD SetDate(const nsACString & aDate) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsICallLog, NS_ICALLLOG_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSICALLLOG \
NS_SCRIPTABLE NS_IMETHOD GetDirection(PRInt16 *aDirection); \
NS_SCRIPTABLE NS_IMETHOD SetDirection(PRInt16 aDirection); \
NS_SCRIPTABLE NS_IMETHOD GetStatus(PRInt16 *aStatus); \
NS_SCRIPTABLE NS_IMETHOD SetStatus(PRInt16 aStatus); \
NS_SCRIPTABLE NS_IMETHOD GetDuration(PRInt32 *aDuration); \
NS_SCRIPTABLE NS_IMETHOD SetDuration(PRInt32 aDuration); \
NS_SCRIPTABLE NS_IMETHOD GetFrom(nsACString & aFrom); \
NS_SCRIPTABLE NS_IMETHOD SetFrom(const nsACString & aFrom); \
NS_SCRIPTABLE NS_IMETHOD GetTo(nsACString & aTo); \
NS_SCRIPTABLE NS_IMETHOD SetTo(const nsACString & aTo); \
NS_SCRIPTABLE NS_IMETHOD GetDate(nsACString & aDate); \
NS_SCRIPTABLE NS_IMETHOD SetDate(const nsACString & aDate);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSICALLLOG(_to) \
NS_SCRIPTABLE NS_IMETHOD GetDirection(PRInt16 *aDirection) { return _to GetDirection(aDirection); } \
NS_SCRIPTABLE NS_IMETHOD SetDirection(PRInt16 aDirection) { return _to SetDirection(aDirection); } \
NS_SCRIPTABLE NS_IMETHOD GetStatus(PRInt16 *aStatus) { return _to GetStatus(aStatus); } \
NS_SCRIPTABLE NS_IMETHOD SetStatus(PRInt16 aStatus) { return _to SetStatus(aStatus); } \
NS_SCRIPTABLE NS_IMETHOD GetDuration(PRInt32 *aDuration) { return _to GetDuration(aDuration); } \
NS_SCRIPTABLE NS_IMETHOD SetDuration(PRInt32 aDuration) { return _to SetDuration(aDuration); } \
NS_SCRIPTABLE NS_IMETHOD GetFrom(nsACString & aFrom) { return _to GetFrom(aFrom); } \
NS_SCRIPTABLE NS_IMETHOD SetFrom(const nsACString & aFrom) { return _to SetFrom(aFrom); } \
NS_SCRIPTABLE NS_IMETHOD GetTo(nsACString & aTo) { return _to GetTo(aTo); } \
NS_SCRIPTABLE NS_IMETHOD SetTo(const nsACString & aTo) { return _to SetTo(aTo); } \
NS_SCRIPTABLE NS_IMETHOD GetDate(nsACString & aDate) { return _to GetDate(aDate); } \
NS_SCRIPTABLE NS_IMETHOD SetDate(const nsACString & aDate) { return _to SetDate(aDate); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSICALLLOG(_to) \
NS_SCRIPTABLE NS_IMETHOD GetDirection(PRInt16 *aDirection) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDirection(aDirection); } \
NS_SCRIPTABLE NS_IMETHOD SetDirection(PRInt16 aDirection) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDirection(aDirection); } \
NS_SCRIPTABLE NS_IMETHOD GetStatus(PRInt16 *aStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStatus(aStatus); } \
NS_SCRIPTABLE NS_IMETHOD SetStatus(PRInt16 aStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetStatus(aStatus); } \
NS_SCRIPTABLE NS_IMETHOD GetDuration(PRInt32 *aDuration) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDuration(aDuration); } \
NS_SCRIPTABLE NS_IMETHOD SetDuration(PRInt32 aDuration) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDuration(aDuration); } \
NS_SCRIPTABLE NS_IMETHOD GetFrom(nsACString & aFrom) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFrom(aFrom); } \
NS_SCRIPTABLE NS_IMETHOD SetFrom(const nsACString & aFrom) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFrom(aFrom); } \
NS_SCRIPTABLE NS_IMETHOD GetTo(nsACString & aTo) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTo(aTo); } \
NS_SCRIPTABLE NS_IMETHOD SetTo(const nsACString & aTo) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTo(aTo); } \
NS_SCRIPTABLE NS_IMETHOD GetDate(nsACString & aDate) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDate(aDate); } \
NS_SCRIPTABLE NS_IMETHOD SetDate(const nsACString & aDate) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDate(aDate); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsCallLog : public nsICallLog
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSICALLLOG
nsCallLog();
private:
~nsCallLog();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS1(nsCallLog, nsICallLog)
nsCallLog::nsCallLog()
{
/* member initializers and constructor code */
}
nsCallLog::~nsCallLog()
{
/* destructor code */
}
/* attribute short direction; */
NS_IMETHODIMP nsCallLog::GetDirection(PRInt16 *aDirection)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsCallLog::SetDirection(PRInt16 aDirection)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute short status; */
NS_IMETHODIMP nsCallLog::GetStatus(PRInt16 *aStatus)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsCallLog::SetStatus(PRInt16 aStatus)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute long duration; */
NS_IMETHODIMP nsCallLog::GetDuration(PRInt32 *aDuration)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsCallLog::SetDuration(PRInt32 aDuration)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute ACString from; */
NS_IMETHODIMP nsCallLog::GetFrom(nsACString & aFrom)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsCallLog::SetFrom(const nsACString & aFrom)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute ACString to; */
NS_IMETHODIMP nsCallLog::GetTo(nsACString & aTo)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsCallLog::SetTo(const nsACString & aTo)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute ACString date; */
NS_IMETHODIMP nsCallLog::GetDate(nsACString & aDate)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsCallLog::SetDate(const nsACString & aDate)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
/* starting interface: nsIList */
#define NS_ILIST_IID_STR "fe4d239b-8766-4386-999d-bcd68903eb71"
#define NS_ILIST_IID \
{0xfe4d239b, 0x8766, 0x4386, \
{ 0x99, 0x9d, 0xbc, 0xd6, 0x89, 0x03, 0xeb, 0x71 }}
class NS_NO_VTABLE NS_SCRIPTABLE nsIList : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ILIST_IID)
/* nsICallLog item (in unsigned long index); */
NS_SCRIPTABLE NS_IMETHOD Item(PRUint32 index, nsICallLog **_retval NS_OUTPARAM) = 0;
/* [noscript] void add (in nsICallLog cl); */
NS_IMETHOD Add(nsICallLog *cl) = 0;
/* readonly attribute unsigned long length; */
NS_SCRIPTABLE NS_IMETHOD GetLength(PRUint32 *aLength) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIList, NS_ILIST_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSILIST \
NS_SCRIPTABLE NS_IMETHOD Item(PRUint32 index, nsICallLog **_retval NS_OUTPARAM); \
NS_IMETHOD Add(nsICallLog *cl); \
NS_SCRIPTABLE NS_IMETHOD GetLength(PRUint32 *aLength);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSILIST(_to) \
NS_SCRIPTABLE NS_IMETHOD Item(PRUint32 index, nsICallLog **_retval NS_OUTPARAM) { return _to Item(index, _retval); } \
NS_IMETHOD Add(nsICallLog *cl) { return _to Add(cl); } \
NS_SCRIPTABLE NS_IMETHOD GetLength(PRUint32 *aLength) { return _to GetLength(aLength); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSILIST(_to) \
NS_SCRIPTABLE NS_IMETHOD Item(PRUint32 index, nsICallLog **_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Item(index, _retval); } \
NS_IMETHOD Add(nsICallLog *cl) { return !_to ? NS_ERROR_NULL_POINTER : _to->Add(cl); } \
NS_SCRIPTABLE NS_IMETHOD GetLength(PRUint32 *aLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLength(aLength); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsList : public nsIList
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSILIST
nsList();
private:
~nsList();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS1(nsList, nsIList)
nsList::nsList()
{
/* member initializers and constructor code */
}
nsList::~nsList()
{
/* destructor code */
}
/* nsICallLog item (in unsigned long index); */
NS_IMETHODIMP nsList::Item(PRUint32 index, nsICallLog **_retval NS_OUTPARAM)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* [noscript] void add (in nsICallLog cl); */
NS_IMETHODIMP nsList::Add(nsICallLog *cl)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* readonly attribute unsigned long length; */
NS_IMETHODIMP nsList::GetLength(PRUint32 *aLength)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
/* starting interface: nsIProxyConfig */
#define NS_IPROXYCONFIG_IID_STR "3b88b334-2836-4ed5-9c5c-4936dc9b73c5"
#define NS_IPROXYCONFIG_IID \
{0x3b88b334, 0x2836, 0x4ed5, \
{ 0x9c, 0x5c, 0x49, 0x36, 0xdc, 0x9b, 0x73, 0xc5 }}
class NS_NO_VTABLE NS_SCRIPTABLE nsIProxyConfig : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPROXYCONFIG_IID)
/* attribute ACString sip_identity; */
NS_SCRIPTABLE NS_IMETHOD GetSip_identity(nsACString & aSip_identity) = 0;
NS_SCRIPTABLE NS_IMETHOD SetSip_identity(const nsACString & aSip_identity) = 0;
/* attribute ACString sip_proxy; */
NS_SCRIPTABLE NS_IMETHOD GetSip_proxy(nsACString & aSip_proxy) = 0;
NS_SCRIPTABLE NS_IMETHOD SetSip_proxy(const nsACString & aSip_proxy) = 0;
/* attribute ACString sip_route; */
NS_SCRIPTABLE NS_IMETHOD GetSip_route(nsACString & aSip_route) = 0;
NS_SCRIPTABLE NS_IMETHOD SetSip_route(const nsACString & aSip_route) = 0;
/* attribute ACString userid; */
NS_SCRIPTABLE NS_IMETHOD GetUserid(nsACString & aUserid) = 0;
NS_SCRIPTABLE NS_IMETHOD SetUserid(const nsACString & aUserid) = 0;
/* attribute ACString password; */
NS_SCRIPTABLE NS_IMETHOD GetPassword(nsACString & aPassword) = 0;
NS_SCRIPTABLE NS_IMETHOD SetPassword(const nsACString & aPassword) = 0;
/* attribute long duration; */
NS_SCRIPTABLE NS_IMETHOD GetDuration(PRInt32 *aDuration) = 0;
NS_SCRIPTABLE NS_IMETHOD SetDuration(PRInt32 aDuration) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIProxyConfig, NS_IPROXYCONFIG_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIPROXYCONFIG \
NS_SCRIPTABLE NS_IMETHOD GetSip_identity(nsACString & aSip_identity); \
NS_SCRIPTABLE NS_IMETHOD SetSip_identity(const nsACString & aSip_identity); \
NS_SCRIPTABLE NS_IMETHOD GetSip_proxy(nsACString & aSip_proxy); \
NS_SCRIPTABLE NS_IMETHOD SetSip_proxy(const nsACString & aSip_proxy); \
NS_SCRIPTABLE NS_IMETHOD GetSip_route(nsACString & aSip_route); \
NS_SCRIPTABLE NS_IMETHOD SetSip_route(const nsACString & aSip_route); \
NS_SCRIPTABLE NS_IMETHOD GetUserid(nsACString & aUserid); \
NS_SCRIPTABLE NS_IMETHOD SetUserid(const nsACString & aUserid); \
NS_SCRIPTABLE NS_IMETHOD GetPassword(nsACString & aPassword); \
NS_SCRIPTABLE NS_IMETHOD SetPassword(const nsACString & aPassword); \
NS_SCRIPTABLE NS_IMETHOD GetDuration(PRInt32 *aDuration); \
NS_SCRIPTABLE NS_IMETHOD SetDuration(PRInt32 aDuration);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIPROXYCONFIG(_to) \
NS_SCRIPTABLE NS_IMETHOD GetSip_identity(nsACString & aSip_identity) { return _to GetSip_identity(aSip_identity); } \
NS_SCRIPTABLE NS_IMETHOD SetSip_identity(const nsACString & aSip_identity) { return _to SetSip_identity(aSip_identity); } \
NS_SCRIPTABLE NS_IMETHOD GetSip_proxy(nsACString & aSip_proxy) { return _to GetSip_proxy(aSip_proxy); } \
NS_SCRIPTABLE NS_IMETHOD SetSip_proxy(const nsACString & aSip_proxy) { return _to SetSip_proxy(aSip_proxy); } \
NS_SCRIPTABLE NS_IMETHOD GetSip_route(nsACString & aSip_route) { return _to GetSip_route(aSip_route); } \
NS_SCRIPTABLE NS_IMETHOD SetSip_route(const nsACString & aSip_route) { return _to SetSip_route(aSip_route); } \
NS_SCRIPTABLE NS_IMETHOD GetUserid(nsACString & aUserid) { return _to GetUserid(aUserid); } \
NS_SCRIPTABLE NS_IMETHOD SetUserid(const nsACString & aUserid) { return _to SetUserid(aUserid); } \
NS_SCRIPTABLE NS_IMETHOD GetPassword(nsACString & aPassword) { return _to GetPassword(aPassword); } \
NS_SCRIPTABLE NS_IMETHOD SetPassword(const nsACString & aPassword) { return _to SetPassword(aPassword); } \
NS_SCRIPTABLE NS_IMETHOD GetDuration(PRInt32 *aDuration) { return _to GetDuration(aDuration); } \
NS_SCRIPTABLE NS_IMETHOD SetDuration(PRInt32 aDuration) { return _to SetDuration(aDuration); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIPROXYCONFIG(_to) \
NS_SCRIPTABLE NS_IMETHOD GetSip_identity(nsACString & aSip_identity) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSip_identity(aSip_identity); } \
NS_SCRIPTABLE NS_IMETHOD SetSip_identity(const nsACString & aSip_identity) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSip_identity(aSip_identity); } \
NS_SCRIPTABLE NS_IMETHOD GetSip_proxy(nsACString & aSip_proxy) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSip_proxy(aSip_proxy); } \
NS_SCRIPTABLE NS_IMETHOD SetSip_proxy(const nsACString & aSip_proxy) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSip_proxy(aSip_proxy); } \
NS_SCRIPTABLE NS_IMETHOD GetSip_route(nsACString & aSip_route) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSip_route(aSip_route); } \
NS_SCRIPTABLE NS_IMETHOD SetSip_route(const nsACString & aSip_route) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSip_route(aSip_route); } \
NS_SCRIPTABLE NS_IMETHOD GetUserid(nsACString & aUserid) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUserid(aUserid); } \
NS_SCRIPTABLE NS_IMETHOD SetUserid(const nsACString & aUserid) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUserid(aUserid); } \
NS_SCRIPTABLE NS_IMETHOD GetPassword(nsACString & aPassword) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPassword(aPassword); } \
NS_SCRIPTABLE NS_IMETHOD SetPassword(const nsACString & aPassword) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPassword(aPassword); } \
NS_SCRIPTABLE NS_IMETHOD GetDuration(PRInt32 *aDuration) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDuration(aDuration); } \
NS_SCRIPTABLE NS_IMETHOD SetDuration(PRInt32 aDuration) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDuration(aDuration); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsProxyConfig : public nsIProxyConfig
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIPROXYCONFIG
nsProxyConfig();
private:
~nsProxyConfig();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS1(nsProxyConfig, nsIProxyConfig)
nsProxyConfig::nsProxyConfig()
{
/* member initializers and constructor code */
}
nsProxyConfig::~nsProxyConfig()
{
/* destructor code */
}
/* attribute ACString sip_identity; */
NS_IMETHODIMP nsProxyConfig::GetSip_identity(nsACString & aSip_identity)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsProxyConfig::SetSip_identity(const nsACString & aSip_identity)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute ACString sip_proxy; */
NS_IMETHODIMP nsProxyConfig::GetSip_proxy(nsACString & aSip_proxy)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsProxyConfig::SetSip_proxy(const nsACString & aSip_proxy)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute ACString sip_route; */
NS_IMETHODIMP nsProxyConfig::GetSip_route(nsACString & aSip_route)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsProxyConfig::SetSip_route(const nsACString & aSip_route)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute ACString userid; */
NS_IMETHODIMP nsProxyConfig::GetUserid(nsACString & aUserid)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsProxyConfig::SetUserid(const nsACString & aUserid)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute ACString password; */
NS_IMETHODIMP nsProxyConfig::GetPassword(nsACString & aPassword)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsProxyConfig::SetPassword(const nsACString & aPassword)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* attribute long duration; */
NS_IMETHODIMP nsProxyConfig::GetDuration(PRInt32 *aDuration)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsProxyConfig::SetDuration(PRInt32 aDuration)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
/* starting interface: nsISIP */
#define NS_ISIP_IID_STR "c5bf5079-8bc3-4fc5-881f-f3bd85a63c61"
#define NS_ISIP_IID \
{0xc5bf5079, 0x8bc3, 0x4fc5, \
{ 0x88, 0x1f, 0xf3, 0xbd, 0x85, 0xa6, 0x3c, 0x61 }}
class NS_NO_VTABLE NS_SCRIPTABLE nsISIP : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISIP_IID)
/* void init (in long port); */
NS_SCRIPTABLE NS_IMETHOD Init(PRInt32 port) = 0;
/* void destroy (); */
NS_SCRIPTABLE NS_IMETHOD Destroy(void) = 0;
/* void setSipPort (in long port); */
NS_SCRIPTABLE NS_IMETHOD SetSipPort(PRInt32 port) = 0;
/* void setRTPAudioPort (in long port); */
NS_SCRIPTABLE NS_IMETHOD SetRTPAudioPort(PRInt32 port) = 0;
/* void setNOFirewall (); */
NS_SCRIPTABLE NS_IMETHOD SetNOFirewall(void) = 0;
/* void setNATFirewall (in string fw_addr); */
NS_SCRIPTABLE NS_IMETHOD SetNATFirewall(const char *fw_addr) = 0;
/* void setSTUNFirewall (in string stun_addr); */
NS_SCRIPTABLE NS_IMETHOD SetSTUNFirewall(const char *stun_addr) = 0;
/* void setPrimaryIdentity (in string username); */
NS_SCRIPTABLE NS_IMETHOD SetPrimaryIdentity(const char *username) = 0;
/* void getCurrentIdentity ([retval] out long current); */
NS_SCRIPTABLE NS_IMETHOD GetCurrentIdentity(PRInt32 *current NS_OUTPARAM) = 0;
/* void getIdentity (in long identity_num, [retval] out ACString username); */
NS_SCRIPTABLE NS_IMETHOD GetIdentity(PRInt32 identity_num, nsACString & username NS_OUTPARAM) = 0;
/* void setIdentity (in long identity_num); */
NS_SCRIPTABLE NS_IMETHOD SetIdentity(PRInt32 identity_num) = 0;
/* void setProxyConfig (in nsIProxyConfig cfg); */
NS_SCRIPTABLE NS_IMETHOD SetProxyConfig(nsIProxyConfig *cfg) = 0;
/* void getProxyConfig ([retval] out nsIProxyConfig cfg); */
NS_SCRIPTABLE NS_IMETHOD GetProxyConfig(nsIProxyConfig **cfg NS_OUTPARAM) = 0;
/* void registerToProxy (); */
NS_SCRIPTABLE NS_IMETHOD RegisterToProxy(void) = 0;
/* void unregisterToProxy (); */
NS_SCRIPTABLE NS_IMETHOD UnregisterToProxy(void) = 0;
/* void addFriend (in ACString name, in ACString addr); */
NS_SCRIPTABLE NS_IMETHOD AddFriend(const nsACString & name, const nsACString & addr) = 0;
/* void setPresenceInfo (in long presence_status); */
NS_SCRIPTABLE NS_IMETHOD SetPresenceInfo(PRInt32 presence_status) = 0;
/* void call (in string URI); */
NS_SCRIPTABLE NS_IMETHOD Call(const char *URI) = 0;
/* void hangup (); */
NS_SCRIPTABLE NS_IMETHOD Hangup(void) = 0;
/* void accept (); */
NS_SCRIPTABLE NS_IMETHOD Accept(void) = 0;
/* void sendDtmf (in char tone); */
NS_SCRIPTABLE NS_IMETHOD SendDtmf(char tone) = 0;
/* boolean isValidSipURI (in string uri); */
NS_SCRIPTABLE NS_IMETHOD IsValidSipURI(const char *uri, PRBool *_retval NS_OUTPARAM) = 0;
/* void setRingTone (in string file); */
NS_SCRIPTABLE NS_IMETHOD SetRingTone(const char *file) = 0;
/* void setRingbackTone (in string file); */
NS_SCRIPTABLE NS_IMETHOD SetRingbackTone(const char *file) = 0;
/* void getPlayLevel ([retval] out short level); */
NS_SCRIPTABLE NS_IMETHOD GetPlayLevel(PRInt16 *level NS_OUTPARAM) = 0;
/* void setPlayLevel (in short level); */
NS_SCRIPTABLE NS_IMETHOD SetPlayLevel(PRInt16 level) = 0;
/* void getMicLevel ([retval] out short level); */
NS_SCRIPTABLE NS_IMETHOD GetMicLevel(PRInt16 *level NS_OUTPARAM) = 0;
/* void setMicLevel (in short level); */
NS_SCRIPTABLE NS_IMETHOD SetMicLevel(PRInt16 level) = 0;
/* void getCodec (in short index, [retval] out ACString codec); */
NS_SCRIPTABLE NS_IMETHOD GetCodec(PRInt16 index, nsACString & codec NS_OUTPARAM) = 0;
/* void enableCodec (in short codec); */
NS_SCRIPTABLE NS_IMETHOD EnableCodec(PRInt16 codec) = 0;
/* void disableCodec (in short codec); */
NS_SCRIPTABLE NS_IMETHOD DisableCodec(PRInt16 codec) = 0;
/* void getCallLogs ([retval] out nsIList retv); */
NS_SCRIPTABLE NS_IMETHOD GetCallLogs(nsIList **retv NS_OUTPARAM) = 0;
/* void clearCallLogs (); */
NS_SCRIPTABLE NS_IMETHOD ClearCallLogs(void) = 0;
/* void addObserver (in nsSipStateObserver cbk); */
NS_SCRIPTABLE NS_IMETHOD AddObserver(nsSipStateObserver *cbk) = 0;
/* void removeObserver (in nsSipStateObserver cbk); */
NS_SCRIPTABLE NS_IMETHOD RemoveObserver(nsSipStateObserver *cbk) = 0;
/* void clearObservers (); */
NS_SCRIPTABLE NS_IMETHOD ClearObservers(void) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsISIP, NS_ISIP_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSISIP \
NS_SCRIPTABLE NS_IMETHOD Init(PRInt32 port); \
NS_SCRIPTABLE NS_IMETHOD Destroy(void); \
NS_SCRIPTABLE NS_IMETHOD SetSipPort(PRInt32 port); \
NS_SCRIPTABLE NS_IMETHOD SetRTPAudioPort(PRInt32 port); \
NS_SCRIPTABLE NS_IMETHOD SetNOFirewall(void); \
NS_SCRIPTABLE NS_IMETHOD SetNATFirewall(const char *fw_addr); \
NS_SCRIPTABLE NS_IMETHOD SetSTUNFirewall(const char *stun_addr); \
NS_SCRIPTABLE NS_IMETHOD SetPrimaryIdentity(const char *username); \
NS_SCRIPTABLE NS_IMETHOD GetCurrentIdentity(PRInt32 *current NS_OUTPARAM); \
NS_SCRIPTABLE NS_IMETHOD GetIdentity(PRInt32 identity_num, nsACString & username NS_OUTPARAM); \
NS_SCRIPTABLE NS_IMETHOD SetIdentity(PRInt32 identity_num); \
NS_SCRIPTABLE NS_IMETHOD SetProxyConfig(nsIProxyConfig *cfg); \
NS_SCRIPTABLE NS_IMETHOD GetProxyConfig(nsIProxyConfig **cfg NS_OUTPARAM); \
NS_SCRIPTABLE NS_IMETHOD RegisterToProxy(void); \
NS_SCRIPTABLE NS_IMETHOD UnregisterToProxy(void); \
NS_SCRIPTABLE NS_IMETHOD AddFriend(const nsACString & name, const nsACString & addr); \
NS_SCRIPTABLE NS_IMETHOD SetPresenceInfo(PRInt32 presence_status); \
NS_SCRIPTABLE NS_IMETHOD Call(const char *URI); \
NS_SCRIPTABLE NS_IMETHOD Hangup(void); \
NS_SCRIPTABLE NS_IMETHOD Accept(void); \
NS_SCRIPTABLE NS_IMETHOD SendDtmf(char tone); \
NS_SCRIPTABLE NS_IMETHOD IsValidSipURI(const char *uri, PRBool *_retval NS_OUTPARAM); \
NS_SCRIPTABLE NS_IMETHOD SetRingTone(const char *file); \
NS_SCRIPTABLE NS_IMETHOD SetRingbackTone(const char *file); \
NS_SCRIPTABLE NS_IMETHOD GetPlayLevel(PRInt16 *level NS_OUTPARAM); \
NS_SCRIPTABLE NS_IMETHOD SetPlayLevel(PRInt16 level); \
NS_SCRIPTABLE NS_IMETHOD GetMicLevel(PRInt16 *level NS_OUTPARAM); \
NS_SCRIPTABLE NS_IMETHOD SetMicLevel(PRInt16 level); \
NS_SCRIPTABLE NS_IMETHOD GetCodec(PRInt16 index, nsACString & codec NS_OUTPARAM); \
NS_SCRIPTABLE NS_IMETHOD EnableCodec(PRInt16 codec); \
NS_SCRIPTABLE NS_IMETHOD DisableCodec(PRInt16 codec); \
NS_SCRIPTABLE NS_IMETHOD GetCallLogs(nsIList **retv NS_OUTPARAM); \
NS_SCRIPTABLE NS_IMETHOD ClearCallLogs(void); \
NS_SCRIPTABLE NS_IMETHOD AddObserver(nsSipStateObserver *cbk); \
NS_SCRIPTABLE NS_IMETHOD RemoveObserver(nsSipStateObserver *cbk); \
NS_SCRIPTABLE NS_IMETHOD ClearObservers(void);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSISIP(_to) \
NS_SCRIPTABLE NS_IMETHOD Init(PRInt32 port) { return _to Init(port); } \
NS_SCRIPTABLE NS_IMETHOD Destroy(void) { return _to Destroy(); } \
NS_SCRIPTABLE NS_IMETHOD SetSipPort(PRInt32 port) { return _to SetSipPort(port); } \
NS_SCRIPTABLE NS_IMETHOD SetRTPAudioPort(PRInt32 port) { return _to SetRTPAudioPort(port); } \
NS_SCRIPTABLE NS_IMETHOD SetNOFirewall(void) { return _to SetNOFirewall(); } \
NS_SCRIPTABLE NS_IMETHOD SetNATFirewall(const char *fw_addr) { return _to SetNATFirewall(fw_addr); } \
NS_SCRIPTABLE NS_IMETHOD SetSTUNFirewall(const char *stun_addr) { return _to SetSTUNFirewall(stun_addr); } \
NS_SCRIPTABLE NS_IMETHOD SetPrimaryIdentity(const char *username) { return _to SetPrimaryIdentity(username); } \
NS_SCRIPTABLE NS_IMETHOD GetCurrentIdentity(PRInt32 *current NS_OUTPARAM) { return _to GetCurrentIdentity(current); } \
NS_SCRIPTABLE NS_IMETHOD GetIdentity(PRInt32 identity_num, nsACString & username NS_OUTPARAM) { return _to GetIdentity(identity_num, username); } \
NS_SCRIPTABLE NS_IMETHOD SetIdentity(PRInt32 identity_num) { return _to SetIdentity(identity_num); } \
NS_SCRIPTABLE NS_IMETHOD SetProxyConfig(nsIProxyConfig *cfg) { return _to SetProxyConfig(cfg); } \
NS_SCRIPTABLE NS_IMETHOD GetProxyConfig(nsIProxyConfig **cfg NS_OUTPARAM) { return _to GetProxyConfig(cfg); } \
NS_SCRIPTABLE NS_IMETHOD RegisterToProxy(void) { return _to RegisterToProxy(); } \
NS_SCRIPTABLE NS_IMETHOD UnregisterToProxy(void) { return _to UnregisterToProxy(); } \
NS_SCRIPTABLE NS_IMETHOD AddFriend(const nsACString & name, const nsACString & addr) { return _to AddFriend(name, addr); } \
NS_SCRIPTABLE NS_IMETHOD SetPresenceInfo(PRInt32 presence_status) { return _to SetPresenceInfo(presence_status); } \
NS_SCRIPTABLE NS_IMETHOD Call(const char *URI) { return _to Call(URI); } \
NS_SCRIPTABLE NS_IMETHOD Hangup(void) { return _to Hangup(); } \
NS_SCRIPTABLE NS_IMETHOD Accept(void) { return _to Accept(); } \
NS_SCRIPTABLE NS_IMETHOD SendDtmf(char tone) { return _to SendDtmf(tone); } \
NS_SCRIPTABLE NS_IMETHOD IsValidSipURI(const char *uri, PRBool *_retval NS_OUTPARAM) { return _to IsValidSipURI(uri, _retval); } \
NS_SCRIPTABLE NS_IMETHOD SetRingTone(const char *file) { return _to SetRingTone(file); } \
NS_SCRIPTABLE NS_IMETHOD SetRingbackTone(const char *file) { return _to SetRingbackTone(file); } \
NS_SCRIPTABLE NS_IMETHOD GetPlayLevel(PRInt16 *level NS_OUTPARAM) { return _to GetPlayLevel(level); } \
NS_SCRIPTABLE NS_IMETHOD SetPlayLevel(PRInt16 level) { return _to SetPlayLevel(level); } \
NS_SCRIPTABLE NS_IMETHOD GetMicLevel(PRInt16 *level NS_OUTPARAM) { return _to GetMicLevel(level); } \
NS_SCRIPTABLE NS_IMETHOD SetMicLevel(PRInt16 level) { return _to SetMicLevel(level); } \
NS_SCRIPTABLE NS_IMETHOD GetCodec(PRInt16 index, nsACString & codec NS_OUTPARAM) { return _to GetCodec(index, codec); } \
NS_SCRIPTABLE NS_IMETHOD EnableCodec(PRInt16 codec) { return _to EnableCodec(codec); } \
NS_SCRIPTABLE NS_IMETHOD DisableCodec(PRInt16 codec) { return _to DisableCodec(codec); } \
NS_SCRIPTABLE NS_IMETHOD GetCallLogs(nsIList **retv NS_OUTPARAM) { return _to GetCallLogs(retv); } \
NS_SCRIPTABLE NS_IMETHOD ClearCallLogs(void) { return _to ClearCallLogs(); } \
NS_SCRIPTABLE NS_IMETHOD AddObserver(nsSipStateObserver *cbk) { return _to AddObserver(cbk); } \
NS_SCRIPTABLE NS_IMETHOD RemoveObserver(nsSipStateObserver *cbk) { return _to RemoveObserver(cbk); } \
NS_SCRIPTABLE NS_IMETHOD ClearObservers(void) { return _to ClearObservers(); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSISIP(_to) \
NS_SCRIPTABLE NS_IMETHOD Init(PRInt32 port) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(port); } \
NS_SCRIPTABLE NS_IMETHOD Destroy(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Destroy(); } \
NS_SCRIPTABLE NS_IMETHOD SetSipPort(PRInt32 port) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSipPort(port); } \
NS_SCRIPTABLE NS_IMETHOD SetRTPAudioPort(PRInt32 port) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRTPAudioPort(port); } \
NS_SCRIPTABLE NS_IMETHOD SetNOFirewall(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetNOFirewall(); } \
NS_SCRIPTABLE NS_IMETHOD SetNATFirewall(const char *fw_addr) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetNATFirewall(fw_addr); } \
NS_SCRIPTABLE NS_IMETHOD SetSTUNFirewall(const char *stun_addr) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSTUNFirewall(stun_addr); } \
NS_SCRIPTABLE NS_IMETHOD SetPrimaryIdentity(const char *username) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPrimaryIdentity(username); } \
NS_SCRIPTABLE NS_IMETHOD GetCurrentIdentity(PRInt32 *current NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentIdentity(current); } \
NS_SCRIPTABLE NS_IMETHOD GetIdentity(PRInt32 identity_num, nsACString & username NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIdentity(identity_num, username); } \
NS_SCRIPTABLE NS_IMETHOD SetIdentity(PRInt32 identity_num) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetIdentity(identity_num); } \
NS_SCRIPTABLE NS_IMETHOD SetProxyConfig(nsIProxyConfig *cfg) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetProxyConfig(cfg); } \
NS_SCRIPTABLE NS_IMETHOD GetProxyConfig(nsIProxyConfig **cfg NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProxyConfig(cfg); } \
NS_SCRIPTABLE NS_IMETHOD RegisterToProxy(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterToProxy(); } \
NS_SCRIPTABLE NS_IMETHOD UnregisterToProxy(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterToProxy(); } \
NS_SCRIPTABLE NS_IMETHOD AddFriend(const nsACString & name, const nsACString & addr) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddFriend(name, addr); } \
NS_SCRIPTABLE NS_IMETHOD SetPresenceInfo(PRInt32 presence_status) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPresenceInfo(presence_status); } \
NS_SCRIPTABLE NS_IMETHOD Call(const char *URI) { return !_to ? NS_ERROR_NULL_POINTER : _to->Call(URI); } \
NS_SCRIPTABLE NS_IMETHOD Hangup(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Hangup(); } \
NS_SCRIPTABLE NS_IMETHOD Accept(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Accept(); } \
NS_SCRIPTABLE NS_IMETHOD SendDtmf(char tone) { return !_to ? NS_ERROR_NULL_POINTER : _to->SendDtmf(tone); } \
NS_SCRIPTABLE NS_IMETHOD IsValidSipURI(const char *uri, PRBool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsValidSipURI(uri, _retval); } \
NS_SCRIPTABLE NS_IMETHOD SetRingTone(const char *file) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRingTone(file); } \
NS_SCRIPTABLE NS_IMETHOD SetRingbackTone(const char *file) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetRingbackTone(file); } \
NS_SCRIPTABLE NS_IMETHOD GetPlayLevel(PRInt16 *level NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPlayLevel(level); } \
NS_SCRIPTABLE NS_IMETHOD SetPlayLevel(PRInt16 level) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPlayLevel(level); } \
NS_SCRIPTABLE NS_IMETHOD GetMicLevel(PRInt16 *level NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMicLevel(level); } \
NS_SCRIPTABLE NS_IMETHOD SetMicLevel(PRInt16 level) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMicLevel(level); } \
NS_SCRIPTABLE NS_IMETHOD GetCodec(PRInt16 index, nsACString & codec NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCodec(index, codec); } \
NS_SCRIPTABLE NS_IMETHOD EnableCodec(PRInt16 codec) { return !_to ? NS_ERROR_NULL_POINTER : _to->EnableCodec(codec); } \
NS_SCRIPTABLE NS_IMETHOD DisableCodec(PRInt16 codec) { return !_to ? NS_ERROR_NULL_POINTER : _to->DisableCodec(codec); } \
NS_SCRIPTABLE NS_IMETHOD GetCallLogs(nsIList **retv NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCallLogs(retv); } \
NS_SCRIPTABLE NS_IMETHOD ClearCallLogs(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearCallLogs(); } \
NS_SCRIPTABLE NS_IMETHOD AddObserver(nsSipStateObserver *cbk) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddObserver(cbk); } \
NS_SCRIPTABLE NS_IMETHOD RemoveObserver(nsSipStateObserver *cbk) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveObserver(cbk); } \
NS_SCRIPTABLE NS_IMETHOD ClearObservers(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->ClearObservers(); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsSIP : public nsISIP
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSISIP
nsSIP();
private:
~nsSIP();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS1(nsSIP, nsISIP)
nsSIP::nsSIP()
{
/* member initializers and constructor code */
}
nsSIP::~nsSIP()
{
/* destructor code */
}
/* void init (in long port); */
NS_IMETHODIMP nsSIP::Init(PRInt32 port)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void destroy (); */
NS_IMETHODIMP nsSIP::Destroy()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void setSipPort (in long port); */
NS_IMETHODIMP nsSIP::SetSipPort(PRInt32 port)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void setRTPAudioPort (in long port); */
NS_IMETHODIMP nsSIP::SetRTPAudioPort(PRInt32 port)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void setNOFirewall (); */
NS_IMETHODIMP nsSIP::SetNOFirewall()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void setNATFirewall (in string fw_addr); */
NS_IMETHODIMP nsSIP::SetNATFirewall(const char *fw_addr)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void setSTUNFirewall (in string stun_addr); */
NS_IMETHODIMP nsSIP::SetSTUNFirewall(const char *stun_addr)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void setPrimaryIdentity (in string username); */
NS_IMETHODIMP nsSIP::SetPrimaryIdentity(const char *username)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void getCurrentIdentity ([retval] out long current); */
NS_IMETHODIMP nsSIP::GetCurrentIdentity(PRInt32 *current NS_OUTPARAM)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void getIdentity (in long identity_num, [retval] out ACString username); */
NS_IMETHODIMP nsSIP::GetIdentity(PRInt32 identity_num, nsACString & username NS_OUTPARAM)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void setIdentity (in long identity_num); */
NS_IMETHODIMP nsSIP::SetIdentity(PRInt32 identity_num)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void setProxyConfig (in nsIProxyConfig cfg); */
NS_IMETHODIMP nsSIP::SetProxyConfig(nsIProxyConfig *cfg)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void getProxyConfig ([retval] out nsIProxyConfig cfg); */
NS_IMETHODIMP nsSIP::GetProxyConfig(nsIProxyConfig **cfg NS_OUTPARAM)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void registerToProxy (); */
NS_IMETHODIMP nsSIP::RegisterToProxy()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void unregisterToProxy (); */
NS_IMETHODIMP nsSIP::UnregisterToProxy()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void addFriend (in ACString name, in ACString addr); */
NS_IMETHODIMP nsSIP::AddFriend(const nsACString & name, const nsACString & addr)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void setPresenceInfo (in long presence_status); */
NS_IMETHODIMP nsSIP::SetPresenceInfo(PRInt32 presence_status)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void call (in string URI); */
NS_IMETHODIMP nsSIP::Call(const char *URI)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void hangup (); */
NS_IMETHODIMP nsSIP::Hangup()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void accept (); */
NS_IMETHODIMP nsSIP::Accept()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void sendDtmf (in char tone); */
NS_IMETHODIMP nsSIP::SendDtmf(char tone)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* boolean isValidSipURI (in string uri); */
NS_IMETHODIMP nsSIP::IsValidSipURI(const char *uri, PRBool *_retval NS_OUTPARAM)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void setRingTone (in string file); */
NS_IMETHODIMP nsSIP::SetRingTone(const char *file)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void setRingbackTone (in string file); */
NS_IMETHODIMP nsSIP::SetRingbackTone(const char *file)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void getPlayLevel ([retval] out short level); */
NS_IMETHODIMP nsSIP::GetPlayLevel(PRInt16 *level NS_OUTPARAM)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void setPlayLevel (in short level); */
NS_IMETHODIMP nsSIP::SetPlayLevel(PRInt16 level)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void getMicLevel ([retval] out short level); */
NS_IMETHODIMP nsSIP::GetMicLevel(PRInt16 *level NS_OUTPARAM)
{
return NS_ERROR_NOT_IMPLEMENTED;
}