1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/telephony/ipc/PTelephony.ipdl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,101 @@ 1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* vim: set sw=2 ts=8 et ft=cpp : */ 1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this file, 1.8 + * You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +include protocol PContent; 1.11 +include protocol PTelephonyRequest; 1.12 +include TelephonyTypes; 1.13 + 1.14 +namespace mozilla { 1.15 +namespace dom { 1.16 +namespace telephony { 1.17 + 1.18 +struct EnumerateCallsRequest 1.19 +{ 1.20 + // empty. 1.21 +}; 1.22 + 1.23 +struct DialRequest 1.24 +{ 1.25 + uint32_t clientId; 1.26 + nsString number; 1.27 + bool isEmergency; 1.28 +}; 1.29 + 1.30 +union IPCTelephonyRequest 1.31 +{ 1.32 + EnumerateCallsRequest; 1.33 + DialRequest; 1.34 +}; 1.35 + 1.36 +sync protocol PTelephony { 1.37 + manager PContent; 1.38 + manages PTelephonyRequest; 1.39 + 1.40 +child: 1.41 + NotifyCallError(uint32_t aClientId, int32_t aCallIndex, nsString aError); 1.42 + 1.43 + NotifyCallStateChanged(uint32_t aClientId, IPCCallStateData aData); 1.44 + 1.45 + NotifyCdmaCallWaiting(uint32_t aClientId, nsString aNumber); 1.46 + 1.47 + NotifyConferenceCallStateChanged(uint16_t aCallState); 1.48 + 1.49 + NotifyConferenceError(nsString aName, nsString aMessage); 1.50 + 1.51 + NotifySupplementaryService(uint32_t aClientId, int32_t aCallIndex, 1.52 + uint16_t aNotification); 1.53 + 1.54 +parent: 1.55 + /** 1.56 + * Sent when the child no longer needs to use PTelephony. 1.57 + */ 1.58 + __delete__(); 1.59 + 1.60 + /** 1.61 + * Sent when the child makes an asynchronous request to the parent. 1.62 + */ 1.63 + PTelephonyRequest(IPCTelephonyRequest request); 1.64 + 1.65 + RegisterListener(); 1.66 + 1.67 + UnregisterListener(); 1.68 + 1.69 + HangUpCall(uint32_t aClientId, uint32_t aCallIndex); 1.70 + 1.71 + AnswerCall(uint32_t aClientId, uint32_t aCallIndex); 1.72 + 1.73 + RejectCall(uint32_t aClientId, uint32_t aCallIndex); 1.74 + 1.75 + HoldCall(uint32_t aClientId, uint32_t aCallIndex); 1.76 + 1.77 + ResumeCall(uint32_t aClientId, uint32_t aCallIndex); 1.78 + 1.79 + ConferenceCall(uint32_t aClientId); 1.80 + 1.81 + SeparateCall(uint32_t aClientId, uint32_t aCallIndex); 1.82 + 1.83 + HoldConference(uint32_t aClientId); 1.84 + 1.85 + ResumeConference(uint32_t aClientId); 1.86 + 1.87 + StartTone(uint32_t aClientId, nsString aTone); 1.88 + 1.89 + StopTone(uint32_t aClientId); 1.90 + 1.91 + sync GetMicrophoneMuted() 1.92 + returns (bool aMuted); 1.93 + 1.94 + SetMicrophoneMuted(bool aMuted); 1.95 + 1.96 + sync GetSpeakerEnabled() 1.97 + returns (bool aEnabled); 1.98 + 1.99 + SetSpeakerEnabled(bool aEnabled); 1.100 +}; 1.101 + 1.102 +} /* namespace telephony */ 1.103 +} /* namespace dom */ 1.104 +} /* namespace mozilla */