BackgroundDownloadProgress Struct

Definition

Contains status information about the download operation.

/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
struct BackgroundDownloadProgress
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public struct BackgroundDownloadProgress
var backgroundDownloadProgress = {
bytesReceived : /* Your value */,
totalBytesToReceive : /* Your value */,
status : /* Your value */,
hasResponseChanged : /* Your value */,
hasRestarted : /* Your value */
}
Public Structure BackgroundDownloadProgress
Inheritance
BackgroundDownloadProgress
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Fields

BytesReceived

The total number of data bytes received. This value does not include bytes received as response headers. Download operations can be restarted (for example, after a network outage). When operations are restarted, they might have to discard previously downloaded bytes and therefore the number of bytes downloaded might not always increase from one report to the next.

HasResponseChanged

true if the download request response has changed; otherwise, false.

Whenever new response information is available due to a new request being invoked, this field is set to true. The application can then choose to read the new response information and update its state, if needed.

HasRestarted

true if a data transfer operation has restarted; otherwise false.

When a download is interrupted and a new request is sent to the server to resume the download, HasRestarted is set to true if the server does not support resume and the download had to start over.

HasRestarted is set to true only in the first progress notification sent after the restart. After the first progress notification, HasRestarted is set to false in later notifications.

Status

A BackgroundTransferStatus containing the current status of the download operation.

TotalBytesToReceive

The total number of bytes of data to download. If this number is unknown, this value is set to 0.

Applies to

See also