Class: Progress

iotcs.device.util.StorageDispatcher.Progress(storageObject)

new Progress(storageObject)

An object for receiving progress via the Progress callback.
Parameters:
Name Type Description
storageObject StorageObject The storage object which progress will be tracked.

Extends

  • iotcs.StorageDispatcher.Progress

Members

(static, readonly) State :string

Enumeration of progress states.
Type:
  • string
Properties:
Name Type Description
CANCELLED string The upload or download was cancelled before it completed.
COMPLETED string The upload or download completed successfully.
FAILED string The upload or download failed without completing.
IN_PROGRESS string The upload or download is currently in progress.
INITIATED string Initial state of the upload or download.
QUEUED string The upload or download is queued and not yet started.

Methods

(static) getBytesTransferred() → {number}

Get the number of bytes transferred. This can be compared to the length of content obtained by calling iotcs.StorageObject#getLength.
Returns:
The number of bytes transferred.
Type
number

(static) getState() → {iotcs.device.util.StorageDispatcher.Progress.State}

Get the state of the transfer.
Returns:
The state of the transfer.
Type
iotcs.device.util.StorageDispatcher.Progress.State

(static) getStorageObject() → {iotcs.StorageObject}

Get the StorageObject that was queued for which this progress event pertains.
Returns:
A StorageObject.
Type
iotcs.StorageObject

Home