mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 864485 - 1/3: B2G Telephony - move to IPDL. Interface changes. sr=sicking, r=hsinyi,khuey
This commit is contained in:
parent
2dd1ca23e2
commit
1895f8828a
@ -20,6 +20,7 @@ include protocol PNecko;
|
||||
include protocol PSms;
|
||||
include protocol PSpeechSynthesis;
|
||||
include protocol PStorage;
|
||||
include protocol PTelephony;
|
||||
include protocol PTestShell;
|
||||
include protocol PJavaScript;
|
||||
include DOMTypes;
|
||||
@ -197,6 +198,7 @@ rpc protocol PContent
|
||||
manages PSms;
|
||||
manages PSpeechSynthesis;
|
||||
manages PStorage;
|
||||
manages PTelephony;
|
||||
manages PTestShell;
|
||||
manages PJavaScript;
|
||||
|
||||
@ -353,6 +355,8 @@ parent:
|
||||
|
||||
PStorage();
|
||||
|
||||
PTelephony();
|
||||
|
||||
PBluetooth();
|
||||
|
||||
PFMRadio();
|
||||
|
83
dom/telephony/ipc/PTelephony.ipdl
Normal file
83
dom/telephony/ipc/PTelephony.ipdl
Normal file
@ -0,0 +1,83 @@
|
||||
/* -*- 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 {
|
||||
|
||||
sync protocol PTelephony {
|
||||
manager PContent;
|
||||
manages PTelephonyRequest;
|
||||
|
||||
child:
|
||||
NotifyCallError(int32_t aCallIndex, nsString aError);
|
||||
|
||||
NotifyCallStateChanged(IPCCallStateData aData);
|
||||
|
||||
NotifyCdmaCallWaiting(nsString aNumber);
|
||||
|
||||
NotifyConferenceCallStateChanged(uint16_t aCallState);
|
||||
|
||||
NotifySupplementaryService(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. It's
|
||||
* currently only for request call enumeration.
|
||||
*/
|
||||
PTelephonyRequest();
|
||||
|
||||
RegisterListener();
|
||||
|
||||
UnregisterListener();
|
||||
|
||||
DialCall(nsString aNumber, bool aIsEmergency);
|
||||
|
||||
HangUpCall(uint32_t aCallIndex);
|
||||
|
||||
AnswerCall(uint32_t aCallIndex);
|
||||
|
||||
RejectCall(uint32_t aCallIndex);
|
||||
|
||||
HoldCall(uint32_t aCallIndex);
|
||||
|
||||
ResumeCall(uint32_t aCallIndex);
|
||||
|
||||
ConferenceCall();
|
||||
|
||||
SeparateCall(uint32_t aCallIndex);
|
||||
|
||||
HoldConference();
|
||||
|
||||
ResumeConference();
|
||||
|
||||
StartTone(nsString aTone);
|
||||
|
||||
StopTone();
|
||||
|
||||
sync GetMicrophoneMuted()
|
||||
returns (bool aMuted);
|
||||
|
||||
SetMicrophoneMuted(bool aMuted);
|
||||
|
||||
sync GetSpeakerEnabled()
|
||||
returns (bool aEnabled);
|
||||
|
||||
SetSpeakerEnabled(bool aEnabled);
|
||||
};
|
||||
|
||||
} /* namespace telephony */
|
||||
} /* namespace dom */
|
||||
} /* namespace mozilla */
|
30
dom/telephony/ipc/PTelephonyRequest.ipdl
Normal file
30
dom/telephony/ipc/PTelephonyRequest.ipdl
Normal file
@ -0,0 +1,30 @@
|
||||
/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
|
||||
/* vim: set ts=2 et sw=2 tw=80: */
|
||||
/* 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 PTelephony;
|
||||
include TelephonyTypes;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
namespace telephony {
|
||||
|
||||
protocol PTelephonyRequest
|
||||
{
|
||||
manager PTelephony;
|
||||
|
||||
child:
|
||||
NotifyEnumerateCallState(IPCCallStateData aData);
|
||||
|
||||
/**
|
||||
* Sent when the asynchronous request has completed. It's currently only for
|
||||
* request call enumeration.
|
||||
*/
|
||||
__delete__();
|
||||
};
|
||||
|
||||
} /* namespace telephony */
|
||||
} /* namespace dom */
|
||||
} /* namespace mozilla */
|
24
dom/telephony/ipc/TelephonyTypes.ipdlh
Normal file
24
dom/telephony/ipc/TelephonyTypes.ipdlh
Normal file
@ -0,0 +1,24 @@
|
||||
/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
|
||||
/* vim: set ts=2 et sw=2 tw=80: */
|
||||
/* 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/. */
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
namespace telephony {
|
||||
|
||||
struct IPCCallStateData
|
||||
{
|
||||
uint32_t callIndex;
|
||||
uint16_t callState;
|
||||
nsString number;
|
||||
bool isActive;
|
||||
bool isOutGoing;
|
||||
bool isEmergency;
|
||||
bool isConference;
|
||||
};
|
||||
|
||||
} /* namespace telephony */
|
||||
} /* namespace dom */
|
||||
} /* namespace mozilla */
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
[scriptable, uuid(a5818719-e1b6-4fdc-8551-006055fa9996)]
|
||||
[scriptable, uuid(3aa42e77-7c2b-43a1-b105-7be094b0817a)]
|
||||
interface nsITelephonyListener : nsISupports
|
||||
{
|
||||
/**
|
||||
@ -67,15 +67,14 @@ interface nsITelephonyListener : nsISupports
|
||||
* Indicates whether this call is outgoing or incoming.
|
||||
* @param isConference
|
||||
* Indicates whether this call is a conference call.
|
||||
* @return true to continue enumeration or false to cancel.
|
||||
*/
|
||||
boolean enumerateCallState(in unsigned long callIndex,
|
||||
in unsigned short callState,
|
||||
in AString number,
|
||||
in boolean isActive,
|
||||
in boolean isOutgoing,
|
||||
in boolean isEmergency,
|
||||
in boolean isConference);
|
||||
void enumerateCallState(in unsigned long callIndex,
|
||||
in unsigned short callState,
|
||||
in AString number,
|
||||
in boolean isActive,
|
||||
in boolean isOutgoing,
|
||||
in boolean isEmergency,
|
||||
in boolean isConference);
|
||||
|
||||
/**
|
||||
* Notify when RIL receives supplementary service notification.
|
||||
@ -108,11 +107,18 @@ interface nsITelephonyListener : nsISupports
|
||||
void notifyCdmaCallWaiting(in AString number);
|
||||
};
|
||||
|
||||
%{C++
|
||||
#define TELEPHONY_PROVIDER_CID \
|
||||
{ 0x9cf8aa52, 0x7c1c, 0x4cde, { 0x97, 0x4e, 0xed, 0x2a, 0xa0, 0xe7, 0x35, 0xfa } }
|
||||
#define TELEPHONY_PROVIDER_CONTRACTID \
|
||||
"@mozilla.org/telephony/telephonyprovider;1"
|
||||
%}
|
||||
|
||||
/**
|
||||
* XPCOM component (in the content process) that provides the telephony
|
||||
* information.
|
||||
*/
|
||||
[scriptable, uuid(45a2f856-4e07-499a-94c6-624f90c3345b)]
|
||||
[scriptable, uuid(effca006-1ca8-47f7-9bab-1323f90a14ec)]
|
||||
interface nsITelephonyProvider : nsISupports
|
||||
{
|
||||
const unsigned short CALL_STATE_UNKNOWN = 0;
|
||||
@ -135,8 +141,8 @@ interface nsITelephonyProvider : nsISupports
|
||||
* RadioInterfaceLayer in the chrome process. Only a content process that has
|
||||
* the 'telephony' permission is allowed to register.
|
||||
*/
|
||||
void registerTelephonyMsg(in nsITelephonyListener listener);
|
||||
void unregisterTelephonyMsg(in nsITelephonyListener listener);
|
||||
void registerListener(in nsITelephonyListener listener);
|
||||
void unregisterListener(in nsITelephonyListener listener);
|
||||
|
||||
/**
|
||||
* Will continue calling listener.enumerateCallState until the listener
|
||||
@ -147,8 +153,8 @@ interface nsITelephonyProvider : nsISupports
|
||||
/**
|
||||
* Functionality for making and managing phone calls.
|
||||
*/
|
||||
void dial(in DOMString number);
|
||||
void dialEmergency(in DOMString number);
|
||||
void dial(in DOMString number,
|
||||
in boolean isEmergency);
|
||||
void hangUp(in unsigned long callIndex);
|
||||
|
||||
void startTone(in DOMString dtmfChar);
|
||||
|
Loading…
Reference in New Issue
Block a user