OpenDOF Project
DOFObject DOFOperationSession_WaitSession ( const DOFOperation  op,
uint32  timeout,
DOFException pException 
)

Wait for a Session Operation to be accepted, and return a DOFObject for the session.

If the operation has already been accepted or is completed, this returns immediately as defined below.

Resource Management:
This function allocates resources that must later be freed by calling DOFObject_Destroy.

This blocks the caller until the operation is accepted or an exception is returned, the operation times out or is cancelled, or the timeout of this wait expires, whichever occurs first.

The time specified in this call has no relationship to the Operation itself; it only specifies how long this call will block the caller.

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. This must not be NULL and must represent a valid Session Operation.
timeoutThe maximum time to wait for a result, in milliseconds. A value of 0 returns immediately.
[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.
Returns
The DOFObject, representing the new Session created by the Session Operation, or NULL if a session object cannot be returned. There are two cases in which a session object cannot be returned:
  • If the operation failed with an exception, the exception is reported via pException, which will be non-NULL.
  • If the operation has not been accepted within the specified timeout, or completes without a session object within the specified timeout, pException will represent a DOFERROR_TIMEOUT.
core-c-dof-oal Version 8.0.1 Build 0
2018-01-22