|
||
The Target is the device that receives commands from a controller.
This tutorial is designed for Symbian licensees and 3rd party application developers.
The following tasks will be covered in this tutorial:
Starting a target
Stopping a target
The high level steps to start a target are:
Create a target interface
Open a connectionless session
The steps required to start a device as a remote control target are given below:
Create a target interface by instantiating an interface selector
using CRemConInterfaceSelector::NewL()
, as shown here:
CRemConInterfaceSelector* iInterfaceSelector;
iInterfaceSelector = CRemConInterfaceSelector::NewL();
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.
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.
To stop your target use:
delete iInterfaceSelector;
Starting as Target - This document