2013-09-06 23:19:50 -07:00
|
|
|
/* -*- 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 {
|
|
|
|
|
2014-02-26 22:12:30 -08:00
|
|
|
struct EnumerateCallsRequest
|
|
|
|
{
|
|
|
|
// empty.
|
|
|
|
};
|
|
|
|
|
|
|
|
struct DialRequest
|
|
|
|
{
|
|
|
|
uint32_t clientId;
|
|
|
|
nsString number;
|
|
|
|
bool isEmergency;
|
|
|
|
};
|
|
|
|
|
|
|
|
union IPCTelephonyRequest
|
|
|
|
{
|
|
|
|
EnumerateCallsRequest;
|
|
|
|
DialRequest;
|
|
|
|
};
|
|
|
|
|
2013-09-06 23:19:50 -07:00
|
|
|
sync protocol PTelephony {
|
|
|
|
manager PContent;
|
|
|
|
manages PTelephonyRequest;
|
|
|
|
|
|
|
|
child:
|
2013-10-31 05:05:51 -07:00
|
|
|
NotifyCallError(uint32_t aClientId, int32_t aCallIndex, nsString aError);
|
2013-09-06 23:19:50 -07:00
|
|
|
|
2013-10-31 05:05:51 -07:00
|
|
|
NotifyCallStateChanged(uint32_t aClientId, IPCCallStateData aData);
|
2013-09-06 23:19:50 -07:00
|
|
|
|
2014-04-09 23:25:42 -07:00
|
|
|
NotifyCdmaCallWaiting(uint32_t aClientId, IPCCdmaWaitingCallData aData);
|
2013-09-06 23:19:50 -07:00
|
|
|
|
|
|
|
NotifyConferenceCallStateChanged(uint16_t aCallState);
|
|
|
|
|
2013-10-27 23:43:14 -07:00
|
|
|
NotifyConferenceError(nsString aName, nsString aMessage);
|
|
|
|
|
2013-10-31 05:05:51 -07:00
|
|
|
NotifySupplementaryService(uint32_t aClientId, int32_t aCallIndex,
|
|
|
|
uint16_t aNotification);
|
2013-09-06 23:19:50 -07:00
|
|
|
|
|
|
|
parent:
|
|
|
|
/**
|
|
|
|
* Sent when the child no longer needs to use PTelephony.
|
|
|
|
*/
|
|
|
|
__delete__();
|
|
|
|
|
|
|
|
/**
|
2014-02-26 22:12:30 -08:00
|
|
|
* Sent when the child makes an asynchronous request to the parent.
|
2013-09-06 23:19:50 -07:00
|
|
|
*/
|
2014-02-26 22:12:30 -08:00
|
|
|
PTelephonyRequest(IPCTelephonyRequest request);
|
2013-09-06 23:19:50 -07:00
|
|
|
|
|
|
|
RegisterListener();
|
|
|
|
|
|
|
|
UnregisterListener();
|
|
|
|
|
2013-10-31 05:05:51 -07:00
|
|
|
HangUpCall(uint32_t aClientId, uint32_t aCallIndex);
|
2013-09-06 23:19:50 -07:00
|
|
|
|
2013-10-31 05:05:51 -07:00
|
|
|
AnswerCall(uint32_t aClientId, uint32_t aCallIndex);
|
2013-09-06 23:19:50 -07:00
|
|
|
|
2013-10-31 05:05:51 -07:00
|
|
|
RejectCall(uint32_t aClientId, uint32_t aCallIndex);
|
2013-09-06 23:19:50 -07:00
|
|
|
|
2013-10-31 05:05:51 -07:00
|
|
|
HoldCall(uint32_t aClientId, uint32_t aCallIndex);
|
2013-09-06 23:19:50 -07:00
|
|
|
|
2013-10-31 05:05:51 -07:00
|
|
|
ResumeCall(uint32_t aClientId, uint32_t aCallIndex);
|
2013-09-06 23:19:50 -07:00
|
|
|
|
2013-10-31 05:05:51 -07:00
|
|
|
ConferenceCall(uint32_t aClientId);
|
2013-09-06 23:19:50 -07:00
|
|
|
|
2013-10-31 05:05:51 -07:00
|
|
|
SeparateCall(uint32_t aClientId, uint32_t aCallIndex);
|
2013-09-06 23:19:50 -07:00
|
|
|
|
2013-10-31 05:05:51 -07:00
|
|
|
HoldConference(uint32_t aClientId);
|
2013-09-06 23:19:50 -07:00
|
|
|
|
2013-10-31 05:05:51 -07:00
|
|
|
ResumeConference(uint32_t aClientId);
|
2013-09-06 23:19:50 -07:00
|
|
|
|
2013-10-31 05:05:51 -07:00
|
|
|
StartTone(uint32_t aClientId, nsString aTone);
|
2013-09-06 23:19:50 -07:00
|
|
|
|
2013-10-31 05:05:51 -07:00
|
|
|
StopTone(uint32_t aClientId);
|
2013-09-06 23:19:50 -07:00
|
|
|
|
|
|
|
sync GetMicrophoneMuted()
|
|
|
|
returns (bool aMuted);
|
|
|
|
|
|
|
|
SetMicrophoneMuted(bool aMuted);
|
|
|
|
|
|
|
|
sync GetSpeakerEnabled()
|
|
|
|
returns (bool aEnabled);
|
|
|
|
|
|
|
|
SetSpeakerEnabled(bool aEnabled);
|
|
|
|
};
|
|
|
|
|
|
|
|
} /* namespace telephony */
|
|
|
|
} /* namespace dom */
|
|
|
|
} /* namespace mozilla */
|