Symbian3/PDK/Source/GUID-0297CAF5-4EB7-5E84-8A8C-8758D6F3B75F.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 13 Aug 2010 16:47:46 +0100
changeset 14 578be2adaf3e
parent 5 f345bda72bc4
permissions -rw-r--r--
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-0297CAF5-4EB7-5E84-8A8C-8758D6F3B75F" xml:lang="en"><title> Data
Reception Setup</title><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>This topic gives information about preparing a <xref href="GUID-617CD367-CF68-3932-8E77-669820A7B9AF.dita"><apiname>RDvbhReceiver</apiname></xref> for
Data Reception. </p>
<section><title>Purpose</title> <p>The purpose of this concept is to set up
a <xref href="GUID-617CD367-CF68-3932-8E77-669820A7B9AF.dita"><apiname>RDvbhReceiver</apiname></xref> instance for data reception.</p> </section>
<section><title>Required background</title><p>IP data is delivered to mobile
TV middleware through a single <xref href="GUID-617CD367-CF68-3932-8E77-669820A7B9AF.dita"><apiname>RDvbhReceiver</apiname></xref> instance through
a realization of <xref href="GUID-A02A8090-2D79-3BDC-9B97-91CEA6472C60.dita"><apiname>MDvbhDataObserver</apiname></xref> supplied by the middleware. </p></section>
<section><title>Introduction</title><p>The <xref href="GUID-A02A8090-2D79-3BDC-9B97-91CEA6472C60.dita"><apiname>MDvbhDataObserver</apiname></xref> interface
class is used to provide the callback mechanism for IP data reception. </p></section>
<section><title>Using data reception setup</title> <p>The following task is
performed. </p> <ul>
<li id="GUID-4E7DBA25-2497-5FAD-8DF6-E354B9234D09"><p><xref href="GUID-82052A09-B380-4C93-8828-2D4E53C8C110.dita">Registering
a Data Observer</xref>.</p> </li>
</ul> </section>
<section><title>Example for the data reception set-up</title><codeblock id="GUID-16733006-AE12-51C5-906E-2FB61B4FFB07" xml:space="preserve">// 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.
</codeblock></section>
<section><title>To Cancel IP Data Packet Reception</title> <p>When mobile
TV middleware does not wish to receive IP data through an observer it has
previously registered with <xref href="GUID-617CD367-CF68-3932-8E77-669820A7B9AF.dita#GUID-617CD367-CF68-3932-8E77-669820A7B9AF/GUID-B0D7B27B-7952-3212-90CA-67B08D52AB7B"><apiname>RDvbhReceiver::ReceiveIPData()</apiname></xref>,
it does not registers the observer by calling <xref href="GUID-617CD367-CF68-3932-8E77-669820A7B9AF.dita#GUID-617CD367-CF68-3932-8E77-669820A7B9AF/GUID-F664F749-DA0F-3584-BBA5-0C19FCD8374C"><apiname>RDvbhReceiver::CancelReceiveIPData()</apiname></xref>.</p> </section>
</conbody><related-links>
<link href="GUID-3C9BE2FF-8D5C-51D0-8BC1-BED7BC1288BA.dita"><linktext>Turn On Broadcast
Receiver Tutorial</linktext></link>
<link href="GUID-2C8BE998-BCCE-5A06-AFC1-4B611D9233AB.dita"><linktext>Turn Off
Broadcast Receiver Tutorial</linktext></link>
<link href="GUID-567585CC-26EC-553D-99D5-D3C178C455F6.dita"><linktext>DVB-H Signal
Scanning Tutorial</linktext></link>
<link href="GUID-743D3117-095B-58D5-947D-A8713475C9A5.dita"><linktext>Tuning IP
Platform Tutorial</linktext></link>
<link href="GUID-F5FE22F3-B7C4-50B3-9B36-5CB8BC1BA18A.dita"><linktext>Receiving
Broadcast Data Tutorial</linktext></link>
</related-links></concept>