CRecurrenceRule Class Reference

This class contains the information about Recurrence rule for particular component. More...

#include <CRecurrenceRule.h>


Public Member Functions

 CRecurrenceRule (CRecurrenceRule &ref)
CRecurrenceRuleoperator= (CRecurrenceRule &right)
 CRecurrenceRule ()
 ~CRecurrenceRule ()
bool setRuleType (RuleType iType)
RuleType getRuleType ()
bool rruleParser (string szRule)
bool setRrule (string szRRule)
string getRrule ()
bool setFrequency (FREQUENCY iValue)
FREQUENCY getFrequency ()
bool setUntil (time_t iUntil)
time_t getUntil ()
bool setCount (int iCount)
int getCount ()
bool setSecond (vector< short > vSec)
vector< short > getSecond ()
bool setMinute (vector< short > vMinute)
vector< short > getMinute ()
bool setHour (vector< short > vHour)
vector< short > getHour ()
bool setWeekDay (vector< short > vByWeekDay)
vector< short > getWeekDay ()
bool setMonthDay (vector< short > vByMonthDay)
vector< short > getMonthDay ()
bool setYearDay (vector< short > vByYearDay)
vector< short > getYearDay ()
bool setWeekNumber (vector< short > vByWeekNumber)
vector< short > getWeekNumber ()
bool setMonth (vector< short > vMonth)
vector< short > getMonth ()
bool setPos (vector< short > vPosition)
vector< short > getPos ()
bool setWeekStart (icalrecurrencetype_weekday start)
icalrecurrencetype_weekday getWeekStart ()
bool setInterval (short interval)
short getInterval ()
 CRecurrenceRule (int iType, string szRRule)

Private Member Functions

vector< short > convertArrayToVector (short array[], int iLengthMax)

Private Attributes

FREQUENCY iFreq
string szRule
int iCount
short interval
time_t iUntil
RuleType iType
icalrecurrencetype_weekday weekStart
vector< short > vBySecond
vector< short > vByMinute
vector< short > vByHour
vector< short > vByWeekDay
vector< short > vByMonthDay
vector< short > vByYearDay
vector< short > vByWeekNumber
vector< short > vByMonth
vector< short > vBySetPos


Detailed Description

This class contains the information about Recurrence rule for particular component.

CRecurrenceRule class


Constructor & Destructor Documentation

CRecurrenceRule::CRecurrenceRule ( CRecurrenceRule ref  ) 

Copy Constructor

CRecurrenceRule::CRecurrenceRule (  ) 

Default constructor

CRecurrenceRule::~CRecurrenceRule (  ) 

Destructor of the class

CRecurrenceRule::CRecurrenceRule ( int  iType,
string  szRRule 
)

overloaded Constructor type 0-rrule ,1 -exrule


Member Function Documentation

CRecurrenceRule & CRecurrenceRule::operator= ( CRecurrenceRule right  ) 

overloaded assignment operator

bool CRecurrenceRule::setRuleType ( RuleType  iType  ) 

setRuleType

Parameters:
RuleType type of recurrence rule 0 - RecurrenceRule ;1 -Exception Rule
Returns:
boolean
function used to decide the rule type

RuleType CRecurrenceRule::getRuleType (  ) 

getRuleType

Parameters:
NONE 
Returns:
RuleType type of recurrence rule 0 - RecurrenceRule ;1 -Exception Rule
function used to retrieve rule type from CRecurrenceRule object

bool CRecurrenceRule::rruleParser ( string  szRule  ) 

Parameters:
string szRule recurrence rule, can be recurrence rule or exception rule
Returns:
bool status of the operation
Function used to parse the recurrence rule and populate the fields in to private members of this class All other set methods defined in this class will be called inside this procedure

currently libical is used later this dependency has to be removed and Funambol API should be used

bool CRecurrenceRule::setRrule ( string  szRRule  ) 

Parameters:
: string szRRule - recurrence rule / exception rule
Returns:
: bool whether the operation is successful or not
Function to set recurrence rule in class place holder

string CRecurrenceRule::getRrule (  ) 

Parameters:
: NONE
Returns:
: string recurrence rule
Function used to retrieve recurrence values from class members

bool CRecurrenceRule::setFrequency ( FREQUENCY  iValue  ) 

Parameters:
FREQUENCY : ivaluea frequebncy can be daily,monthly etc, valid values defined in FREQUENCY enumeration.
Returns:
bool: status
to set FREQUENCY of occurrence

FREQUENCY CRecurrenceRule::getFrequency (  ) 

Parameters:
NONE 
Returns:
FREQUENCY of occurrence
function returns FREQUENCY parameter set in the class

bool CRecurrenceRule::setUntil ( time_t  iUntil  ) 

Parameters:
time_t : until value in rrule as time_t
Returns:
bool : status of operation performed
function used to set unitl time in CRecurrencRule object

time_t CRecurrenceRule::getUntil (  ) 

Parameters:
: NONE
Returns:
unitl :time_t status of operation performed
function used to set until time in CRecurrencRule object

bool CRecurrenceRule::setCount ( int  iCount  ) 

Parameters:
: integer Count of occurances
Returns:
: boolean status of operation performed
Function used to set MAX count of instances

int CRecurrenceRule::getCount (  ) 

Parameters:
: NONE
Returns:
: integer count of occurances
Function used to retrieve MAX count of instances

bool CRecurrenceRule::setSecond ( vector< short >  vSec  ) 

Parameters:
vector<short>,: seconds list on which the events should occur
Returns:
boolean: staus of the operation
Function used to set seconds in list of seconds appearing in Recurrence rule

vector< short > CRecurrenceRule::getSecond (  ) 

Parameters:
NONE 
Returns:
vector<short>: seconds list on which the events should occur
Function used to get seconds list in CRecurrenceRule Class

bool CRecurrenceRule::setMinute ( vector< short >  vMinute  ) 

Parameters:
vector<short>,: Minute list on which the events should occur
Returns:
boolean: staus of the operation
Function used to set Minutes appearig in Recurrence rule to CRecurrenceRule class

vector< short > CRecurrenceRule::getMinute (  ) 

Returns:
vector<short>: Minute list on which the events should occur
Parameters:
NONE Function used to get Minutes in CRecurrenceRule class

bool CRecurrenceRule::setHour ( vector< short >  vHour  ) 

Parameters:
vector<short>,: Hour list on which the events should occur
Returns:
boolean: staus of the operation
Function used to set Hours appearing in Recurrence rule to CRecurrenceRule class

vector< short > CRecurrenceRule::getHour (  ) 

Parameters:
NONE 
Returns:
vector<short>: Hour list on which the events should occur
Function used to get Hours in CRecurrenceRule class

bool CRecurrenceRule::setWeekDay ( vector< short >  vByWeekDay  ) 

Parameters:
vector<short>,: WeekDay list on which the events should occur
Returns:
boolean: staus of the operation
Function used to set WeekDays SU.MO,TU etc appearing in Recurrence rule to CRecurrenceRule class

vector< short > CRecurrenceRule::getWeekDay (  ) 

Parameters:
NONE 
Returns:
vector<short>: WeekDay list on which the events should occur
Function used to get WeekDays SU.MO,TU etc in CRecurrenceRule class

bool CRecurrenceRule::setMonthDay ( vector< short >  vByMonthDay  ) 

Parameters:
vector<short>,: MonthDay list on which the events should occur
Returns:
boolean: staus of the operation
Function used to set Month Days appearing in Recurrence rule to CRecurrenceRule

vector< short > CRecurrenceRule::getMonthDay (  ) 

Parameters:
NONE 
Returns:
vector<short>: YearDay list on which the events should occur
Function used to Retrieve MonthDay appearing in CRecurrenceRule class

bool CRecurrenceRule::setYearDay ( vector< short >  vByYearDay  ) 

Parameters:
vector<short>,: YearDay list on which the events should occur
Returns:
boolean: staus of the operation
Function used to set YearDay appearing in Recurrence rule to CRecurrenceRule class Eg: RRULE:FREQ=YEARLY;INTERVAL=3;COUNT=10;BYYEARDAY=1,100,200

vector< short > CRecurrenceRule::getYearDay (  ) 

Parameters:
NONE 
Returns:
vector<short>: YearDay list on which the events should occur
Function used to Retrieve YearDay appearing in CRecurrenceRule class

bool CRecurrenceRule::setWeekNumber ( vector< short >  vByWeekNumber  ) 

Parameters:
vector<short>,: WeekNumeber list on which the events should occur
Returns:
boolean: staus of the operation
Function used to set WeekNumber appearing in Recurrence rule to CRecurrenceRule class

vector< short > CRecurrenceRule::getWeekNumber (  ) 

Parameters:
NONE 
Returns:
vector<short>: WeekNumeber list on which the events should occur
Function used to get WeekNumber appearing in CRecurrenceRule class

bool CRecurrenceRule::setMonth ( vector< short >  vMonth  ) 

Parameters:
vector<short>,: Month list on which the events should occur
Returns:
boolean: staus of the operation
Function used to set Month list appearing in Recurrence rule to CRecurrenceRule class

vector< short > CRecurrenceRule::getMonth (  ) 

Parameters:
NONE 
Returns:
vector<short>: Month list on which the events should occur
Function used to get Month list appearing in CRecurrenceRule class

bool CRecurrenceRule::setPos ( vector< short >  vPosition  ) 

Parameters:
vector<short>,: Position list on which the events should occur
Returns:
boolean: staus of the operation
Function used to set Position list appearing in Recurrence rule to CRecurrenceRule class eg : The BYSETPOS rule part specifies a COMMA character (US-ASCII decimal 44) separated list of values which corresponds to the nth occurrence within the set of events specified by the rule. Valid values are 1 to 366 or -366 to -1. It MUST only be used in conjunction with another BYxxx rule part. For example "the last work day of the month" could be represented as: RRULE:FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-1

vector< short > CRecurrenceRule::getPos (  ) 

Parameters:
NONE 
Returns:
vector<short>: Position list on which the events should occur
Function used to get Position list from CRecurrenceRule class

bool CRecurrenceRule::setWeekStart ( icalrecurrencetype_weekday  start  ) 

Parameters:
int : weekstart offset day from which week starts in Calendar in our calendar it is either SUNDAY or MONDAY
Returns:
boolean: staus of the operation
Function used to set week start appearing in Recurrence rule to CRecurrenceRule class Eg: DTSTART;TZID=US-Eastern:19970805T090000 RRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=MO ==> (1997 EDT)Aug 5,10,19,24 changing only WKST from MO to SU, yields different results... DTSTART;TZID=US-Eastern:19970805T090000 RRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU ==> (1997 EDT)August 5,17,19,31

icalrecurrencetype_weekday CRecurrenceRule::getWeekStart (  ) 

@ int : weekstart offset day from which week starts in Calendar in our calendar it is either SUNDAY or MONDAY

Returns:
boolean: staus of the operation
Function used to get week start day from CRecurrenceRule class

bool CRecurrenceRule::setInterval ( short  interval  ) 

Parameters:
short : interval between two instances
Returns:
: bool status of the operation Function used to set the interval param

short CRecurrenceRule::getInterval (  ) 

Parameters:
NONE 
Returns:
short: interval between instances
Function used to retrieve interval parameter

vector< short > CRecurrenceRule::convertArrayToVector ( short  array[],
int  iLengthMax 
) [private]

Parameters:
array of short
Returns:
vector of short;
function to convert array to vector

After parsing Recurrence rule using ICAL API all arrays are populated with default value of 32639 , to save memory consumption we have filtered out default values


Field Documentation

FREQUENCY CRecurrenceRule::iFreq [private]

Frequency

string CRecurrenceRule::szRule [private]

RRule or Exception Rule

int CRecurrenceRule::iCount [private]

integer value

short CRecurrenceRule::interval [private]

interval appearing in rrule

time_t CRecurrenceRule::iUntil [private]

Until value

RuleType CRecurrenceRule::iType [private]

Rule type

icalrecurrencetype_weekday CRecurrenceRule::weekStart [private]

week start as per rfc Ical is week day from which recuurenc has to start. Our Calendar app supports SU or MO for week start.

vector< short > CRecurrenceRule::vBySecond [private]

(0-60) second values

vector< short > CRecurrenceRule::vByMinute [private]

(0-60) Minute values

vector< short > CRecurrenceRule::vByHour [private]

(0-24) Hour values

vector< short > CRecurrenceRule::vByWeekDay [private]

(SU,MO,TU,WE,TH,FR,ST) WeekDay values

vector< short > CRecurrenceRule::vByMonthDay [private]

(1-31) Month values

vector< short > CRecurrenceRule::vByYearDay [private]

(0-365) Year day values

vector< short > CRecurrenceRule::vByWeekNumber [private]

(1-52) Week Number values

vector< short > CRecurrenceRule::vByMonth [private]

(1-12) Month values

vector< short > CRecurrenceRule::vBySetPos [private]

(1-366) SetPosition values


The documentation for this class was generated from the following files:
Generated on Tue Feb 24 16:21:34 2009 for calendar-backend by  doxygen 1.5.1