# Class Storage#getFirmwareUpgradeStatus

storage

- Defined in: storage.js

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| Storage#getFirmwareUpgradeStatus(successCallback, errorCallback) Gets the status of firmware upgrading.

## Class Detail

Storage#getFirmwareUpgradeStatus(successCallback, errorCallback)

Gets the status of firmware upgrading.

    function getFirmwareUpgradeStatus() {
       var successCb = function (cbObject) {
         console.log("status " + cbObject.status);
         console.log("upgradeProgress " + cbObject.upgradeProgress);
         console.log("downloadProgress " + cbObject.downloadProgress);
       };

       var failureCb = function(cbObject) {
         var errorCode = cbObject.errorCode;
         var errorText = cbObject.errorText;
         console.log( " Error Code [" + errorCode + "]: " + errorText);
       };

       var storage = new Storage();
       storage.getFirmwareUpgradeStatus(successCb, failureCb);

    }

Parameters:
{Function} successCallback
  success callback function.
{Function} errorCallback
  failure callback function.

Since:
  1.2
Returns:
  {Object}

  Property | Type | Description
  --- | --- | ---
  status | String | idle | downloading | ready | in progress | completed | fail
  downloadProgress | Number | 0 ~ 100
  | upgradeProgress | Number | 0 ~ 100

See:
  Storage.downloadFirmware(), Storage.upgradeFirmware()