class CAgnRptDef : public CBase |
A repeat definition, including exceptions and sporadic dates, which is owned by an agenda entry.
The object is set using CAgnEntry::SetRptDefL() and is returned using CAgnSimpleEntry::RptDef().
The repeat definition has a type (daily, weekly etc.) and stores a set of repeat details (e.g. until time, interval between repeats). The repeat details are stored using an instance of a TAgnRpt - derived class. They are set using SetDaily(), SetWeekly() etc. These functions also set the type. It may optionally store an exception list, which is a list of the dates on which the repeat should not occur.
Private Attributes | |
---|---|
RArray< TAgnCalendarTime > * | iExceptions |
const CAgnSimpleEntry & | iOwningEntry |
TAgnRpt * | iRRule |
RArray< TAgnCalendarTime > * | iSporadicDates |
CAgnTzRules * | iTimeZone |
CAgnRptDef | ( | const CAgnSimpleEntry & | aOwningEntry | ) | [private] |
const CAgnSimpleEntry & aOwningEntry |
IMPORT_C | ~CAgnRptDef | ( | ) |
Frees all resources owned by the repeat definition, prior to its destruction.
IMPORT_C void | AddExceptionL | ( | const TAgnCalendarTime & | aException | ) |
Adds an exception to the list of exceptions (first creating the exception list if necessary).
const TAgnCalendarTime & aException | The exception to add to the list. |
IMPORT_C void | AddSporadicDateL | ( | const TAgnCalendarTime & | aSporadicDate | ) |
Adds a sporadic date to the list of sporadic dates (first creating the sporadic date list if necessary).
const TAgnCalendarTime & aSporadicDate | The sporadic date to add to the list. |
void | ClearRRule | ( | ) |
Clear the Repeat Rule only, leaving sporadic dates and exception dates intact
void | ClearTimeArray | ( | RArray< TAgnCalendarTime > *& | aTimeArray | ) | [private] |
RArray< TAgnCalendarTime > *& aTimeArray |
IMPORT_C CTzRules * | CloneTzRulesL | ( | ) |
Gets a copy of the time zone rules that apply to the repeat definition.
IMPORT_C TTime | ConvertFromRepeatLocalToUtcL | ( | const TTime & | aRptLocalDate | ) | const |
const TTime & aRptLocalDate |
IMPORT_C TTime | ConvertFromUtcToRepeatLocalL | ( | const TTime & | aUtcDate | ) | const |
const TTime & aUtcDate |
IMPORT_C void | CopyL | ( | const CAgnRptDef & | aRpt | ) |
Copies the contents of a repeat definition into this object.
const CAgnRptDef & aRpt |
void | CopyTimeArrayL | ( | const RArray< TAgnCalendarTime > * | aSource, |
RArray< TAgnCalendarTime > *& | aDestination | |||
) | [private] |
const RArray< TAgnCalendarTime > * aSource | |
RArray< TAgnCalendarTime > *& aDestination |
void | CreateRptObjectL | ( | const TAgnRpt & | aRpt | ) | [private] |
Create a Repeat Rule of the appropriate repeat rule type operator.
const TAgnRpt & aRpt | Repeat details. |
void | CreateRptObjectL | ( | TAgnRpt::TType | aType | ) | [private] |
TAgnRpt::TType aType |
void | EnsureTimeArrayExistsL | ( | RArray< TAgnCalendarTime > *& | aTimeArray | ) | [private] |
RArray< TAgnCalendarTime > *& aTimeArray |
IMPORT_C const RArray< TAgnCalendarTime > * | Exceptions | ( | ) | const |
Gets a pointer to the repeat definition's exception list. Pointer to the exception list.
IMPORT_C void | ExternalizeL | ( | RWriteStream & | aStream, |
TBool | aToBuffer = EFalse | |||
) |
Externalises the repeat definition to a write stream.
RWriteStream & aStream | Stream to which the object should be externalised. |
TBool aToBuffer = EFalse |
IMPORT_C TBool | FindException | ( | const TAgnCalendarTime & | aException | ) | const |
Tests whether aException is in the exceptions list.
ETrue = present, otherwise EFalse.
const TAgnCalendarTime & aException | The exception. |
TInt | FindSporadicDate | ( | const TAgnCalendarTime & | aException | ) | const [private] |
Tests whether aSporadicDate is in the sporadic dates list, using the sporadic date as the find key.
ETrue = present, otherwise EFalse.
const TAgnCalendarTime & aException | The sporadic dates. |
IMPORT_C const TAgnCalendarTime & | FirstInstanceL | ( | ) | const |
Gets the first instance of the repeat as a TAgnCalendarTime. This is either the first sporadic date or the start of the repeat rule, whichever is earlier.
The first instance of the repeat.
TBool | HasRepeatRule | ( | ) | const |
Returns ETrue if there is a repeat rule
if there is a repeat rule
TBool | HasSporadicDates | ( | ) | const |
Returns ETrue if there is at least one sporadic date
if there is at least one sporadic date
IMPORT_C TUint | InstanceCountL | ( | ) | const |
Gets the number of repeat instances generated by the repeat algorithm, including excepted instances.
The number of repeat instances.
void | InternalizeExceptionsL | ( | RReadStream & | aStream | ) |
RReadStream & aStream |
IMPORT_C void | InternalizeL | ( | RReadStream & | aStream, |
TBool | aFromBuffer = EFalse | |||
) |
Internalises the repeat definition from a read stream, including type, repeat details and exception list.
RReadStream & aStream | Stream from which the object should be internalised. |
TBool aFromBuffer = EFalse |
void | InternalizeRepeatRuleL | ( | RReadStream & | aStream | ) |
RReadStream & aStream |
void | InternalizeSporadicDatesL | ( | RReadStream & | aStream | ) |
RReadStream & aStream |
void | InternalizeTimeZoneL | ( | RReadStream & | aStream, |
TBool | aFromBuffer = EFalse | |||
) |
RReadStream & aStream | |
TBool aFromBuffer = EFalse |
TBool | IsARepeatRuleDateInstanceL | ( | const TTime & | aDate | ) | const |
const TTime & aDate |
TBool | IsASporadicDateInstanceL | ( | const TTime & | aDate | ) | const [private] |
const TTime & aDate |
IMPORT_C TBool | IsAnInstanceL | ( | const TTime & | aDate | ) | const |
Tests whether aDate (System local time) falls on an instance generated from the repeat algorithm or on a sporadic date including excepted items.
Note: this function is not intended to be called by a view.
True = date falls on an instance, otherwise False.
const TTime & aDate | The date to be checked, expressed as System Local Time |
IMPORT_C TBool | IsAnUnexceptedInstanceL | ( | const TTime & | aDate | ) | const |
Tests whether aDate falls on an instance generated from the repeat algorithm or a sporadic date which is not excepted.
True = the date falls on a non excepted instance, otherwise False.
const TTime & aDate | The system local date to be checked, expressed as Current System Local Time |
IMPORT_C const TAgnCalendarTime & | LastInstanceL | ( | ) | const |
Gets the last instance of the repeat as a TAgnCalendarTime. This is either the last sporadic date or the end of the repeat rule, whichever is latest.
The last instance of the repeat.
IMPORT_C CAgnRptDef * | NewL | ( | const CAgnSimpleEntry & | aOwningEntry | ) | [static] |
Allocates and constructs a repeat definition.
Pointer to the created repeat definition.
const CAgnSimpleEntry & aOwningEntry |
TBool | NudgeInstanceBackwardsUtcL | ( | const TTime & | aDate, |
TTime & | aNext, | |||
TBool | aCheckExcepted | |||
) | const [private] |
TBool | NudgeInstanceForwardsUtcL | ( | const TTime & | aDate, |
TTime & | aNext, | |||
TBool | aCheckExcepted | |||
) | const [private] |
IMPORT_C TBool | NudgeNextInstanceL | ( | const TTime & | aDay, |
TTime & | aNext, | |||
TBool | aCheckUnexcepted | |||
) | const |
Tests whether there is another repeat instance date after aDate (System local time), including excepted instances and Sporadic Dates.
If there is, it returns ETrue and sets aNext to it. If not, it returns EFalse and sets aNext to the last valid instance date. If aDate is a valid instance, then aNext is set to it, not the next instance.
For example:
If repeat instances fall on 10th Jan and 20th Jan, then if aDate = 10th Jan, this function returns ETrue and sets aNext to 10th Jan. If aDate = 11th to 19th Jan, it returns ETrue and sets aNext to 20th Jan. If aDate = 21st Jan, it returns EFalse and sets aNext to 20th Jan.
This function can leave.
True if there is a next instance, otherwise False.
IMPORT_C TBool | NudgeNextInstanceUtcL | ( | const TTime & | aDayUtc, |
TTime & | aNextUtc | |||
) | const |
TBool | NudgeNextRepeatInstanceToNextValidInstanceUtcL | ( | const TTime & | aUtcDate, |
TTime & | aUtcNext | |||
) | const [private] |
TBool | NudgeNextRepeatInstanceUtcL | ( | const TTime & | aDate, |
TTime & | aNext, | |||
TBool | aCheckExcepted | |||
) | const [private] |
TBool | NudgeNextSporadicInstanceUtcL | ( | const TTime & | aDate, |
TTime & | aNext, | |||
TBool | aCheckExcepted | |||
) | const [private] |
TBool | NudgeNextUnexceptedRepeatInstanceUtcL | ( | const TTime & | aDate, |
TTime & | aNext | |||
) | const [private] |
IMPORT_C TBool | NudgePreviousInstanceUtcL | ( | const TTime & | aDayUtc, |
TTime & | aPrevUtc | |||
) | const |
TBool | NudgePreviousRepeatInstanceToPreviousValidInstanceUtcL | ( | const TTime & | aUtcDate, |
TTime & | aUtcPrev | |||
) | const [private] |
TBool | NudgePreviousRepeatInstanceUtcL | ( | const TTime & | aDay, |
TTime & | aPrev, | |||
TBool | aCheckExcepted | |||
) | const [private] |
TBool | NudgePreviousSporadicInstanceUtcL | ( | const TTime & | aDay, |
TTime & | aPrev, | |||
TBool | aCheckExcepted | |||
) | const [private] |
IMPORT_C TBool | NudgePreviousUnexceptedInstanceL | ( | const TTime & | aDay, |
TTime & | aPrev | |||
) | const |
Tests whether there is a repeat instance or sporadic date before aDate.
If there is, it returns ETrue and sets aNext to it. If not, it returns EFalse and sets aNext to the last valid instance date. If aDate is a valid instance, then aNext is set to it, not the next instance.
This function can leave.
For example:
If repeat instances fall on 10th Jan and 20th Jan, then if aDate = 20th Jan, it returns ETrue and sets aNext to 20th Jan. If aDate = 11th to 19th Jan, it returns ETrue and sets aNext to 10th Jan. If aDate = 9th Jan, it returns EFalse and sets aNext to 10th Jan.
True if there is a previous instance, otherwise false.
TBool | NudgePreviousUnexceptedRepeatInstanceUtcL | ( | const TTime & | aDay, |
TTime & | aPrev | |||
) | const [private] |
IMPORT_C void | PruneExceptionsL | ( | ) |
Removes any exceptions which do not occur on instances
IMPORT_C const TAgnRpt * | RRule | ( | ) | const |
Gets a pointer to the repeat details. Pointer to the repeat details
IMPORT_C void | RemoveAllExceptions | ( | ) |
Removes all the exceptions from the exception list.
IMPORT_C void | RemoveAllSporadicDates | ( | ) |
Removes all the sporadic dates from the sporadic date list.
void | RemoveSporadicDate | ( | const TAgnCalendarTime & | aException | ) |
Removes a sporadic date from the sporadic date list.
If it is the last sporadic date in the list, the list is deleted.
ETrue if the sporadic date was found and removed, otherwise EFalse.
const TAgnCalendarTime & aException | The sporadic date to be removed. |
IMPORT_C void | SetRRuleL | ( | const TAgnRpt & | aRpt | ) |
const TAgnRpt & aRpt |
IMPORT_C void | SetTimeZoneL | ( | ) |
Sets the time zone to the current system time zone. Leaves with KErrGeneral if the time zone server could not be accessed.
IMPORT_C void | SetTimeZoneL | ( | const CTzRules & | aTimeZone | ) |
Sets the time zone to aTimeZone
const CTzRules & aTimeZone | The time zone in which the repeat entry times are expressed. It contains a collection of time zone rules. |
IMPORT_C void | SetUntilTime | ( | const TAgnCalendarTime & | aUntilTime | ) |
const TAgnCalendarTime & aUntilTime |
IMPORT_C const RArray< TAgnCalendarTime > * | SporadicDateList | ( | ) | const |
Gets a pointer to the repeat definition's sporadic date list. Pointer to the sporadic date list.
IMPORT_C TAgnRpt::TType | Type | ( | ) | const |
Gets the repeat definition's type, as set by SetDaily(), SetWeekly() etc.
The repeat definition's type.
TBool | operator== | ( | const CAgnRptDef & | aRpt | ) | const |
Compares two repeat definitions for equality.
This compares all repeat details, the repeat type and the exception list.
True if complete definitions agree, otherwise False.
const CAgnRptDef & aRpt |