Bug 1070831 - Part 3: Internal interface changes. r=aknow

This commit is contained in:
Ben Hsu 2014-12-21 17:31:00 +01:00
parent 6ebe0e8d9f
commit 913c56d983
5 changed files with 22 additions and 126 deletions

View File

@ -9,7 +9,7 @@
"@mozilla.org/mobileconnection/gonkmobileconnectionservice;1"
%}
[scriptable, uuid(eae40ffe-394a-4355-8e0b-07170d3e70f4)]
[scriptable, uuid(ef49b866-85a0-11e4-b023-f73e02752840)]
interface nsIGonkMobileConnectionService : nsIMobileConnectionService
{
void notifyNetworkInfoChanged(in unsigned long clientId, in jsval networkInfo);
@ -29,10 +29,6 @@ interface nsIGonkMobileConnectionService : nsIMobileConnectionService
void notifyRadioStateChanged(in unsigned long clientId,
in long radioState);
void notifyUssdReceived(in unsigned long clientId,
in DOMString message,
in boolean sessionEnded);
void notifyEmergencyCallbackModeChanged(in unsigned long clientId,
in boolean active,
in unsigned long timeoutMs);

View File

@ -4,23 +4,9 @@
#include "nsISupports.idl"
[scriptable, uuid(fd2fa95c-5b54-11e4-bc6b-6f3bffb681cd)]
[scriptable, uuid(b9ec941e-8504-11e4-810e-7b62c60e8261)]
interface nsIMobileConnectionMessenger : nsISupports
{
/**
* 'ussd-received' system message
*
* @param aServiceId
* The ID of Service where this info is notified from.
* @param aMessage
* USSD Message to be displayed.
* @param aSessionEnded
* True if USSD session is ended.
*/
void notifyUssdReceived(in unsigned long aServiceId,
in DOMString aMessage,
in boolean aSessionEnded);
/**
* 'cdma-info-rec-received' system message with Display Info
*

View File

@ -12,7 +12,7 @@ interface nsIMobileNetworkInfo;
interface nsINeighboringCellIdsCallback;
interface nsIVariant;
[scriptable, uuid(c00abd30-5b2e-11e4-8ed6-0800200c9a66)]
[scriptable, uuid(6e6468a4-84fb-11e4-9b66-17dbe13c059e)]
interface nsIMobileConnectionListener : nsISupports
{
/**
@ -25,17 +25,6 @@ interface nsIMobileConnectionListener : nsISupports
*/
void notifyDataChanged();
/**
* Notify when ussd is received.
*
* @param message
* The ussd request in string format.
* @param sessionEnded
* Indicates whether the session is ended.
*/
void notifyUssdReceived(in DOMString message,
in boolean sessionEnded);
/**
* Notify when data call is failed to establish.
*
@ -124,7 +113,7 @@ interface nsIMobileConnectionListener : nsISupports
#define NO_ADDITIONAL_INFORMATION 0
%}
[scriptable, builtinclass, uuid(16e77f19-0298-46de-ae49-9b2fb92a28c0)]
[scriptable, builtinclass, uuid(14d66926-8434-11e4-8c3f-f724194bb5f1)]
interface nsIMobileConnectionCallback : nsISupports
{
/**
@ -137,27 +126,9 @@ interface nsIMobileConnectionCallback : nsISupports
void notifyGetNetworksSuccess(in uint32_t count,
[array, size_is(count)] in nsIMobileNetworkInfo networks);
void notifySendCancelMmiSuccess(in DOMString aServiceCode,
in DOMString aStatusMessage);
void notifySendCancelMmiSuccessWithInteger(in DOMString aServiceCode,
in DOMString aStatusMessage,
in unsigned short aAdditionalInformation);
void notifySendCancelMmiSuccessWithStrings(in DOMString aServiceCode,
in DOMString aStatusMessage,
in unsigned long aLength,
[array, size_is(aLength)] in wstring aAdditionalInformation);
void notifySendCancelMmiSuccessWithCallForwardingOptions(in DOMString aServiceCode,
in DOMString aStatusMessage,
in unsigned long aLength,
[array, size_is(aLength)] in nsIMobileCallForwardingOptions aAdditionalInformation);
void notifyGetCallForwardingSuccess(in uint32_t count,
[array, size_is(count)] in nsIMobileCallForwardingOptions results);
void notifyGetCallBarringSuccess(in unsigned short program,
in boolean enabled,
in unsigned short serviceClass);
@ -171,45 +142,7 @@ interface nsIMobileConnectionCallback : nsISupports
/**
* notifyError() will be called, when request is failed.
*/
[optional_argc]
void notifyError(in DOMString name,
[optional] in DOMString message,
[optional] in DOMString serviceCode,
[optional] in unsigned short additionalInformation);
%{C++
// non-virtual so it won't affect the vtable
inline nsresult NotifyError(const nsAString& aName)
{
return NotifyError(aName, EmptyString(), EmptyString(),
NO_ADDITIONAL_INFORMATION, 0 /* ARGC = 0 */);
}
// non-virtual so it won't affect the vtable
inline nsresult NotifyError(const nsAString& aName,
const nsAString& aMessage)
{
return NotifyError(aName, aMessage, EmptyString(), NO_ADDITIONAL_INFORMATION,
1 /* ARGC = 1 */);
}
// non-virtual so it won't affect the vtable
inline nsresult NotifyError(const nsAString& aName,
const nsAString& aMessage,
const nsAString& aServiceCode)
{
return NotifyError(aName, aMessage, aServiceCode, NO_ADDITIONAL_INFORMATION,
2 /* ARGC = 2 */);
}
// non-virtual so it won't affect the vtable
inline nsresult NotifyError(const nsAString& aName,
const nsAString& aMessage,
const nsAString& aServiceCode,
uint16_t aAdditionInformation)
{
return NotifyError(aName, aMessage, aServiceCode, aAdditionInformation,
3 /* ARGC = 3 */);
}
%}
void notifyError(in DOMString name);
};
%{C++
@ -235,7 +168,7 @@ already_AddRefed<nsIMobileConnectionService>
NS_CreateMobileConnectionService();
%}
[scriptable, uuid(99e43353-5fc4-497e-88a2-5fa6862ee64c)]
[scriptable, uuid(2b3d0122-8054-11e4-964e-c727f38fd7e6)]
interface nsIMobileConnection : nsISupports
{
/*
@ -549,36 +482,6 @@ interface nsIMobileConnection : nsISupports
*/
void getVoicePrivacyMode(in nsIMobileConnectionCallback requestCallback);
/**
* Send a MMI message.
*
* @param mmi
* DOMString containing an MMI string that can be associated to a
* USSD request or other RIL functionality.
* @param requestCallback
* Called when request is finished.
*
* If successful, the notifySendCancelMmiSuccess*() will be called. And the
* result will contain the information about the mmi operation.
*
* Otherwise, the notifyError() will be called.
*/
void sendMMI(in DOMString mmi,
in nsIMobileConnectionCallback requestCallback);
/**
* Cancel the current MMI request if one exists.
*
* @param requestCallback
* Called when request is finished.
*
* If successful, the notifySendCancelMmiSuccess*() will be called. And the
* result will contain the information about the mmi operation.
*
* Otherwise, the notifyError() will be called.
*/
void cancelMMI(in nsIMobileConnectionCallback requestCallback);
/**
* Queries current call forwarding options.
*

View File

@ -10,7 +10,7 @@
"@mozilla.org/telephony/gonktelephonyservice;1"
%}
[scriptable, uuid(068d7bf2-1773-48ef-95f8-bd835115fed7)]
[scriptable, uuid(cbbe66d8-865b-11e4-94f1-ab441e55905b)]
interface nsIGonkTelephonyService : nsITelephonyService
{
void notifyAudioStateChanged(in unsigned long clientId, in short state);
@ -31,7 +31,4 @@ interface nsIGonkTelephonyService : nsITelephonyService
void notifyUssdReceived(in unsigned long clientId, in DOMString message,
in boolean sessionEnded);
void dialMMI(in unsigned long clientId, in AString mmiString,
in nsITelephonyDialCallback callback);
};

View File

@ -4,7 +4,7 @@
#include "nsISupports.idl"
[scriptable, uuid(998a48b2-5b54-11e4-833e-6b17c1427d49)]
[scriptable, uuid(84045b7e-84fb-11e4-a94c-5ba58d0d5932)]
interface nsITelephonyMessenger : nsISupports
{
/**
@ -37,4 +37,18 @@ interface nsITelephonyMessenger : nsISupports
in unsigned long aDuration,
in boolean aOutgoing,
in boolean aHangUpLocal);
/**
* 'ussd-received' system message
*
* @param aServiceId
* The ID of Service where this info is notified from.
* @param aMessage
* USSD Message to be displayed.
* @param aSessionEnded
* True if USSD session is ended.
*/
void notifyUssdReceived(in unsigned long aServiceId,
in DOMString aMessage,
in boolean aSessionEnded);
};