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 void SetCryptoInL ( CSRTPCryptoContext *)
IMPORT_C HBufC8 * UnprotectSrtcpL (const TDesC8 &)
IMPORT_C HBufC8 * UnprotectSrtpL (const TDesC8 &)
void UpdateCryptoAndStatesL ()
Private Member Functions
CSRTPStreamIn ( CSRTPSession &, TUint )
CSRTPStreamIn ( CSRTPSession &, TUint , CSRTPCryptoContext *, MSRTPReKeyingObserver &)
CSRTPStreamIn ( CSRTPSession &, TUint , MSRTPReKeyingObserver &)
CSRTPStreamIn ( CSRTPSession &)
CSRTPStreamIn ( CSRTPSession &, CSRTPCryptoContext *, MSRTPReKeyingObserver &)
CSRTPStreamIn ( CSRTPSession &, MSRTPReKeyingObserver &)
void ChangeRTCPState ( MSRTPStreamInContext::TContextInState )
void ChangeRTPState ( MSRTPStreamInContext::TContextInState )
void ConstructL ()
TSRTPStreamInStateBase & CurrentRTCPState ()
TSRTPStreamInStateBase & 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
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,
TUint aSSRC
) [private]

Parameters

CSRTPSession & aSession
TUint aSSRC

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

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

CSRTPStreamIn(CSRTPSession &, TUint, MSRTPReKeyingObserver &)

CSRTPStreamIn ( CSRTPSession & aSession,
TUint aSSRC,
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]

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)

void ChangeRTCPState ( MSRTPStreamInContext::TContextInState aNewState ) [private]

ChangeRTPState(MSRTPStreamInContext::TContextInState)

void ChangeRTPState ( MSRTPStreamInContext::TContextInState aNewState ) [private]

ConstructL()

void ConstructL ( ) [private]

CurrentRTCPState()

TSRTPStreamInStateBase & CurrentRTCPState ( ) [private]

CurrentRTPState()

TSRTPStreamInStateBase & CurrentRTPState ( ) [private]

InitializeStatesL()

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

NewL(CSRTPSession &, TUint)

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

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 & aSession The 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 & aSession The session containing the cryptographic context for this object.
CSRTPCryptoContext * aCon The cryptographic context, ownership is transfered.
MSRTPReKeyingObserver & aObs The callback object

NewL(CSRTPSession &, TUint, MSRTPReKeyingObserver &)

IMPORT_C CSRTPStreamIn * NewL ( CSRTPSession & aSession,
TUint aSSRC,
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 & aSession The session which includes the streams.
TUint aSSRC The synchronization source ID of the RTP stream that corresponds to this object.
MSRTPReKeyingObserver & aObs The 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 & aSession The session which includes the streams.
MSRTPReKeyingObserver & aObs The callback object

SetCryptoInL(CSRTPCryptoContext *)

IMPORT_C void SetCryptoInL ( 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 * aCon aCryyptoContext 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 & aPacket The 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 & aPacket The SRTP packet to process.

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

MSRTPStreamInContext::TContextInState iCurrentRTCPState

MSRTPStreamInContext::TContextInState iCurrentRTCPState [protected]

MSRTPStreamInContext::TContextInState iCurrentRTPState

MSRTPStreamInContext::TContextInState iCurrentRTPState [protected]

CArrayVarFlat< TSRTPStreamInStateBase > iStates

CArrayVarFlat < TSRTPStreamInStateBase > iStates [protected]