The IMAPITable interface includes three methods that operate asynchronously and three methods for controlling an asynchronous operation. The following table lists these methods:
Asynchronous operation | Asynchronous control method |
---|---|
SetColumns | GetStatus |
Restrict | Abort |
SortTable | WaitForCompletion |
With GetStatus, a table user can determine if the table is static or dynamic, if an operation is in progress or has completed, and if an error has occurred from a completed operation. For example, if a client needs to cancel a sort operation because it is taking too much time, the client can first call GetStatus to determine if, in fact, a sort operation is presently processing. Then the client can call IMAPITable::Abort to stop it.
Calling WaitForCompletion allows the task to complete without interruption.