mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 14:25:52 +00:00
Bug 864485 - 1/3: B2G Telephony - move to IPDL. Interface changes. sr=sicking, r=hsinyi,khuey
This commit is contained in:
parent
3787fb7dfe
commit
11f93d78f3
@ -20,6 +20,7 @@ include protocol PNecko;
|
|||||||
include protocol PSms;
|
include protocol PSms;
|
||||||
include protocol PSpeechSynthesis;
|
include protocol PSpeechSynthesis;
|
||||||
include protocol PStorage;
|
include protocol PStorage;
|
||||||
|
include protocol PTelephony;
|
||||||
include protocol PTestShell;
|
include protocol PTestShell;
|
||||||
include protocol PJavaScript;
|
include protocol PJavaScript;
|
||||||
include DOMTypes;
|
include DOMTypes;
|
||||||
@ -197,6 +198,7 @@ rpc protocol PContent
|
|||||||
manages PSms;
|
manages PSms;
|
||||||
manages PSpeechSynthesis;
|
manages PSpeechSynthesis;
|
||||||
manages PStorage;
|
manages PStorage;
|
||||||
|
manages PTelephony;
|
||||||
manages PTestShell;
|
manages PTestShell;
|
||||||
manages PJavaScript;
|
manages PJavaScript;
|
||||||
|
|
||||||
@ -353,6 +355,8 @@ parent:
|
|||||||
|
|
||||||
PStorage();
|
PStorage();
|
||||||
|
|
||||||
|
PTelephony();
|
||||||
|
|
||||||
PBluetooth();
|
PBluetooth();
|
||||||
|
|
||||||
PFMRadio();
|
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"
|
#include "nsISupports.idl"
|
||||||
|
|
||||||
[scriptable, uuid(a5818719-e1b6-4fdc-8551-006055fa9996)]
|
[scriptable, uuid(3aa42e77-7c2b-43a1-b105-7be094b0817a)]
|
||||||
interface nsITelephonyListener : nsISupports
|
interface nsITelephonyListener : nsISupports
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -67,15 +67,14 @@ interface nsITelephonyListener : nsISupports
|
|||||||
* Indicates whether this call is outgoing or incoming.
|
* Indicates whether this call is outgoing or incoming.
|
||||||
* @param isConference
|
* @param isConference
|
||||||
* Indicates whether this call is a conference call.
|
* Indicates whether this call is a conference call.
|
||||||
* @return true to continue enumeration or false to cancel.
|
|
||||||
*/
|
*/
|
||||||
boolean enumerateCallState(in unsigned long callIndex,
|
void enumerateCallState(in unsigned long callIndex,
|
||||||
in unsigned short callState,
|
in unsigned short callState,
|
||||||
in AString number,
|
in AString number,
|
||||||
in boolean isActive,
|
in boolean isActive,
|
||||||
in boolean isOutgoing,
|
in boolean isOutgoing,
|
||||||
in boolean isEmergency,
|
in boolean isEmergency,
|
||||||
in boolean isConference);
|
in boolean isConference);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notify when RIL receives supplementary service notification.
|
* Notify when RIL receives supplementary service notification.
|
||||||
@ -108,11 +107,18 @@ interface nsITelephonyListener : nsISupports
|
|||||||
void notifyCdmaCallWaiting(in AString number);
|
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
|
* XPCOM component (in the content process) that provides the telephony
|
||||||
* information.
|
* information.
|
||||||
*/
|
*/
|
||||||
[scriptable, uuid(45a2f856-4e07-499a-94c6-624f90c3345b)]
|
[scriptable, uuid(effca006-1ca8-47f7-9bab-1323f90a14ec)]
|
||||||
interface nsITelephonyProvider : nsISupports
|
interface nsITelephonyProvider : nsISupports
|
||||||
{
|
{
|
||||||
const unsigned short CALL_STATE_UNKNOWN = 0;
|
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
|
* RadioInterfaceLayer in the chrome process. Only a content process that has
|
||||||
* the 'telephony' permission is allowed to register.
|
* the 'telephony' permission is allowed to register.
|
||||||
*/
|
*/
|
||||||
void registerTelephonyMsg(in nsITelephonyListener listener);
|
void registerListener(in nsITelephonyListener listener);
|
||||||
void unregisterTelephonyMsg(in nsITelephonyListener listener);
|
void unregisterListener(in nsITelephonyListener listener);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Will continue calling listener.enumerateCallState until the listener
|
* Will continue calling listener.enumerateCallState until the listener
|
||||||
@ -147,8 +153,8 @@ interface nsITelephonyProvider : nsISupports
|
|||||||
/**
|
/**
|
||||||
* Functionality for making and managing phone calls.
|
* Functionality for making and managing phone calls.
|
||||||
*/
|
*/
|
||||||
void dial(in DOMString number);
|
void dial(in DOMString number,
|
||||||
void dialEmergency(in DOMString number);
|
in boolean isEmergency);
|
||||||
void hangUp(in unsigned long callIndex);
|
void hangUp(in unsigned long callIndex);
|
||||||
|
|
||||||
void startTone(in DOMString dtmfChar);
|
void startTone(in DOMString dtmfChar);
|
||||||
|
Loading…
Reference in New Issue
Block a user