Bug 1083843 - [MobileConnection] Deprecate CFStateChangeEvent.success. r=hsinyi,smaug,btian

This commit is contained in:
Edgar Chen 2014-10-23 22:13:35 +08:00
Родитель d437aeb62f
Коммит 6c4b7b4e65
13 изменённых файлов: 18 добавлений и 38 удалений

Просмотреть файл

@ -115,8 +115,7 @@ MobileConnectionListener::NotifyDataError(const nsAString & message)
}
NS_IMETHODIMP
MobileConnectionListener::NotifyCFStateChanged(bool success,
uint16_t action,
MobileConnectionListener::NotifyCFStateChanged(uint16_t action,
uint16_t reason,
const nsAString& number,
uint16_t timeSeconds,

Просмотреть файл

@ -115,8 +115,7 @@ MobileConnectionListener::NotifyDataError(const nsAString & message)
}
NS_IMETHODIMP
MobileConnectionListener::NotifyCFStateChanged(bool success,
uint16_t action,
MobileConnectionListener::NotifyCFStateChanged(uint16_t action,
uint16_t reason,
const nsAString& number,
uint16_t timeSeconds,

Просмотреть файл

@ -1041,8 +1041,7 @@ MobileConnection::NotifyDataError(const nsAString& aMessage)
}
NS_IMETHODIMP
MobileConnection::NotifyCFStateChanged(bool aSuccess,
unsigned short aAction,
MobileConnection::NotifyCFStateChanged(unsigned short aAction,
unsigned short aReason,
const nsAString& aNumber,
unsigned short aSeconds,
@ -1055,7 +1054,6 @@ MobileConnection::NotifyCFStateChanged(bool aSuccess,
CFStateChangeEventInit init;
init.mBubbles = false;
init.mCancelable = false;
init.mSuccess = aSuccess;
init.mAction = aAction;
init.mReason = aReason;
init.mNumber = aNumber;

Просмотреть файл

@ -665,8 +665,8 @@ MobileConnectionProvider.prototype = {
notifyCFStateChanged: function(aAction, aReason, aNumber, aTimeSeconds,
aServiceClass) {
this.deliverListenerEvent("notifyCFStateChanged",
[true, aAction, aReason, aNumber, aTimeSeconds,
aServiceClass]);
[aAction, aReason, aNumber, aTimeSeconds,
aServiceClass]);
},
getSupportedNetworkTypes: function(aTypes) {

Просмотреть файл

@ -12,7 +12,7 @@ interface nsIMobileNetworkInfo;
interface nsINeighboringCellIdsCallback;
interface nsIVariant;
[scriptable, uuid(823d935e-8262-47ed-8429-8203096b2ff4)]
[scriptable, uuid(c00abd30-5b2e-11e4-8ed6-0800200c9a66)]
interface nsIMobileConnectionListener : nsISupports
{
/**
@ -47,8 +47,6 @@ interface nsIMobileConnectionListener : nsISupports
/**
* Notify when call forwarding state is changed.
*
* @param success
* Indicates whether the set call forwarding request is success.
* @param action
* One of the nsIMobileConnection.CALL_FORWARD_ACTION_* values.
* @param reason
@ -60,8 +58,7 @@ interface nsIMobileConnectionListener : nsISupports
* @param serviceClass
* One of the nsIMobileConnection.ICC_SERVICE_CLASS_* values.
*/
void notifyCFStateChanged(in boolean success,
in unsigned short action,
void notifyCFStateChanged(in unsigned short action,
in unsigned short reason,
in DOMString number,
in unsigned short timeSeconds,

Просмотреть файл

@ -439,16 +439,15 @@ MobileConnectionChild::RecvNotifyDataError(const nsString& aMessage)
}
bool
MobileConnectionChild::RecvNotifyCFStateChanged(const bool& aSuccess,
const uint16_t& aAction,
MobileConnectionChild::RecvNotifyCFStateChanged(const uint16_t& aAction,
const uint16_t& aReason,
const nsString& aNumber,
const uint16_t& aTimeSeconds,
const uint16_t& aServiceClass)
{
for (int32_t i = 0; i < mListeners.Count(); i++) {
mListeners[i]->NotifyCFStateChanged(aSuccess, aAction, aReason, aNumber,
aTimeSeconds, aServiceClass);
mListeners[i]->NotifyCFStateChanged(aAction, aReason, aNumber, aTimeSeconds,
aServiceClass);
}
return true;

Просмотреть файл

@ -77,9 +77,9 @@ protected:
RecvNotifyDataError(const nsString& aMessage) MOZ_OVERRIDE;
virtual bool
RecvNotifyCFStateChanged(const bool& aSuccess, const uint16_t& aAction,
const uint16_t& aReason, const nsString& aNumber,
const uint16_t& aTimeSeconds, const uint16_t& aServiceClass) MOZ_OVERRIDE;
RecvNotifyCFStateChanged(const uint16_t& aAction, const uint16_t& aReason,
const nsString& aNumber, const uint16_t& aTimeSeconds,
const uint16_t& aServiceClass) MOZ_OVERRIDE;
virtual bool
RecvNotifyEmergencyCbModeChanged(const bool& aActive,

Просмотреть файл

@ -212,8 +212,7 @@ MobileConnectionParent::NotifyDataError(const nsAString& aMessage)
}
NS_IMETHODIMP
MobileConnectionParent::NotifyCFStateChanged(bool aSuccess,
uint16_t aAction,
MobileConnectionParent::NotifyCFStateChanged(uint16_t aAction,
uint16_t aReason,
const nsAString &aNumber,
uint16_t aTimeSeconds,
@ -221,9 +220,8 @@ MobileConnectionParent::NotifyCFStateChanged(bool aSuccess,
{
NS_ENSURE_TRUE(mLive, NS_ERROR_FAILURE);
return SendNotifyCFStateChanged(aSuccess, aAction, aReason,
nsAutoString(aNumber), aTimeSeconds,
aServiceClass) ? NS_OK : NS_ERROR_FAILURE;
return SendNotifyCFStateChanged(aAction, aReason, nsAutoString(aNumber),
aTimeSeconds, aServiceClass) ? NS_OK : NS_ERROR_FAILURE;
}
NS_IMETHODIMP

Просмотреть файл

@ -22,9 +22,8 @@ child:
NotifyDataInfoChanged(nsMobileConnectionInfo aInfo);
NotifyUssdReceived(nsString aMessage, bool aSessionEnd);
NotifyDataError(nsString aMessage);
NotifyCFStateChanged(bool aSuccess, uint16_t aAction, uint16_t aReason,
nsString aNumber, uint16_t aTimeSeconds,
uint16_t aServiceClass);
NotifyCFStateChanged(uint16_t aAction, uint16_t aReason, nsString aNumber,
uint16_t aTimeSeconds, uint16_t aServiceClass);
NotifyEmergencyCbModeChanged(bool aActive, uint32_t aTimeoutMs);
NotifyOtaStatusChanged(nsString aStatus);
NotifyIccChanged(nsString aIccId);

Просмотреть файл

@ -29,7 +29,6 @@ function testSetCallForwardingOption(aOptions) {
// Check cfstatechange event.
promises.push(waitForManagerEvent("cfstatechange").then(function(aEvent) {
is(aEvent.success, true, "check success");
is(aEvent.action, aOptions.action, "check action");
is(aEvent.reason, aOptions.reason, "check reason");
is(aEvent.number, aOptions.number, "check number");

Просмотреть файл

@ -60,7 +60,6 @@ function testSetCallForwarding(aData) {
let promises = [];
// Check cfstatechange event.
promises.push(waitForManagerEvent("cfstatechange").then(function(aEvent) {
is(aEvent.success, true, "check success");
is(aEvent.action, MozMobileConnection.CALL_FORWARD_ACTION_REGISTRATION,
"check action");
is(aEvent.reason, aData.reason, "check reason");

Просмотреть файл

@ -105,7 +105,6 @@ function testSetCallForwarding(aData) {
let promises = [];
// Check cfstatechange event.
promises.push(waitForManagerEvent("cfstatechange").then(function(aEvent) {
is(aEvent.success, true, "check success");
is(aEvent.action, MozMobileConnection.CALL_FORWARD_ACTION_REGISTRATION,
"check action");
is(aEvent.reason, aData.reason, "check reason");

Просмотреть файл

@ -8,11 +8,6 @@
Constructor(DOMString type, optional CFStateChangeEventInit eventInitDict)]
interface CFStateChangeEvent : Event
{
/**
* Indicates about errors while setting up the Call forwarding rule.
*/
readonly attribute boolean success;
/**
* Indicates what to do with the rule.
*
@ -56,7 +51,6 @@ interface CFStateChangeEvent : Event
dictionary CFStateChangeEventInit : EventInit
{
boolean success = false;
unsigned short action = 0;
unsigned short reason = 0;
DOMString number = "";