realtimenetprots/rtp/cfrtp/inc/rtpflow.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // RTP Flow definitions.
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalComponent
       
    21 */
       
    22 
       
    23 #ifndef CRTPFLOW_H
       
    24 #define CRTPFLOW_H
       
    25 
       
    26 #include "rtpprovisioninfo.h"
       
    27 #include "rtpbaseflow.h"
       
    28 #include "rtpcontroller.h"
       
    29 
       
    30 
       
    31 const TInt KRtpDefBufSz = 1500;
       
    32 
       
    33 NONSHARABLE_CLASS(CRtpFlow) : public CRtpBaseFlow 
       
    34 	{
       
    35 	/** CRtpFlow implements the RTP Flow.
       
    36 
       
    37 	@internalComponent 
       
    38 	
       
    39 	**/				    
       
    40 
       
    41 	friend class CRtpFlowFactory;	
       
    42 	
       
    43 	public:
       
    44 	static CRtpFlow* NewL(CSubConnectionFlowFactoryBase& aFactory, 
       
    45 	                       const Messages::TNodeId& aSubConn,  
       
    46 	                       CProtocolIntfBase* aProtocolIntf);
       
    47 
       
    48 	public:
       
    49 	//CSubConnectionFlowBase
       
    50 	virtual void ReceivedL(const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage);
       
    51 	
       
    52 	virtual TInt  Write(RMBufChain& aData, TUint aOptions, TSockAddr* anAddr = NULL );
       
    53 	virtual TInt GetData(RMBufChain& aData, TUint aLength,TUint aOptions,TSockAddr* anAddr=NULL);
       
    54 	
       
    55 	/*MRtpDataSender*/
       
    56 	void SendData(TDes8& aBuffer, TSockAddr &aAddr, TInt aFlags, TRequestStatus  &aStatus);
       
    57 	
       
    58 	public:
       
    59 	virtual void NewData(TUint aCount);
       
    60 	virtual void CanSend();
       
    61 	
       
    62 	virtual void DoCanClose(MSessionControlNotify::TDelete aDelete);
       
    63 	
       
    64 	virtual void DoUpdateLocalAddress(const TSockAddr& anAddr);
       
    65 
       
    66 	virtual TInt DoSetOption(TUint level, TUint name, const TDesC8 &anOption);
       
    67 	virtual TInt DoGetOption(TUint level, TUint name, TDes8 &anOption) const;
       
    68 	
       
    69 	/* When an RTCP flow is created call this function to enable RTCP in
       
    70 	   RtpSession. The function will return a Pointer to RTPSession which
       
    71 	   can be passed on to RTCP Flow */
       
    72 	CRtpController* GetRtpSession() const;
       
    73 	
       
    74 	void SetNonRtpSendData(TInt aNonRtpData);
       
    75  	TInt NonRtpSendData();
       
    76  		
       
    77 	virtual ~CRtpFlow(); 
       
    78 	
       
    79 	protected:
       
    80 	CRtpFlow(ESock::CSubConnectionFlowFactoryBase& aFactory, const Messages::TNodeId& aSubConnId, ESock::CProtocolIntfBase* aProtocolIntf);
       
    81 	/* RTP Session Pointer */
       
    82 	CRtpController *iRtpSession;
       
    83 	void ConstructL();
       
    84 	/* Worker for Provision */
       
    85 	void DoProvisionL(const CRtpProvisionConfig *apRtpProv);
       
    86 	/* This buffer is used to pass data to rtp Stack.*/
       
    87 	RBuf8 iRtpBuffer;
       
    88 	// Non Rtp Data sending flag
       
    89 	TInt iNonRtpSendData;
       
    90 	
       
    91 	/* Handlet For RTP Flow */
       
    92 	CCFRtpHandler *iRtpHandler;	
       
    93 };
       
    94 
       
    95 
       
    96 
       
    97 
       
    98 #endif // CRTPFLOW_H
       
    99 
       
   100