diff -r 000000000000 -r 6474c204b198 dom/telephony/ipc/PTelephony.ipdl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dom/telephony/ipc/PTelephony.ipdl Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,101 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set sw=2 ts=8 et ft=cpp : */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +include protocol PContent; +include protocol PTelephonyRequest; +include TelephonyTypes; + +namespace mozilla { +namespace dom { +namespace telephony { + +struct EnumerateCallsRequest +{ + // empty. +}; + +struct DialRequest +{ + uint32_t clientId; + nsString number; + bool isEmergency; +}; + +union IPCTelephonyRequest +{ + EnumerateCallsRequest; + DialRequest; +}; + +sync protocol PTelephony { + manager PContent; + manages PTelephonyRequest; + +child: + NotifyCallError(uint32_t aClientId, int32_t aCallIndex, nsString aError); + + NotifyCallStateChanged(uint32_t aClientId, IPCCallStateData aData); + + NotifyCdmaCallWaiting(uint32_t aClientId, nsString aNumber); + + NotifyConferenceCallStateChanged(uint16_t aCallState); + + NotifyConferenceError(nsString aName, nsString aMessage); + + NotifySupplementaryService(uint32_t aClientId, int32_t aCallIndex, + uint16_t aNotification); + +parent: + /** + * Sent when the child no longer needs to use PTelephony. + */ + __delete__(); + + /** + * Sent when the child makes an asynchronous request to the parent. + */ + PTelephonyRequest(IPCTelephonyRequest request); + + RegisterListener(); + + UnregisterListener(); + + HangUpCall(uint32_t aClientId, uint32_t aCallIndex); + + AnswerCall(uint32_t aClientId, uint32_t aCallIndex); + + RejectCall(uint32_t aClientId, uint32_t aCallIndex); + + HoldCall(uint32_t aClientId, uint32_t aCallIndex); + + ResumeCall(uint32_t aClientId, uint32_t aCallIndex); + + ConferenceCall(uint32_t aClientId); + + SeparateCall(uint32_t aClientId, uint32_t aCallIndex); + + HoldConference(uint32_t aClientId); + + ResumeConference(uint32_t aClientId); + + StartTone(uint32_t aClientId, nsString aTone); + + StopTone(uint32_t aClientId); + + sync GetMicrophoneMuted() + returns (bool aMuted); + + SetMicrophoneMuted(bool aMuted); + + sync GetSpeakerEnabled() + returns (bool aEnabled); + + SetSpeakerEnabled(bool aEnabled); +}; + +} /* namespace telephony */ +} /* namespace dom */ +} /* namespace mozilla */