CSRTPStreamOut Class Reference

class CSRTPStreamOut : public CSRTPStream

Represents an SRTP stream.

Inherits from

Public Member Functions
~CSRTPStreamOut ()
IMPORT_C CSRTPStreamOut * NewL ( CSRTPSession &, TUint )
IMPORT_C CSRTPStreamOut * NewL ( CSRTPSession &, TUint , CSRTPCryptoContext *, MSRTPReKeyingObserver &)
IMPORT_C CSRTPStreamOut * NewL ( CSRTPSession &, TUint , MSRTPReKeyingObserver &)
IMPORT_C HBufC8 * ProtectRtcpL (const TDesC8 &)
IMPORT_C HBufC8 * ProtectRtpL (const TDesC8 &)
IMPORT_C void SetCryptoOutL ( CSRTPCryptoContext *)
void UpdateCryptoAndStatesL ()
Private Member Functions
CSRTPStreamOut ( CSRTPSession &, TUint )
CSRTPStreamOut ( CSRTPSession &, TUint , CSRTPCryptoContext *, MSRTPReKeyingObserver &)
CSRTPStreamOut ( CSRTPSession &, TUint , MSRTPReKeyingObserver &)
void ChangeRTCPState ( MSRTPStreamOutContext::TContextOutState )
void ChangeRTPState ( MSRTPStreamOutContext::TContextOutState )
void ConstructL ()
TSRTPStreamOutStateBase & CurrentRTCPState ()
TSRTPStreamOutStateBase & CurrentRTPState ()
void InitializeStatesL ()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CSRTPStream::CSRTPStream(CSRTPSession &,CSRTPCryptoContext *,MSRTPReKeyingObserver &,TBool)
CSRTPStream::CSRTPStream(CSRTPSession &,MSRTPReKeyingObserver &,TBool)
CSRTPStream::CSRTPStream(CSRTPSession &,TBool)
CSRTPStream::CSRTPStream(CSRTPSession &,TUint,CSRTPCryptoContext *,MSRTPReKeyingObserver &,TBool)
CSRTPStream::CSRTPStream(CSRTPSession &,TUint,MSRTPReKeyingObserver &,TBool)
CSRTPStream::CSRTPStream(CSRTPSession &,const TUint,TBool)
CSRTPStream::CreateCryptoHandlerSRTCPL()
CSRTPStream::CreateCryptoHandlerSRTPL()
CSRTPStream::GetCryptoContext()
CSRTPStream::IsContextSet()
CSRTPStream::KeyExpired()
CSRTPStream::ROC()const
CSRTPStream::ReKeyNeeded()
CSRTPStream::SSRC()const
CSRTPStream::SetROC(TUint32)
CSRTPStream::SetSSRC(const TUint)
CSRTPStream::StreamType()
CSRTPStream::UpdateCryptoHandlerL()
CSRTPStream::~CSRTPStream()
Protected Attributes
MSRTPStreamOutContext::TContextOutState iCurrentRTCPState
MSRTPStreamOutContext::TContextOutState iCurrentRTPState
CArrayVarFlat < TSRTPStreamOutStateBase > iStates
Inherited Attributes
CSRTPStream::iContext
CSRTPStream::iHandlerRTCP
CSRTPStream::iHandlerRTP
CSRTPStream::iIsStreamInType
CSRTPStream::iObserver
CSRTPStream::iROC
CSRTPStream::iRekey
CSRTPStream::iSSRC
CSRTPStream::iSession
CSRTPStream::iStreamLink
CSRTPStream::iStreamOffset
CSRTPStream::iStrmSpecificCrypto

Constructor & Destructor Documentation

CSRTPStreamOut(CSRTPSession &, TUint)

CSRTPStreamOut ( CSRTPSession & aSession,
TUint aSSRC
) [private]

Parameters

CSRTPSession & aSession
TUint aSSRC

CSRTPStreamOut(CSRTPSession &, TUint, CSRTPCryptoContext *, MSRTPReKeyingObserver &)

CSRTPStreamOut ( CSRTPSession & aSession,
TUint aSSRC,
CSRTPCryptoContext * aCon,
MSRTPReKeyingObserver & aObs
) [private]

CSRTPStreamOut(CSRTPSession &, TUint, MSRTPReKeyingObserver &)

CSRTPStreamOut ( CSRTPSession & aSession,
TUint aSSRC,
MSRTPReKeyingObserver & aObs
) [private]

Parameters

CSRTPSession & aSession
TUint aSSRC
MSRTPReKeyingObserver & aObs

~CSRTPStreamOut()

~CSRTPStreamOut ( )

Member Functions Documentation

ChangeRTCPState(MSRTPStreamOutContext::TContextOutState)

void ChangeRTCPState ( MSRTPStreamOutContext::TContextOutState aNewState ) [private]

ChangeRTPState(MSRTPStreamOutContext::TContextOutState)

void ChangeRTPState ( MSRTPStreamOutContext::TContextOutState aNewState ) [private]

ConstructL()

void ConstructL ( ) [private]

CurrentRTCPState()

TSRTPStreamOutStateBase & CurrentRTCPState ( ) [private]

CurrentRTPState()

TSRTPStreamOutStateBase & CurrentRTPState ( ) [private]

InitializeStatesL()

void InitializeStatesL ( ) [private]
Create states defined in TSRTPStreamOutStateBase
leave
KErrNone if success, system-wide error code otherwise

NewL(CSRTPSession &, TUint)

IMPORT_C CSRTPStreamOut * NewL ( CSRTPSession & aSession,
TUint aSSRC
) [static]
Two-phased constructor. Use this function if the stream will use the SRTP session's default cryptographic context.
leave
KErrNone if success, system-wide error code otherwise

Parameters

CSRTPSession & aSession The session containing the cryptographic context for this object.
TUint aSSRC The synchronization source ID of the RTP stream that corresponds to this object.

NewL(CSRTPSession &, TUint, CSRTPCryptoContext *, MSRTPReKeyingObserver &)

IMPORT_C CSRTPStreamOut * NewL ( CSRTPSession & aSession,
TUint aSSRC,
CSRTPCryptoContext * aCon,
MSRTPReKeyingObserver & aObs
) [static]
Two-phased constructor. Use this function if the stream will have its own cryptographic context.
leave
KErrNone if success, system-wide error code otherwise

Parameters

CSRTPSession & aSession The session containing the cryptographic context for this object.
TUint aSSRC The synchronization source ID of the RTP stream that corresponds to this object.
CSRTPCryptoContext * aCon The cryptographic context, ownership is transfered.
MSRTPReKeyingObserver & aObs The callback object

NewL(CSRTPSession &, TUint, MSRTPReKeyingObserver &)

IMPORT_C CSRTPStreamOut * NewL ( CSRTPSession & aSession,
TUint aSSRC,
MSRTPReKeyingObserver & aObs
) [static]
Two-phased constructor. Use this function if the stream will have its own cryptographic context. Note that if crypto context is not set later, all data packet will not be processed.
leave
KErrNone if success, system-wide error code otherwise

Parameters

CSRTPSession & aSession The session containing the cryptographic context for this object.
TUint aSSRC The synchronization source ID of the RTP stream that corresponds to this object.
MSRTPReKeyingObserver & aObs The callback object

ProtectRtcpL(const TDesC8 &)

IMPORT_C HBufC8 * ProtectRtcpL ( const TDesC8 & aPacket )
Protect an RTCP packet. The settings for the protection are fetched from the appropriate cryptographic context. If the protection fails, the function leaves with a system error code and the provided RTCP packet is unaltered.
leave
KErrNone if success, system-wide error code otherwise

Parameters

const TDesC8 & aPacket The RTCP packet to protect.

ProtectRtpL(const TDesC8 &)

IMPORT_C HBufC8 * ProtectRtpL ( const TDesC8 & aPacket )
Protect an RTP packet. The settings for the protection are fetched from the appropriate cryptographic context. If the protection fails, the function leaves with a system error code and the provided RTP packet is unaltered.
leave
KErrNone if success, system-wide error code otherwise

Parameters

const TDesC8 & aPacket The RTP packet to protect. The length of descriptor should be the same with the actual data, otherwise encoding will not be correct.

SetCryptoOutL(CSRTPCryptoContext *)

IMPORT_C void SetCryptoOutL ( CSRTPCryptoContext * aCon )
Set CryptoContext for OutStream Setting cryptographic context must be done to enable encode/decode packets. During offer/Answer, offerer do not know which crypto context is chosen by answerer. CryptoContext then can be set after getting response from answerer. Updating stream specific crypto Context. Note that to update crypto context, ROC will not be re-intialed to zero but the states and number of receiving packets will be reset. This can be use only when keys lifetime has not expired. Crypto context ownersh p is transfered.
leave
KErrNone if success, system-wide error code otherwise

Parameters

CSRTPCryptoContext * aCon aCryyptoContext which wants be used

UpdateCryptoAndStatesL()

void UpdateCryptoAndStatesL ( ) [virtual]
Delete the existed crypto context and re-initial the states
leave
KErrNone if success, system-wide error code otherwise

Member Data Documentation

MSRTPStreamOutContext::TContextOutState iCurrentRTCPState

MSRTPStreamOutContext::TContextOutState iCurrentRTCPState [protected]

MSRTPStreamOutContext::TContextOutState iCurrentRTPState

MSRTPStreamOutContext::TContextOutState iCurrentRTPState [protected]

CArrayVarFlat< TSRTPStreamOutStateBase > iStates

CArrayVarFlat < TSRTPStreamOutStateBase > iStates [protected]