Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 2 additions & 36 deletions client-lite/src/include/do_error.h
Original file line number Diff line number Diff line change
@@ -1,34 +1,11 @@
#ifndef __DELIVERYOPTIMIZATION_ERROR_H__
#define __DELIVERYOPTIMIZATION_ERROR_H__

#if defined (_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif

// Definitions of DeliveryOptimization error codes
//
// Error codes are 32 bit values laid out as follows:
//
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
// +---+-+-+-----------------------+-------------------------------+
// |Sev|C|R| Facility | Code |
// +---+-+-+-----------------------+-------------------------------+
// Sev - is the severity code
// 00 - Success
// 01 - Informational
// 10 - Warning
// 11 - Error
// C - is the Customer code flag
// R - is a reserved bit
// Facility - is the facility code
// Code - is the facility's status code
//
// Severity used is 2 (warning). This was chosen to make the codes similar (start with 0x80) to other components like WU.
// Facility code used is 208 (0xD0). See winerror.h for FACILITY_DELIVERY_OPTIMIZATION.
// Note that the uniqueness of facility codes isn't really enforced in Windows.
// DO error codes can be identified by the 0x80D0 prefix.
//
// Historically, error codes were separated into zones with a macro identifying each zone.
// Error codes used to be separated into zones with a macro identifying each zone.
// Currently, we only care about the transient error zone so only this macro is defined.
// The error codes are still separated with sufficient buffer left to add errors in each zone.

Expand All @@ -40,9 +17,6 @@
// Download job codes

#define DO_E_DOWNLOAD_NO_PROGRESS HRESULT(0x80D02002L) // Download of a file saw no progress within the defined period
#define DO_E_JOB_NOT_FOUND HRESULT(0x80D02003L) // Job was not found
#define DO_E_NO_DOWNLOADS HRESULT(0x80D02005L) // No downloads currently exist
#define DO_E_JOB_TOO_OLD HRESULT(0x80D0200CL) // Job has neither completed nor has it been cancelled prior to reaching the maximum age threshold
#define DO_E_UNKNOWN_PROPERTY_ID HRESULT(0x80D02011L) // SetProperty() or GetProperty() called with an unknown property ID
#define DO_E_READ_ONLY_PROPERTY HRESULT(0x80D02012L) // Unable to call SetProperty() on a read-only property
#define DO_E_INVALID_STATE HRESULT(0x80D02013L) // The requested action is not allowed in the current job state. The job might have been canceled or completed transferring. It is in a read-only state now.
Expand All @@ -56,12 +30,4 @@

#define DO_E_BLOCKED_BY_NO_NETWORK HRESULT(0x80D03805L) // Download paused due to loss of network connectivity

// HTTP

#define DO_E_HTTP_BLOCKSIZE_MISMATCH HRESULT(0x80D05001L) // HTTP server returned a response with data size not equal to what was requested
#define DO_E_HTTP_CERT_VALIDATION HRESULT(0x80D05002L) // The Http server certificate validation has failed
#define DO_E_INVALID_RANGE HRESULT(0x80D05010L) // The specified byte range is invalid
#define DO_E_INSUFFICIENT_RANGE_SUPPORT HRESULT(0x80D05011L) // The server does not support the necessary HTTP protocol. Delivery Optimization (DO) requires that the server support the Range protocol header.
#define DO_E_OVERLAPPING_RANGES HRESULT(0x80D05012L) // The list of byte ranges contains some overlapping ranges, which are not supported

#endif // __DELIVERYOPTIMIZATION_ERROR_H__