Symbian3/PDK/Source/GUID-E6D9F8CA-F293-5CE6-93C4-5FEC5EBCB2E9.dita
changeset 1 25a17d01db0c
child 3 46218c8b8afa
equal deleted inserted replaced
0:89d6a7a84779 1:25a17d01db0c
       
     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-E6D9F8CA-F293-5CE6-93C4-5FEC5EBCB2E9" xml:lang="en"><title>Asynchronous
       
    13 service provider's responsibilities</title><shortdesc>This document describes the functionality required from an asynchronous
       
    14 service provider.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    15 <p>An asynchronous service provider must interact in the following ways with
       
    16 its clients:</p>
       
    17 <ul>
       
    18 <li id="GUID-C140D0C8-0486-5AEF-8AFC-732B34078705"><p>prior to initiating
       
    19 a request, a request function must set the value of the passed <codeph>TRequestStatus</codeph> to <codeph>KRequestPending</codeph>,
       
    20 which indicates that a request has been issued but not completed.</p> </li>
       
    21 <li id="GUID-117EE3F9-A2A9-59FE-ABE2-D8CC9C5856C5"><p>requests must be completed
       
    22 by signalling the requesting thread’s request semaphore by calling <codeph>RThread::RequestComplete()</codeph> with
       
    23 the <codeph>TRequestStatus</codeph> as the first parameter and the completion
       
    24 code as the second parameter (which is placed in the <codeph>TRequestStatus</codeph>).</p> </li>
       
    25 <li id="GUID-EBD83E91-B71C-5532-8EB6-F44541D2DC53"><p>there must be a <i>cancel
       
    26 function</i> which can cancel an outstanding request. In some cases, calling
       
    27 the cancel function does not cause cancellation because the request is already
       
    28 complete. In all cases, the request must be complete before the cancel function
       
    29 returns.</p> </li>
       
    30 <li id="GUID-6F7F7419-9170-50C3-AF76-8F03E4FF43D3"><p>if an asynchronous request
       
    31 is made, it must complete precisely once, whether normally, abnormally, or
       
    32 through cancellation.</p> </li>
       
    33 <li id="GUID-DCC53064-2B63-5532-B2E7-3A48FB9CD630"><p>completion through cancellation
       
    34 is often indicated by a <codeph>TRequestStatus</codeph> code of <codeph>KErrCancel</codeph>.</p> </li>
       
    35 </ul>
       
    36 <section id="GUID-08111F39-8412-40CC-B21D-C97A14B43BF8"><title>See also</title> <p><xref href="GUID-E0B34F3E-D4C4-3232-B8B1-7DB35B454646.dita"><apiname>TRequestStatus</apiname></xref> </p> </section>
       
    37 </conbody></concept>