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)
CAlarmgetAlarm ()
int getAllDay ()
bool setAllDay (int iAllDay)
vector< time_t > generateInstanceTimes (time_t viewBegin, time_t viewEnd)
int getDuration ()
bool getRecurrenceProperties ()
bool getAlarmProperties ()
virtual ~CComponent ()
string generateUid ()
void setCreatedTime (time_t iCreatedTime)
time_t getCreatedTime ()

Private Member Functions

vector< string > extractSubStrings (string SourceString, string byField)

Private Attributes

string sId
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

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::CComponent ( CComponent  ) 

Copy Constructor

CComponent::CComponent ( string  description  ) 

Overloaded Constructor

CComponent::CComponent ( string  summary,
time_t  tododue,
int  status 
)

Overloaded constructor

CComponent::CComponent ( string  summary,
string  description,
string  location,
time_t  dateStart,
time_t  dateEnd 
)

Overloaded Constructor

CComponent::CComponent ( string  szuid,
string  szDescription,
time_t  stDateStart 
)

overloaded Constructor

CComponent::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 
)

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::~CComponent (  )  [virtual]

Destructor for CComponent class.


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

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

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

bool CComponent::setId ( string  sId  ) 

Parameters:
: string sId Id of the string
Returns:
:bool (SUCCESS/FAILURE)
This function is used to set the id of the entry. Inside this procedure generateUid is called which will generate globally unique ID

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.

bool CComponent::setType ( int  num  ) 

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

int CComponent::getType (  ) 

Parameters:
:None 
Returns:
: int used to get type of entry
This function is used to get the type of the entry created.

bool CComponent::setFlags ( int  iflag  ) 

Parameters:
int iflag to indicate recurrence or alarm
Returns:
bool status of the operation

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.

bool CComponent::setSummary ( string  szSummary  ) 

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

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

bool CComponent::setDescription ( string  strDescription  ) 

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

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

bool CComponent::setLocation ( string  szLocation  ) 

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

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

bool CComponent::setStatus ( int  iStatus  ) 

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

int CComponent::getStatus (  ) 

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

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.

time_t CComponent::getDateStart (  ) 

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

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

time_t CComponent::getDateEnd (  ) 

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

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

bool CComponent::setRecurrence ( CRecurrence ptrRecur  ) 

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

CRecurrence * CComponent::getRecurrence (  ) 

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

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

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.

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.

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

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

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.

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.

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

CAlarm * CComponent::getAlarm (  ) 

Parameters:
NONE 
Returns:
CAlarm* pointer to CAlarm object
This function is used to get Alarm properties

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 )

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 )

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 retrieve the recurrence dates

int CComponent::getDuration (  ) 

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

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.

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

string CComponent::generateUid (  ) 

Parameters:
none 
Returns:
string UID
Function to generate the UID for the component

void CComponent::setCreatedTime ( time_t  iCreatedTime  ) 

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

time_t CComponent::getCreatedTime (  ) 

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

vector< string > CComponent::extractSubStrings ( string  SourceString,
string  byField 
) [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


Field Documentation

string CComponent::sId [private]

Component ID

int CComponent::iType [private]

Component Type

int CComponent::iFlags [private]

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

int CComponent::iStatus [private]

Status

time_t CComponent::iDateStart [private]

Start date for event

time_t CComponent::iDateEnd [private]

End date for event

time_t CComponent::iLastModified [private]

Last modified date

time_t CComponent::iCreatedTime [private]

Component created time

time_t CComponent::iuntil [private]

Recurrence until date

int CComponent::iAllDay [private]

All day event

string CComponent::szSummary [private]

Event summary

string CComponent::szDescription [private]

Event description

string CComponent::szLocation [private]

Event location

string CComponent::szuid [private]

Event Uid

CRecurrence* CComponent::pRecurrence [private]

CRecurrence class containment

CAlarm* CComponent::pAlarm [private]

CAlarm class containment


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