CICalValue Class Reference

class CICalValue : public CBase

Class representing a property-, property parameter- or rule segement value.

Inherits from

Public Member Functions
~CICalValue()
IMPORT_C HBufC8 *BinaryLC()
IMPORT_C TBoolBooleanL()
IMPORT_C TTimeIntervalSecondsDurationL()
IMPORT_C voidGetDateL(TTime &)
IMPORT_C voidGetDateTimeL(TTime &, TTimeZoneType &, TInt)
IMPORT_C voidGetDayL(TDay &, TInt &)
IMPORT_C voidGetFloatL(TReal &)
IMPORT_C voidGetPeriodL(TTime &, TTimeZoneType &, TTime &, TTimeZoneType &)
IMPORT_C voidGetRecurrenceRuleL(RPointerArray< CICalRuleSegment > &)
IMPORT_C voidGetTimeL(TTime &, TTimeZoneType &)
IMPORT_C TIntIntegerL()
IMPORT_C TMonthMonthL()
IMPORT_C CICalValue *NewL()
IMPORT_C CICalValue *NewLC()
IMPORT_C voidSetBinaryL(const TDesC8 &)
IMPORT_C voidSetBooleanL(TBool)
IMPORT_C voidSetDateL(const TTime &)
IMPORT_C voidSetDateTimeL(const TTime &, TTimeZoneType)
IMPORT_C voidSetDayL(TDay, TInt)
IMPORT_C voidSetDurationL(TTimeIntervalSeconds)
IMPORT_C voidSetFloatL(const TReal &)
IMPORT_C voidSetIntegerL(TInt)
IMPORT_C voidSetMonthL(TMonth)
IMPORT_C voidSetPeriodL(const TTime &, TTimeZoneType, const TTime &, TTimeZoneType)
IMPORT_C voidSetRecurrenceRuleL(const TDesC &)
IMPORT_C voidSetTextL(const TDesC &)
IMPORT_C voidSetTimeL(const TTime &, TTimeZoneType)
IMPORT_C voidSetUtcOffsetL(TTimeIntervalSeconds)
IMPORT_C const TDesC &TextL()
IMPORT_C TTimeIntervalSecondsUtcOffsetL()
Private Member Functions
CICalValue()
voidAppendDateToValueL(const TTime &)
voidAppendTimeToValueL(const TTime &)
voidCheckNullValueL()
voidConstructL()
voidGetDateFromValueL(TTime &, TInt)
TBool GetDurDateL(TInt &, TInt &)
TBool GetDurHourL(TInt &, TInt &)
TBool GetDurMinuteL(TInt &, TInt &)
TBool GetDurSecondL(TInt &, TInt &)
TBool GetDurTimeL(TInt &, TInt &)
TBool GetDurWeekL(TInt &, TInt &)
voidGetTimeFromValueL(TTime &, TTimeZoneType &, TInt)
voidGetTimeIntervalFromValueL(TTimeIntervalSeconds &, TInt)
voidPrepareValuePointer()
TInt ReadIntL(const TDesC &)
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()
Public Member Enumerations
enumTTimeZoneType { EFloatingTime, EUtcTime, ESpecifiedTimeZone }
Private Attributes
HBufC *iValue

Constructor & Destructor Documentation

CICalValue()

CICalValue()[private]

Constructor.

~CICalValue()

~CICalValue()

Destructor.

Member Functions Documentation

AppendDateToValueL(const TTime &)

voidAppendDateToValueL(const TTime &aDate)[private]

Appends the date to iValue. Member iValue must be initialised before calling.

Parameters

const TTime & aDateTTime to append to the value.

AppendTimeToValueL(const TTime &)

voidAppendTimeToValueL(const TTime &aTime)[private]

Appends the time to iValue. Member iValue must be initialised before calling.

Parameters

const TTime & aTimeTTime to append to the value.

BinaryLC()

IMPORT_C HBufC8 *BinaryLC()const

Returns a copy of the value as an 8-bit string. User takes ownership of the returned descriptor, which is also left on the Cleanup Stack. Note that each 16-bit word in the value is copied into a single 8-bit word in the returned descriptor and any values greater than 256 are set to the value '1'. This will not occur if the value was set using SetBinaryL().

BooleanL()

IMPORT_C TBoolBooleanL()const
Returns the CICalValue as a TBool. Leaves if the value cannot be read as a TBool.
leave
KErrCorrupt if value is not a valid Boolean value.

CheckNullValueL()

voidCheckNullValueL()const [private]
Checks for a NULL value. Should be called before accessing iValue.
leave
Leaves with KErrCorrupt if the value is NULL.

ConstructL()

voidConstructL()[private]

Internal construction.

DurationL()

IMPORT_C TTimeIntervalSecondsDurationL()const

Returns the CICalValue as a Duration (TTimeIntervalSeconds).

GetDateFromValueL(TTime &, TInt)

voidGetDateFromValueL(TTime &aDate,
TIntaFirstCharacterNum = 0
)const [private]
Gets the date from iValue descriptor. Should be in the format YYYYMMDD
leave
Leaves with KErrCorrupt if the format of the value is not a valid date.

Parameters

TTime & aDateA modifiable reference returning a date.
TInt aFirstCharacterNum = 0Skip this many characters at the start of the value.

GetDateL(TTime &)

IMPORT_C voidGetDateL(TTime &aDate)const

Returns the CICalValue as a date (TTime).

Parameters

TTime & aDateTTime to store the date in.

GetDateTimeL(TTime &, TTimeZoneType &, TInt)

IMPORT_C voidGetDateTimeL(TTime &aDateTime,
TTimeZoneType &aTzType,
TIntaFirstCharacterNum = 0
)const
Returns the CICalValue as a date/time (TTime).
leave
Leaves with KErrCorrupt if the value is not a valid date/time.

Parameters

TTime & aDateTimeTTime to store the date/time in.
TTimeZoneType & aTzTypeEnumeration showing whether the time represents local time (not supported), UTC or a custom time zone.
TInt aFirstCharacterNum = 0Skip this many characters of the internal buffer

GetDayL(TDay &, TInt &)

IMPORT_C voidGetDayL(TDay &aDay,
TInt &aPos
)const
Returns the value as an enumerated day and position.
leave
KErrCorrupt if the day part is invalid.

Parameters

TDay & aDayA modifiable reference to an enumerated day.
TInt & aPosA modifiable reference to a position.

GetDurDateL(TInt &, TInt &)

TBool GetDurDateL(TInt &aIntervalSecs,
TInt &aCurrentCharNumber
)const [private]

Reads in and converts a dur-day into a number of seconds

Parameters

TInt & aIntervalSecsFunction adds number of seconds to this variable.
TInt & aCurrentCharNumberCharacter number to start looking in the value.

GetDurHourL(TInt &, TInt &)

TBool GetDurHourL(TInt &aIntervalSecs,
TInt &aCurrentCharNumber
)const [private]

Reads in and converts a dur-hour into a number of seconds. There is no range check on the number of hours.

Parameters

TInt & aIntervalSecsFunction adds number of seconds to this variable.
TInt & aCurrentCharNumberCharacter number to start looking in the value.

GetDurMinuteL(TInt &, TInt &)

TBool GetDurMinuteL(TInt &aIntervalSecs,
TInt &aCurrentCharNumber
)const [private]

Reads in and converts a dur-minute into a number of seconds. There is no range check on the number of minutes.

Parameters

TInt & aIntervalSecsFunction adds number of seconds to this variable.
TInt & aCurrentCharNumberCharacter number to start looking in the value.

GetDurSecondL(TInt &, TInt &)

TBool GetDurSecondL(TInt &aIntervalSecs,
TInt &aCurrentCharNumber
)const [private]

Reads in and converts a dur-second into a number of seconds. There is no range check on the number of seconds.

Parameters

TInt & aIntervalSecsFunction adds number of seconds to this variable.
TInt & aCurrentCharNumberCharacter number to start looking in the value.

GetDurTimeL(TInt &, TInt &)

TBool GetDurTimeL(TInt &aIntervalSecs,
TInt &aCurrentCharNumber
)const [private]
Reads in and converts a dur-time into a number of seconds
leave
Leaves with KErrCorrupt if the value does not hold a valid time.

Parameters

TInt & aIntervalSecsFunction adds number of seconds to this variable.
TInt & aCurrentCharNumberCharacter number to start looking in the value.

GetDurWeekL(TInt &, TInt &)

TBool GetDurWeekL(TInt &aIntervalSecs,
TInt &aCurrentCharNumber
)const [private]

Reads in and converts a dur-week into a number of seconds

Parameters

TInt & aIntervalSecsFunction adds number of seconds to this variable
TInt & aCurrentCharNumberCharacter number to start looking in the value.

GetFloatL(TReal &)

IMPORT_C voidGetFloatL(TReal &aFloat)const
Returns the CICalValue as a Float (TReal).
leave
Leaves if there is an error reading a float.

Parameters

TReal & aFloatThe value to return.

GetPeriodL(TTime &, TTimeZoneType &, TTime &, TTimeZoneType &)

IMPORT_C voidGetPeriodL(TTime &aStartTime,
TTimeZoneType &aStartTzType,
TTime &aEndTime,
TTimeZoneType &aEndTzType
)const

Returns the CICalValue as a Period (two TTimes).

Parameters

TTime & aStartTimeTTime marking the beginning of the period.
TTimeZoneType & aStartTzTypeEnumeration showing whether the start time represents local time (not supported), UTC or a custom time zone.
TTime & aEndTimeTTime marking the end of the period.
TTimeZoneType & aEndTzTypeEnumeration showing whether the end time represents local time (not supported), UTC or a custom time zone.

GetRecurrenceRuleL(RPointerArray< CICalRuleSegment > &)

IMPORT_C voidGetRecurrenceRuleL(RPointerArray< CICalRuleSegment > &aRuleSegmentArray)const
Returns the value as an array of CICalRuleSegments. Assumes that all escaping has been previously removed.
leave
Leaves if there is an error adding a rule segment to the array.

Parameters

RPointerArray< CICalRuleSegment > & aRuleSegmentArrayThe array that the segments are appended to.

GetTimeFromValueL(TTime &, TTimeZoneType &, TInt)

voidGetTimeFromValueL(TTime &aTime,
TTimeZoneType &aTzType,
TIntaFirstCharacterNum = 0
)const [private]
Gets the time from iValue descriptor, starting from a pre-determined point. Should be in the format HHMMSS[Z]
leave
Leaves with KErrCorrupt if the value does not hold a valid time.

Parameters

TTime & aTimeTTime to store result of read in
TTimeZoneType & aTzTypeEnumeration showing whether the time represents local time (not supported), UTC or a custom time zone.
TInt aFirstCharacterNum = 0The character number to start searching from.

GetTimeIntervalFromValueL(TTimeIntervalSeconds &, TInt)

voidGetTimeIntervalFromValueL(TTimeIntervalSeconds &aTime,
TIntaFirstCharacterNum = 0
)const [private]
Retrieves a time interval stored as a duration as per the RFC 2445 specification.
leave
Leaves with KErrCorrupt if the value does not hold a valid interval.

Parameters

TTimeIntervalSeconds & aTimeTTimeIntervalSeconds to store the result in.
TInt aFirstCharacterNum = 0The position in the value containing the first character of the duration.

GetTimeL(TTime &, TTimeZoneType &)

IMPORT_C voidGetTimeL(TTime &aTime,
TTimeZoneType &aTzType
)const

Returns the CICalValue as a time (TTime).

Parameters

TTime & aTimeTTime to store the time in.
TTimeZoneType & aTzTypeEnumeration showing whether the time represents local time (not supported), UTC or a custom time zone.

IntegerL()

IMPORT_C TIntIntegerL()const

Returns the CICalValue as an Integer.

MonthL()

IMPORT_C TMonthMonthL()const
Gets the value as a month.
leave
Leaves with KErrCorrupt if the value is not a valid month.

NewL()

IMPORT_C CICalValue *NewL()[static]

Static factory construction.

NewLC()

IMPORT_C CICalValue *NewLC()[static]

Static factory construction.

PrepareValuePointer()

voidPrepareValuePointer()[private]

Prepares iValue pointer for writing. Deletes existing pointer if it exists.

ReadIntL(const TDesC &)

TInt ReadIntL(const TDesC &aDes)const [private]
Reads a TInt from the given descriptor.
leave
Leaves if there is an error reading an integer.

Parameters

const TDesC & aDesThe descriptor to convert

SetBinaryL(const TDesC8 &)

IMPORT_C voidSetBinaryL(const TDesC8 &aBuffer)

Stores an 8-bit buffer in the CICalValue. Each 8-bit value is stored within a 16-bit value internally.

Parameters

const TDesC8 & aBufferThe 8-bit buffer to be stored.

SetBooleanL(TBool)

IMPORT_C voidSetBooleanL(TBoolaBool)

Stores a TBool in the CICalValue.

Parameters

TBool aBoolTBool to be stored.

SetDateL(const TTime &)

IMPORT_C voidSetDateL(const TTime &aDate)

Stores a date (TTime) as the value.

Parameters

const TTime & aDateTTime to be stored.

SetDateTimeL(const TTime &, TTimeZoneType)

IMPORT_C voidSetDateTimeL(const TTime &aDateTime,
TTimeZoneTypeaTzType
)

Stores a date/time (TTime) as the value.

Parameters

const TTime & aDateTimeTTime to be stored.
TTimeZoneType aTzTypeEnumeration showing whether the time represents floating time, UTC or a custom time zone.

SetDayL(TDay, TInt)

IMPORT_C voidSetDayL(TDayaDay,
TIntaPos = 0
)
Sets the value from an enumerated date and position.
leave
Leaves with KErrUnknown if the value of aDay is not known.

Parameters

TDay aDayThe day to set.
TInt aPos = 0The position to set.

SetDurationL(TTimeIntervalSeconds)

IMPORT_C voidSetDurationL(TTimeIntervalSecondsaDuration)

Stores a Duration (TTimeIntervalSeconds) as the value.

Parameters

TTimeIntervalSeconds aDurationTTimeIntervalSeconds to be stored.

SetFloatL(const TReal &)

IMPORT_C voidSetFloatL(const TReal &aFloat)

Stores a float (TReal) as the value.

Parameters

const TReal & aFloatThe value to store.

SetIntegerL(TInt)

IMPORT_C voidSetIntegerL(TIntaInt)

Stores an Integer as the value.

Parameters

TInt aIntThe integer to be stored.

SetMonthL(TMonth)

IMPORT_C voidSetMonthL(TMonthaMonth)

Sets a month as the value.

Parameters

TMonth aMonthThe month to set.

SetPeriodL(const TTime &, TTimeZoneType, const TTime &, TTimeZoneType)

IMPORT_C voidSetPeriodL(const TTime &aStartTime,
TTimeZoneTypeaStartTzType,
const TTime &aEndTime,
TTimeZoneTypeaEndTzType
)

Stores a Period (two TTimes) as the value.

Parameters

const TTime & aStartTimeTTime to be stored containing the beginning of the period.
TTimeZoneType aStartTzTypeEnumeration showing whether the start time represents local time (not supported), UTC or a custom time zone.
const TTime & aEndTimeTTime to be stored containing the end of the period.
TTimeZoneType aEndTzTypeEnumeration showing whether the end time represents local time (not supported), UTC or a custom time zone.

SetRecurrenceRuleL(const TDesC &)

IMPORT_C voidSetRecurrenceRuleL(const TDesC &aRuleValue)

Sets a complete RRULE as a descriptor value. Note that this is no different than setting as text and is only supplied for symmetry.

Parameters

const TDesC & aRuleValueThe descriptor containing the complete RRULE.

SetTextL(const TDesC &)

IMPORT_C voidSetTextL(const TDesC &aText)

Stores text as the value.

Parameters

const TDesC & aTextThe text to be stored.

SetTimeL(const TTime &, TTimeZoneType)

IMPORT_C voidSetTimeL(const TTime &aTime,
TTimeZoneTypeaTzType
)

Stores a time (TTime) as the value.

Parameters

const TTime & aTimeTTime to be stored.
TTimeZoneType aTzTypeEnumeration showing whether the time represents local time (not supported), UTC or a custom time zone.

SetUtcOffsetL(TTimeIntervalSeconds)

IMPORT_C voidSetUtcOffsetL(TTimeIntervalSecondsaOffset)

Stores a UTC Offset (TTimeIntervalSeconds) as the value.

Parameters

TTimeIntervalSeconds aOffsetTTimeInterval to set as the offset.

TextL()

IMPORT_C const TDesC &TextL()const

Returns the CICalValue as text.

UtcOffsetL()

IMPORT_C TTimeIntervalSecondsUtcOffsetL()const
Returns the CICalValue as a UTC Offset (TTimeIntervalSeconds).
leave
Leaves with KErrCorrupt if the value is invalid.

Member Enumerations Documentation

Enum TTimeZoneType

Enumerators

EFloatingTime

Local "floating" time.

EUtcTime

UTC time.

ESpecifiedTimeZone

User specified time zone.

Member Data Documentation

HBufC * iValue

HBufC *iValue[private]