rtp/srtpstack/inc/tsrtpstreaminstatelatebind.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:    "Late binding" state for incoming SRTP stream. 
       
    15 *                 In this state, the stream reads SSRC value from packet
       
    16 *                 and it becomes "official" SSRC value for this stream.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 #ifndef TSRTPSTREAMINSTATELATEBIND_H
       
    24 #define TSRTPSTREAMINSTATELATEBIND_H
       
    25 
       
    26 // INCLUDES
       
    27 #include "tsrtpstreaminstatebase.h"
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class MSRTPCryptoHandlerContext;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 class TSRTPStreamInStateLateBind : public TSRTPStreamInStateBase
       
    34 	{
       
    35 	public:	// Constructors
       
    36 
       
    37 		TSRTPStreamInStateLateBind(MSRTPStreamInContext& aStreamContext,
       
    38 		    MSRTPCryptoHandlerContextRTP& aCryptoHandlerRTPContext,
       
    39 		    MSRTPCryptoHandlerContextRTCP& aCryptoHandlerRTCPContext);
       
    40 
       
    41 	public: // From TSRTPStreamInStateBase
       
    42 		
       
    43         /**
       
    44         * Unprotect encrypted RTP packet in "late binding" state.
       
    45         * @param aPacket encrypted packet
       
    46         * @leave KErrNone if success, system-wide error code otherwise        
       
    47         * @return HBufC8* decrypted packet
       
    48         */                              
       
    49         HBufC8* DoUnprotectSrtpL(const TDesC8& aPacket);
       
    50 
       
    51         /**
       
    52         * Unprotect encrypted RTCP packet in "late binding" state.
       
    53         * @param aPacket encrypted packet
       
    54         * @leave KErrNone if success, system-wide error code otherwise        
       
    55         * @return HBufC8* decrypted packet
       
    56         */                              
       
    57         HBufC8* DoUnprotectSrtcpL(const TDesC8& aPacket);
       
    58 
       
    59 	private: // Constructors
       
    60 
       
    61 		/// Default constructor. Not implemented.
       
    62 		TSRTPStreamInStateLateBind();
       
    63 	};
       
    64 
       
    65 #endif // TSRTPStreamInStateLateBind_H