Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: SdpTimeField.h
Link against: sdpcodec.lib

Class CSdpTimeField

class CSdpTimeField : public CBase;

Description

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

Derivation

Members

Defined in CSdpTimeField:
CloneL(), DecodeL(), DecodeLC(), EncodeL(), IsValid(), NewL(), NewLC(), RepeatFields(), SetTimesL(), StartTime(), StopTime(), operator==(), ~CSdpTimeField()

Inherited from CBase:
Delete(), Extension_(), operator new()


Construction and destruction


NewL()

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

Description

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.

Return value

CSdpTimeField *

a new instance.


NewLC()

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

Description

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.

Return value

CSdpTimeField *

a new instance.


~CSdpTimeField()

IMPORT_C ~CSdpTimeField();

Description

Deletes the resources held by the instance.

[Top]


Member functions


DecodeL()

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

Description

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

Flag to specify whether to decode subfields also (ETrue) or only the time field (EFalse).

Return value

CSdpTimeField *

a new instance.


DecodeLC()

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

Description

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

Flag to specify whether to decode subfields also (ETrue) or only the time field (EFalse).

Return value

CSdpTimeField *

a new instance.


EncodeL()

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

Description

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

Flag to specify whether to output subfields also (ETrue) or only the time field (EFalse).


CloneL()

IMPORT_C CSdpTimeField *CloneL(TBool aRecurse=ETrue) const;

Description

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

Parameters

TBool aRecurse

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

Return value

CSdpTimeField *

a new instance.


operator==()

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

Description

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

Parameters

const CSdpTimeField &aObj

The instance to compare to.

Return value

TBool

ETrue if equal, EFalse if not.


IsValid()

IMPORT_C TBool IsValid() const;

Description

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

Return value

TBool

ETrue if time description is valid and EFalse if not.


StartTime()

IMPORT_C const TDesC8 &StartTime() const;

Description

Gets the session start time.

Return value

const TDesC8 &

The session start time.


StopTime()

IMPORT_C const TDesC8 &StopTime() const;

Description

Gets the session stop time.

Return value

const TDesC8 &

The session stop time.


SetTimesL()

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

Description

Sets the session start and stop times.

Parameters

const TDesC8 &aStartTime

Session start time..

const TDesC8 &aStopTime

Session end time that must be greater than or equal to the start time.

Leave codes

KErrSdpCodecTimeField

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


RepeatFields()

IMPORT_C RPointerArray< CSdpRepeatField > &RepeatFields();

Description

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.

Return value

RPointerArray< CSdpRepeatField > &

The set of repeat fields.