OpenDOF Project
boolean DOFOperation_WaitAcknowledged ( const DOFOperation  op,
uint32  timeout,
DOFException pException 
)

Wait for the Operation to be acknowledged.

An Operation is considered acknowledged when a response (either positive or negative) has been received. BeginQuery, BeginInterest, and BeginProvide Operations are do not receive a response, and therefore are never acknowledged.

This blocks the caller until the operation is acknowledged, the operation completes (including by timeout or cancel), or the timeout of this wait expires, whichever occurs first. During this wait, information continues to be passed to the callbacks as necessary.

The time specified in this call does not affect the Operation itself; it only specifies the maximum time this call will pend waiting for the operation to be acknowledged or complete. Avoid using the same timeout as the operation, since the operation may or may not actually complete before this wait does, causing a nondeterministic result. Instead, use DOF_TIMEOUT_NEVER. The maximum time this call can wait is the minimum of the operation's time remaining and timeout.

It is not safe to use this call if the operation's complete callback can result in a call to DOFOperation_Destroy (refer to that function's documentation for more information).

Parameters
opThe Operation. Must not be NULL.
timeoutThe maximum time to wait, in milliseconds.
[out]pExceptionAn Exception. If pException is NULL, no exception is reported. Otherwise, the output is either a DOFException, or NULL to indicate no exception occurred. DOFException_Destroy must be called to destroy the returned DOFException, if any.
Return values
TRUEif the operation is acknowledged. If pException is not NULL, it will contain the same exception (if any) given to the operation's callback indicating acknowledgement.
FALSEif the operation has not been acknowledged within the specified time, the operation completed before being acknowledged (e.g., timed out), or an error occurred. If pException is not NULL, it will be set as follows:
  • NULL if the operation was cancelled before being acknowledged.
  • A DOFErrorException containing DOFERROR_TIMEOUT if the operation is still in progress (the wait timed out), or the operation timed out and was never acknowledged.
  • The exception reported to the Complete callback, if the operation is completed abnormally.
  • A DOFErrorException containing DOFERROR_INSUFFICIENT_RESOURCES if internal resources could not be created to process this request.
See Also
DOFOperation_IsAcknowledged
core-c-dof-oal Version 8.0.1 Build 0
2018-01-22