Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: calrrule.h
Link against: calinterimapi.lib

Class TCalRRule

class TCalRRule;

Description

Class representing iCal repeat types.

This supports the following standard iCal properties:

Note that the repeat rule type (FREQ) must be set before any of the following properties can be set, since their behaviour is dependent on the rule type: BYDAY, BYMONTHDAY, BYYEARDAY

The WKST parameter is only significant in weekly repeat rules with an interval of greater than 1.

The repeat rule type may not be changed once it has been set.

Members

Defined in TCalRRule:
Count(), DtStart(), EDaily, EInvalid, EMonthly, EWeekly, EYearly, GetByDayL(), GetByDayL(), GetByMonthDayL(), GetByMonthL(), Interval(), SetByDay(), SetByDay(), SetByMonth(), SetByMonthDay(), SetCount(), SetDtStart(), SetInterval(), SetType(), SetUntil(), SetWkSt(), TCalRRule(), TCalRRule(), TDayOfMonth, TType, Type(), Until(), WkSt()


Construction and destruction


TCalRRule()

Capability: Illegal

IMPORT_C TCalRRule();

Description

Constructor for the iCal repeat rule type. This does not set the type. All data is reset.


TCalRRule()

Capability: Illegal

IMPORT_C TCalRRule(TType aType);

Description

Constructor for the iCal repeat rule type. All data is reset.

Parameters

TType aType

The type of repeat rule. One of: EDaily, EWeekly, EMonthly, EYearly.

Leave codes

KErrNotSupported

If an invalid repeat rule type is passed in.

[Top]


Member functions


SetType()

Capability: Illegal

IMPORT_C void SetType(TType aType);

Description

Sets the repeat definition's type.

This will be one of: daily, weekly, monthly or yearly. If the type is weekly, it must have at least one weekday set by calling SetByDay().

The type may only be set once, from either the constructor or from the SetType function.

Parameters

TType aType

The repeat definition's type.

Leave codes

KErrNotSupported

If an invalid type is passed in.

Panic codes

CalInterimAPI

15 The repeat rule type has already been set.

See also:


Type()

Capability: Illegal

IMPORT_C TType Type() const;

Description

Gets the repeat definition's type.

This will be one of: daily, weekly, monthly or yearly.

Return value

TType

The repeat definition's type.


SetDtStart()

Capability: Illegal

IMPORT_C void SetDtStart(const TCalTime &aTime);

Description

Sets the repeat's start date.

The repeat rule's start date should match the first instance. If the entry type is of EAppt, EEvent, EReminder, and EAnniv then start dates of both the repeat rule and the entry will be modified to be the first instance after the repeat rule's start date. For ETodo, the due date (i.e. the end time) is aligned to the repeat rule start date.

Parameters

const TCalTime &aTime

The start date, as a TCalTime so it may be accessed in utc or system local time.


DtStart()

Capability: Illegal

IMPORT_C TCalTime DtStart() const;

Description

Gets the date on which this repeat rule starts.

Return value

TCalTime

The start date, as a TCalTime so it may be accessed in utc or system local time.


SetUntil()

Capability: Illegal

IMPORT_C void SetUntil(const TCalTime &aTime);

Description

Sets the repeat's end date.

Only one of the until or count parameters may be set. Setting the until date will reset the count parameter. This also unsets the rule's 'repeat forever' flag.

Parameters

const TCalTime &aTime

The end date, as a TCalTime so it may be accessed in utc or system local time.


Until()

Capability: Illegal

IMPORT_C TCalTime Until() const;

Description

Gets the date on which this repeat rule finishes.

Return value

TCalTime

The end date, as a TCalTime so it may be accessed in utc or system local time. If the until value has not been set this will return Time::NullTTime.


SetCount()

Capability: Illegal

IMPORT_C void SetCount(TUint aCount);

Description

Sets the number of instances that this repeat rule will contain.

Only one of the until or count parameters may be set. Setting the count will reset the until parameter.

Parameters

TUint aCount

The number of instances. Any non-positive parameter will be ignored.


Count()

Capability: Illegal

IMPORT_C TUint Count() const;

Description

Gets the number of instances that this repeat rule will contain.

Return value

TUint

The number of instances. If the count has not been set this will return 0.


SetInterval()

Capability: Illegal

IMPORT_C void SetInterval(TInt aInterval);

Description

Sets the repeat interval.

This is a number of days for a daily repeat, a number of weeks for a weekly repeat, etc.

Parameters

TInt aInterval

The interval. Any parameter that is greater than 255 or less than 1 will be ignored.


Interval()

Capability: Illegal

IMPORT_C TInt Interval() const;

Description

Gets the repeat interval.

This is a number of days for a daily repeat, a number of weeks for a weekly repeat, etc.

Return value

TInt

The interval.


SetByDay()

Capability: Illegal

IMPORT_C void SetByDay(const RArray< TDay > &aDays);

Description

Set all weekdays on which this rule is repeated.

Parameters

const RArray< TDay > &aDays

Array containing all weekdays that are to be set. Any weekdays not included in this array will not be set. Any weekdays not in the TDay enum will be ignored.

Leave codes

KErrNotSupported

if not called on a weekly repeat rule.


GetByDayL()

Capability: Illegal

IMPORT_C void GetByDayL(RArray< TDay > &aDays) const;

Description

Gets all weekdays on which this rule is repeated.

Parameters

RArray< TDay > &aDays

On return this array contains all weekdays that are to be set. This function will do nothing if this is not a weekly repeat rule.


SetByDay()

Capability: Illegal

IMPORT_C void SetByDay(const RArray< TDayOfMonth > &aDays);

Description

Set all weekdays in the month on which this rule is repeated.

Parameters

const RArray< TDayOfMonth > &aDays

Array containing all days in the month that are to be set. Any days in the month not included in this array will not be set. For a yearly rule, only the first item in the array will be used. Any invalid data will be ignored.

Leave codes

KErrNotSupported

If it is called on a repeat rule which is not monthly or yearly.


GetByDayL()

Capability: Illegal

IMPORT_C void GetByDayL(RArray< TDayOfMonth > &aDays) const;

Description

Gets all days in the month on which this rule is repeated.

Parameters

RArray< TDayOfMonth > &aDays

On return this array contains all days in the month that are to be set. This function will do nothing if this is not a monthly or yearly repeat rule.


SetByMonthDay()

Capability: Illegal

IMPORT_C void SetByMonthDay(const RArray< TInt > &aMonthDays);

Description

Sets all dates of the month on which this rule is repeated.

Parameters

const RArray< TInt > &aMonthDays

Array containing all month dates that are to be set. Any month dates not included in this array will not be set. Any out of range dates will be ignored.

Leave codes

KErrNotSupported

If it is not a monthly repeat rule.


GetByMonthDayL()

Capability: Illegal

IMPORT_C void GetByMonthDayL(RArray< TInt > &aMonthDays) const;

Description

Gets all dates of the month on which this rule is repeated.

Parameters

RArray< TInt > &aMonthDays

On return, this array contains all month dates that are to be set. This function will do nothing if this is not a monthly repeat rule.


SetByMonth()

Capability: Illegal

IMPORT_C void SetByMonth(const RArray< TMonth > aMonths);

Description

Sets the month of the year for this repeat rule.

Parameters

const RArray< TMonth > aMonths

Array of months on which to repeat. Only the first month in the array is used.

Leave codes

KErrNotSupported

If it is not on a yearly repeat rule


GetByMonthL()

Capability: Illegal

IMPORT_C void GetByMonthL(RArray< TMonth > &aMonths) const;

Description

Gets the month of the year for this repeat rule. This function will do nothing if this is not a yearly repeat rule

Parameters

RArray< TMonth > &aMonths


SetWkSt()

Capability: Illegal

IMPORT_C void SetWkSt(TDay aDay);

Description

Sets the first day of the week for this repeat rule.

Parameters

TDay aDay

The weekday to be the first. Any invalid parameter will be ignored.


WkSt()

Capability: Illegal

IMPORT_C TDay WkSt() const;

Description

Gets the first day of the week for this repeat rule.

Return value

TDay

The weekday to be the first.

[Top]


Member classes


Class TDayOfMonth

class TDayOfMonth;

Description

Class to represent a weekday within a month.

Valid values of iWeekInMonth are 1, 2, 3, 4 for the 1st, 2nd, 3rd and 4th week of the month, or -1 for the last week of the month.

For example: The 3rd Wednesday would have iDay = EWednesday and iWeekInMonth = 3. The last Sunday would have iDay = ESunday and iWeekInMonth = -1.

Members

Defined in TCalRRule::TDayOfMonth:
Day(), TDayOfMonth(), WeekInMonth()

Construction and destruction


TDayOfMonth()

Capability: Illegal

IMPORT_C TDayOfMonth(TDay aDay, TInt8 aWeekInMonth);

Description

Constructor for the weekday within a month data structure.

Parameters

TDay aDay

The weekday to set.

TInt8 aWeekInMonth

The week to set.

Member functions


Day()

Capability: Illegal

IMPORT_C TDay Day() const;

Description

Get the weekday.

Return value

TDay

The weekday.


WeekInMonth()

Capability: Illegal

IMPORT_C TInt8 WeekInMonth() const;

Description

Get the week within the month.

Return value

TInt8

The week within the month.

[Top]


Member enumerations


Enum TType

TType

Description

Types of repeat rule.

EInvalid

The type has not yet been defined.

EDaily

Rule which repeats based on a number of days.

EWeekly

Rule which repeats based on a number of weeks.

EMonthly

Rule which repeats based on a number of months.

EYearly

Rule which repeats based on a number of years.