Symbian3/PDK/Source/GUID-8E25E84C-E8F3-50B2-82E5-0611A341ED27.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-8E25E84C-E8F3-50B2-82E5-0611A341ED27" xml:lang="en"><title>Starting
       
    13 as Target</title><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    14 <p>The Target is the device that receives commands from a controller. </p>
       
    15 <p><b>Intended Audience: </b> </p>
       
    16 <p>This tutorial is designed for Symbian licensees and 3rd party application
       
    17 developers. </p>
       
    18 <section><title>Using the target</title> <p>The following tasks will be covered
       
    19 in this tutorial: </p> <ul>
       
    20 <li id="GUID-B38F1581-5750-51FB-B383-55DA66F4334C"><p>Starting a target </p> </li>
       
    21 <li id="GUID-6DC01733-3365-56AB-9BF6-DA5FA54BEFD5"><p>Stopping a target </p> </li>
       
    22 </ul> <p><b> Basic procedure</b> </p> <p>The high level steps to start a target
       
    23 are: </p> <ul>
       
    24 <li id="GUID-CD03C0DC-6C7C-5E14-9967-204BC272D32C"><p>Create a target interface </p> </li>
       
    25 <li id="GUID-56FB6161-7BDA-5E4F-B3B8-AA9A898D7A15"><p>Open a connectionless
       
    26 session </p> </li>
       
    27 </ul> </section>
       
    28 <section><title>Starting a target</title> <p>The steps required to start a
       
    29 device as a remote control target are given below: </p> <ol id="GUID-31A116B3-0035-539D-BED6-50D803B6025E">
       
    30 <li id="GUID-C256FBD7-39F6-52E6-A9D0-CAFC2A95979E"><p>Create a target interface
       
    31 by instantiating an interface selector using <xref href="GUID-81EE9382-D501-3FCE-ACD9-7BC5236FC462.dita#GUID-81EE9382-D501-3FCE-ACD9-7BC5236FC462/GUID-17C0EFFE-AEE4-31E6-97D6-701CFD3E761C"><apiname>CRemConInterfaceSelector::NewL()</apiname></xref>,
       
    32 as shown here: </p> <codeblock id="GUID-F5F2E656-705F-5FE0-B8EA-43A780EA14E5" xml:space="preserve">CRemConInterfaceSelector* iInterfaceSelector;
       
    33 iInterfaceSelector = CRemConInterfaceSelector::NewL();</codeblock> </li>
       
    34 <li id="GUID-5CFD7F73-398B-5CFB-ABF3-2C7B047F55A3"><p>Create a core remote
       
    35 control API target and add the interface selector created above as shown here: </p> <codeblock id="GUID-81C408AE-A678-5810-805B-CA082ECF6517" xml:space="preserve">CRemConCoreApiTarget* iCoreTarget;iCoreTarget = 
       
    36    CRemConCoreApiTarget::NewL(*iInterfaceSelector,*this);</codeblock> <p>The <codeph>*iInterfaceSelector</codeph> is
       
    37 the <xref href="GUID-723FC8F2-DB48-3C70-976F-D027E19F480B.dita"><apiname>CRemConCoreApiTarget</apiname></xref> interface selector and <codeph>*this</codeph> is
       
    38 the owning observer. The remote control framework observers are used to send
       
    39 and receive commands and responses. </p> </li>
       
    40 <li id="GUID-250565A9-8BA2-535E-BA34-141BAE3337B3"><p>Open the above interface
       
    41 using <xref href="GUID-81EE9382-D501-3FCE-ACD9-7BC5236FC462.dita#GUID-81EE9382-D501-3FCE-ACD9-7BC5236FC462/GUID-87BDC40F-F3A9-3879-967D-38FF56E27E37"><apiname>CRemConInterfaceSelector::OpenTargetL()</apiname></xref>. </p> <codeblock id="GUID-012B8A1D-BAF9-5BC6-B102-025F8BB1013D" xml:space="preserve">iInterfaceSelector-&gt;OpenTargetL();</codeblock> </li>
       
    42 </ol> <p>The above code will start a device as a remote control target that
       
    43 is able to receive and handle remote control commands. </p> </section>
       
    44 <section><title>Stopping a target</title> <p>To stop your target use: </p> <codeblock id="GUID-53934A6A-8E38-5591-A333-F9A5D574172E" xml:space="preserve">delete iInterfaceSelector;</codeblock> </section>
       
    45 <section><title>What's next?</title> <ul>
       
    46 <li id="GUID-ECB765A0-C8B6-54F3-AE04-082E15A1770A"><p> <xref href="GUID-C4A072E1-4385-5C98-98C1-56F297132F11.dita">Remote
       
    47 Control Basics</xref> </p> </li>
       
    48 <li id="GUID-C22F3018-EF6F-582D-BF93-94B1C4122806"><p> <xref href="GUID-E25A5C1E-83D7-51D5-8F11-9C44C6CEEDCE.dita">Starting
       
    49 as Controller</xref>  </p> </li>
       
    50 <li id="GUID-D399A6EB-966E-51F6-B273-E7DB5A04BCAE"><p> <b>Starting as Target</b> -
       
    51 This document </p> </li>
       
    52 <li id="GUID-93E9A8AE-5202-57FC-98B7-0651C301FB40"><p> <xref href="GUID-7DDF477A-1744-589A-82CB-3CB32D56D7CE.dita">Commands
       
    53 and Responses</xref>  </p> </li>
       
    54 </ul> </section>
       
    55 </conbody></concept>