Symbian3/SDK/Source/GUID-9652782C-D5A7-584F-A61C-1340D49478A2.dita
changeset 0 89d6a7a84779
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Symbian3/SDK/Source/GUID-9652782C-D5A7-584F-A61C-1340D49478A2.dita	Thu Jan 21 18:18:20 2010 +0000
@@ -0,0 +1,12 @@
+<?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 xml:lang="en" id="GUID-9652782C-D5A7-584F-A61C-1340D49478A2"><title>Registering for and handling events</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>This page describes how to register an event for a callback function and how to handle them when the event occured. </p> <p>Events can be registered for a session, a send source or a receive source using <codeph>RRtpXxx:RegisterEventCallbackL()</codeph>, where <codeph>Xxx</codeph> can be <codeph>Session</codeph>, <codeph>SendSource</codeph> or <codeph>ReceiveSource</codeph>, for the respective source of events. </p> <codeblock id="GUID-389805C0-3A8E-5270-AEE3-4C9E60C4E6A7" xml:space="preserve">RegisterEventCallbackL(ERtpPacketReceived, GetPacket, aPtr, ERtpOneShot);</codeblock> <p>In the above call, the event <codeph>ERtpPacketReceived</codeph> is registered to the callback function <codeph>GetPacket()</codeph>. <codeph>ERtpOneShot</codeph> indicates that the callback function can be called only once. </p> <p> <codeph>TRtpEvent</codeph> provides a handle to an RTP session, send stream or receive stream event. The event types supported by <codeph>TRtpEventType</codeph> are passed to <codeph>RegisterEventCallbackL()</codeph>, so that the registered callback function is called for the specified event. </p> <p>Some of the event types supported by <codeph>TRtpEventType</codeph> that may be handled are given below: </p> <ul><li id="GUID-4187B54E-E4A1-5A2C-9E4B-2D4C41E84CA5"><p> <codeph>ERtpAnyEvent</codeph> is called for any event failures. </p> </li> <li id="GUID-34E11BD0-2D71-586C-B913-0FE8FFAB4837"><p>Event types related to the session: </p> <ul><li id="GUID-048D9BA1-A3FC-5C48-A4F0-803B3ACE6E04"><p> <codeph>ERtpSessionFail</codeph> indicates a session-level error. </p> </li> <li id="GUID-15D13D17-2B08-5275-A3A9-060B1CE2177B"><p> <codeph>ERtpSessionEventEnd</codeph> defines the upper limit for session event type values. </p> </li> </ul> </li> <li id="GUID-45DA3A9F-4E04-53FB-85FA-9285F173488C"><p>Event types related to the send stream: </p> <ul><li id="GUID-0AFA7AE7-B81D-59A2-9DFE-CC57AC266153"><p> <codeph>ERtpSendFail</codeph> indicates an error has occurred while sending a packet. </p> </li> <li id="GUID-3804EB39-97A6-517A-B4C7-7EFE86B49232"><p> <codeph>ERtpSendSucceeded</codeph> indicates a send packet operation has succeeded. </p> </li> </ul> </li> <li id="GUID-AE3F984B-9816-5B44-AB8F-368008367049"><p>Event types related to the reception stream: </p> <ul><li id="GUID-D651EC2F-72D6-5DED-B017-873734C9B472"><p> <codeph>ERtpNewSource</codeph> indicates that a new stream has been received. </p> </li> <li id="GUID-F6A82FA7-D8C2-5F46-A5D2-2AFAEA1DBAAD"><p> <codeph>ERtpPacketReceived</codeph> indicates that an in-sequence packet has been received. </p> </li> </ul> </li> <li id="GUID-5F9B64A4-FEE5-5CD2-B95E-733FD7381CC1"><p>Event types related to non-RTP data: </p> <ul><li id="GUID-35D36569-71E0-57E5-B398-4D7DB248DCB4"><p> <codeph>ENonRtpDataReceived </codeph> indicates that non-RTP data has been received on the RTP socket. </p> </li> <li id="GUID-3BD0DD09-3244-5E28-901C-4400FF45ADFE"><p> <codeph>ENonRtcpDataReceived</codeph> indicates that non-RTP data has been received on the RTCP socket. </p> </li> </ul> </li> </ul> </conbody></concept>
\ No newline at end of file