rtp/srtpstack/inc/tsrtpstreamoutstatebase.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 /*
       
     2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:    Base class for outgoing SRTP stream states
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 #ifndef TSRTPSTREAMOUTSTATEBASE_H
       
    23 #define TSRTPSTREAMOUTSTATEBASE_H
       
    24 
       
    25 // INCLUDES
       
    26 #include <e32std.h>
       
    27 #include "tsrtpstreamstatebase.h"
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class MSRTPStreamOutContext;
       
    31 class MSRTPCryptoHandlerContext;
       
    32 class MSRTCPCryptoHandlerContext;
       
    33 
       
    34 // CLASS DECLARATION
       
    35 class TSRTPStreamOutStateBase : public TSRTPStreamStateBase
       
    36 	{
       
    37 	protected:	// Constructors and destructor
       
    38 
       
    39 		TSRTPStreamOutStateBase(MSRTPStreamOutContext& aStreamContext,
       
    40 		    MSRTPCryptoHandlerContextRTP& aCryptoHandlerRTPContext,
       
    41 		    MSRTPCryptoHandlerContextRTCP& aCryptoHandlerRTCPContext);
       
    42 
       
    43 	public: // New methods
       
    44         /**
       
    45         * virtual function for protecting plain RTP packet.
       
    46         * implemented in substates of TSRTPStreamOutStateBase.
       
    47         * @param aPacket plain RTP packet
       
    48         * @leave KErrNone if success, system-wide error code otherwise        
       
    49         * @return HBufC8* encrypted packet
       
    50         */                              	
       
    51 		virtual HBufC8* DoProtectRtpL(const TDesC8& aPacket)=0;
       
    52 
       
    53         /**
       
    54         * virtual function for protecting plain RTCP packet.
       
    55         * implemented in substates of TSRTPStreamOutStateBase.
       
    56         * @param aPacket plain RTCP packet
       
    57         * @leave KErrNone if success, system-wide error code otherwise        
       
    58         * @return HBufC8* encrypted packet
       
    59         */                              	
       
    60 		virtual HBufC8* DoProtectRtcpL(const TDesC8& aPacket)=0;
       
    61 
       
    62 	private: // Constructors
       
    63 		/// Default constructor. Not implemented.
       
    64 		TSRTPStreamOutStateBase();
       
    65 
       
    66 	protected: // Data
       
    67 		/* 
       
    68 	    * interface for a transmitting stream for changing state
       
    69 	    */
       
    70 		MSRTPStreamOutContext& iStreamContext;
       
    71 	};
       
    72 
       
    73 #endif // TSRTPStreamOutStateBase_H