Bug 1053116 - Part 1: update error code in nfc_consts.js. r=dimi
authorYoshi Huang <allstars.chh@mozilla.com>
Fri, 15 Aug 2014 10:02:01 +0800
changeset 199686 eb8fcaf1fd4a8cd8c35f37833a6822a1a610f8ac
parent 199685 e231bba271cfcd3123703567d9bf5054feb89c7d
child 199687 d7c82822bf6740d05008a326bf2ec54bc61c2350
push id9752
push useryhuang@mozilla.com
push dateFri, 15 Aug 2014 09:46:09 +0000
treeherderb2g-inbound@d7c82822bf67 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdimi
bugs1053116
milestone34.0a1
Bug 1053116 - Part 1: update error code in nfc_consts.js. r=dimi
dom/nfc/gonk/nfc_consts.js
--- a/dom/nfc/gonk/nfc_consts.js
+++ b/dom/nfc/gonk/nfc_consts.js
@@ -68,32 +68,31 @@ this.NFC_ERROR_WRITE = -8;
 this.NFC_ERROR_INVALID_PARAM = -9;
 this.NFC_ERROR_INSUFFICIENT_RESOURCES = -10;
 this.NFC_ERROR_SOCKET_CREATION = -11;
 this.NFC_ERROR_SOCKET_NOT_CONNECTED = -12;
 this.NFC_ERROR_BUFFER_TOO_SMALL = -13;
 this.NFC_ERROR_SAP_USED = -14;
 this.NFC_ERROR_SERVICE_NAME_USED = -15;
 this.NFC_ERROR_SOCKET_OPTIONS = -16;
-this.NFC_ERROR_NFC_ALREADY_ON = -17;
-this.NFC_ERROR_NFC_ALREADY_OFF = -18;
-this.NFC_ERROR_ALREADY_DISCOVERY_ON = -19;
-this.NFC_ERROR_ALREADY_DISCOVERY_OFF = -20;
-this.NFC_ERROR_FAIL_ENABLE_DISCOVERY = -21;
-this.NFC_ERROR_FAIL_DISABLE_DISCOVERY = -22;
-this.NFC_ERROR_NOT_INITIALIZED = -23;
-this.NFC_ERROR_INITIALIZE_FAIL = -24;
-this.NFC_ERROR_DEINITIALIZE_FAIL = -25;
-this.NFC_ERROR_SE_ALREADY_SELECTED = -26;
-this.NFC_ERROR_SE_CONNECTED = -27;
-this.NFC_ERROR_NO_SE_CONNECTED = -28;
-this.NFC_ERROR_NOT_SUPPORTED = -29;
-this.NFC_ERROR_BAD_SESSION_ID = -30;
-this.NFC_ERROR_LOST_TECH = -31;
-this.NFC_ERROR_BAD_TECH_TYPE = -32;
+this.NFC_ERROR_FAIL_ENABLE_DISCOVERY = -17;
+this.NFC_ERROR_FAIL_DISABLE_DISCOVERY = -18;
+this.NFC_ERROR_NOT_INITIALIZED = -19;
+this.NFC_ERROR_INITIALIZE_FAIL = -20;
+this.NFC_ERROR_DEINITIALIZE_FAIL = -21;
+this.NFC_ERROR_SE_CONNECTED = -22;
+this.NFC_ERROR_NO_SE_CONNECTED = -23;
+this.NFC_ERROR_NOT_SUPPORTED = -24;
+this.NFC_ERROR_BAD_SESSION_ID = -25;
+this.NFC_ERROR_LOST_TECH = -26;
+this.NFC_ERROR_BAD_TECH_TYPE = -27;
+this.NFC_ERROR_SELECT_SE_FAIL = -28;
+this.NFC_ERROR_DESELECT_SE_FAIL = -29;
+this.NFC_ERROR_FAIL_ENABLE_LOW_POWER_MODE = -30;
+this.NFC_ERROR_FAIL_DISABLE_LOW_POWER_MODE = -31;
 
 // Gecko specific error codes
 this.NFC_GECKO_ERROR_GENERIC_FAILURE = 1;
 this.NFC_GECKO_ERROR_P2P_REG_INVALID = 2;
 this.NFC_GECKO_ERROR_NOT_ENABLED = 3;
 
 this.NFC_ERROR_MSG = {};
 this.NFC_ERROR_MSG[this.NFC_ERROR_IO] = "NfcIoError";
@@ -107,33 +106,31 @@ this.NFC_ERROR_MSG[this.NFC_ERROR_WRITE]
 this.NFC_ERROR_MSG[this.NFC_ERROR_INVALID_PARAM] = "NfcInvalidParamError";
 this.NFC_ERROR_MSG[this.NFC_ERROR_INSUFFICIENT_RESOURCES] = "NfcInsufficentResourcesError";
 this.NFC_ERROR_MSG[this.NFC_ERROR_SOCKET_CREATION] = "NfcSocketCreationError";
 this.NFC_ERROR_MSG[this.NFC_ERROR_SOCKET_NOT_CONNECTED] = "NfcSocketNotConntectedError";
 this.NFC_ERROR_MSG[this.NFC_ERROR_BUFFER_TOO_SMALL] = "NfcBufferTooSmallError";
 this.NFC_ERROR_MSG[this.NFC_ERROR_SAP_USED] = "NfcSapUsedError";
 this.NFC_ERROR_MSG[this.NFC_ERROR_SERVICE_NAME_USED] = "NfcServiceNameUsedError";
 this.NFC_ERROR_MSG[this.NFC_ERROR_SOCKET_OPTIONS] = "NfcSocketOptionsError";
-this.NFC_ERROR_MSG[this.NFC_ERROR_NFC_ALREADY_ON] = "NfcAlreadOnError";
-this.NFC_ERROR_MSG[this.NFC_ERROR_NFC_ALREADY_OFF] = "NfcAlreadyOffError";
-this.NFC_ERROR_MSG[this.NFC_ERROR_ALREADY_DISCOVERY_ON] = "NfcDiscoveryOnError";
-this.NFC_ERROR_MSG[this.NFC_ERROR_ALREADY_DISCOVERY_OFF] = "NfcDiscoveryOffError";
 this.NFC_ERROR_MSG[this.NFC_ERROR_FAIL_ENABLE_DISCOVERY] = "NfcFailEnableDiscoveryError";
 this.NFC_ERROR_MSG[this.NFC_ERROR_FAIL_DISABLE_DISCOVERY] = "NfcFailDisableDiscoveryError";
 this.NFC_ERROR_MSG[this.NFC_ERROR_NOT_INITIALIZED] = "NfcNotInitializedError";
 this.NFC_ERROR_MSG[this.NFC_ERROR_INITIALIZE_FAIL] = "NfcInitializeFailError";
 this.NFC_ERROR_MSG[this.NFC_ERROR_DEINITIALIZE_FAIL] = "NfcDeinitializeFailError";
-this.NFC_ERROR_MSG[this.NFC_ERROR_SE_ALREADY_SELECTED] = "NfcSeAlreadySelectedError";
 this.NFC_ERROR_MSG[this.NFC_ERROR_SE_CONNECTED] = "NfcSeConnectedError";
 this.NFC_ERROR_MSG[this.NFC_ERROR_NO_SE_CONNECTED] = "NfcNoSeConnectedError";
 this.NFC_ERROR_MSG[this.NFC_ERROR_NOT_SUPPORTED] = "NfcNotSupportedError";
 this.NFC_ERROR_MSG[this.NFC_ERROR_BAD_SESSION_ID] = "NfcBadSessionIdError";
 this.NFC_ERROR_MSG[this.NFC_ERROR_LOST_TECH] = "NfcLostTechError";
 this.NFC_ERROR_MSG[this.NFC_ERROR_BAD_TECH_TYPE] = "NfcBadTechTypeError";
-
+this.NFC_ERROR_MSG[this.NFC_ERROR_SELECT_SE_FAIL] = "SelectSecureElementFailed";
+this.NFC_ERROR_MSG[this.NFC_ERROR_DESELECT_SE_FAIL] = "DeselectSecureElementFailed";
+this.NFC_ERROR_MSG[this.NFC_ERROR_FAIL_ENABLE_LOW_POWER_MODE] = "EnableLowPowerModeFail";
+this.NFC_ERROR_MSG[this.NFC_ERROR_FAIL_DISABLE_LOW_POWER_MODE] = "DisableLowPowerModeFail";
 this.NFC_ERROR_MSG[this.NFC_GECKO_ERROR_GENERIC_FAILURE] = "NfcGenericFailureError";
 this.NFC_ERROR_MSG[this.NFC_GECKO_ERROR_P2P_REG_INVALID] = "NfcP2PRegistrationInvalid";
 this.NFC_ERROR_MSG[this.NFC_GECKO_ERROR_NOT_ENABLED] = "NfcNotEnabledError";
 
 // NFC powerlevels must match config PDUs.
 this.NFC_POWER_LEVEL_UNKNOWN        = -1;
 this.NFC_POWER_LEVEL_DISABLED       = 0;
 this.NFC_POWER_LEVEL_LOW            = 1;