Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]


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.

[Top]


Using the target

The following tasks will be covered in this tutorial:


Basic procedure

The high level steps to start a target are:

[Top]


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. 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.

  3. Open the above interface using CRemConInterfaceSelector::OpenTargetL().

    iInterfaceSelector->OpenTargetL();

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

[Top]


Stopping a target

To stop your target use:

delete iInterfaceSelector;

[Top]


What's next?