rtp/srtpstack/inc/tsrtpstreaminstatebase.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 incoming SRTP stream states
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef TSRTPSTREAMINSTATEBASE_H
       
    22 #define TSRTPSTREAMINSTATEBASE_H
       
    23 
       
    24 // INCLUDES
       
    25 #include <e32std.h>
       
    26 #include "tsrtpstreamstatebase.h"
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class MSRTPStreamInContext;
       
    30 class MSRTPCryptoHandlerContext;
       
    31 class MSRTPCryptoHandlerContextRTP;
       
    32 class MSRTPCryptoHandlerContextRTCP;
       
    33 
       
    34 // CLASS DECLARATION
       
    35 class TSRTPStreamInStateBase : public TSRTPStreamStateBase
       
    36 	{
       
    37 	protected:	// Constructors and destructor
       
    38 
       
    39 		TSRTPStreamInStateBase(MSRTPStreamInContext& aStreamContext,
       
    40 		    MSRTPCryptoHandlerContextRTP& aCryptoHandlerRTPContext,
       
    41 		    MSRTPCryptoHandlerContextRTCP& aCryptoHandlerRTCPContext);
       
    42 
       
    43 	public: // New methods
       
    44         /**
       
    45         * virtual function for unprotecting encrypted RTP packet.
       
    46         * implemented in substates of TSRTPStreamInStateBase.
       
    47         * @param aPacket encrypted packet
       
    48         * @leave KErrNone if success, system-wide error code otherwise        
       
    49         * @return HBufC8* decrypted packet
       
    50         */                              
       
    51 		virtual HBufC8* DoUnprotectSrtpL(const TDesC8& aPacket)=0;
       
    52 
       
    53         /**
       
    54         * virtual function for unprotecting encrypted RTCP packet.
       
    55         * implemented in substates of TSRTPStreamInStateBase.
       
    56         * @param aPacket encrypted packet
       
    57         * @leave KErrNone if success, system-wide error code otherwise        
       
    58         * @return HBufC8* decrypted packet
       
    59         */                              
       
    60 		virtual HBufC8* DoUnprotectSrtcpL(const TDesC8& aPacket)=0;
       
    61 		
       
    62 	private: // Constructors
       
    63 		/// Default constructor. Not implemented.
       
    64 		TSRTPStreamInStateBase();
       
    65 
       
    66 	protected: // Data
       
    67 	    /* 
       
    68 	    * interface for a receiver stream for changing state
       
    69 	    */
       
    70 		MSRTPStreamInContext& iStreamContext;
       
    71 		
       
    72 	};
       
    73 
       
    74 #endif // TSRTPStreamInStateBase_H