-
Notifications
You must be signed in to change notification settings - Fork 2
/
nsISIP.idl
99 lines (76 loc) · 2.63 KB
/
nsISIP.idl
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
#include "nsISupports.idl"
#include "nsIExtensionManager.idl"
#include "nsIFile.idl"
#include "nsIRunnable.idl"
#include "nsIArray.idl"
[scriptable, function, uuid(3869ed55-e06a-4ac1-84ea-4c3a4b696924)]
interface nsSipStateObserver : nsISupports {
void onStatusChange(in string status, in string data);
};
[scriptable, uuid(248eaceb-8910-49a5-a775-f06b62eaa2cd)]
interface nsICallLog : nsISupports
{
attribute short direction;
attribute short status;
attribute long duration;
attribute ACString from;
attribute ACString to;
attribute ACString date;
};
[scriptable, uuid(fe4d239b-8766-4386-999d-bcd68903eb71)]
interface nsIList : nsISupports
{
nsICallLog item(in unsigned long index);
[noscript] void add(in nsICallLog cl);
readonly attribute unsigned long length;
};
[scriptable, uuid(3b88b334-2836-4ed5-9c5c-4936dc9b73c5)]
interface nsIProxyConfig : nsISupports
{
attribute ACString sip_identity;
attribute ACString sip_proxy;
attribute ACString sip_route;
attribute ACString userid;
attribute ACString password;
attribute long duration;
};
[scriptable, uuid(c5bf5079-8bc3-4fc5-881f-f3bd85a63c61)]
interface nsISIP : nsISupports
{
void init(in long port);
void destroy();
void setSipPort(in long _port);
void setRTPAudioPort(in long _port);
void setNOFirewall();
void setNATFirewall(in string fw_addr);
void setSTUNFirewall(in string stun_addr);
void setPrimaryIdentity(in string username);
void getCurrentIdentity([retval] out long current);
void getIdentity(in long identity_num, [retval] out ACString username);
void setIdentity(in long identity_num);
void setProxyConfig(in nsIProxyConfig cfg);
void getProxyConfig([retval] out nsIProxyConfig cfg);
void registerToProxy();
void unregisterToProxy();
void addFriend(in ACString name, in ACString addr);
void setPresenceInfo(in long presence_status);
void call(in string URI);
void hangup();
void accept();
void sendDtmf(in char tone);
boolean isValidSipURI(in string uri);
void setRingTone(in string file);
void setRingbackTone(in string file);
void getPlayLevel([retval] out short level);
void setPlayLevel(in short level);
void getMicLevel([retval] out short level);
void setMicLevel(in short level);
void getCodec(in short index, [retval] out ACString codec);
void enableCodec(in short codec);
void disableCodec(in short codec);
void getCallLogs([retval] out nsIList retv);
void clearCallLogs();
void addObserver(in nsSipStateObserver cbk);
void removeObserver(in nsSipStateObserver cbk);
void clearObservers();
};