diff -r 000000000000 -r 89d6a7a84779 Symbian3/SDK/Source/GUID-CCCEC352-3A49-534C-9551-A4CAE1A3475E.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-CCCEC352-3A49-534C-9551-A4CAE1A3475E.dita Thu Jan 21 18:18:20 2010 +0000 @@ -0,0 +1,57 @@ + + + + + +How +to handle a single asynchronous requestThis document describes how to handle a single asynchronous request. +

A thread that requests an asynchronous service from another thread can +continue processing but eventually reaches a point where it must wait until +the asynchronous request is complete before it can resume processing.

+

Typically, the requester performs the following sequence:

+ +TRequestStatus status; // Request status object +someProvider.IssueRequest(parameters,status); // Issue the request +... +User::WaitForRequest(status); // Wait for completion +if (status==KErrNone) + { + /* success */ + } +else if (status==KErrXxx) + { + /* check for some error */ + } +else // check for other error conditions etc. +... +
Notes
    +
  • there is no special +name for a request function; the request performed depends on the class, the +function name and the parameters passed.

  • +
  • when the request is +complete, an integer is stored in the request status object to convey additional +information about the completion of the function. The meaning of the completion +code varies from function to function. Additionally, information returned +by the request may be returned to reference parameters passed to the request +function.

  • +
  • The integer completion +code must not be KErrPending. By convention, KErrNone indicates +no error and KErrCancel indicates a cancelled request. Other +values may be used for specific types of error.

  • +
+
\ No newline at end of file