Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <calrrule.h>

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:


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(TType)

Capability: Illegal

IMPORT_C TCalRRule(TType aType);

Description

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

Parameters

TCalRRule::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.


TCalRRule()

Capability: Illegal

IMPORT_C TCalRRule();

Description


TCalRRule(TType)

Capability: Illegal

IMPORT_C TCalRRule(TType aType);

Description

Parameters

TCalRRule::TType aType

[Top]


Member functions


SetType(TType)

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 TCalRRule::SetByDay(const RArray< TDay > &).

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

Parameters

TCalRRule::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()const

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

TCalRRule::TType

The repeat definition's type.


SetDtStart(const TCalTime &)

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()const

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.


SetType(TType)

Capability: Illegal

IMPORT_C void SetType(TType aType);

Description

Parameters

TCalRRule::TType aType


Type()const

Capability: Illegal

IMPORT_C TType Type() const;

Description

Return value

TCalRRule::TType


SetUntil(const TCalTime &)

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()const

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().


SetDtStart(const TCalTime &)

Capability: Illegal

IMPORT_C void SetDtStart(const TCalTime &aTime);

Description

Parameters

const TCalTime &aTime


DtStart()const

Capability: Illegal

IMPORT_C TCalTime DtStart() const;

Description

Return value

TCalTime


SetCount(TUint)

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()const

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.


SetUntil(const TCalTime &)

Capability: Illegal

IMPORT_C void SetUntil(const TCalTime &aTime);

Description

Parameters

const TCalTime &aTime


Until()const

Capability: Illegal

IMPORT_C TCalTime Until() const;

Description

Return value

TCalTime


SetInterval(TInt)

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()const

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.


SetCount(TUint)

Capability: Illegal

IMPORT_C void SetCount(TUint aCount);

Description

Parameters

TUint aCount


Count()const

Capability: Illegal

IMPORT_C TUint Count() const;

Description

Return value

TUint


SetByDay(const RArray< TDay > &)

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(RArray< TDay > &)const

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.


SetInterval(TInt)

Capability: Illegal

IMPORT_C void SetInterval(TInt aInterval);

Description

Parameters

TInt aInterval


Interval()const

Capability: Illegal

IMPORT_C TInt Interval() const;

Description

Return value

TInt


SetByDay(const RArray< TDayOfMonth > &)

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< TCalRRule::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(RArray< TDayOfMonth > &)const

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< TCalRRule::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.


SetByDay(const RArray< TDay > &)

Capability: Illegal

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

Description

Parameters

const RArray< TDay > &aDays


GetByDayL(RArray< TDay > &)const

Capability: Illegal

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

Description

Parameters

RArray< TDay > &aDays


SetByMonthDay(const RArray< TInt > &)

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(RArray< TInt > &)const

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.


SetByDay(const RArray< TDayOfMonth > &)

Capability: Illegal

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

Description

Parameters

const RArray< TCalRRule::TDayOfMonth > &aDays


GetByDayL(RArray< TDayOfMonth > &)const

Capability: Illegal

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

Description

Parameters

RArray< TCalRRule::TDayOfMonth > &aDays


SetByMonth(const RArray< TMonth >)

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(RArray< TMonth > &)const

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


SetByMonthDay(const RArray< TInt > &)

Capability: Illegal

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

Description

Parameters

const RArray< TInt > &aMonthDays


GetByMonthDayL(RArray< TInt > &)const

Capability: Illegal

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

Description

Parameters

RArray< TInt > &aMonthDays


SetWkSt(TDay)

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()const

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.


SetByMonth(const RArray< TMonth >)

Capability: Illegal

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

Description

Parameters

const RArray< TMonth > aMonths


GetByMonthL(RArray< TMonth > &)const

Capability: Illegal

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

Description

Parameters

RArray< TMonth > &aMonths


SetWkSt(TDay)

Capability: Illegal

IMPORT_C void SetWkSt(TDay aDay);

Description

Parameters

TDay aDay


WkSt()const

Capability: Illegal

IMPORT_C TDay WkSt() const;

Description

Return value

TDay

[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:

Construction and destruction


TDayOfMonth(TDay,TInt8)

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.


TDayOfMonth(TDay,TInt8)

Capability: Illegal

IMPORT_C TDayOfMonth(TDay aDay, TInt8 aWeekInMonth);

Description

Parameters

TDay aDay

TInt8 aWeekInMonth

Member functions


Day()const

Capability: Illegal

IMPORT_C TDay Day() const;

Description

Get the weekday.

Return value

TDay

The weekday.


WeekInMonth()const

Capability: Illegal

IMPORT_C TInt8 WeekInMonth() const;

Description

Get the week within the month.

Return value

TInt8

The week within the month.


Day()const

Capability: Illegal

IMPORT_C TDay Day() const;

Description

Return value

TDay


WeekInMonth()const

Capability: Illegal

IMPORT_C TInt8 WeekInMonth() const;

Description

Return value

TInt8

[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.


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.