Data Reception Setup

This topic gives information about preparing a RDvbhReceiver for Data Reception.

Purpose

The purpose of this concept is to set up a RDvbhReceiver instance for data reception.

Required background

IP data is delivered to mobile TV middleware through a single RDvbhReceiver instance through a realization of MDvbhDataObserver supplied by the middleware.

Introduction

The MDvbhDataObserver interface class is used to provide the callback mechanism for IP data reception.

Using data reception setup

The following task is performed.

Example for the data reception set-up

// Context: The following takes place in some method of an object that
// implements MDvbhDataObserver. Its member iReceiver is an RDvbhReceiver
// that has previously been opened.

TInt result = iReceiver.ReceiveIpData(*this);
if (result != KErrNone)
    {
    //Take some action.
    return HandleReceiveIpDataError(result);
    }

// The receiver is now set up for data reception, so that Later on,
// whenever the receiver filters an IP packet, the object’s
// DvbhPacketReceived() will be called.

To Cancel IP Data Packet Reception

When mobile TV middleware does not wish to receive IP data through an observer it has previously registered with RDvbhReceiver::ReceiveIPData(), it does not registers the observer by calling RDvbhReceiver::CancelReceiveIPData().