S60 3rd Edition API Reference: CSdpTimeField Class Reference

CSdpTimeField Class Reference

API published in: S60 2nd Ed

Link against: sdpcodec.lib

Capability Information

Required Capabilities

None

Exceptions


#include <sdptimefield.h>

Detailed Description

PublishedAll
Released
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.


Public Member Functions

IMPORT_C ~CSdpTimeField ()
 Deletes the resources held by the instance.
IMPORT_C void EncodeL (RWriteStream &aStream, TBool aRecurse=ETrue) const
 Outputs the field formatted according to SDP syntax and including the terminating CRLF.
IMPORT_C CSdpTimeFieldCloneL (TBool aRecurse=ETrue) const
 Creates a new instance that is equal to the target.
IMPORT_C TBool operator== (const CSdpTimeField &aObj) const
 Compares this instance to another for equality.
IMPORT_C TBool IsValid () const
 Checks the consistency of the time description and it's subfields.
IMPORT_C const TDesC8 & StartTime () const
 Gets the session start time.
IMPORT_C const TDesC8 & StopTime () const
 Gets the session stop time.
IMPORT_C void SetTimesL (const TDesC8 &aStartTime, const TDesC8 &aStopTime)
 Sets the session start and stop times.
IMPORT_C RPointerArray< CSdpRepeatField > & RepeatFields ()
 Gets the set of repeat times fields related to this time field.
void ExternalizeL (RWriteStream &aStream) const
 Externalizes the object to stream.
void DoInternalizeL (RReadStream &aStream)
 Creates object from the stream data.

Static Public Member Functions

static IMPORT_C CSdpTimeFieldDecodeL (const TDesC8 &aText, TBool aRecurse=ETrue)
 Constructs a time field.
static IMPORT_C CSdpTimeFieldDecodeLC (const TDesC8 &aText, TBool aRecurse=ETrue)
 Constructs a time field and adds the pointer to the cleanup stack.
static IMPORT_C CSdpTimeFieldNewL (const TDesC8 &aStartTime, const TDesC8 &aStopTime)
 Constructs a time field.
static IMPORT_C CSdpTimeFieldNewLC (const TDesC8 &aStartTime, const TDesC8 &aStopTime)
 Constructs a time field and adds the pointer to the cleanup stack.
static CSdpTimeFieldInternalizeL (RReadStream &aStream)
 Creates object from the stream data.

Constructor & Destructor Documentation

IMPORT_C CSdpTimeField::~CSdpTimeField  ) 
 

Deletes the resources held by the instance.


Member Function Documentation

IMPORT_C CSdpTimeField* CSdpTimeField::CloneL TBool  aRecurse = ETrue  )  const
 

Creates a new instance that is equal to the target.

Optionally also related repeat times are cloned.

Parameters:
aRecurse Flag to specify whether to clone subfields also (ETrue) or only the time field (EFalse).
Returns:
a new instance.
static IMPORT_C CSdpTimeField* CSdpTimeField::DecodeL const TDesC8 &  aText,
TBool  aRecurse = ETrue
[static]
 

Constructs a time field.

Parameters:
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.
aRecurse Flag to specify whether to decode subfields also (ETrue) or only the time field (EFalse).
Returns:
a new instance.
static IMPORT_C CSdpTimeField* CSdpTimeField::DecodeLC const TDesC8 &  aText,
TBool  aRecurse = ETrue
[static]
 

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

Parameters:
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.
aRecurse Flag to specify whether to decode subfields also (ETrue) or only the time field (EFalse).
Returns:
a new instance.
void CSdpTimeField::DoInternalizeL RReadStream &  aStream  ) 
 

Creates object from the stream data.

Does the "2nd phase construction" of internalization.

Parameters:
aStream Stream where the object's state will be read
IMPORT_C void CSdpTimeField::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:
aStream Stream used for output. On return the stream includes correctly formatted time field with repeat fields if aRecurse is ETrue.
aRecurse Flag to specify whether to output subfields also (ETrue) or only the time field (EFalse).
void CSdpTimeField::ExternalizeL RWriteStream &  aStream  )  const
 

Externalizes the object to stream.

Parameters:
aStream Stream where the object's state will be stored
static CSdpTimeField* CSdpTimeField::InternalizeL RReadStream &  aStream  )  [static]
 

Creates object from the stream data.

Parameters:
aStream Stream where the object's state will be read
Returns:
Initialized object
IMPORT_C TBool CSdpTimeField::IsValid  )  const
 

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

Returns:
ETrue if time description is valid and EFalse if not.
static IMPORT_C CSdpTimeField* CSdpTimeField::NewL const TDesC8 &  aStartTime,
const TDesC8 &  aStopTime
[static]
 

Constructs a time field.

Parameters:
aStartTime Session start time.
aStopTime Session end time that must be greater than or equal to the start time.
Returns:
a new instance.
static IMPORT_C CSdpTimeField* CSdpTimeField::NewLC const TDesC8 &  aStartTime,
const TDesC8 &  aStopTime
[static]
 

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

Parameters:
aStartTime Session start time.
aStopTime Session end time that must be greater than or equal to the start time.
Returns:
a new instance.
IMPORT_C TBool CSdpTimeField::operator== const CSdpTimeField aObj  )  const
 

Compares this instance to another for equality.

Subfields are included in comparison if present.

Parameters:
aObj The instance to compare to.
Returns:
ETrue if equal, EFalse if not.
IMPORT_C RPointerArray<CSdpRepeatField>& CSdpTimeField::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.

Returns:
The set of repeat fields.
IMPORT_C void CSdpTimeField::SetTimesL const TDesC8 &  aStartTime,
const TDesC8 &  aStopTime
 

Sets the session start and stop times.

Parameters:
aStartTime Session start time..
aStopTime Session end time that must be greater than or equal to the start time.
Leave:
KErrSdpCodecTimeField if start time and stop time are not correct as defined draft-ietf-mmusic-sdp-new-14.
IMPORT_C const TDesC8& CSdpTimeField::StartTime  )  const
 

Gets the session start time.

Returns:
The session start time.
IMPORT_C const TDesC8& CSdpTimeField::StopTime  )  const
 

Gets the session stop time.

Returns:
The session stop time.

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2007
Back to top