diff -r 43e37759235e -r 51a74ef9ed63 Symbian3/SDK/Source/GUID-8E25E84C-E8F3-50B2-82E5-0611A341ED27.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-8E25E84C-E8F3-50B2-82E5-0611A341ED27.dita Wed Mar 31 11:11:55 2010 +0100 @@ -0,0 +1,55 @@ + + + + + +Starting +as Target +

The Target is the device that receives commands from a controller.

+

Intended Audience:

+

This tutorial is designed for Symbian licensees and 3rd party application +developers.

+
Using the target

The following tasks will be covered +in this tutorial:

    +
  • Starting a target

  • +
  • Stopping a target

  • +

Basic procedure

The high level steps to start a target +are:

    +
  • Create a target interface

  • +
  • Open a connectionless +session

  • +
+
Starting a target

The steps required to start a +device as a remote control target are given below:

    +
  1. Create a target interface +by instantiating an interface selector using CRemConInterfaceSelector::NewL(), +as shown here:

    CRemConInterfaceSelector* iInterfaceSelector; +iInterfaceSelector = CRemConInterfaceSelector::NewL();
  2. +
  3. Create a core remote +control API target and add the interface selector created above as shown here:

    CRemConCoreApiTarget* iCoreTarget;iCoreTarget = + CRemConCoreApiTarget::NewL(*iInterfaceSelector,*this);

    The *iInterfaceSelector is +the CRemConCoreApiTarget interface selector and *this is +the owning observer. The remote control framework observers are used to send +and receive commands and responses.

  4. +
  5. Open the above interface +using CRemConInterfaceSelector::OpenTargetL().

    iInterfaceSelector->OpenTargetL();
  6. +

The above code will start a device as a remote control target that +is able to receive and handle remote control commands.

+
Stopping a target

To stop your target use:

delete iInterfaceSelector;
+
What's next?
    +
  • Remote +Control Basics

  • +
  • Starting +as Controller

  • +
  • Starting as Target - +This document

  • +
  • Commands +and Responses

  • +
+
\ No newline at end of file