BG_JOB_STATE enumeration (bits.h)
Defines constants that specify the different states of a job.
typedef enum BG_JOB_STATE {
BG_JOB_STATE_QUEUED = 0,
BG_JOB_STATE_CONNECTING,
BG_JOB_STATE_TRANSFERRING,
BG_JOB_STATE_SUSPENDED,
BG_JOB_STATE_ERROR,
BG_JOB_STATE_TRANSIENT_ERROR,
BG_JOB_STATE_TRANSFERRED,
BG_JOB_STATE_ACKNOWLEDGED,
BG_JOB_STATE_CANCELLED
} ;
BG_JOB_STATE_QUEUED Value: 0 Specifies that the job is in the queue, and waiting to run. If a user logs off while their job is transferring, the job transitions to the queued state. |
BG_JOB_STATE_CONNECTING Specifies that BITS is trying to connect to the server. If the connection succeeds, the state of the job becomes BG_JOB_STATE_TRANSFERRING; otherwise, the state becomes BG_JOB_STATE_TRANSIENT_ERROR. |
BG_JOB_STATE_TRANSFERRING Specifies that BITS is transferring data for the job. |
BG_JOB_STATE_SUSPENDED Specifies that the job is suspended (paused). To suspend a job, call the IBackgroundCopyJob::Suspend method. BITS automatically suspends a job when it is created. The job remains suspended until you call the IBackgroundCopyJob::Resume method, IBackgroundCopyJob::Complete method, or IBackgroundCopyJob::Cancel method. |
BG_JOB_STATE_ERROR Specifies that a nonrecoverable error occurred (the service is unable to transfer the file). If the error—such as an access-denied error—can be corrected, then call the IBackgroundCopyJob::Resume method after the error is fixed. However, if the error cannot be corrected, then call the IBackgroundCopyJob::Cancel method to cancel the job, or call the IBackgroundCopyJob::Complete method to accept the portion of a download job that transferred successfully. |
BG_JOB_STATE_TRANSIENT_ERROR Specifies that a recoverable error occurred. BITS will retry jobs in the transient error state based on the retry interval you specify (see IBackgroundCopyJob::SetMinimumRetryDelay method). The state of the job changes to BG_JOB_STATE_ERROR if the job fails to make progress (see IBackgroundCopyJob::SetNoProgressTimeout method). BITS does not retry the job if a network disconnect or a disk lock error occurred (for example, chkdsk is running), or the MaxInternetBandwidth Group Policy is zero. |
BG_JOB_STATE_TRANSFERRED Specifies that your job was successfully processed. You must call the IBackgroundCopyJob::Complete method to acknowledge completion of the job, and to make the files available to the client. |
BG_JOB_STATE_ACKNOWLEDGED Specifies that you called the IBackgroundCopyJob::Complete method to acknowledge that your job completed successfully. |
BG_JOB_STATE_CANCELLED Specifies that you called the IBackgroundCopyJob::Cancel method to cancel the job (that is, to remove the job from the transfer queue). |
Requirement | Value |
---|---|
Minimum supported client | Windows XP |
Minimum supported server | Windows Server 2003 |
Header | bits.h |