# IProgress Interface Reference

The IProgress interface represents a task progress object that allows to wait for the completion of some asynchronous task. More...

List of all members.

## Public Member Functions
void | waitForCompletion (in long timeout)
| Waits until the task is done (including all operations) with a given timeout.
void | waitForOperationCompletion (in unsigned long operation, in long timeout)
| Waits until the given operation is done with a given timeout.
void | cancel ()
| Cancels the task.
## Public Attributes
readonly attribute uuid | id
| ID of the task.
readonly attribute wstring | description
| Description of the task.
readonly attribute $unknown | initiator
| Initiator of the task.
readonly attribute boolean | cancelable
| Whether the task can be interrupted.
readonly attribute long | percent
| Current task progress value in percent.
readonly attribute boolean | completed
| Whether the task has been completed.
readonly attribute boolean | canceled
| Whether the task has been canceled.
readonly attribute result | resultCode
| Result code of the progress task.
readonly attribute IVirtualBoxErrorInfo | errorInfo
| Extended information about the unsuccessful result of the progress operation.
readonly attribute unsigned long | operationCount
| Number of operations this task is divided into.
readonly attribute unsigned long | operation
| Number of the operation being currently executed.
readonly attribute wstring | operationDescription
| Description of the operation being currently executed.
readonly attribute long | operationPercent
| Current operation progress value in percent.

## Detailed Description

The IProgress interface represents a task progress object that allows to wait for the completion of some asynchronous task.

The task consists of one or more operations that run sequentially, one after one. There is an individual percent of completion of the current operation and the percent of completion of the task as a whole. Similarly, you can wait for the completion of a particular operation or for the completion of the whole task.

Every operation is identified by a number (starting from 0) and has a separate description.

Interface ID:
  `{10CC03A1-717E-429B-992D-C67B56175A51}`

## Member Function Documentation

void IProgress::waitForCompletion | ( | in long | timeout | ) |

Waits until the task is done (including all operations) with a given timeout.

Parameters:

  | timeout | Timeout value in milliseconds. Specify -1 for an indefinite wait.

void IProgress::waitForOperationCompletion | ( | in unsigned long | operation,
|  | in long | timeout |
| ) |  |  |

Waits until the given operation is done with a given timeout.

Parameters:

  | operation | Number of the operation to wait for. Must be less than operationCount.
  | timeout | Timeout value in milliseconds. Specify -1 for an indefinite wait.

void IProgress::cancel | ( |  | ) |

Cancels the task.

Note:
  If cancelable is `false`, then this method will fail.

## Member Data Documentation

readonly attribute uuid IProgress::id

ID of the task.

readonly attribute wstring IProgress::description

Description of the task.

readonly attribute $unknown IProgress::initiator

Initiator of the task.

readonly attribute boolean IProgress::cancelable

Whether the task can be interrupted.

readonly attribute long IProgress::percent

Current task progress value in percent.

This value depends on how many operations are already complete.

readonly attribute boolean IProgress::completed

Whether the task has been completed.

readonly attribute boolean IProgress::canceled

Whether the task has been canceled.

readonly attribute result IProgress::resultCode

Result code of the progress task.

Valid only if completed is true.

readonly attribute IVirtualBoxErrorInfo IProgress::errorInfo

Extended information about the unsuccessful result of the progress operation.

May be NULL when no extended information is available. Valid only if completed is true and resultCode indicates a failure.

readonly attribute unsigned long IProgress::operationCount

Number of operations this task is divided into.

Every task consists of at least one operation.

readonly attribute unsigned long IProgress::operation

Number of the operation being currently executed.

readonly attribute wstring IProgress::operationDescription

Description of the operation being currently executed.

readonly attribute long IProgress::operationPercent

Current operation progress value in percent.