gecko/dom/telephony/ipc/PTelephony.ipdl

115 lines
2.4 KiB
C++

/* -*- 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;
};
struct USSDRequest
{
uint32_t clientId;
nsString ussd;
};
struct HangUpConferenceRequest
{
uint32_t clientId;
};
union IPCTelephonyRequest
{
EnumerateCallsRequest;
DialRequest;
USSDRequest;
HangUpConferenceRequest;
};
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, IPCCdmaWaitingCallData aData);
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 */