CICalValue Class Reference
| class CICalValue : public CBase |
Class representing a property-, property parameter- or rule segement value.
| Public Member Functions |
|---|
| ~CICalValue() |
| IMPORT_C HBufC8 * | BinaryLC() |
| IMPORT_C TBool | BooleanL() |
| IMPORT_C TTimeIntervalSeconds | DurationL() |
| IMPORT_C void | GetDateL(TTime &) |
| IMPORT_C void | GetDateTimeL(TTime &, TTimeZoneType &, TInt) |
| IMPORT_C void | GetDayL(TDay &, TInt &) |
| IMPORT_C void | GetFloatL(TReal &) |
| IMPORT_C void | GetPeriodL(TTime &, TTimeZoneType &, TTime &, TTimeZoneType &) |
| IMPORT_C void | GetRecurrenceRuleL(RPointerArray< CICalRuleSegment > &) |
| IMPORT_C void | GetTimeL(TTime &, TTimeZoneType &) |
| IMPORT_C TInt | IntegerL() |
| IMPORT_C TMonth | MonthL() |
| IMPORT_C CICalValue * | NewL() |
| IMPORT_C CICalValue * | NewLC() |
| IMPORT_C void | SetBinaryL(const TDesC8 &) |
| IMPORT_C void | SetBooleanL(TBool) |
| IMPORT_C void | SetDateL(const TTime &) |
| IMPORT_C void | SetDateTimeL(const TTime &, TTimeZoneType) |
| IMPORT_C void | SetDayL(TDay, TInt) |
| IMPORT_C void | SetDurationL(TTimeIntervalSeconds) |
| IMPORT_C void | SetFloatL(const TReal &) |
| IMPORT_C void | SetIntegerL(TInt) |
| IMPORT_C void | SetMonthL(TMonth) |
| IMPORT_C void | SetPeriodL(const TTime &, TTimeZoneType, const TTime &, TTimeZoneType) |
| IMPORT_C void | SetRecurrenceRuleL(const TDesC &) |
| IMPORT_C void | SetTextL(const TDesC &) |
| IMPORT_C void | SetTimeL(const TTime &, TTimeZoneType) |
| IMPORT_C void | SetUtcOffsetL(TTimeIntervalSeconds) |
| IMPORT_C const TDesC & | TextL() |
| IMPORT_C TTimeIntervalSeconds | UtcOffsetL() |
| Private Member Functions |
|---|
| CICalValue() |
| void | AppendDateToValueL(const TTime &) |
| void | AppendTimeToValueL(const TTime &) |
| void | CheckNullValueL() |
| void | ConstructL() |
| void | GetDateFromValueL(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 &) |
| void | GetTimeFromValueL(TTime &, TTimeZoneType &, TInt) |
| void | GetTimeIntervalFromValueL(TTimeIntervalSeconds &, TInt) |
| void | PrepareValuePointer() |
|
TInt
| ReadIntL(const TDesC &) |
Constructor & Destructor Documentation
Member Functions Documentation
AppendDateToValueL(const TTime &)
| void | AppendDateToValueL | ( | const TTime & | aDate | ) | [private] |
Appends the date to iValue. Member iValue must be initialised before calling.
Parameters
| const TTime & aDate | TTime to append to the value. |
AppendTimeToValueL(const TTime &)
| void | AppendTimeToValueL | ( | const TTime & | aTime | ) | [private] |
Appends the time to iValue. Member iValue must be initialised before calling.
Parameters
| const TTime & aTime | TTime 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 TBool | BooleanL | ( | ) | 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()
| void | CheckNullValueL | ( | ) | const [private] |
Checks for a NULL value. Should be called before accessing iValue.
- leave
- Leaves with KErrCorrupt if the value is NULL.
ConstructL()
| void | ConstructL | ( | ) | [private] |
GetDateFromValueL(TTime &, TInt)
| void | GetDateFromValueL | ( | TTime & | aDate, |
| | TInt | aFirstCharacterNum = 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 & aDate | A modifiable reference returning a date. |
| TInt aFirstCharacterNum = 0 | Skip this many characters at the start of the value. |
GetDateL(TTime &)
| IMPORT_C void | GetDateL | ( | TTime & | aDate | ) | const |
Parameters
| TTime & aDate | TTime to store the date in. |
GetDateTimeL(TTime &, TTimeZoneType &, TInt)
Returns the
CICalValue as a date/time (
TTime).
- leave
- Leaves with KErrCorrupt if the value is not a valid date/time.
Parameters
| TTime & aDateTime | TTime to store the date/time in. |
| TTimeZoneType & aTzType | Enumeration showing whether the time represents local time (not supported), UTC or a custom time zone. |
| TInt aFirstCharacterNum = 0 | Skip this many characters of the internal buffer |
GetDayL(TDay &, TInt &)
| IMPORT_C void | GetDayL | ( | TDay & | aDay, |
| | TInt & | aPos |
| | ) | const |
Returns the value as an enumerated day and position.
- leave
- KErrCorrupt if the day part is invalid.
Parameters
| TDay & aDay | A modifiable reference to an enumerated day. |
| TInt & aPos | A 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 & aIntervalSecs | Function adds number of seconds to this variable. |
| TInt & aCurrentCharNumber | Character 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 & aIntervalSecs | Function adds number of seconds to this variable. |
| TInt & aCurrentCharNumber | Character 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 & aIntervalSecs | Function adds number of seconds to this variable. |
| TInt & aCurrentCharNumber | Character 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 & aIntervalSecs | Function adds number of seconds to this variable. |
| TInt & aCurrentCharNumber | Character 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 & aIntervalSecs | Function adds number of seconds to this variable. |
| TInt & aCurrentCharNumber | Character 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 & aIntervalSecs | Function adds number of seconds to this variable |
| TInt & aCurrentCharNumber | Character number to start looking in the value. |
GetFloatL(TReal &)
| IMPORT_C void | GetFloatL | ( | TReal & | aFloat | ) | const |
Returns the
CICalValue as a Float (TReal).
- leave
- Leaves if there is an error reading a float.
Parameters
| TReal & aFloat | The value to return. |
GetPeriodL(TTime &, TTimeZoneType &, TTime &, TTimeZoneType &)
Parameters
| TTime & aStartTime | TTime marking the beginning of the period. |
| TTimeZoneType & aStartTzType | Enumeration showing whether the start time represents local time (not supported), UTC or a custom time zone. |
| TTime & aEndTime | TTime marking the end of the period. |
| TTimeZoneType & aEndTzType | Enumeration showing whether the end time represents local time (not supported), UTC or a custom time zone. |
GetRecurrenceRuleL(RPointerArray< CICalRuleSegment > &)
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.
GetTimeFromValueL(TTime &, TTimeZoneType &, TInt)
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 & aTime | TTime to store result of read in |
| TTimeZoneType & aTzType | Enumeration showing whether the time represents local time (not supported), UTC or a custom time zone. |
| TInt aFirstCharacterNum = 0 | The character number to start searching from. |
GetTimeIntervalFromValueL(TTimeIntervalSeconds &, TInt)
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 & aTime | TTimeIntervalSeconds to store the result in. |
| TInt aFirstCharacterNum = 0 | The position in the value containing the first character of the duration. |
GetTimeL(TTime &, TTimeZoneType &)
Parameters
| TTime & aTime | TTime to store the time in. |
| TTimeZoneType & aTzType | Enumeration showing whether the time represents local time (not supported), UTC or a custom time zone. |
IntegerL()
| IMPORT_C TInt | IntegerL | ( | ) | const |
MonthL()
Gets the value as a month.
- leave
- Leaves with KErrCorrupt if the value is not a valid month.
NewL()
Static factory construction.
NewLC()
Static factory construction.
PrepareValuePointer()
| void | PrepareValuePointer | ( | ) | [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 & aDes | The descriptor to convert |
SetBinaryL(const TDesC8 &)
| IMPORT_C void | SetBinaryL | ( | 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 & aBuffer | The 8-bit buffer to be stored. |
SetBooleanL(TBool)
| IMPORT_C void | SetBooleanL | ( | TBool | aBool | ) | |
Parameters
| TBool aBool | TBool to be stored. |
SetDateL(const TTime &)
| IMPORT_C void | SetDateL | ( | const TTime & | aDate | ) | |
Stores a date (TTime) as the value.
Parameters
| const TTime & aDate | TTime to be stored. |
SetDateTimeL(const TTime &, TTimeZoneType)
Stores a date/time (TTime) as the value.
Parameters
| const TTime & aDateTime | TTime to be stored. |
| TTimeZoneType aTzType | Enumeration showing whether the time represents floating time, UTC or a custom time zone. |
SetDayL(TDay, TInt)
| IMPORT_C void | SetDayL | ( | TDay | aDay, |
| | TInt | aPos = 0 |
| | ) | |
Sets the value from an enumerated date and position.
- leave
- Leaves with KErrUnknown if the value of aDay is not known.
Parameters
| TDay aDay | The day to set. |
| TInt aPos = 0 | The position to set. |
SetDurationL(TTimeIntervalSeconds)
SetFloatL(const TReal &)
| IMPORT_C void | SetFloatL | ( | const TReal & | aFloat | ) | |
Stores a float (TReal) as the value.
Parameters
| const TReal & aFloat | The value to store. |
SetIntegerL(TInt)
| IMPORT_C void | SetIntegerL | ( | TInt | aInt | ) | |
Stores an Integer as the value.
Parameters
| TInt aInt | The integer to be stored. |
SetMonthL(TMonth)
| IMPORT_C void | SetMonthL | ( | TMonth | aMonth | ) | |
Sets a month as the value.
Parameters
| TMonth aMonth | The month to set. |
SetPeriodL(const TTime &, TTimeZoneType, const TTime &, TTimeZoneType)
Stores a Period (two TTimes) as the value.
Parameters
| const TTime & aStartTime | TTime to be stored containing the beginning of the period. |
| TTimeZoneType aStartTzType | Enumeration showing whether the start time represents local time (not supported), UTC or a custom time zone. |
| const TTime & aEndTime | TTime to be stored containing the end of the period. |
| TTimeZoneType aEndTzType | Enumeration showing whether the end time represents local time (not supported), UTC or a custom time zone. |
SetRecurrenceRuleL(const TDesC &)
| IMPORT_C void | SetRecurrenceRuleL | ( | 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 & aRuleValue | The descriptor containing the complete RRULE. |
SetTextL(const TDesC &)
| IMPORT_C void | SetTextL | ( | const TDesC & | aText | ) | |
Stores text as the value.
Parameters
| const TDesC & aText | The text to be stored. |
SetTimeL(const TTime &, TTimeZoneType)
Stores a time (TTime) as the value.
Parameters
| const TTime & aTime | TTime to be stored. |
| TTimeZoneType aTzType | Enumeration showing whether the time represents local time (not supported), UTC or a custom time zone. |
SetUtcOffsetL(TTimeIntervalSeconds)
TextL()
| IMPORT_C const TDesC & | TextL | ( | ) | const |
Member Enumerations Documentation
Enum TTimeZoneType
Enumerators
| EFloatingTime |
Local "floating" time.
|
| EUtcTime |
UTC time.
|
| ESpecifiedTimeZone |
User specified time zone.
|
Member Data Documentation
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.