Adaptation/GUID-30978E00-D244-44CD-8F4E-9676DF172A52.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-30978E00-D244-44CD-8F4E-9676DF172A52" xml:lang="en"><title>Driver-side
       
    13 Handling</title><shortdesc>This document describes how device drivers handle asynchronous
       
    14 requests.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    15 <p>Drivers generally implement the <xref href="GUID-9D910016-5611-30DD-A139-EE46705A4912.dita"><apiname>DoRequest()</apiname></xref> function
       
    16 in the LDD to handle the received asynchronous messages. </p>
       
    17 <p>The implementation reads the request type and other passed arguments, and
       
    18 initiates handling of the request appropriately. </p>
       
    19 <p>The return value of this function only indicates the status of the message
       
    20 reception to the driver. It does not actually indicate the request completion
       
    21 result. </p>
       
    22 <codeblock id="GUID-335BB3F8-7B2B-5FC4-A8D1-204E6B24FECD" xml:space="preserve">TInt DExDriverLogicalChannel::DoRequest(TInt aReqNo, TRequestStatus* aStatus,
       
    23         TAny* a1, TAny* a2)
       
    24     {
       
    25     switch (aReqNo)
       
    26         {
       
    27         case RExDriverChannel::ERequestTransmitData:
       
    28             // Call TransmitData function
       
    29             r = TransmitData ((const TDesC8*)a1);
       
    30             // The status object is stored 
       
    31             // to be used when notifying the completion of the 
       
    32             // request at a later point.
       
    33             //
       
    34             iTxDataStatus = aStatus;
       
    35             break;
       
    36         }
       
    37     return r;
       
    38     }</codeblock>
       
    39 </conbody></concept>