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