Symbian3/SDK/Source/GUID-D4DD2109-3A5B-557D-BCF2-89691CDA5C75.dita
author Graeme Price <GRAEME.PRICE@NOKIA.COM>
Fri, 15 Oct 2010 14:32:18 +0100
changeset 15 307f4279f433
parent 0 89d6a7a84779
permissions -rw-r--r--
Initial contribution of the Adaptation Documentation.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-D4DD2109-3A5B-557D-BCF2-89691CDA5C75" xml:lang="en"><title>Client
Server Example Code</title><shortdesc>Example code that explains how to use client server framework.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<ul>
<li id="GUID-14B5A537-3A16-53F0-B596-32C5D1CDBACA"><p> <xref href="GUID-D4DD2109-3A5B-557D-BCF2-89691CDA5C75.dita#GUID-D4DD2109-3A5B-557D-BCF2-89691CDA5C75/GUID-0465FB35-1E22-5CB1-A8FF-A923D7B33BCF">Simple client server example</xref> </p> </li>
<li id="GUID-7250FD91-3D1A-54AB-85E4-77458EAC6748"><p> <xref href="GUID-D4DD2109-3A5B-557D-BCF2-89691CDA5C75.dita#GUID-D4DD2109-3A5B-557D-BCF2-89691CDA5C75/GUID-B3A1F02D-DF0E-5209-B891-FAE7FBAFEBB1">Complex client server example</xref> </p> </li>
</ul>
<section id="GUID-0465FB35-1E22-5CB1-A8FF-A923D7B33BCF"><title>Simple client
server example</title> <p><b>Description</b> </p> <p>This pair of examples
shows a simple use of the client server interface. The client, <xref href="GUID-D4DD2109-3A5B-557D-BCF2-89691CDA5C75.dita#GUID-D4DD2109-3A5B-557D-BCF2-89691CDA5C75/GUID-4DEF499E-D288-5C88-A8B8-0F9C52C65ABB">SimpleClient</xref>, has a single session with the server <xref href="GUID-D4DD2109-3A5B-557D-BCF2-89691CDA5C75.dita#GUID-D4DD2109-3A5B-557D-BCF2-89691CDA5C75/GUID-BFDD4BF0-E60A-5996-B83D-4DE3EACA93FD">SimpleServer</xref>, implemented as a statically linked DLL. </p> <p><b>Download</b> </p> <p>Click
on the following link to download the example: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-32692316-d765-41e1-99ba-1d656f7c2870.zip" scope="external"> ClientServerSimple.zip </xref></p><p>Click the following
link to download additional files: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-4184e6d4-8dbe-4267-b1a3-8737c8bf64ce.zip" scope="external"> CommonFramework.zip </xref></p><p>Click <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-32692316-d765-41e1-99ba-1d656f7c2870.html" scope="peer"> browse ClientServerSimple </xref> to view the example</p><p>Click <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-4184e6d4-8dbe-4267-b1a3-8737c8bf64ce.html" scope="peer"> browse CommonFramework </xref> to view additional files.</p> <p id="GUID-4DEF499E-D288-5C88-A8B8-0F9C52C65ABB"><b>SimpleClient: simple client</b> </p> <p><b>Build
Notes</b> </p> <p>The server must be built before the client. This requirement
is specified in the component description file, <filepath>bld.inf</filepath>. <filepath>SimpleServer.mmp</filepath> is
listed before <filepath>SimpleClient.mmp</filepath>. Build activities relating
to particular <filepath>.mmp</filepath> files are carried out in the order
in which they are listed in the <filepath>bld.inf</filepath> file. </p><p><b>Class
summary</b></p><p> <xref href="GUID-6D8A458C-9A39-3000-A3BC-060A2A3663E6.dita"><apiname>RSessionBase </apiname></xref>  <xref href="GUID-8E316AC4-4676-301A-9A23-659E83AA1D1C.dita"><apiname>CServer2 </apiname></xref>  <xref href="GUID-D5A30C75-E22C-34E8-913B-7D2CA6AD5C51.dita"><apiname>CSession2</apiname></xref> </p> </section>
<section id="GUID-B3A1F02D-DF0E-5209-B891-FAE7FBAFEBB1"><title>Complex client
server example</title> <p>This pair of examples shows a more complex use of
the client server interface. The server can support multiple subsessions within
a single session, represented by the code in <xref href="GUID-D4DD2109-3A5B-557D-BCF2-89691CDA5C75.dita#GUID-D4DD2109-3A5B-557D-BCF2-89691CDA5C75/GUID-544EE3A6-86A2-57FF-A13B-94658F1DCA16">ComplexServer***</xref>; <xref href="GUID-D4DD2109-3A5B-557D-BCF2-89691CDA5C75.dita#GUID-D4DD2109-3A5B-557D-BCF2-89691CDA5C75/GUID-80C65CEC-7337-50D4-B186-12ADFC5B1155">ComplexClient***</xref> is
the corresponding client code. </p> <ul>
<li id="GUID-452F053B-8BB1-5592-B0C2-A92EA5124B15"><p> <xref href="GUID-D4DD2109-3A5B-557D-BCF2-89691CDA5C75.dita#GUID-D4DD2109-3A5B-557D-BCF2-89691CDA5C75/GUID-80C65CEC-7337-50D4-B186-12ADFC5B1155">Complex client</xref> </p> </li>
<li id="GUID-1F71FAC4-ED3E-58FC-BFBB-61A43983C4C2"><p> <xref href="GUID-D4DD2109-3A5B-557D-BCF2-89691CDA5C75.dita#GUID-D4DD2109-3A5B-557D-BCF2-89691CDA5C75/GUID-544EE3A6-86A2-57FF-A13B-94658F1DCA16">Complex server</xref>. </p> </li>
</ul> <p><b>Download</b> </p> <p>Click on the following link to download the
example: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-334e50a3-aaac-4ea0-8b9e-8e73ddd4b183.zip" scope="external"> ClientServerComplex.zip </xref></p><p>Click the following
link to download additional files: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-4184e6d4-8dbe-4267-b1a3-8737c8bf64ce.zip" scope="external"> CommonFramework.zip </xref></p><p>Click <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-334e50a3-aaac-4ea0-8b9e-8e73ddd4b183.html" scope="peer"> browse ClientServerComplex </xref> to view example.</p><p>Click <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-4184e6d4-8dbe-4267-b1a3-8737c8bf64ce.html" scope="peer"> browse CommonFramework </xref> to view additional files.</p> <p id="GUID-80C65CEC-7337-50D4-B186-12ADFC5B1155"><b>ComplexClient: client requiring
multiple server subsessions</b> </p> <p><b>Build Notes</b> </p> <p>The server
must be built before the client. This requirement is specified in the component
description file <filepath>bld.inf</filepath>. <filepath>ComplexServer.mmp</filepath> is
listed before <filepath>ComplexClient.mmp</filepath>. Build activities relating
to particular <filepath>.mmp</filepath> files are carried out in the order
in which they are listed in the <filepath>bld.inf</filepath> file. </p><p><b>Class
summary</b></p><p><xref href="GUID-6D8A458C-9A39-3000-A3BC-060A2A3663E6.dita"><apiname> RSessionBase </apiname></xref> <xref href="GUID-1BBE1448-1DF8-33C4-BF9E-5A5F427AEE35.dita"><apiname>RSubSessionBase </apiname></xref> <xref href="GUID-8E316AC4-4676-301A-9A23-659E83AA1D1C.dita"><apiname>CServer2 </apiname></xref>  <xref href="GUID-D5A30C75-E22C-34E8-913B-7D2CA6AD5C51.dita"><apiname>CSession2 </apiname></xref>  <xref href="GUID-9230EF62-376A-389C-B720-7C1EDCB7EA97.dita"><apiname>CObject </apiname></xref> <xref href="GUID-DE901A59-C714-356A-9490-C4E9C9F186DB.dita"><apiname>CObjectCon </apiname></xref> <xref href="GUID-72761B3C-ECB6-34B2-87ED-C972E479357A.dita"><apiname>CObjectConIx </apiname></xref> </p> <p><b>Security
issues</b> </p> <p>The example does not demonstrate security issues. Its purpose
is just to demonstrate the mechanics of the client server relationship. </p> </section>
</conbody></concept>