Adaptation/GUID-F7249C66-B62F-45DF-B733-BC6D5FCDA003.dita
changeset 15 307f4279f433
equal deleted inserted replaced
14:578be2adaf3e 15:307f4279f433
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-F7249C66-B62F-45DF-B733-BC6D5FCDA003" xml:lang="en"><title>Completion and Notification</title><shortdesc>This document describes how a device driver notifies completion
       
    13 of an asynchronous request.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    14 <p>On completion of the request, the driver calls <xref href="GUID-C6946ECB-775F-3EC2-A56F-78F25B9FBE3D.dita#GUID-C6946ECB-775F-3EC2-A56F-78F25B9FBE3D/GUID-D720BB4C-5E31-3213-BB16-859AA325FE98"><apiname>Kern::RequestComplete()</apiname></xref>,
       
    15 passing the <codeph>TRequestStatus</codeph> object and completion error code,
       
    16 to notify the request completion to the user. This API internally sets the
       
    17 passed error code in the <codeph>TRequestStatus</codeph> object. It also signals
       
    18 the client's thread semaphore. </p>
       
    19 <codeblock id="GUID-D6016CEF-C1F8-5743-97E3-E0E9E2C92547" xml:space="preserve">void DExDriverLogicalChannel::DoTxDataComplete()
       
    20     {
       
    21     ...
       
    22     // Notify the client (iClient) that the request is completed. The  
       
    23     // TRequestStatus object is updated with the status and the 
       
    24     // completion code is provided to the client. Typically, the client 
       
    25     // thread, waiting using User::WaitForRequest(TRequestStatus 
       
    26     // &amp;aStatus) or the active object framework, is unblocked and 
       
    27     // notified. Then the client may read the request status from the 
       
    28     // TRequestStatus object.
       
    29     // 
       
    30     Kern::RequestComplete(iClient,iTxDataStatus,iTxResult);
       
    31     }</codeblock>
       
    32 <p>The user retrieves the result of the request by calling <xref href="GUID-8005774C-A9AA-3335-B918-51190A125134.dita#GUID-8005774C-A9AA-3335-B918-51190A125134/GUID-BC53014D-0801-3168-9FDE-9D5897A7AA8A"><apiname>TRequestStaus::Int()</apiname></xref>. </p>
       
    33 </conbody></concept>