|
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-0A9D11FB-6A24-5115-A39C-23FDE864DF6A" xml:lang="en"><title>How |
|
13 to complete requests</title><shortdesc>This document describes how to complete a request for a service.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <p>If you are a service provider, you can complete a request using either <xref href="GUID-C197C9A7-EA05-3F24-9854-542E984C612D.dita#GUID-C197C9A7-EA05-3F24-9854-542E984C612D/GUID-2F263A1B-BB71-396C-8C45-B0D062327FFA"><apiname>User::RequestComplete()</apiname></xref>, |
|
15 or <xref href="GUID-B0E661BC-4058-3256-B9C3-5A4FD52F6DE5.dita#GUID-B0E661BC-4058-3256-B9C3-5A4FD52F6DE5/GUID-34A51DFD-CE91-356E-96B1-008121C4E73A"><apiname>RThread::RequestComplete()</apiname></xref>, passing the request status |
|
16 object and the service provider's return code, a value other than <codeph>KRequestPending</codeph>. |
|
17 This results in the active object's <codeph>iStatus</codeph> member being |
|
18 set to the return code value and a signal that the request is complete. </p> |
|
19 <p>The current thread calls <codeph>User::RequestComplete()</codeph> to complete |
|
20 a request that originated in the current thread. </p> |
|
21 <p>The current thread calls <codeph>RThread::RequestComplete()</codeph> to |
|
22 complete a request that originated in a different thread, i.e. the thread |
|
23 represented by the <xref href="GUID-B0E661BC-4058-3256-B9C3-5A4FD52F6DE5.dita"><apiname>RThread</apiname></xref> object. Note that in this case, |
|
24 the target thread <i>must</i> be in the same process as the current thread. |
|
25 Any attempt to complete a request on a thread in another process is a security |
|
26 violation, resulting in a KERN-EXEC 46 panic. </p> |
|
27 </conbody></concept> |