mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-09-10 11:54:40 +00:00
170 lines
2.9 KiB
C++
170 lines
2.9 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;
|
|
|
|
using nsTelephonyCallInfo from "mozilla/dom/telephony/TelephonyIPCSerializer.h";
|
|
|
|
namespace mozilla {
|
|
namespace dom {
|
|
namespace telephony {
|
|
|
|
struct EnumerateCallsRequest
|
|
{
|
|
// empty.
|
|
};
|
|
|
|
struct DialRequest
|
|
{
|
|
uint32_t clientId;
|
|
nsString number;
|
|
bool isEmergency;
|
|
};
|
|
|
|
struct SendUSSDRequest
|
|
{
|
|
uint32_t clientId;
|
|
nsString ussd;
|
|
};
|
|
|
|
struct CancelUSSDRequest
|
|
{
|
|
uint32_t clientId;
|
|
};
|
|
|
|
struct ConferenceCallRequest
|
|
{
|
|
uint32_t clientId;
|
|
};
|
|
|
|
struct SeparateCallRequest
|
|
{
|
|
uint32_t clientId;
|
|
uint32_t callIndex;
|
|
};
|
|
|
|
struct HangUpConferenceRequest
|
|
{
|
|
uint32_t clientId;
|
|
};
|
|
|
|
struct HoldConferenceRequest
|
|
{
|
|
uint32_t clientId;
|
|
};
|
|
|
|
struct ResumeConferenceRequest
|
|
{
|
|
uint32_t clientId;
|
|
};
|
|
|
|
struct AnswerCallRequest
|
|
{
|
|
uint32_t clientId;
|
|
uint32_t callIndex;
|
|
};
|
|
|
|
struct HangUpCallRequest
|
|
{
|
|
uint32_t clientId;
|
|
uint32_t callIndex;
|
|
};
|
|
|
|
struct RejectCallRequest
|
|
{
|
|
uint32_t clientId;
|
|
uint32_t callIndex;
|
|
};
|
|
|
|
struct HoldCallRequest
|
|
{
|
|
uint32_t clientId;
|
|
uint32_t callIndex;
|
|
};
|
|
|
|
struct ResumeCallRequest
|
|
{
|
|
uint32_t clientId;
|
|
uint32_t callIndex;
|
|
};
|
|
|
|
struct SendTonesRequest
|
|
{
|
|
uint32_t clientId;
|
|
nsString dtmfChars;
|
|
uint32_t pauseDuration;
|
|
uint32_t toneDuration;
|
|
};
|
|
|
|
union IPCTelephonyRequest
|
|
{
|
|
EnumerateCallsRequest;
|
|
DialRequest;
|
|
SendUSSDRequest;
|
|
CancelUSSDRequest;
|
|
ConferenceCallRequest;
|
|
SeparateCallRequest;
|
|
HangUpConferenceRequest;
|
|
HoldConferenceRequest;
|
|
ResumeConferenceRequest;
|
|
AnswerCallRequest;
|
|
HangUpCallRequest;
|
|
RejectCallRequest;
|
|
HoldCallRequest;
|
|
ResumeCallRequest;
|
|
SendTonesRequest;
|
|
};
|
|
|
|
sync protocol PTelephony {
|
|
manager PContent;
|
|
manages PTelephonyRequest;
|
|
|
|
child:
|
|
NotifyCallStateChanged(nsTelephonyCallInfo[] aAllInfo);
|
|
|
|
NotifyCdmaCallWaiting(uint32_t aClientId, IPCCdmaWaitingCallData aData);
|
|
|
|
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();
|
|
|
|
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 */
|