CParserTimePropertyValue Class Reference

class CParserTimePropertyValue : public CParserPropertyValue

Abstract base class for all of the date/time property value classes.

Provides date/time conversion functions between machine-local and universal time.

The date/time property value classes are CParserPropertyValueAlarm , CParserPropertyValueDate , CParserPropertyValueDateTime , CParserPropertyValueMultiDateTime , CParserPropertyValueDaylight and CParserPropertyValueRecurrence .

Inherits from

Public Member Functions
IMPORT_C void ConvertAllDateTimesToUTCL (const TTimeIntervalSeconds &, const CVersitDaylight *)
IMPORT_C void ConvertAllUTCDateTimesToMachineLocalL (const TTimeIntervalSeconds &)
void ConvertDateTime ( TDateTime &, const TTimeIntervalSeconds &, const CVersitDaylight *, TBool )
IMPORT_C TBool SupportsInterface (const TUid &)
Protected Member Functions
CParserTimePropertyValue (const TUid &)
IMPORT_C void ConvertDateTime ( TDateTime *, const TTimeIntervalSeconds &, const CVersitDaylight *)
IMPORT_C void EncodeTimePeriodL ( TDes8 &, const TTime &)
IMPORT_C void EncodeVersitDateTimeL ( TDes8 &, const TVersitDateTime &, TBool )
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()
CParserPropertyValue::Append(TDes16 &,TDesC8 &)
CParserPropertyValue::CParserPropertyValue(const TUid &)
CParserPropertyValue::EncodeL(CBufBase *,const TDesC8 &,const TUid &)const
CParserPropertyValue::ExternalizeL(RWriteStream &,const Versit::TEncodingAndCharset &,TInt)
CParserPropertyValue::FoldAndWriteValueToStreamL(RWriteStream &,const TDesC &,const Versit::TEncodingAndCharset &,TInt &)const
CParserPropertyValue::FoldEncodeAndWriteValueToStreamL(RWriteStream &,const CDesCArray *,const Versit::TEncodingAndCharset &,TInt &)const
CParserPropertyValue::FoldEncodeAndWriteValueToStreamL(RWriteStream &,const TDesC &,const Versit::TEncodingAndCharset &,TInt &)const
CParserPropertyValue::IsAsciiCharacterSetSufficient()
CParserPropertyValue::PlugIn()
CParserPropertyValue::SetPlugIn(MVersitPlugIn *)
CParserPropertyValue::Uid()const

Constructor & Destructor Documentation

CParserTimePropertyValue(const TUid &)

IMPORT_C CParserTimePropertyValue ( const TUid & aPropertyValueUid ) [protected]

Parameters

const TUid & aPropertyValueUid

Member Functions Documentation

ConvertAllDateTimesToUTCL(const TTimeIntervalSeconds &, const CVersitDaylight *)

IMPORT_C void ConvertAllDateTimesToUTCL ( const TTimeIntervalSeconds & aIncrement,
const CVersitDaylight * aDaylight
) [pure virtual]

This is implemented, where applicable, to convert date/time values into universal time.

The date/time is checked against the daylight saving information provided in aDaylight. If it falls inside the daylight saving period then the daylight saving offset is subtracted from the time to convert it to universal time. Otherwise aIncrement is added to the date/time of the alarm to convert it to universal time.

Note that the daylight savings offset will adjust the time both for the daylight saving and for the time zone.

The function has no effect if it date/times are already stored in universal time.

If aDaylight is a NULL pointer then aIncrement is used.

since 9.1

Parameters

const TTimeIntervalSeconds & aIncrement A time interval in seconds which represents the time zone's offset from universal time.
const CVersitDaylight * aDaylight Pointer to the specification for daylight saving. If the alarm's time value is within the period for daylight saving, the value is modified by the daylight saving offset (which accounts for both the time zone and daylight saving rule).

ConvertAllUTCDateTimesToMachineLocalL(const TTimeIntervalSeconds &)

IMPORT_C void ConvertAllUTCDateTimesToMachineLocalL ( const TTimeIntervalSeconds & aIncrement ) [pure virtual]

Pure virtual function which is implemented, where applicable, to convert the date/time property value into machine-local time.

This process involves adjusting the date/time value by the offset in aIncrement.

The function has no effect if the value is already stored as machine-local time.

The universal date/times are assumed to have been corrected for any daylight saving rule in effect.

since 9.1

Parameters

const TTimeIntervalSeconds & aIncrement A time interval which represents the number of seconds which is to be added to the date/time value. This should normally be the universal time offset for the machine's locale.

ConvertDateTime(TDateTime &, const TTimeIntervalSeconds &, const CVersitDaylight *, TBool)

void ConvertDateTime ( TDateTime & aDateTime,
const TTimeIntervalSeconds & aIncrement,
const CVersitDaylight * aDaylight,
TBool aTo
) [static]

Parameters

TDateTime & aDateTime
const TTimeIntervalSeconds & aIncrement
const CVersitDaylight * aDaylight
TBool aTo

ConvertDateTime(TDateTime *, const TTimeIntervalSeconds &, const CVersitDaylight *)

IMPORT_C void ConvertDateTime ( TDateTime * aDateTime,
const TTimeIntervalSeconds & aIncrement,
const CVersitDaylight * aDaylight
) [protected]

Parameters

TDateTime * aDateTime
const TTimeIntervalSeconds & aIncrement
const CVersitDaylight * aDaylight

EncodeTimePeriodL(TDes8 &, const TTime &)

IMPORT_C void EncodeTimePeriodL ( TDes8 & aBuf,
const TTime & aTimePeriod
) const [protected]

Parameters

TDes8 & aBuf
const TTime & aTimePeriod

EncodeVersitDateTimeL(TDes8 &, const TVersitDateTime &, TBool)

IMPORT_C void EncodeVersitDateTimeL ( TDes8 & aBuf,
const TVersitDateTime & aDateTime,
TBool aEncodeTime = ETrue
) const [protected]

Parameters

TDes8 & aBuf
const TVersitDateTime & aDateTime
TBool aEncodeTime = ETrue

SupportsInterface(const TUid &)

IMPORT_C TBool SupportsInterface ( const TUid & aInterfaceUid ) const [virtual]

Tests whether the property value supports the specified interface.

It overrides the base class function, which always returns EFalse.

This function is used to test whether or not a property value is time-related (i.e. derived from CParserTimePropertyValue ). It returns ETrue if aInterfaceUid is KVersitTimePropertyUid.

Parameters

const TUid & aInterfaceUid An interface UID.