|
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
2 /* vim: set sw=2 ts=8 et ft=cpp : */ |
|
3 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
4 * License, v. 2.0. If a copy of the MPL was not distributed with this file, |
|
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
6 |
|
7 include protocol PContent; |
|
8 include protocol PTelephonyRequest; |
|
9 include TelephonyTypes; |
|
10 |
|
11 namespace mozilla { |
|
12 namespace dom { |
|
13 namespace telephony { |
|
14 |
|
15 struct EnumerateCallsRequest |
|
16 { |
|
17 // empty. |
|
18 }; |
|
19 |
|
20 struct DialRequest |
|
21 { |
|
22 uint32_t clientId; |
|
23 nsString number; |
|
24 bool isEmergency; |
|
25 }; |
|
26 |
|
27 union IPCTelephonyRequest |
|
28 { |
|
29 EnumerateCallsRequest; |
|
30 DialRequest; |
|
31 }; |
|
32 |
|
33 sync protocol PTelephony { |
|
34 manager PContent; |
|
35 manages PTelephonyRequest; |
|
36 |
|
37 child: |
|
38 NotifyCallError(uint32_t aClientId, int32_t aCallIndex, nsString aError); |
|
39 |
|
40 NotifyCallStateChanged(uint32_t aClientId, IPCCallStateData aData); |
|
41 |
|
42 NotifyCdmaCallWaiting(uint32_t aClientId, nsString aNumber); |
|
43 |
|
44 NotifyConferenceCallStateChanged(uint16_t aCallState); |
|
45 |
|
46 NotifyConferenceError(nsString aName, nsString aMessage); |
|
47 |
|
48 NotifySupplementaryService(uint32_t aClientId, int32_t aCallIndex, |
|
49 uint16_t aNotification); |
|
50 |
|
51 parent: |
|
52 /** |
|
53 * Sent when the child no longer needs to use PTelephony. |
|
54 */ |
|
55 __delete__(); |
|
56 |
|
57 /** |
|
58 * Sent when the child makes an asynchronous request to the parent. |
|
59 */ |
|
60 PTelephonyRequest(IPCTelephonyRequest request); |
|
61 |
|
62 RegisterListener(); |
|
63 |
|
64 UnregisterListener(); |
|
65 |
|
66 HangUpCall(uint32_t aClientId, uint32_t aCallIndex); |
|
67 |
|
68 AnswerCall(uint32_t aClientId, uint32_t aCallIndex); |
|
69 |
|
70 RejectCall(uint32_t aClientId, uint32_t aCallIndex); |
|
71 |
|
72 HoldCall(uint32_t aClientId, uint32_t aCallIndex); |
|
73 |
|
74 ResumeCall(uint32_t aClientId, uint32_t aCallIndex); |
|
75 |
|
76 ConferenceCall(uint32_t aClientId); |
|
77 |
|
78 SeparateCall(uint32_t aClientId, uint32_t aCallIndex); |
|
79 |
|
80 HoldConference(uint32_t aClientId); |
|
81 |
|
82 ResumeConference(uint32_t aClientId); |
|
83 |
|
84 StartTone(uint32_t aClientId, nsString aTone); |
|
85 |
|
86 StopTone(uint32_t aClientId); |
|
87 |
|
88 sync GetMicrophoneMuted() |
|
89 returns (bool aMuted); |
|
90 |
|
91 SetMicrophoneMuted(bool aMuted); |
|
92 |
|
93 sync GetSpeakerEnabled() |
|
94 returns (bool aEnabled); |
|
95 |
|
96 SetSpeakerEnabled(bool aEnabled); |
|
97 }; |
|
98 |
|
99 } /* namespace telephony */ |
|
100 } /* namespace dom */ |
|
101 } /* namespace mozilla */ |