CComponent Class Reference

This class contains the API's to get/set the basic parameters for any events/todo/notes This holds the basic information for components. More...

#include <CComponent.h>

Inheritance diagram for CComponent:

CBdayEvent CComponentDetails CEvent CJournal CTodo

Public Member Functions

 CComponent ()
 CComponent (CComponent &)
 CComponent (string description)
 CComponent (string summary, time_t tododue, int status)
 CComponent (string summary, string description, string location, time_t dateStart, time_t dateEnd)
 CComponent (string szuid, string szDescription, time_t stDateStart)
vector< CRecurrenceRule * > retrieveRecurreceRuleObject ()
const CComponentoperator= (const CComponent &right)
 CComponent (string id, int type, int flags, string summary, string description, string location, int status, time_t dateStart, time_t dateEnd, time_t lastModified, time_t iCreatedTime)
bool setId (string sId)
string getId ()
bool setType (int num)
int getType ()
bool setFlags (int iflag)
int getFlags ()
bool setSummary (string szSummary)
string getSummary ()
bool setDescription (string strDescription)
string getDescription ()
bool setLocation (string szLocation)
string getLocation ()
bool setStatus (int iStatus)
int getStatus ()
bool setDateStart (time_t dateStart)
time_t getDateStart ()
bool setDateEnd (time_t dateEnd)
time_t getDateEnd ()
bool setLastModified (time_t lastModified)
bool setRecurrence (CRecurrence *ptrRecur)
CRecurrencegetRecurrence ()
time_t getLastModified ()
bool setUntil (time_t iuntil)
time_t getUntil ()
bool setGUid (string szuid)
string getGUid ()
bool setRtype (int irtype)
int getRtype ()
bool setAlarm (CAlarm *uAlarm)
bool setAlarm (int time_before, int alarm_duration)
bool setAlarmBefore (int time_before)
CAlarmgetAlarm ()
int getAlarmBefore ()
int getAllDay ()
bool setAllDay (int iAllDay)
vector< time_t > generateInstanceTimes (time_t viewBegin, time_t viewEnd)
void generateInstanceTimes (time_t viewBegin, time_t viewEnd, vector< time_t > &instance_times)
vector< time_t > getInstanceTimes (time_t viewBegin, time_t viewEnd)
void getInstanceTimes (time_t viewBegin, time_t viewEnd, vector< time_t > &instance_times)
int getInstanceNumber (time_t viewBegin, time_t viewEnd)
int getDuration ()
bool getRecurrenceProperties ()
bool getAlarmProperties ()
virtual ~CComponent ()
void setCreatedTime (time_t iCreatedTime)
time_t getCreatedTime ()
void removeAlarm ()
void removeRecurrence ()
string getTzid ()
void setTzid (string sZone)
time_t getTzOffset (void)
void setTzOffset (time_t)
string toString ()
vector< string > extractSubStrings (string SourceString, string byField)
void updateUntilInDB (time_t until, int &pErrorCode)
bool updateAlarmTriggerTime (time_t *pOutInstanceTime)
void setCalendarId (int iId)
int getCalendarId ()

Private Member Functions

bool generateYearlyInstanceTime (time_t viewBegin, time_t viewEnd, vector< time_t > &time)

Private Attributes

string sId
int iCalId
int iType
int iFlags
int iStatus
time_t iDateStart
time_t iDateEnd
time_t iLastModified
time_t iCreatedTime
time_t iuntil
int iAllDay
string szSummary
string szDescription
string szLocation
string szuid
CRecurrencepRecurrence
CAlarmpAlarm
string sTzid
time_t tzOffset
time_t iStDate
time_t iEndDate
vector< time_t > rTimes

Detailed Description

This class contains the API's to get/set the basic parameters for any events/todo/notes This holds the basic information for components.

CComponent class


Constructor & Destructor Documentation

CComponent::CComponent (  ) 

CComponent() This is the defult constructor for CComponent class

CComponent () Default CComponent constructor

CComponent::CComponent ( CComponent ref  ) 

CComponent::CComponent ( string  szDescription  ) 

Overloaded Constructor

CComponent::CComponent ( string  szSummary,
time_t  stTododue,
int  iStatus 
)

Overloaded constructor

CComponent Overloaded Parametrized constructor

CComponent::CComponent ( string  szSummary,
string  szDescription,
string  szLocation,
time_t  iDateStart,
time_t  iDateEnd 
)

Overloaded Constructor

CComponent Overloaded Parametrized with minimal parameters for UI

CComponent::CComponent ( string  szuid,
string  szSummary,
time_t  iDateStart 
)

overloaded Constructor

CComponent Overloaded Parametrized constructor for CBdayEvent

CComponent::CComponent ( string  sId,
int  iType,
int  iFlags,
string  szSummary,
string  szDescription,
string  szLocation,
int  iStatus,
time_t  iDateStart,
time_t  iDateEnd,
time_t  iLastModified,
time_t  iCreatedTime 
)

Parameters:
id entryid
type entry type
calendarId Calendar ID
flags Flags to identify secondary table
summary Summary for event / todo / journal
description Entry description
status Entry status
dateStart Start date for event
dateEnd End date for event
lastModified Last modified date for event
Returns:
: None
This is the parameter constructor of class calEntry where all variables are being initialised

CComponent Overloaded Parametrized constructor

CComponent::~CComponent (  )  [virtual]

Destructor for CComponent class.

References pAlarm, and pRecurrence.


Member Function Documentation

vector< CRecurrenceRule * > CComponent::retrieveRecurreceRuleObject (  ) 

Parameters:
NONE 
Returns:
CRecurrenceRule* pointer to CRecurrenceRule class from which UI can access other fields
funtion used to retrieve CRecurrenceRule Object present in CRecurrence Class

retrieveRecurrenceRuleObject

Parameters:
NONE 
Returns:
vector<CRecurrenceRule*> pointer to CRecurrenceRule class from which UI can access other fields function used to retrieve CRecurrenceRule Object present in CRecurrence Class

References CRecurrence::getRecurrenceRule(), and pRecurrence.

const CComponent & CComponent::operator= ( const CComponent right  ) 

Parameters:
Constant reference to CComponent
Returns:
Reference to CComponent
Overloaded assignment operator for the class

overloaded assignment operator

References iAllDay, iCalId, iDateEnd, iDateStart, iFlags, iStatus, iType, pAlarm, pRecurrence, removeAlarm(), removeRecurrence(), setAlarm(), setRecurrence(), sId, sTzid, szDescription, szLocation, szSummary, and tzOffset.

Referenced by CComponentDetails::operator=().

bool CComponent::setId ( string  sId  ) 

string CComponent::getId (  ) 

Parameters:
:None 
Returns:
:string id used to get id of entry
This function is used to get the id of the entry created.

getId()

Parameters:
:None 
Returns:
: string > > used to get id of entry
This function is used to get the id of the entry created.

References sId.

Referenced by CCalendar::addBirthDay(), CCalendar::addCacheEntries(), CMulticalendar::addEvent(), CCalendar::addEvent(), CMulticalendar::addJournal(), CCalendar::addJournal(), CMulticalendar::addTodo(), CCalendar::addTodo(), CMulticalendar::comparePrevNextComponent(), CCalendar::destroyExistingValidAlarms(), CMulticalendar::enableAutomaticDeletion(), generateInstanceTimes(), getAlarmProperties(), CCalendar::getAllEventsTodos(), CCalendar::getComponents(), CMulticalendar::getComponentsWithLimitedData(), getInstanceNumber(), CMulticalendar::getLatestComponent(), CComponentDetails::getParameter(), CMulticalendar::getPrevNextComponent(), CComponentDetails::getPropertyValues(), getRecurrenceProperties(), CCalendar::manageCookie(), CMulticalendar::modifyBirthDay(), CCalendar::modifyBirthDay(), CMulticalendar::modifyEvent(), CCalendar::modifyEvent(), CMulticalendar::modifyJournal(), CCalendar::modifyJournal(), CMulticalendar::modifyTodo(), CCalendar::modifyTodo(), CCalendar::registerAlarmForVisibleCalendar(), CComponentDetails::retrieveAttendeeDetails(), CComponentDetails::retrieveOrganizerDetails(), CComponentDetails::retrieveParameterDetails(), CComponentDetails::retrieveXPropertyDetails(), CCalendar::setNextAlarm(), CTodo::toString(), CJournal::toString(), CEvent::toString(), CComponentDetails::toString(), and CBdayEvent::toString().

bool CComponent::setType ( int  type  ) 

Parameters:
: int num used to set type of entry
Returns:
:bool (SUCCESS/FAILURE)
This function is used to set the type of the entry created. It could be an event,todo or journal E_EVENT= 1 E_TODO =2 E_JOURNAL=3

setType()

Parameters:
: num(int) > > used to set type of entry
Returns:
:bool (SUCCESS/FAILURE)
This function is used to set the type of the entry created. It could be an event,todo or journal

References iType.

Referenced by CEvent::CEvent(), CJournal::CJournal(), CTodo::CTodo(), CCalendar::getComponents(), CCalendar::getTodo(), CCalendar::getTodos(), ICalConverter::localToIcalVcal(), and ICalConverter::toLocal().

int CComponent::getType (  ) 

bool CComponent::setFlags ( int  flags  ) 

Parameters:
int iflag to indicate recurrence or alarm
Returns:
bool status of the operation
setFlags()
Parameters:
: calendarId(int) > > Used to set the flags.
Returns:
:bool (SUCCESS/FAILURE)
This function is used to set the flag value to identify the associated tables

References iFlags.

Referenced by CCalendar::getComponents(), and CCalendar::setNextAlarm().

int CComponent::getFlags (  ) 

Parameters:
:None 
Returns:
: int used to get flag value.
This function is used to get the flag value to identify associated tables.

getFlags()

Parameters:
:None 
Returns:
: id(int) > > used to get flag value.
This function is used to get the flag value to identify associated tables.

References iFlags.

Referenced by CCalendar::getAllEventsTodos(), CCalendar::getComponents(), CMulticalendar::getComponentsAllCalendars(), CMulticalendar::getComponentsWithLimitedData(), CCalendar::getRecursiveEventsInRange(), CCalendar::getTodo(), CCalendar::getTodos(), CMulticalendar::popEventDetails(), CCalendar::setNextAlarm(), CTodo::toString(), CJournal::toString(), CEvent::toString(), CComponentDetails::toString(), and CBdayEvent::toString().

bool CComponent::setSummary ( string  summary  ) 

Parameters:
: string szSummary it is the summary of the entry
Returns:
:bool (SUCCESS/FAILURE)
This function is used to set the summary of the entry created. The summary is in string format

setSummary()

Parameters:
: string > > it is the summary of the entry
Returns:
:bool (SUCCESS/FAILURE)
This function is used to set the summary of the entry created. The summary is in string format

References szSummary.

Referenced by CMulticalendar::checkExistenceOfFutureRepeatingEvent(), CCalendar::getAllEventsTodos(), CCalendar::getComponents(), CMulticalendar::getComponentsAllCalendars(), CMulticalendar::getComponentsWithLimitedData(), CCalendar::getJournal(), CCalendar::getJournals(), CMulticalendar::getLatestComponent(), CCalendar::getRecursiveEventsInRange(), CMulticalendar::getTodaysAllDay(), CCalendar::getTodo(), CCalendar::getTodos(), CMulticalendar::popEventDetails(), and CBdayEvent::setFirstName().

string CComponent::getSummary (  ) 

Parameters:
: None
Returns:
:string it is the summary of the entry
This function is used to get the summary of the entry created. The title is in string format

getSummary()

Parameters:
: None
Returns:
:string > > it is the summary of the entry getAttach() This function is used to get the summary of the entry created. The title is in string format

References szSummary.

Referenced by CCalendar::checkDuplicateEntry(), CMulticalendar::comparePrevNextComponent(), CCalendar::destroyExistingValidAlarms(), generateYearlyInstanceTime(), CBdayEvent::getFirstName(), CMulticalendar::getLatestComponent(), CMulticalendar::getPrevNextComponent(), CCalendar::manageCookie(), CCalendar::registerAlarmForVisibleCalendar(), ICalConverter::replaceWithEncodedString(), CCalendar::setNextAlarm(), ICalConverter::toLocal(), CTodo::toString(), CJournal::toString(), CEvent::toString(), CComponentDetails::toString(), and CBdayEvent::toString().

bool CComponent::setDescription ( string  description  ) 

Parameters:
: string szDescripton it is the description of the entry
Returns:
:bool (SUCCESS/FAILURE)
This function is used to set the description of the entry created. The description is in string format

setDescription()

Parameters:
: string > > it is the description of the entry
Returns:
:bool (SUCCESS/FAILURE)
This function is used to set the description of the entry created. The description is in string format

References szDescription.

Referenced by CMulticalendar::checkExistenceOfFutureRepeatingEvent(), CCalendar::getAllEventsTodos(), CCalendar::getComponents(), CMulticalendar::getComponentsAllCalendars(), CCalendar::getJournal(), CCalendar::getJournals(), CCalendar::getRecursiveEventsInRange(), CCalendar::getTodo(), CCalendar::getTodos(), and CMulticalendar::popEventDetails().

string CComponent::getDescription (  ) 

Parameters:
: None
Returns:
:string it is the description of the entry
This function is used to get the description of the entry created. The description is in string format

getDescription ()

Parameters:
: None
Returns:
:string > > it is the description of the entry getAttach() This function is used to get the description of the entry created. The description is in string format

References szDescription.

Referenced by CCalendar::checkDuplicateEntry(), CCalendar::manageCookie(), CCalendar::registerAlarmForVisibleCalendar(), ICalConverter::replaceWithEncodedString(), CCalendar::setNextAlarm(), CTodo::toString(), CJournal::toString(), CEvent::toString(), CComponentDetails::toString(), and CBdayEvent::toString().

bool CComponent::setLocation ( string  location  ) 

Parameters:
: string szLocation it is the location of the entry
Returns:
:bool (SUCCESS/FAILURE)
This function is used to set the location of the entry created. The location is in string format

setLocation()

Parameters:
: string > > it is the location of the entry
Returns:
:bool (SUCCESS/FAILURE)
This function is used to set the location of the entry created. The location is in string format

References szLocation.

Referenced by CMulticalendar::checkExistenceOfFutureRepeatingEvent(), CCalendar::getAllEventsTodos(), CCalendar::getComponents(), CMulticalendar::getComponentsAllCalendars(), CCalendar::getJournal(), CCalendar::getJournals(), CCalendar::getRecursiveEventsInRange(), CCalendar::getTodo(), CCalendar::getTodos(), and CMulticalendar::popEventDetails().

string CComponent::getLocation (  ) 

Parameters:
: None
Returns:
:string it is the location of the entry
This function is used to get the location of the entry created. The location is in string format

References szLocation.

Referenced by CCalendar::checkDuplicateEntry(), CCalendar::manageCookie(), CCalendar::registerAlarmForVisibleCalendar(), ICalConverter::replaceWithEncodedString(), CCalendar::setNextAlarm(), CTodo::toString(), CJournal::toString(), CEvent::toString(), CComponentDetails::toString(), and CBdayEvent::toString().

bool CComponent::setStatus ( int  status  ) 

Parameters:
: int iStatus Used to set the status for entry.
Returns:
:bool (SUCCESS/FAILURE)
This function is used to set the status.

setStatus()

Parameters:
: Used to set the status for entry.
Returns:
:bool (SUCCESS/FAILURE)
This function is used to set the status.

References iStatus.

Referenced by CCalendar::getAllEventsTodos(), and CCalendar::getComponents().

int CComponent::getStatus (  ) 

Parameters:
:None 
Returns:
: int used to get status value
This function is used to get the status value.

getStatus()

Parameters:
:None 
Returns:
: id(int) > > used to get status value
This function is used to get the status value.

References iStatus.

Referenced by CCalendar::addTodoCompDetails(), CCalendar::modifyTodo(), CTodo::toString(), CJournal::toString(), CEvent::toString(), CComponentDetails::toString(), and CBdayEvent::toString().

bool CComponent::setDateStart ( time_t  dateStart  ) 

Parameters:
: time_t Used to set the start date for event.
Returns:
:bool (SUCCESS/FAILURE)
This function is used to set the start date along with timestamp.

setDateStart()

Parameters:
: Used to set the start date for event.
Returns:
:bool (SUCCESS/FAILURE)
This function is used to set the start date along with timestamp.

References iDateStart.

Referenced by CMulticalendar::enableAutomaticDeletion(), CCalendar::getComponents(), CMulticalendar::getLatestComponent(), ICalConverter::importEventDateStartAndDateEnd(), ICalConverter::importTodoDue(), CBdayEvent::setBirthDate(), and ICalConverter::toLocal().

time_t CComponent::getDateStart (  ) 

bool CComponent::setDateEnd ( time_t  dateEnd  ) 

Parameters:
: time_t Used to set the date end for entry.
Returns:
:bool (SUCCESS/FAILURE)
This function is used to set the date end

setDateEnd()

Parameters:
: Used to set the date end for entry.
Returns:
:bool (SUCCESS/FAILURE)
This function is used to set the date end

References iDateEnd.

Referenced by CMulticalendar::enableAutomaticDeletion(), CCalendar::getComponents(), ICalConverter::importEventDateEnd(), and ICalConverter::importEventDateStartAndDateEnd().

time_t CComponent::getDateEnd (  ) 

Parameters:
:None 
Returns:
: time_t used to get date end value
This function is used to get the date end.

getDateEnd()

Parameters:
:None 
Returns:
: used to get date end value
This function is used to get the date end.

References iDateEnd.

Referenced by CCalendar::addEvent(), CCalendar::checkIfMultiDayEvent(), CMulticalendar::comparePrevNextComponent(), CMulticalendar::enableAutomaticDeletion(), CCalendar::manageCookie(), CCalendar::registerAlarmForVisibleCalendar(), CCalendar::setNextAlarm(), CTodo::toString(), CJournal::toString(), CEvent::toString(), CComponentDetails::toString(), and CBdayEvent::toString().

bool CComponent::setLastModified ( time_t  lastModified  ) 

Parameters:
: time_t Used to set the last modified value
Returns:
:bool (SUCCESS/FAILURE)
This function is used to set the last modified

setLastModified()

Parameters:
: Used to set the last modified value
Returns:
:bool (SUCCESS/FAILURE)
This function is used to set the last modified

References iLastModified.

Referenced by CCalendar::checkDuplicateEntry(), CCalendar::getAllEventsTodos(), CCalendar::getComponents(), CCalendar::getRecursiveEventsInRange(), and CCalendar::modifyJournal().

bool CComponent::setRecurrence ( CRecurrence uRecurrence  ) 

Parameters:
:CRecurrence * pTrRecur pointer to recurrence object
Returns:
: bool -status of operation
This function is used to set the pointer to CRecurrence

setRecurrence()

Parameters:
:CRecurrence *
Returns:
: bool
This function is used to set the pointer to CRecurrence

References pRecurrence, and removeRecurrence().

Referenced by CComponent(), getRecurrenceProperties(), ICalConverter::importEventRecurrence(), and operator=().

CRecurrence * CComponent::getRecurrence (  ) 

Parameters:
:None 
Returns:
: Used to get pointer to Recurrence
This function is used to get the pointer to CRecurrence

getRecurrence()

Parameters:
:None 
Returns:
: Used to get pointer to Recurrence
This function is used to get the pointer to CRecurrence

References pRecurrence.

Referenced by CCalendar::addBirthDay(), CCalendar::addCacheEntries(), CCalendar::addEvent(), CCalendar::addTodo(), ICalConverter::localToIcalVcal(), CCalendar::modifyBirthDay(), CCalendar::modifyEvent(), CCalendar::modifyTodo(), CTodo::toString(), CJournal::toString(), CEvent::toString(), CComponentDetails::toString(), toString(), and CBdayEvent::toString().

time_t CComponent::getLastModified (  ) 

Parameters:
:None 
Returns:
:time_t Used to get last modified value
This function is used to get the last modified value

getLastModified()

Parameters:
:None 
Returns:
: Used to get last modified value
This function is used to get the last modified value

References iLastModified.

Referenced by CCalendar::checkDuplicateEntry(), CCalendar::modifyJournal(), CTodo::toString(), CJournal::toString(), CEvent::toString(), CComponentDetails::toString(), and CBdayEvent::toString().

bool CComponent::setUntil ( time_t  iuntil  ) 

Parameters:
: time_t time in UTC (integer) format.
Returns:
: bool to indicate the result of operation.
This function is used to set the Until value in Recurrence object.

setUntil

Parameters:
: int time in UTC (integer) format.
Returns:
: bool to indicate the result of operation.
This function is used to set the Until value in Recurrence object.

Referenced by CCalendar::getAllEventsTodos(), CCalendar::getComponents(), and ICalConverter::importEventRecurrence().

time_t CComponent::getUntil (  ) 

Parameters:
: NONE.
Returns:
: int time in UTC (integer) format.
This function is used to get the Until(time) value in Recurrence object.

getUntil

Parameters:
: NONE.
Returns:
: int time in UTC (integer) format.
This function is used to get the Until(time) value in Recurrence object.

References iuntil.

Referenced by CTodo::toString(), CJournal::toString(), CEvent::toString(), CComponentDetails::toString(), CBdayEvent::toString(), and updateAlarmTriggerTime().

bool CComponent::setGUid ( string  szuid  ) 

Parameters:
: string globally unique ID for component.
Returns:
: bool to indicate the result of operation.
This function is used to set the UID value in Recurrence object. TODO: NEED TO REMOVE THIS PARAMETER AS GUID IS REDUNDANT WE USE COMPONENT ID AS GUID

setGUid

Parameters:
: string globally unique ID for component.
Returns:
: bool to indicate the result of operation.
This function is used to set the UID value in Recurrence object.

Referenced by CMulticalendar::checkExistenceOfFutureRepeatingEvent(), CCalendar::getAllEventsTodos(), CCalendar::getComponents(), CMulticalendar::getComponentsAllCalendars(), CCalendar::getJournal(), CCalendar::getJournals(), CCalendar::getRecursiveEventsInRange(), CCalendar::getTodo(), CCalendar::getTodos(), CMulticalendar::popEventDetails(), and CBdayEvent::setEBookUid().

string CComponent::getGUid (  ) 

Parameters:
: NONE
Returns:
: string globally unique ID for each component.
This function is used to get the UID value in Recurrence object. TODO: NEED TO REMOVE THIS PARAMETER AS GUID IS REDUNDANT WE USE COMPONENT ID AS GUID

getGUid

Parameters:
: NONE
Returns:
: string globally unique ID for each component.
This function is used to set the UID value in Recurrence object.

References szuid.

Referenced by CCalendar::checkDuplicateEntry(), CBdayEvent::getEBookUid(), CTodo::toString(), CJournal::toString(), CEvent::toString(), CComponentDetails::toString(), and CBdayEvent::toString().

bool CComponent::setRtype ( int  irtype  ) 

Parameters:
: NONE.
Returns:
: Int Type of internal recurrence.
This function is used to get the Recurrence type value in Recurrence object. It is used for recurrence events and todos. It can take values like 'BY_DAILY' =1 'BY_WEEKLY' =2 'BY_MONTHLY'=3 and so on. For external events/todos the value should be set to 0.

setRtype

Parameters:
: int Type of recurrence .
Returns:
: bool to indicate the result of operation.
This function is used to set the Recurrence type value in Recurrence object. It is used for recurrence events and todos. It can take values like 'BY_DAILY' =1 'BY_WEEKLY' =2 'BY_MONTHLY'=3 and so on. For external events/todos the value should be set to 0.

References pRecurrence, and CRecurrence::setRtype().

int CComponent::getRtype (  ) 

Parameters:
: NONE.
Returns:
: Int Type of internal recurrence.
This function is used to get the Recurrence type value in Recurrence object. It is used for recurrence events and todos. It can take values like 'BY_DAILY' =1 'BY_WEEKLY' =2 'BY_MONTHLY'=3 and so on. For external events/todos the value should be set to 0.

getRtype

Parameters:
: NONE.
Returns:
: Int Type of internal recurrence.
This function is used to get the Recurrence type value in Recurrence object. It is used for recurrence events and todos. It can take values like 'BY_DAILY' =1 'BY_WEEKLY' =2 'BY_MONTHLY'=3 and so on. For external events/todos the value should be set to 0.

References CRecurrence::getRtype(), and pRecurrence.

bool CComponent::setAlarm ( CAlarm uAlarm  ) 

Parameters:
CAlarm* uAlarm pointer to CAlarm object
Returns:
bool indicating result of operation
This function is used to set Alarm properties

setAlarm(Calarm *)

Parameters:
CAlarm* pointer to CAlarm object
Returns:
bool indicating result of operation
This function is used to set Alarm properties

References iType, pAlarm, removeAlarm(), CAlarm::setDuration(), and CAlarm::setTimeBefore().

Referenced by CComponent(), getAlarmProperties(), CCalendar::getTodo(), CCalendar::getTodos(), operator=(), and setAlarmBefore().

bool CComponent::setAlarm ( int  time_before,
int  alarm_duration 
)

Parameters:
time_before - Alarm time in seconds before component occurance start time
alarm_duration - Alarm duration (E_AM_NONE, E_AM_xxxMIN, E_AM_DAYBEFORE, etc)
Returns:
bool indicating result of operation
This function is used to set Alarm properties

Parameters:
time_before - Alarm time in seconds before component occurance start time
alarm_duration - Alarm type (E_AM_NONE, E_AM_xxxMIN, E_AM_DAYBEFORE, etc)
Returns:
bool indicating result of operation
This function is used to set Alarm properties

References pAlarm, removeAlarm(), CAlarm::setDuration(), CAlarm::setTimeBefore(), and CAlarm::setTrigger().

bool CComponent::setAlarmBefore ( int  time_before  ) 

Parameters:
time_before - Alarm time in seconds before component occurance start time
Returns:
bool indicating result of operation
This function is used to set Alarm properties

References iDateStart, and setAlarm().

CAlarm * CComponent::getAlarm (  ) 

int CComponent::getAlarmBefore (  ) 

Returns:
seconds before event ocuurence
This function is used to get Alarm properties

Returns:
seconds before event ocuurence, -1 if alarm is not set
This function is used to get Alarm properties

References CAlarm::getTimeBefore(), and pAlarm.

int CComponent::getAllDay (  ) 

Parameters:
NONE 
Returns:
value of flag allday stored in DB
all day event is one in which time is not required eg Birthday, function (all day event )

getAllDay()

Parameters:
NONE 
Returns:
value of flag allday stored in DB all day event is one in which time is not required eg Birthday, function (all day event )

References iAllDay.

Referenced by CMulticalendar::comparePrevNextComponent(), generateInstanceTimes(), getInstanceNumber(), CMulticalendar::getLatestComponent(), ICalConverter::importEventDateEnd(), ICalConverter::localToIcalVcal(), CCalendar::manageCookie(), CCalendar::registerAlarmForVisibleCalendar(), CCalendar::setNextAlarm(), CTodo::toString(), CJournal::toString(), CEvent::toString(), CComponentDetails::toString(), and CBdayEvent::toString().

bool CComponent::setAllDay ( int  iAllDay  ) 

Parameters:
int (0 not all day ,1 allday event )
Returns:
bool result of the operation
all day event is one in which time is not required eg Birthday, function (all day event )

setAllDay()

Parameters:
int (0 not all day ,1 allday event )
Returns:
bool result of the operation all day event is one in which time is not required eg Birthday, function (all day event )

Referenced by CCalendar::getAllEventsTodos(), CCalendar::getComponents(), CMulticalendar::getLatestComponent(), CMulticalendar::getTodaysAllDay(), and ICalConverter::importEventDateStartAndDateEnd().

vector< time_t > CComponent::generateInstanceTimes ( time_t  viewBegin,
time_t  viewEnd 
)

Parameters:
viewBegin lower range of current view
viewEnd higher range of current view
Returns:
vector <time_t> values on which event has to happen
Function used to calculate the recurrence dates DO NOT USE due to performance issues. Use void generateInstanceTimes(time_t,time_t,vector<time_t>&) instead

generateInstanceTimes()

Parameters:
viewBegin lower range of current view
viewEnd higher range of current view
Returns:
vector <time_t> values on which event has to happen
Function used to retrieve the recurrence dates

Referenced by CCalendar::addCacheEntries(), getInstanceTimes(), and updateAlarmTriggerTime().

void CComponent::generateInstanceTimes ( time_t  viewBegin,
time_t  viewEnd,
vector< time_t > &  instance_times 
)

Parameters:
viewBegin lower range of current view
viewEnd higher range of current view
Returns:
vector <time_t> values on which event has to happen
Function used to calculate the recurrence dates

References CRecurrence::generateInstanceTimes(), generateYearlyInstanceTime(), getAllDay(), getId(), getType(), iDateEnd, iDateStart, iEndDate, iStDate, and pRecurrence.

vector< time_t > CComponent::getInstanceTimes ( time_t  viewBegin,
time_t  viewEnd 
)

Parameters:
viewBegin lower range of current view
viewEnd higher range of current view
Returns:
vector <time_t> values on which event has to happen
Function used to retrieve the recurrence dates from the DB

References generateInstanceTimes().

Referenced by CMulticalendar::checkExistenceOfFutureRepeatingEvent().

void CComponent::getInstanceTimes ( time_t  viewBegin,
time_t  viewEnd,
vector< time_t > &  instance_times 
)

Parameters:
viewBegin lower range of current view
viewEnd higher range of current view
instance_times values on which event has to happen
Function used to retrieve the recurrence dates from the DB

References generateInstanceTimes().

int CComponent::getInstanceNumber ( time_t  viewBegin,
time_t  viewEnd 
)

Parameters:
viewBegin lower range of current view viewEnd higher range of current view
Returns:
int number of events
Function used to retrieve the number of recurrence events from the DB

References CRecurrence::checkInstances(), generateYearlyInstanceTime(), getAllDay(), getId(), getType(), iDateEnd, iDateStart, and pRecurrence.

Referenced by CCalendar::getAllEventsTodos(), CCalendar::getComponents(), CMulticalendar::getComponentsAllCalendars(), CMulticalendar::getComponentsWithLimitedData(), and CCalendar::getRecursiveEventsInRange().

int CComponent::getDuration (  ) 

Parameters:
NONE 
Returns:
duration parameter from alarm class
this function is used to return duration value stored in Alarm class

getDurationFromAlarm()

Parameters:
NONE 
Returns:
duration parameter from alarm class
this function is used to return duration value stored in Alarm class

References CAlarm::getDuration(), and pAlarm.

bool CComponent::getRecurrenceProperties (  ) 

Parameters:
ptrEntry Component Entry template , can be event*,todo*,journal* or CComponent*
Returns:
Template class (Event/todo/journal)
Function used to get the recurrence properties. This will be used in getEvent function.

getRecurrenceProperties()

Parameters:
ptrEntry Component Entry template , can be event*,todo*,journal* or CComponent*
Returns:
Template class (Event/todo/journal) Function used to get the recurrence properties. This will be used in getEvent function.

References extractSubStrings(), getId(), CCalendarDB::getRecords(), CCalendarDB::Instance(), CRecurrence::setEDays(), CRecurrence::setErule(), setId(), CRecurrence::setRDays(), CRecurrence::setRecurId(), setRecurrence(), CRecurrence::setRrule(), and CRecurrence::setRtype().

Referenced by CMulticalendar::checkExistenceOfFutureRepeatingEvent(), CCalendar::getAllEventsTodos(), CCalendar::getComponents(), CMulticalendar::getComponentsAllCalendars(), CMulticalendar::getComponentsWithLimitedData(), CCalendar::getRecursiveEventsInRange(), and CMulticalendar::popEventDetails().

bool CComponent::getAlarmProperties (  ) 

Parameters:
template can be event todo or Journal pointer
Returns:
boolean result of the operation
this function is used to retreive Alarm properties from DB

getAlarmProperties()

Parameters:
template can be event todo or Journal pointer
Returns:
boolean result of the operation
this function is used to retreive Alarm properties from DB

References getId(), CCalendarDB::getRecords(), CCalendarDB::Instance(), pAlarm, setAlarm(), CAlarm::setAttach(), CAlarm::setCookie(), CAlarm::setDuration(), and CAlarm::setTimeBefore().

Referenced by CCalendar::getAllEventsTodos(), CCalendar::getComponents(), CMulticalendar::getComponentsAllCalendars(), CCalendar::getRecursiveEventsInRange(), and CMulticalendar::popEventDetails().

void CComponent::setCreatedTime ( time_t  iCreatedTime  ) 

Parameters:
 time_t iCreatedTime time in utc
Returns:
: NONE
This function is used to set created time

getLocation ()

Parameters:
: None
Returns:
:string > > it is the location of the entry getAttach() This function is used to get the location of the entry created. The location is in string format setCreatedTime
Parameters:
int time in utc
Returns:
bool indicating result of operation
This function is used to set created time

Referenced by CCalendar::getAllEventsTodos(), CCalendar::getComponents(), and CCalendar::getRecursiveEventsInRange().

time_t CComponent::getCreatedTime (  ) 

Parameters:
none 
Returns:
: time_t created time in utc
This function is used to get created time

getCreatedTime

Parameters:
none 
Returns:
created time in utc
This function is used to get created time

References iCreatedTime.

Referenced by ICalConverter::localToIcalVcal(), CTodo::toString(), CJournal::toString(), CEvent::toString(), CComponentDetails::toString(), and CBdayEvent::toString().

void CComponent::removeAlarm (  ) 

void CComponent::removeRecurrence (  ) 

remove recurrence compoennt

References pRecurrence.

Referenced by operator=(), and setRecurrence().

time_t CComponent::getTzOffset ( void   ) 

get Method to retrieve Tzoffset

void CComponent::setTzOffset ( time_t  offset  ) 

function to set the tzoffset

string CComponent::toString (  ) 

vector< string > CComponent::extractSubStrings ( string  sub,
string  by 
)

Function to parse substring based on a delimiter

extractSubStrings

Parameters:
string which needs to be parsed
Returns:
vector <strind> sub strings parsed and returned in to a vector Function to parse a substring in to string

Referenced by getRecurrenceProperties().

void CComponent::updateUntilInDB ( time_t  until,
int &  pErrorCode 
)

Parameters:
string sId Id of the component
time_t until value
int& reference to error code
Returns:
NONE
Function to update until value for repeating event which doesn't have unitl in its rrule. Until value will be updated when event view is opened for the first time.

Parameters:
string sId Id of the component
time_t until value
int& reference to error code
Returns:
NONE
Function to update until value for repeating event which doesn't have unitl in its rrule. Until value will be updated when event view is opened for the first time.

References CCalendarDB::execSQL(), CCalendarDB::Instance(), sId, and CCalendarDB::sqliteErrorMapper().

bool CComponent::updateAlarmTriggerTime ( time_t *  pOutInstanceTime  ) 

Update Alarm trigger time for upcoming event instance param pOutInstanceTime - pointer to time_t to recieve instance time the alarm is set for

Returns:
true if alarm is set for instnce false if no more instances

References generateInstanceTimes(), CAlarm::getDuration(), CAlarm::getTimeBefore(), CAlarm::getTrigger(), getUntil(), iDateStart, pAlarm, pRecurrence, and CAlarm::setTrigger().

Referenced by CCalendar::manageCookie(), CCalendar::registerAlarmForVisibleCalendar(), CCalendar::setNextAlarm(), and ICalConverter::toLocal().

void CComponent::setCalendarId ( int  iId  ) 

int CComponent::getCalendarId (  ) 

Parameters:
 None
Returns:
int: returns the calendar id
This function is called to get the calendar id.

References iCalId.

Referenced by CMulticalendar::getPrevNextComponent(), CTodo::toString(), CJournal::toString(), CEvent::toString(), CComponentDetails::toString(), toString(), and CBdayEvent::toString().

bool CComponent::generateYearlyInstanceTime ( time_t  viewBegin,
time_t  viewEnd,
vector< time_t > &  times 
) [private]

generateYearlyInstanceTime()

Parameters:
viewBegin lower range of current view
viewEnd higher range of current view
times vector to add generated event time
Returns:
bool result of the operation, true if time was found in interval and added to times vector, false otherwise
Function used to calculate the yearly recurrence date for short interval

References getDateStart(), getSummary(), CMulticalendar::getSystemTimeZone(), and CMulticalendar::MCInstance().

Referenced by generateInstanceTimes(), and getInstanceNumber().


Field Documentation

string CComponent::sId [private]

extractSubStrings

Parameters:
string which needs to be parsed
Returns:
vector <strind> sub strings parsed and returned in to a vector
Function to parse a substring in to string Component ID

Referenced by CComponent(), getId(), operator=(), toString(), and updateUntilInDB().

int CComponent::iCalId [private]

Calendar ID

Referenced by CComponent(), getCalendarId(), operator=(), and setCalendarId().

int CComponent::iType [private]

Component Type

Referenced by CComponent(), getType(), operator=(), setAlarm(), setType(), and toString().

int CComponent::iFlags [private]

Flags to identify the presence of recurrence/attendees etc.,

Referenced by CComponent(), getFlags(), operator=(), removeAlarm(), setFlags(), and toString().

int CComponent::iStatus [private]

time_t CComponent::iDateStart [private]

time_t CComponent::iDateEnd [private]

time_t CComponent::iLastModified [private]

Last modified date

Referenced by CComponent(), getLastModified(), setLastModified(), and toString().

time_t CComponent::iCreatedTime [private]

Component created time

Referenced by CComponent(), getCreatedTime(), and toString().

time_t CComponent::iuntil [private]

Recurrence until date

Referenced by CComponent(), getUntil(), and toString().

int CComponent::iAllDay [private]

All day event

Referenced by CComponent(), getAllDay(), operator=(), and toString().

string CComponent::szSummary [private]

Event summary

Referenced by CComponent(), getSummary(), operator=(), setSummary(), and toString().

string CComponent::szDescription [private]

Event description

Referenced by CComponent(), getDescription(), operator=(), setDescription(), and toString().

string CComponent::szLocation [private]

Event location

Referenced by CComponent(), getLocation(), operator=(), setLocation(), and toString().

string CComponent::szuid [private]

Event Uid

Referenced by getGUid(), and toString().

time_t CComponent::iStDate [private]

Start date of the interval of calculated recurrences

Referenced by CComponent(), and generateInstanceTimes().

time_t CComponent::iEndDate [private]

End date of the interval of calculated recurrences

Referenced by CComponent(), and generateInstanceTimes().

vector< time_t > CComponent::rTimes [private]

already calculated recurrences


The documentation for this class was generated from the following files:

Generated on Tue Jul 27 14:17:50 2010 for calendar-backend by  doxygen 1.5.6