CSdpTimeField Class Reference

class CSdpTimeField : public CBase

This class encapsulates the time field and the related zero or more repeat times fields and an optional time zone adjustment field of the Session Description Protocol.

The normative reference for correct formatting and values is draft-ietf-mmusic-sdp-new-14 unless specified otherwise in member documentation. The implementation supports this normative reference, but does not enforce it fully.

sdpcodec.lib

Inherits from

Constructor & Destructor Documentation

CSdpTimeField()

CSdpTimeField ( ) [private]

~CSdpTimeField()

IMPORT_C ~CSdpTimeField ( )

Deletes the resources held by the instance.

Member Functions Documentation

CloneL(TBool)

IMPORT_C CSdpTimeField * CloneL ( TBool aRecurse = ETrue ) const

Creates a new instance that is equal to the target. Optionally also related repeat times are cloned.

Parameters

TBool aRecurse = ETrue Flag to specify whether to clone subfields also (ETrue) or only the time field (EFalse).

ConstructL(const TDesC8 &, TBool)

void ConstructL ( const TDesC8 & aText,
TBool aRecurse = ETrue
) [private]

Parameters

const TDesC8 & aText
TBool aRecurse = ETrue

ConstructL(const TDesC8 &, const TDesC8 &)

void ConstructL ( const TDesC8 & aStartTime,
const TDesC8 & aStopTime
) [private]

Parameters

const TDesC8 & aStartTime
const TDesC8 & aStopTime

DecodeL(const TDesC8 &, TBool)

IMPORT_C CSdpTimeField * DecodeL ( const TDesC8 & aText,
TBool aRecurse = ETrue
) [static]

Constructs a time field.

Parameters

const TDesC8 & aText A correctly formatted time field value terminated by a CRLF followed by zero or more repeat times and zero or one time zone adjustment fields separeted by a CRLF.
TBool aRecurse = ETrue Flag to specify whether to decode subfields also (ETrue) or only the time field (EFalse).

DecodeLC(const TDesC8 &, TBool)

IMPORT_C CSdpTimeField * DecodeLC ( const TDesC8 & aText,
TBool aRecurse = ETrue
) [static]

Constructs a time field and adds the pointer to the cleanup stack.

Parameters

const TDesC8 & aText A correctly formatted time field value terminated by a CRLF followed by zero or more repeat times and zero or one time zone adjustment fields separeted by a CRLF.
TBool aRecurse = ETrue Flag to specify whether to decode subfields also (ETrue) or only the time field (EFalse).

DoInternalizeL(RReadStream &)

void DoInternalizeL ( RReadStream & aStream )

Creates object from the stream data. Does the "2nd phase construction" of internalization.

Parameters

RReadStream & aStream Stream where the object's state will be read

EncodeL(RWriteStream &, TBool)

IMPORT_C void EncodeL ( RWriteStream & aStream,
TBool aRecurse = ETrue
) const

Outputs the field formatted according to SDP syntax and including the terminating CRLF. Optionally output also the related repeat times.

Parameters

RWriteStream & aStream Stream used for output. On return the stream includes correctly formatted time field with repeat fields if aRecurse is ETrue.
TBool aRecurse = ETrue Flag to specify whether to output subfields also (ETrue) or only the time field (EFalse).

ExternalizeL(RWriteStream &)

void ExternalizeL ( RWriteStream & aStream ) const

Externalizes the object to stream

Parameters

RWriteStream & aStream Stream where the object's state will be stored

InternalizeL(RReadStream &)

CSdpTimeField * InternalizeL ( RReadStream & aStream ) [static]

Creates object from the stream data

Parameters

RReadStream & aStream Stream where the object's state will be read

IsValid()

IMPORT_C TBool IsValid ( ) const

Checks the consistency of the time description and it's subfields.

NewL(const TDesC8 &, const TDesC8 &)

IMPORT_C CSdpTimeField * NewL ( const TDesC8 & aStartTime,
const TDesC8 & aStopTime
) [static]

Constructs a time field.

Parameters

const TDesC8 & aStartTime Session start time.
const TDesC8 & aStopTime Session end time that must be greater than or equal to the start time.

NewLC(const TDesC8 &, const TDesC8 &)

IMPORT_C CSdpTimeField * NewLC ( const TDesC8 & aStartTime,
const TDesC8 & aStopTime
) [static]

Constructs a time field and adds the pointer to the cleanup stack.

Parameters

const TDesC8 & aStartTime Session start time.
const TDesC8 & aStopTime Session end time that must be greater than or equal to the start time.

RepeatFields()

IMPORT_C RPointerArray < CSdpRepeatField > & RepeatFields ( )

Gets the set of repeat times fields related to this time field. This array is used directly for element insertion and removal.

The objects referenced from the array are owned by the media field instance and must not be deleted. An object can be removed from the media description by setting the corresponding element to zero. By doing so, the calling party receives ownership of the removed object.

RepeatFieldsCompare(const CSdpTimeField &)

TBool RepeatFieldsCompare ( const CSdpTimeField & aObj ) const [private]

Parameters

const CSdpTimeField & aObj

SetTimesL(const TDesC8 &, const TDesC8 &)

IMPORT_C void SetTimesL ( const TDesC8 & aStartTime,
const TDesC8 & aStopTime
)

Sets the session start and stop times.

leave
KErrSdpCodecTimeField if start time and stop time are not correct as defined draft-ietf-mmusic-sdp-new-14.

Parameters

const TDesC8 & aStartTime Session start time..
const TDesC8 & aStopTime Session end time that must be greater than or equal to the start time.

StartTime()

IMPORT_C const TDesC8 & StartTime ( ) const

Gets the session start time.

StopTime()

IMPORT_C const TDesC8 & StopTime ( ) const

Gets the session stop time.

__DbgTestInvariant()

void __DbgTestInvariant ( ) const [private]

operator==(const CSdpTimeField &)

IMPORT_C TBool operator== ( const CSdpTimeField & aObj ) const

Compares this instance to another for equality. Subfields are included in comparison if present.

Parameters

const CSdpTimeField & aObj The instance to compare to.

Member Data Documentation

RPointerArray< CSdpRepeatField > iRFields

RPointerArray < CSdpRepeatField > iRFields [private]

HBufC8 * iStartTime

HBufC8 * iStartTime [private]

HBufC8 * iStopTime

HBufC8 * iStopTime [private]

RStringPool iStringPool

RStringPool iStringPool [private]