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 voidSetCryptoOutL(CSRTPCryptoContext *)
voidUpdateCryptoAndStatesL()
Private Member Functions
CSRTPStreamOut(CSRTPSession &, TUint)
CSRTPStreamOut(CSRTPSession &, TUint, CSRTPCryptoContext *, MSRTPReKeyingObserver &)
CSRTPStreamOut(CSRTPSession &, TUint, MSRTPReKeyingObserver &)
voidChangeRTCPState(MSRTPStreamOutContext::TContextOutState)
voidChangeRTPState(MSRTPStreamOutContext::TContextOutState)
voidConstructL()
TSRTPStreamOutStateBase &CurrentRTCPState()
TSRTPStreamOutStateBase &CurrentRTPState()
voidInitializeStatesL()
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,
TUintaSSRC
)[private]

Parameters

CSRTPSession & aSession
TUint aSSRC

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

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

Parameters

CSRTPSession & aSession
TUint aSSRC
CSRTPCryptoContext * aCon
MSRTPReKeyingObserver & aObs

CSRTPStreamOut(CSRTPSession &, TUint, MSRTPReKeyingObserver &)

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

Parameters

CSRTPSession & aSession
TUint aSSRC
MSRTPReKeyingObserver & aObs

~CSRTPStreamOut()

~CSRTPStreamOut()

Member Functions Documentation

ChangeRTCPState(MSRTPStreamOutContext::TContextOutState)

voidChangeRTCPState(MSRTPStreamOutContext::TContextOutStateaNewState)[private]

ChangeRTPState(MSRTPStreamOutContext::TContextOutState)

voidChangeRTPState(MSRTPStreamOutContext::TContextOutStateaNewState)[private]

ConstructL()

voidConstructL()[private]

CurrentRTCPState()

TSRTPStreamOutStateBase &CurrentRTCPState()[private]

CurrentRTPState()

TSRTPStreamOutStateBase &CurrentRTPState()[private]

InitializeStatesL()

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

NewL(CSRTPSession &, TUint)

IMPORT_C CSRTPStreamOut *NewL(CSRTPSession &aSession,
TUintaSSRC
)[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 & aSessionThe session containing the cryptographic context for this object.
TUint aSSRCThe synchronization source ID of the RTP stream that corresponds to this object.

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

IMPORT_C CSRTPStreamOut *NewL(CSRTPSession &aSession,
TUintaSSRC,
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 & aSessionThe session containing the cryptographic context for this object.
TUint aSSRCThe synchronization source ID of the RTP stream that corresponds to this object.
CSRTPCryptoContext * aConThe cryptographic context, ownership is transfered.
MSRTPReKeyingObserver & aObsThe callback object

NewL(CSRTPSession &, TUint, MSRTPReKeyingObserver &)

IMPORT_C CSRTPStreamOut *NewL(CSRTPSession &aSession,
TUintaSSRC,
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 & aSessionThe session containing the cryptographic context for this object.
TUint aSSRCThe synchronization source ID of the RTP stream that corresponds to this object.
MSRTPReKeyingObserver & aObsThe 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 & aPacketThe 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 & aPacketThe 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 voidSetCryptoOutL(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 * aConaCryyptoContext which wants be used

UpdateCryptoAndStatesL()

voidUpdateCryptoAndStatesL()[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]