CSRTPStreamIn Class Reference

class CSRTPStreamIn : public CSRTPStream

Represents an SRTP stream.

Inherits from

Public Member Functions
~CSRTPStreamIn()
IMPORT_C CSRTPStreamIn *NewL(CSRTPSession &, TUint)
IMPORT_C CSRTPStreamIn *NewL(CSRTPSession &, TUint, CSRTPCryptoContext *, MSRTPReKeyingObserver &)
IMPORT_C CSRTPStreamIn *NewL(CSRTPSession &)
IMPORT_C CSRTPStreamIn *NewL(CSRTPSession &, CSRTPCryptoContext *, MSRTPReKeyingObserver &)
IMPORT_C CSRTPStreamIn *NewL(CSRTPSession &, TUint, MSRTPReKeyingObserver &)
IMPORT_C CSRTPStreamIn *NewL(CSRTPSession &, MSRTPReKeyingObserver &)
IMPORT_C voidSetCryptoInL(CSRTPCryptoContext *)
IMPORT_C HBufC8 *UnprotectSrtcpL(const TDesC8 &)
IMPORT_C HBufC8 *UnprotectSrtpL(const TDesC8 &)
voidUpdateCryptoAndStatesL()
Private Member Functions
CSRTPStreamIn(CSRTPSession &, TUint)
CSRTPStreamIn(CSRTPSession &, TUint, CSRTPCryptoContext *, MSRTPReKeyingObserver &)
CSRTPStreamIn(CSRTPSession &, TUint, MSRTPReKeyingObserver &)
CSRTPStreamIn(CSRTPSession &)
CSRTPStreamIn(CSRTPSession &, CSRTPCryptoContext *, MSRTPReKeyingObserver &)
CSRTPStreamIn(CSRTPSession &, MSRTPReKeyingObserver &)
voidChangeRTCPState(MSRTPStreamInContext::TContextInState)
voidChangeRTPState(MSRTPStreamInContext::TContextInState)
voidConstructL()
TSRTPStreamInStateBase &CurrentRTCPState()
TSRTPStreamInStateBase &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
MSRTPStreamInContext::TContextInState iCurrentRTCPState
MSRTPStreamInContext::TContextInState iCurrentRTPState
CArrayVarFlat< TSRTPStreamInStateBase >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

CSRTPStreamIn(CSRTPSession &, TUint)

CSRTPStreamIn(CSRTPSession &aSession,
TUintaSSRC
)[private]

Parameters

CSRTPSession & aSession
TUint aSSRC

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

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

Parameters

CSRTPSession & aSession
TUint aSSRC
CSRTPCryptoContext * aCon
MSRTPReKeyingObserver & aObs

CSRTPStreamIn(CSRTPSession &, TUint, MSRTPReKeyingObserver &)

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

Parameters

CSRTPSession & aSession
TUint aSSRC
MSRTPReKeyingObserver & aObs

CSRTPStreamIn(CSRTPSession &)

CSRTPStreamIn(CSRTPSession &aSession)[private]

Parameters

CSRTPSession & aSession

CSRTPStreamIn(CSRTPSession &, CSRTPCryptoContext *, MSRTPReKeyingObserver &)

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

Parameters

CSRTPSession & aSession
CSRTPCryptoContext * aCon
MSRTPReKeyingObserver & aObs

CSRTPStreamIn(CSRTPSession &, MSRTPReKeyingObserver &)

CSRTPStreamIn(CSRTPSession &aSession,
MSRTPReKeyingObserver &aObs
)[private]

Parameters

CSRTPSession & aSession
MSRTPReKeyingObserver & aObs

~CSRTPStreamIn()

~CSRTPStreamIn()

Destructor Note that crypto context will be deleted if stream has it's own cryptocontext

Member Functions Documentation

ChangeRTCPState(MSRTPStreamInContext::TContextInState)

voidChangeRTCPState(MSRTPStreamInContext::TContextInStateaNewState)[private]

ChangeRTPState(MSRTPStreamInContext::TContextInState)

voidChangeRTPState(MSRTPStreamInContext::TContextInStateaNewState)[private]

ConstructL()

voidConstructL()[private]

CurrentRTCPState()

TSRTPStreamInStateBase &CurrentRTCPState()[private]

CurrentRTPState()

TSRTPStreamInStateBase &CurrentRTPState()[private]

InitializeStatesL()

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

NewL(CSRTPSession &, TUint)

IMPORT_C CSRTPStreamIn *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 CSRTPStreamIn *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 &)

IMPORT_C CSRTPStreamIn *NewL(CSRTPSession &aSession)[static]
Two-phased constructor. Use this function if the stream will use the SRTP session's default cryptographic context and "late binding" is to be used, that is, no SSRC is provided.
leave
KErrNone if success, system-wide error code otherwise

Parameters

CSRTPSession & aSessionThe session containing the cryptographic context for this object.

NewL(CSRTPSession &, CSRTPCryptoContext *, MSRTPReKeyingObserver &)

IMPORT_C CSRTPStreamIn *NewL(CSRTPSession &aSession,
CSRTPCryptoContext *aCon,
MSRTPReKeyingObserver &aObs
)[static]
Two-phased constructor. Use this function if the stream will have its own cryptographic context and "late binding" is to be used, that is, no SSRC is provided.
leave
KErrNone if success, system-wide error code otherwise

Parameters

CSRTPSession & aSessionThe session containing the cryptographic context for this object.
CSRTPCryptoContext * aConThe cryptographic context, ownership is transfered.
MSRTPReKeyingObserver & aObsThe callback object

NewL(CSRTPSession &, TUint, MSRTPReKeyingObserver &)

IMPORT_C CSRTPStreamIn *NewL(CSRTPSession &aSession,
TUintaSSRC,
MSRTPReKeyingObserver &aObs
)[static]
Two-phased constructor. Use this function if the stream will have its own cryptographic context and this cryptographic context will be set later. Note that if the crypto context is not been set, the encoded packets will not be handled.
leave
KErrNone if success, system-wide error code otherwise

Parameters

CSRTPSession & aSessionThe session which includes the streams.
TUint aSSRCThe synchronization source ID of the RTP stream that corresponds to this object.
MSRTPReKeyingObserver & aObsThe callback object

NewL(CSRTPSession &, MSRTPReKeyingObserver &)

IMPORT_C CSRTPStreamIn *NewL(CSRTPSession &aSession,
MSRTPReKeyingObserver &aObs
)[static]
Two-phased constructor. Use this function if the stream will have its own cryptographic context and "late binding" is to be used, that is, no SSRC is provided.Stream own cryptocontext will be set later. Note that if the crypto context is not been set, the encoded packets will not be handled.
leave
KErrNone if success, system-wide error code otherwise

Parameters

CSRTPSession & aSessionThe session which includes the streams.
MSRTPReKeyingObserver & aObsThe callback object

SetCryptoInL(CSRTPCryptoContext *)

IMPORT_C voidSetCryptoInL(CSRTPCryptoContext *aCon)
Set/Update CryptoContext for InStream 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. If crypto context has not been set, no packets in secure session will be handled. 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, ownership is transfered.

UnprotectSrtcpL(const TDesC8 &)

IMPORT_C HBufC8 *UnprotectSrtcpL(const TDesC8 &aPacket)
Unprotect an SRTCP packet. The settings for the protection are fetched from the appropriate cryptographic context. If the operation fails, the function leaves with a system error code.
leave
KErrNone if success, system-wide error code otherwise

Parameters

const TDesC8 & aPacketThe SRTCP packet to process.

UnprotectSrtpL(const TDesC8 &)

IMPORT_C HBufC8 *UnprotectSrtpL(const TDesC8 &aPacket)
Unprotect an SRTP packet. The settings for the protection are fetched from the appropriate cryptographic context. If the operation fails, the function leaves with a system error code.
leave
KErrNone if success, system-wide error code otherwise

Parameters

const TDesC8 & aPacketThe SRTP packet to process.

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

MSRTPStreamInContext::TContextInState iCurrentRTCPState

MSRTPStreamInContext::TContextInState iCurrentRTCPState[protected]

MSRTPStreamInContext::TContextInState iCurrentRTPState

MSRTPStreamInContext::TContextInState iCurrentRTPState[protected]

CArrayVarFlat< TSRTPStreamInStateBase > iStates

CArrayVarFlat< TSRTPStreamInStateBase >iStates[protected]