|
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-59BBEA98-6501-5415-A4B5-3AE8E33957D3" xml:lang="en"><title>Server |
|
13 services</title><shortdesc>Describes asynchronous services provided by the client-server framework.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <p>The majority of Symbian platform asynchronous services are provided by |
|
15 servers written in accordance with the Symbian platform client-server framework. |
|
16 A server is a thread running in user mode, which services requests from client |
|
17 threads also running in user mode. An example of asynchronous service provided |
|
18 by a server is the <codeph>EventReady(TRequestStatus* aStat)</codeph> function |
|
19 provided by the <codeph>RWsSession</codeph> class — the client API to |
|
20 the window server. This function requests an event from the window server, |
|
21 which the user program can extract and analyse using other <codeph>RWsSession</codeph> functions.</p> |
|
22 <p>As with services provided by the kernel, server-provided services are presented |
|
23 to clients through a client API, typically an <codeph>R</codeph> class such |
|
24 as <codeph>RWsSession</codeph>, derived from <codeph>RSessionBase</codeph>. |
|
25 When the <codeph>RSessionBase</codeph> is opened, a server-side object is |
|
26 created and the client’s thread id is noted. Request functions are converted |
|
27 into an inter-thread message which encapsulates all the parameters. When request |
|
28 functions complete, the server posts the request status and signals the client |
|
29 thread’s request semaphore.</p> |
|
30 <p>As with services provided by the kernel, the process of requesting asynchronous |
|
31 service from a server, and handling its completion, involves messaging and |
|
32 inter-thread communication. Symbian platform provides efficient services to |
|
33 support these.</p> |
|
34 </conbody></concept> |