nn::nex::CallContext::RegisterCompletionCallback Member Function

Syntax

void RegisterCompletionCallback(
     CompletionCallback pfCompletionCallback,
     const UserContext & oContext,
     qBool bAddToEnd = true
);

Parameters

Name Description
in pfCompletionCallback Pointer to the callback function for the CallContext.
in oContext The UserContext associated with this CallContext.
in bAddToEnd If true (the default), the callback is added to the end of the list. If false, it is added to the front of the list.

Return Values

None.

Description

Sets the operation to execute when this CallContext completes.

CompletionCallback provides an easy and efficient way to ensure that a specific user-specified function is called when the CallContext completes. By using this callback when methods are called asynchronously, you can eliminate the task of continually polling to check whether the CallContext has completed.

If more than one callback is registered, by default they are stored and called in the order of registration. The first one to be registered will be the first one to be called. If you want to change this order, you must configure the bAddToEnd parameter when registering certain callbacks.

Do not call NEX blocking functions from inside the callback function.

Revision History

2012/01/27
Initial version.

CONFIDENTIAL