CCalendar Class Reference

This class has the API's to add/modify/delete the calendars and to add/modify/delete the components such as Event/Todo/Journal/Birthday's. More...

#include <CCalendar.h>


Public Member Functions

string getCacheEntry (time_t startDate, int &pErrorCode)
bool addCacheEntry (string sId, time_t startDate, int &pErrorCode)
bool deleteCacheEntry (time_t startDate, int &pErrorCode)
int getCacheTableCount (time_t inputDate, int &pErrorCode)
bool addCacheEntries (CComponent *pEntry, int &pErrorCode)
bool updateCacheEntry (string szId, time_t startDate, int &pErrorCode)
bool appendToIds (string Id, string &szIds)
string removeFromIds (string Id, string szIdStrings)
bool deleteCacheEntries (string szId, int eEntry, int &pErrorCode)
bool modifyCacheEntry (CComponent *oldEntry, int &pErrorCode)
void checkIfMultiDayEvent (CComponent *pEntry, vector< time_t > &vStartdates)
 CCalendar (CCalendar &ref)
const CCalendaroperator= (const CCalendar &right)
 CCalendar (int iCalId, string szName, CalendarColour iColour, bool fIsReadOnly, bool fIsVisible, CalendarType iCalType, string szCalendarTune)
 CCalendar (string szName, CalendarColour iColour, bool fIsReadOnly, bool fIsVisible, CalendarType iCalType, string szCalendarTune, string szCalendarVersion)
vector< CComponent * > getAllEventsTodos (int iStDate, int iEndDate, int iLimit, int &iOffset, int &pErrorCode)
 CCalendar ()
bool setCalendarColor (CalendarColour iCalendarColor)
CalendarColour getCalendarColor ()
bool setCalendarName (string szName)
string getCalendarName ()
bool setCalendarId (int iId)
int getCalendarId ()
bool setCalendarType (CalendarType iCalType)
void setProfileType (SyncProfileType iProfile)
SyncProfileType getProfileType ()
CalendarType getCalendarType ()
bool setCalendarReadOnly (bool fIsReadOnly)
bool IsReadOnly ()
bool setCalendarShown (bool fIsVisible)
bool IsShown ()
bool modifyEvent (CEvent *pEvent, int &pErrorCode)
bool modifyBirthDay (CBdayEvent *pBday, int &pErrorCode)
bool modifyJournal (CJournal *pJournal, int &pErrorCode)
bool modifyTodo (CTodo *pTodo, int &pErrorCode)
bool addEvent (CEvent *pEvent, int &pErrorCode)
bool addBirthDay (CBdayEvent *pBday, int &pErrorCode)
bool addTodo (CTodo *ptrTodo, int &pErrorCode)
bool addJournal (CJournal *ptrJournal, int &pErrorCode)
bool deleteEvent (string sEventID, int &pErrorCode)
bool deleteBirthDay (int iUid, int &pErrorCode)
bool deleteTodo (string sTodoID, int &pErrorCode)
bool deleteJournal (string sJournalID, int &pErrorCode)
void deleteComponent (string sId, int &pErrorCode)
vector< long > getCookie (string ietjId, int &pErrorCode)
string getCalendarVersion ()
void setCalendarVersion (string szCalendarVersion)
bool registerAlarmForVisibleCalendar (int &perrorCode)
 ~CCalendar ()
vector< string > getIdList (int iCompType, int &pErrorCode)
CEventgetEvent (string sComponentID, int &pErrorCode)
CTodogetTodo (string szComponentID, int &pErrorCode)
CJournalgetJournal (string sComponentID, int &pErrorCode)
bool checkDuplicateEntry (CComponent *pEntry, int iType, int &pErrorCode)
vector< CEvent * > getDetailedEventList (int &pErrorCode)
vector< CTodo * > getTodoListDetailed (int &pErrorCode)
vector< CJournal * > getJournalListDetailed (int &pErrorCode)
bool deleteBirthDay (string szUID, int &pErrorCode)
vector< CComponent * > getComponents (int iCalendarID, int iStartDate, int iEndDate, int &pErrorCode)
vector< CComponent * > getComponents (int iCalendarID, int iStartDate, int iEndDate, int iLimit, int iOffset, int &pErrorCode)
int updateTrash (int iCalendarID, string iComponentID, int iComponentType, time_t iDeletedTime, int &pErrorCode)
vector< CEvent * > getAllAddedEvents (int iDate, int &pErrorCode)
vector< CTodo * > getAllAddedTodos (int iDate, int &pErrorCode)
vector< CJournal * > getAllAddedJournals (int iDate, int &pErrorCode)
vector< CComponent * > getAllAddItems (int iDate, int &pErrorCode)
vector< CEvent * > getAllModifiedEvents (int iDate, int &pErrorCode)
vector< CTodo * > getAllModifiedTodos (int iDate, int &pErrorCode)
vector< CJournal * > getAllModifiedJournals (int iDate, int &pErrorCode)
vector< CComponent * > getAllModifiedItems (int iDate, int &pErrorCode)
vector< string > getAllDeletedItems (int iDate, int iType, int &pErrorCode)
int exportCalendarEntries (string szFilename, int &pErrorCode)
bool setNextAlarm (string sComponentId, int iType, int &pErrorCode)
void setCalendarTune (string szCalendarTune)
string getCalendarTune ()
bool addParameters (map< string, vector< CParameters * > > hashMap, string sId, ACTION iAction, int &pErrorCode, bool clearHashMap=true)
bool addXProperties (vector< CProperties * > vXProp, string sId, ACTION iAction, int &pErrorCode)
string getExternalToLocalId (string sId, bool fetchLocal, int &pErrorCode)
bool addMapTableInfo (string sLocalId, string sExternalId, int &pErrorCode)
vector< string > getAllDeletedEvents (int iLastSyncDate, int &pErrorCode)
vector< string > getAllDeletedJournals (int iLastSyncDate, int &pErrorCode)
vector< string > getAllDeletedTodos (int iLastSyncDate, int &pErrorCode)
bool destroyExistingValidAlarms (int &pErrorCode)
bool checkEntryExist (string szTable, string iId, int &pErrorCode)
CComponentgetEntry (string sCompId, int iType, int &pErrorCode)
vector< CEvent * > getDetailedBdayList (int &pErrorCode)
CEventgetBirthDayEvent (string sCompId, int &pErrorCode)
void deleteComponents (vector< string > idList, int &ErrorCode)
void modifyComponents (vector< CComponent * > &compList, int &ErrorCode)
vector< string > addComponents (vector< CComponent * > &compList, vector< string > &duplicateIds, int &ErrorCode)
vector< CEvent * > getEvents (int &pErrorCode)
vector< CTodo * > getTodos (int &pErrorCode)
vector< CJournal * > getJournals (int &pErrorCode)
string toString ()

Private Member Functions

vector< CCache * > getDeletedCacheTableInfo (string sCompId, int &pErrorCode)
bool updateAttendeesForComponent (CComponentDetails *pCompDetails, int &pErrorCode)
bool deleteAttendeesForComponent (CComponentDetails *pCompDetails, int &pErrorCode)
bool updateOrganizerForComponent (CComponentDetails *pCompDetails, int &pErrorCode)
bool deleteOrganizerForComponent (CComponentDetails *pCompDetails, int &pErrorCode)
bool updateXPropertiesForComponent (CComponentDetails *pEntry, int &pErrorCode)
bool deleteXPropertiesForComponent (CComponentDetails *pEntry, int &pErrorCode)
bool updateParametersForComponent (CComponentDetails *pEntry, int &pErrorCode)
bool deleteParametersForComponent (CComponentDetails *pEntry, int &pErrorCode)
bool deregisterAlarm (CComponentDetails *pCompDetails, int &pErrorCode)
bool checkFieldinTable (string szTable, string szField, string szValue)
vector< CComponent * > getRecursiveEventsInRange (int iStartDate, int iEndDate, vector< CComponent * >vListEntry, int &pErrorCode)
vector< string > getChangeIds (int iComponentType, int iChangeType, int iDate, int &pErrorCode)
bool entrySetModifiedTime (CComponent *pEntry, int &pErrorCode)
template<class comp>
bool addCompDetails (sqlite3_stmt *pStmt, comp *cDet, int &pErrorCode)
bool addEventCompDetails (CEvent *pEvent, int &pErrorCode)
bool addTodoCompDetails (CTodo *ptrTodo, int &pErrorCode)
bool addJournalCompDetails (CJournal *ptrJournal, int &pErrorCode)
bool manageCookie (const ACTION iAction, CComponent *pcomp, int &pErrorCode)
bool addAlarm (CAlarm *ptrAlarm, ACTION iAction, string sId, int &pErrorCode)
bool addRecurrence (CRecurrence *ptrRecur, string sId, int &pErrorCode)
bool modifyRecurrence (CRecurrence *ptrRecur, string sId, int &pErrorCode)
bool addAttendeeDetails (vector< CAttendee * >vAttendeeList, string sId, int iType, ACTION iAction, int &pErrorCode)
bool addOrganizer (COrganizer *ptrOrganizer, string sId, int iType, ACTION iAction, int &pErrorCode)
template<class ent>
int addComponent (ent *pEvent, ACTION iAction, int &pErrorCode)

Private Attributes

string szName
CalendarColour iColor
bool fReadOnly
bool fIsVisible
int iCalId
CalendarType iCalType
string szCalendarTune
string szCalendarVersion
SyncProfileType iProfileType


Detailed Description

This class has the API's to add/modify/delete the calendars and to add/modify/delete the components such as Event/Todo/Journal/Birthday's.

CCalendar class


Constructor & Destructor Documentation

CCalendar::CCalendar ( CCalendar ref  ) 

copy Constructor for CCalendarClass

Copy Constructor for CCalendarClass

References fIsVisible, fReadOnly, iCalId, iCalType, iColor, iProfileType, szCalendarTune, szCalendarVersion, and szName.

CCalendar::CCalendar ( int  iCalId,
string  szName,
CalendarColour  iColor,
bool  fReadOnly,
bool  fIsVisible,
CalendarType  iCalType,
string  szCalendarTune 
)

Parameters:
 int iCalId represents calendar id
 string szName represents calendar name
 CalendarColour iColor represents calendar color
 bool fIsReadOnly represents whether calendar read only or not
 bool fIsVisbile represents whether calendar visible/invisible
 CalendarType iCalType represents type of the calendar
 string szCalendarTune represents ring tone of the calendar
This is parameterized constructor for Calendar class. it initializes the name,color,id,readonly,visible parameters and type of the calendar.

Calendar

Parameters:
iCalid integer clendar Id
name represents calendar name
color represents calendar color
readonly represents whether calendar read only or not
isvisbile represents whether calendar visible/invisible
calendarTune represents calendarTune
This is parameterized constructor for Calendar class. it initializes the name,color,id,readonly ,visible , calendartype and calendarTune parameters of the calendar.

CCalendar::CCalendar ( string  szName,
CalendarColour  iColor,
bool  fReadOnly,
bool  fIsVisible,
CalendarType  iCalType,
string  szCalendarTune,
string  szCalendarVersion 
)

Parameters:
 string szName represents calendar name
 CalendarColour iColor represents calendar color
 bool fIsReadOnly represents whether calendar read only or not
 bool fIsVisbile represents whether calendar visible/invisible
 CalendarType iCalType represents type of the calendar
 string szCalendarTune represents ring tone of the calendar
 string szCalendarVersion represents Version of the calendar
This is parameterized constructor for Calendar class. it initializes the name,color,id,readonly,visible parameters and type of the calendar.

Calendar

Parameters:
fname represents calendar name
fcolor represents calendar color
freadonly represents whether calendar read only or not
fisvisbile represents whether calendar visible/invisible
calendarTune represents calendarTune
This is parameterized constructor for Calendar class. it initializes the name,color,readonly and visible parameters of the calendar.

CCalendar::CCalendar (  ) 

Parameters:
 None
Returns:
: None
This is default constructor of Calendar class. it calls initCalendar() to set default values to member variables.

Calendar

Parameters:
None 
Returns:
None
This is default constructor of Calendar class.

CCalendar::~CCalendar (  ) 

~Calendar

Parameters:
None 
Returns:
None
This is destructor for the Calendar class.

~Calendar

Parameters:
None 
Returns:
None
This is destructor for the Calendar class.


Member Function Documentation

bool CCalendar::addCacheEntry ( string  sId,
time_t  startDate,
int &  pErrorCode 
)

Adds a single Id into cache table at specified start date

References CCalendarDB::getDb(), CCalendarDB::insertRows(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().

Referenced by addCacheEntries().

bool CCalendar::deleteCacheEntry ( time_t  startDate,
int &  pErrorCode 
)

int CCalendar::getCacheTableCount ( time_t  inputDate,
int &  pErrorCode 
)

Checks if entries exist for a given date

References CCalendarDB::getRecords(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().

Referenced by addCacheEntries().

bool CCalendar::addCacheEntries ( CComponent pEntry,
int &  pErrorCode 
)

Adds mutiple entries for a recurrent event and single entry for events and to do TODO: No rollback mechanism and error scenarios handled TODO: To check impact of sync when adding, deleting, modifying

References addCacheEntry(), checkIfMultiDayEvent(), CComponent::generateInstanceTimes(), getCacheTableCount(), CComponent::getId(), and CComponent::getRecurrence().

string CCalendar::removeFromIds ( string  Id,
string  szIdStrings 
)

Remove Id from comma separated Id string

Referenced by deleteCacheEntries().

bool CCalendar::deleteCacheEntries ( string  szId,
int  eEntry,
int &  pErrorCode 
)

Remove entries from cache table TODO: Use enum input param

References deleteCacheEntry(), and removeFromIds().

bool CCalendar::modifyCacheEntry ( CComponent oldEntry,
int &  pErrorCode 
)

Modify the Cache entry

void CCalendar::checkIfMultiDayEvent ( CComponent pEntry,
vector< time_t > &  vStartdates 
)

check if the event is multiday

References CComponent::getDateEnd(), and CComponent::getDateStart().

Referenced by addCacheEntries().

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

overloaded assignment operator for CCalendar class

Overloaded assignment operator for CCalendar class

References fIsVisible, fReadOnly, iCalId, iCalType, iColor, iProfileType, szCalendarTune, szCalendarVersion, and szName.

vector< CComponent * > CCalendar::getAllEventsTodos ( int  iStDate,
int  iEndDate,
int  iLimit,
int &  iOffset,
int &  pErrorCode 
)

Parameters:
: stDate to do conditional fetching based on start date. -1 in case of no conditions
: endDate to do conditional fetching based on end date. -1 in case of no conditions
: limit limit for number of events fetched by the calenadr
int * pErrorCode error code: CALENDAR_OPERATION_SUCCESSFUL- fetching is successful and can be continued; CALENDAR_FETCH_NOITEMS- fetching is finished (no more items found in DB); other error code- fetching is failed.
Returns:
: Vector for CComponent. If pErrorCode equals to CALENDAR_OPERATION_SUCCESSFUL, but vector is empty, no component (from offset to limit) meets the conditions, continue fetching This function is used to get all the Events /Todos /Bdays associated with particular Calendar progressively It is an overloaded API for get componets used to fetch Components in bursts of specified size
Parameters:
: stDate to do conditional fetching based on start date. -1 in case of no conditions
: endDate to do conditional fetching based on end date. -1 in case of no conditions
: limit limit for number of events fetched by the calenadr
int * pErrorCode error code: CALENDAR_OPERATION_SUCCESSFUL- fetching is successful and can be continued; CALENDAR_FETCH_NOITEMS- fetching is finished (no more items found in DB); other error code- fetching is failed.
Returns:
: Vector for CComponent. If pErrorCode equals to CALENDAR_OPERATION_SUCCESSFUL, but vector is empty, no component (from offset to limit) meets the conditions, continue fetching This function is used to get all the Events /Todos /Bdays associated with particular Calendar progressively It is an overloaded API for get componets used to fetch Components in bursts of specified size

References CComponent::getAlarmProperties(), getCalendarId(), CComponent::getFlags(), CComponent::getId(), CComponent::getInstanceNumber(), CCalendarDB::getRecords(), CComponent::getRecurrenceProperties(), CMulticalendar::getSystemTimeZone(), CComponent::getType(), iCalId, CCalendarDB::Instance(), CMulticalendar::MCInstance(), CComponent::setAllDay(), CComponent::setCalendarId(), CComponent::setCreatedTime(), CComponent::setDescription(), CComponent::setGUid(), CComponent::setId(), CComponent::setLastModified(), CComponent::setLocation(), CComponent::setStatus(), CComponent::setSummary(), CComponent::setTzid(), CComponent::setUntil(), CCalendarDB::sqliteErrorMapper(), and CComponent::toString().

Referenced by CMulticalendar::getAllEventsTodos().

bool CCalendar::setCalendarColor ( CalendarColour  iColor  ) 

Parameters:
iCalendarColour,: Calendar Color to be set from any one of the following COLOUR_RED, COLOUR_GREEN, COLOUR_BLUE, COLOUR_PURPLE, COLOUR_YELLOW
Returns:
: bool (SUCCESS/FAILURE)
This function is called to set the color of calendar. it sets the strColor as the calendar color.

setCalendarColor

Parameters:
strColor Calendar Color to be set
Returns:
bool (SUCCESS/FAILURE)
This function is called to set the color of calendar. it sets the strColor as the calendar color.

Referenced by CMulticalendar::addCalendar(), CMulticalendar::getCalendarById(), CMulticalendar::getListCalFromMc(), and CMulticalendar::modifyCalendar().

CalendarColour CCalendar::getCalendarColor (  ) 

Parameters:
 None
Returns:
: returns calendar color as a Enumeration COLOUR_RED, COLOUR_GREEN, COLOUR_BLUE, COLOUR_PURPLE, COLOUR_YELLOW
This function is called to get the calendar color.

getCalendarColor

Parameters:
None 
Returns:
returns calendar color as an Enumeration This function is called to get the calendar color.

References iColor.

Referenced by CMulticalendar::addCalendar(), CMulticalendar::getUnusedCalendarColor(), CMulticalendar::modifyCalendar(), and toString().

bool CCalendar::setCalendarName ( string  szName  ) 

Parameters:
string szName: Calendar Name to be set
Returns:
: bool (SUCCESS/FAILURE)
This function is called to set the name of calendar. it sets the strName as the calendar name.

setCalendarName

Parameters:
strName Calendar Name to be set
Returns:
bool (SUCCESS/FAILURE)
This function is called to set the name of calendar. it sets the strName as the calendar name.

Referenced by CMulticalendar::setCalendarName().

string CCalendar::getCalendarName (  ) 

Parameters:
 None
Returns:
: returns calendar name as a char pointer
This function is called to get the calendar name.

getCalendarName

Parameters:
None 
Returns:
returns calendar name as a char pointer
This function is called to get the calendar name.

References szName.

Referenced by CMulticalendar::addCalendar(), CMulticalendar::modifyCalendar(), and toString().

bool CCalendar::setCalendarId ( int  iId  ) 

Parameters:
int iId: Calendar id to be set
Returns:
: bool (SUCCESS/FAILURE)
This function is called to set the id of calendar. it sets the id as the calendarid.

setCalendarId

Parameters:
id Calendar id to be set
Returns:
bool (SUCCESS/FAILURE)
This function is called to set the id of calendar. it sets the id as the calendarid.

References iCalId.

Referenced by CMulticalendar::addCalendar(), CMulticalendar::getCalendarById(), and CMulticalendar::getListCalFromMc().

int CCalendar::getCalendarId (  ) 

bool CCalendar::setCalendarType ( CalendarType  iCalType  ) 

Parameters:
 CalendarType iCaltype: Calendar Type to be set
Returns:
: bool (SUCCESS/FAILURE)
This function is called to set the type of calendar 0 - Local calendar 1 - Sync calendar 2 - Smart calendar

setCalendarType

Parameters:
id,: Calendar Type to be set
Returns:
bool (SUCCESS/FAILURE) This function is called to set the type of calendar 0 - Local calendar 1 - Sync calendar 2 - Smart calendar

Referenced by CMulticalendar::getCalendarById(), CMulticalendar::getListCalFromMc(), and CMulticalendar::modifyCalendar().

void CCalendar::setProfileType ( SyncProfileType  iProfile  ) 

Parameters:
SyncProfileType - Profile type of calendar
Returns:
NONE
Function to set profile Type reuired from maesync point of view

Parameters:
SyncProfileType - Profile type of calendar
Returns:
NONE
Function to set profile Type required from maesync point of view

Referenced by CMulticalendar::getCalendarById(), and CMulticalendar::getListCalFromMc().

SyncProfileType CCalendar::getProfileType (  ) 

Parameters:
NONE 
Returns:
SyncProfileType - Profile type of calendar
Function to get profile Type reuired from maesync point of view

Parameters:
NONE 
Returns:
SyncProfileType - Profile type of calendar
Function to get profile Type required from maesync point of view

Referenced by CMulticalendar::addCalendar(), CMulticalendar::modifyCalendar(), and toString().

CalendarType CCalendar::getCalendarType (  ) 

Parameters:
 None
Returns:
: CalendarType the calendar type 0 - Local calendar 1 - Sync calendar 2 - Smart calendar
This function is called to get the calendar type.

getCalendarType

Parameters:
None 
Returns:
: returns the calendar type
This function is called to get the calendar type

References iCalType.

Referenced by CMulticalendar::addCalendar(), CMulticalendar::clearCalendar(), CMulticalendar::deleteCalendar(), destroyExistingValidAlarms(), exportCalendarEntries(), CMulticalendar::getLatestComponent(), CMulticalendar::getPrevNextComponent(), CMulticalendar::modifyCalendar(), and registerAlarmForVisibleCalendar().

bool CCalendar::setCalendarReadOnly ( bool  fFlag  ) 

Parameters:
bool fIsReadonly: represents whether calendar is readonly
Returns:
: bool (SUCCESS/FAILURE)
This function is called to set whether calendar is readonly.

setCalendarReadOnly

Parameters:
flag represents whether calendar is readonly
Returns:
bool (SUCCESS/FAILURE)
This function is called to set whether calendar is readonly.

References fReadOnly.

Referenced by CMulticalendar::modifyCalendar().

bool CCalendar::IsReadOnly (  ) 

Parameters:
 None
Returns:
: bool TRUE/FALSE whether calendar is readonly.
This function is called to know whether calendar is readonly.

IsReadOnly

Parameters:
None 
Returns:
returns whether calendar is readonly as a bool
This function is called to know whether calendar is readonly.

References fReadOnly.

Referenced by CMulticalendar::addCalendar(), CMulticalendar::modifyCalendar(), and toString().

bool CCalendar::setCalendarShown ( bool  fFlag  ) 

Parameters:
 bool isVisible: represents whether calendar is visible or not
Returns:
: bool (SUCCESS/FAILURE)
This function is called to set whether calendar is visible.

setCalendarShown

Parameters:
flag represents whether calendar is visible or not
Returns:
bool (SUCCESS/FAILURE)
This function is called to set whether calendar is visible.

References fIsVisible.

Referenced by CMulticalendar::modifyCalendar().

bool CCalendar::IsShown (  ) 

Parameters:
 None
Returns:
: returns the visibility of the calendar
This function is called to know calendar visibility .

IsShown

Parameters:
None 
Returns:
returns the visibility of the calendar
This function is called to know calendar visibility .

References fIsVisible.

Referenced by CMulticalendar::addCalendar(), addEvent(), addTodo(), CMulticalendar::getLatestComponent(), CMulticalendar::getTodaysAllDay(), modifyBirthDay(), CMulticalendar::modifyCalendar(), modifyEvent(), modifyTodo(), CMulticalendar::setNextAlarm(), and toString().

bool CCalendar::modifyEvent ( CEvent pEntry,
int &  pErrorCode 
)

Parameters:
 CEvent* pEvent: pointer to calEvent
 int& reference to error int to throw some error code.
Returns:
: bool
This function is called to modify the event entry record in the database. Incase the Event is moved from one calendar to the other then deleteEvent/addEvent APIs should be used instead of modifyEvent.

modifyEvent

Parameters:
ptrEntry pointer to calEvent
int * pErrorCode error code if any
Returns:
bool
This function is called to modify the event entry record in the database.

References addAlarm(), addAttendeeDetails(), addComponent(), addOrganizer(), addParameters(), addRecurrence(), addXProperties(), checkEntryExist(), CComponent::getAlarm(), CComponentDetails::getAttachments(), CComponentDetails::getAttendees(), CComponentDetails::getCategories(), CComponentDetails::getClas(), CComponentDetails::getComments(), CComponentDetails::getContact(), getCookie(), CComponentDetails::getDateStamp(), CCalendarDB::getDb(), CEvent::getGeo(), CComponentDetails::getHashMap(), CComponent::getId(), CComponentDetails::getOrganizer(), CEvent::getPriority(), CComponent::getRecurrence(), CComponentDetails::getRelated(), CComponentDetails::getResources(), CComponentDetails::getSequence(), CEvent::getTransparency(), CComponent::getType(), CComponentDetails::getUid(), CComponentDetails::getUrl(), CComponentDetails::getXProperties(), CCalendarDB::Instance(), IsShown(), manageCookie(), modifyRecurrence(), CComponent::removeAlarm(), CCalendarDB::sqliteErrorMapper(), and CCalendarDB::updateDB().

Referenced by addEvent(), modifyComponents(), CMulticalendar::modifyEvent(), and setNextAlarm().

bool CCalendar::modifyBirthDay ( CBdayEvent pBday,
int &  pErrorCode 
)

Parameters:
 CBdayEvent* pBday: pointer to CBdayEvent
 int * pErrorCode error code if any
Returns:
: bool (SUCCESS/FAILURE)
This function is called to modify the birthday record in the database.

modifyBirthDay

Parameters:
pBday pointer to CBdayEvent object
int * pErrorCode error code if any
Returns:
bool (SUCCESS/FAILURE)
This function is called to modify the birthday record in the database.

References addAlarm(), addComponent(), addRecurrence(), checkEntryExist(), CComponent::getAlarm(), CBdayEvent::getBirthDate(), getCookie(), CCalendarDB::getDb(), CComponent::getId(), CComponent::getRecurrence(), CCalendarDB::Instance(), IsShown(), manageCookie(), modifyRecurrence(), CComponent::removeAlarm(), CCalendarDB::sqliteErrorMapper(), and CCalendarDB::updateDB().

Referenced by CMulticalendar::modifyBirthDay().

bool CCalendar::modifyJournal ( CJournal pEntry,
int &  pErrorCode 
)

Parameters:
 CJournal* pJournal: pointer to calJournal
 int * pErrorCode error code if any
Returns:
: bool
This function is called to modify the journal entry record in the database. Incase the Todo is moved from one calendar to the other then deleteJournal/addJournal APIs should be used instead of modifyJournal.

modifyJournal

Parameters:
ptrEntry pointer to CJournal
int * pErrorCode error code if any
Returns:
NONE * This function is called to modify the journal entry record in the database.

References addAttendeeDetails(), addComponent(), addOrganizer(), addParameters(), addXProperties(), CComponentDetails::getAttachments(), CComponentDetails::getAttendees(), CComponentDetails::getCategories(), CComponentDetails::getClas(), CComponentDetails::getComments(), CComponentDetails::getContact(), CComponentDetails::getDateStamp(), CCalendarDB::getDb(), CComponentDetails::getHashMap(), CComponent::getId(), CComponent::getLastModified(), CComponentDetails::getOrganizer(), CComponentDetails::getRelated(), CComponentDetails::getResources(), CComponentDetails::getSequence(), CComponent::getType(), CComponentDetails::getUid(), CComponentDetails::getUrl(), CComponentDetails::getXProperties(), CCalendarDB::Instance(), CComponent::setLastModified(), CCalendarDB::sqliteErrorMapper(), and CCalendarDB::updateDB().

Referenced by addJournal(), modifyComponents(), and CMulticalendar::modifyJournal().

bool CCalendar::modifyTodo ( CTodo pEntry,
int &  pErrorCode 
)

Parameters:
 CTodo* pTodo: pointer to calTodo
 int * pErrorCode error code if any
Returns:
: bool
This function is called to modify the todo entry record in the database. Incase the Todo is moved from one calendar to the other then deleteTodo/addTodo APIs should be used instead of modifyTodo.

modifyTodo

Parameters:
ptrEntry pointer to calTodo
int * pErrorCode error code if any
Returns:
bool This function is called to modify the todo entry record in the database.

References addAlarm(), addComponent(), addRecurrence(), checkEntryExist(), CComponent::getAlarm(), CComponentDetails::getAttachments(), CComponentDetails::getAttendees(), CComponentDetails::getCategories(), CComponentDetails::getClas(), CComponentDetails::getComments(), CTodo::getCompleted(), CComponentDetails::getContact(), CComponentDetails::getDateStamp(), CCalendarDB::getDb(), CComponentDetails::getHashMap(), CComponent::getId(), CComponentDetails::getOrganizer(), CTodo::getPercentComplete(), CTodo::getPriority(), CComponent::getRecurrence(), CComponentDetails::getRelated(), CComponentDetails::getResources(), CComponentDetails::getSequence(), CComponent::getStatus(), CComponent::getType(), CComponentDetails::getUid(), CComponentDetails::getUrl(), CComponentDetails::getXProperties(), CCalendarDB::Instance(), IsShown(), manageCookie(), modifyRecurrence(), CTodo::setCompleted(), CCalendarDB::sqliteErrorMapper(), and CCalendarDB::updateDB().

Referenced by addTodo(), modifyComponents(), CMulticalendar::modifyTodo(), and setNextAlarm().

bool CCalendar::addEvent ( CEvent pEvent,
int &  pErrorCode 
)

Parameters:
 CEvent* pEvent: calEvent pointer
 int * pErrorCode error code if any
Returns:
: bool
This function is called when an event entry is to be added. it adds an event(provided by calEvent pointer) into database. In successful scenario Id of the newly added event is set in pEvent , can be retrieved using pEvent->getId().

addEvent

Parameters:
pEvent calEvent pointer
int * pErrorCode error code if any
Returns:
bool
This function is called when an event entry is to be added. it adds an event(provided by calEvent pointer) into database

References addAlarm(), addAttendeeDetails(), addComponent(), addEventCompDetails(), addOrganizer(), addParameters(), addRecurrence(), addXProperties(), checkDuplicateEntry(), CComponent::getAlarm(), CComponentDetails::getAttendees(), getCalendarId(), CComponent::getDateEnd(), CComponent::getDateStart(), CComponentDetails::getHashMap(), CComponent::getId(), CComponentDetails::getOrganizer(), CComponent::getRecurrence(), CComponentDetails::getXProperties(), IsShown(), manageCookie(), modifyEvent(), and CComponent::removeAlarm().

Referenced by addComponents(), and CMulticalendar::addEvent().

bool CCalendar::addBirthDay ( CBdayEvent pBday,
int &  pErrorCode 
)

Parameters:
 CBdayEvent *pBdayendar: CBdayEvent pointer
 int * pErrorCode error code if any
Returns:
: bool (SUCCESS/FAILURE)
This function is called when an birthday entry is to be added. In successful scenario Id of the newly added event is set in pBday , can be retrieved using pBday->getId().

addBirthDay

Parameters:
pBday - pointer to CBdayEvent object
int * pErrorCode error code if any
Returns:
boolean SUCCESS/FAILURE
This function is called to add a new birthday data into the database.

References addComponent(), addMapTableInfo(), addRecurrence(), CBdayEvent::getBirthDate(), getExternalToLocalId(), CComponent::getId(), CComponent::getRecurrence(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().

Referenced by CMulticalendar::addBirthdays().

bool CCalendar::addTodo ( CTodo ptrTodo,
int &  pErrorCode 
)

Parameters:
 CTodo* ptrTodo: calTodo pointer
 int * pErrorCode error code if any
Returns:
: bool
This function is called when a todo entry is to be added. it adds a todo(provided by calTodo pointer) into database. In successful scenario Id of the newly added todo is set in ptrTodo , can be retrieved using ptrTodo->getId().

addTodo

Parameters:
ptrTodo calTodo pointer
int * pErrorCode error code if any
Returns:
bool
This function is called when a todo entry is to be added. it adds a todo(provided by calTodo pointer) into database

References addAlarm(), addAttendeeDetails(), addComponent(), addOrganizer(), addParameters(), addRecurrence(), addTodoCompDetails(), addXProperties(), checkDuplicateEntry(), CComponent::getAlarm(), CComponentDetails::getAttendees(), CComponentDetails::getHashMap(), CComponent::getId(), CComponentDetails::getOrganizer(), CComponent::getRecurrence(), CComponentDetails::getXProperties(), IsShown(), manageCookie(), modifyTodo(), and CComponent::removeAlarm().

Referenced by addComponents(), and CMulticalendar::addTodo().

bool CCalendar::addJournal ( CJournal ptrJournal,
int &  pErrorCode 
)

Parameters:
ptrJournal,: calJournal pointer
int * pErrorCode error code if any
Returns:
: bool
This function is called when a journal entry is to be added. it adds a journal(provided by calJournal pointer) into database. In successful scenario Id of the newly added Journal is set in ptrJournal , can be retrieved using ptrJournal->getId().

addJournal

Parameters:
ptrJournal calJournal pointer
int * pErrorCode error code if any
Returns:
bool
This function is called when a journal entry is to be added. it adds a journal(provided by calJournal pointer) into database

References addAttendeeDetails(), addComponent(), addJournalCompDetails(), addOrganizer(), addParameters(), addXProperties(), checkDuplicateEntry(), CComponentDetails::getAttendees(), CComponentDetails::getHashMap(), CComponent::getId(), CComponentDetails::getOrganizer(), CComponentDetails::getXProperties(), and modifyJournal().

Referenced by addComponents(), and CMulticalendar::addJournal().

bool CCalendar::deleteEvent ( string  sEtjId,
int &  pErrorCode 
)

Parameters:
string sEventID: eventId to be deleted
int * pErrorCode error code if any
Returns:
: bool
This function is called when an event is to be deleted. it deletes an event(provided by eventId) from database.

deleteEvent

Parameters:
sEtjId eventId to be deleted
int * pErrorCode error code if any
Returns:
bool
This function is called when an event is to be deleted. it deletes an event(provided by eventId) from database

References CAlarm::deleteAlarmEvent(), getCalendarId(), getCookie(), CCalendarDB::getDb(), CCalendarDB::Instance(), CCalendarDB::sqliteErrorMapper(), CCalendarDB::updateDB(), and updateTrash().

Referenced by deleteComponent(), and CMulticalendar::deleteEvent().

bool CCalendar::deleteBirthDay ( int  iUid,
int &  pErrorCode 
)

Parameters:
int iUid: Unique UID for birthday contacts from Ebook db.
int * pErrorCode error code if any
Returns:
: bool (SUCCESS/FAILURE)
Function used to delete birthday record from database.

Referenced by CMulticalendar::deleteBirthdays().

bool CCalendar::deleteTodo ( string  sEtjId,
int &  pErrorCode 
)

Parameters:
string todoid: todoid to be deleted
int * pErrorCode error code if any
Returns:
:bool
This function is called when a todo entry is to be deleted. it deletes a todo(provided by todoid) from database.

deleteTodo

Parameters:
sEtjId todoid to be deleted
int * pErrorCode error code if any
Returns:
bool
This function is called when a todo entry is to be deleted. it deletes a todo(provided by todoid) from database

References CAlarm::deleteAlarmEvent(), getCalendarId(), getCookie(), CCalendarDB::getDb(), CCalendarDB::Instance(), CCalendarDB::sqliteErrorMapper(), CCalendarDB::updateDB(), and updateTrash().

Referenced by deleteComponent(), and CMulticalendar::deleteTodo().

bool CCalendar::deleteJournal ( string  sJournalId,
int &  pErrorCode 
)

Parameters:
string sJournalid: journalid to be deleted
int * pErrorCode error code if any
Returns:
: NONE
This function is called when a journal entry is to be deleted.

deleteJournal

Parameters:
iJournalId iJournalId to be deleted
int * pErrorCode error code if any
Returns:
bool
This function is called when a journal entry is to be deleted. it deletes a journal(provided by journalid) from database

References getCalendarId(), CCalendarDB::getDb(), CCalendarDB::Instance(), CCalendarDB::sqliteErrorMapper(), CCalendarDB::updateDB(), and updateTrash().

Referenced by deleteComponent(), and CMulticalendar::deleteJournal().

void CCalendar::deleteComponent ( string  sId,
int &  pErrorCode 
)

Parameters:
string sId: id of the component to be deleted
int * pErrorCode error code if any
Returns:
: NONE
Function deletes component from DB based on Component ID.

deleteComponent

Parameters:
sId of the component to be deleted
int * pErrorCode error code if any
Returns:
NONE
Function deletes component from DB based on Component ID

References deleteEvent(), deleteJournal(), deleteTodo(), CCalendarDB::getRecords(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().

Referenced by deleteComponents().

vector< long > CCalendar::getCookie ( string  ietjId,
int &  pErrorCode 
)

Parameters:
string etjId: id of event/todo
int * pErrorCode error code if any
Returns:
: vector of long ,cookie id is unique per alarm
Function used to get cookie vector from Databse for a particular event ID .

References CCalendarDB::getRecords(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().

Referenced by deleteBirthDay(), deleteEvent(), deleteTodo(), destroyExistingValidAlarms(), manageCookie(), modifyBirthDay(), and modifyEvent().

string CCalendar::getCalendarVersion (  ) 

Parameters:
none 
Returns:
string calendar version number
Function to retrieve Calendar version

getCalendarVersion

Parameters:
none 
Returns:
string calendar version number Function to retrieve Calendar version

Referenced by CMulticalendar::addCalendar(), and CMulticalendar::modifyCalendar().

void CCalendar::setCalendarVersion ( string  szCalendarVersion  ) 

Parameters:
string szCaeldnarVersion
Returns:
none
Function to set Caelndar version

setCalendarVersion

Parameters:
string szCaeldnarVersion
Returns:
none Function to set Caelndar version

Referenced by CMulticalendar::getCalendarById(), CMulticalendar::getListCalFromMc(), and CMulticalendar::modifyCalendar().

bool CCalendar::registerAlarmForVisibleCalendar ( int &  perrorCode  ) 

vector< string > CCalendar::getIdList ( int  iCompType,
int &  pErrorCode 
)

Parameters:
int iCompType Component Type
int& pErrorCode error code if any
Returns:
vector <string> Vector of component id's
Function is used to get the list of components id's For a given calendar and component -type, all existing IDs in DB are retrieved.

getIdList

Parameters:
Component type
int * pErrorCode error code if any
Returns:
list of Id of existing event Todo and Journal
This function is used to get the elaborate details of particular entry

References getCalendarId(), CCalendarDB::getRecords(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().

Referenced by getDetailedBdayList(), getDetailedEventList(), getJournalListDetailed(), and getTodoListDetailed().

CEvent * CCalendar::getEvent ( string  sCompId,
int &  pErrorCode 
)

Parameters:
string Component Id
int * pErrorCode error code if any
Returns:
CEvent * Pointer to CEvent class
NOTE : Them memory for CEvent is allocated in this procedure has to be freed by API user. Function used to get the complete event details of particular component ID

getEvent

Parameters:
Component ID
int * pErrorCode error code if any
Returns:
CEvent* Pointer to CEvent class
This function is used to get the elaborate details of particular entry

References CCalendarDB::getRecords(), CCalendarDB::Instance(), CAlarm::setAction(), CAlarm::setAttach(), CAlarm::setCookie(), CAlarm::setDuration(), CRecurrence::setEDays(), CRecurrence::setErule(), CRecurrence::setRDays(), CRecurrence::setRecurId(), CAlarm::setRepeat(), CRecurrence::setRrule(), CRecurrence::setRtype(), CAlarm::setTimeBefore(), CAlarm::setTrigger(), and CCalendarDB::sqliteErrorMapper().

Referenced by destroyExistingValidAlarms(), getAllAddedEvents(), getAllAddItems(), getAllModifiedEvents(), getAllModifiedItems(), getDetailedEventList(), getEntry(), CMulticalendar::getLatestComponent(), CMulticalendar::getPrevNextComponent(), registerAlarmForVisibleCalendar(), and setNextAlarm().

CTodo * CCalendar::getTodo ( string  sCompId,
int &  pErrorCode 
)

Parameters:
string szComponentId Component Id
int& pErrorCode place holder
Returns:
CTodo * Pointer to CTodo class
NOTE : Them memory for CTodo is allocated in this procedure has to be freed by API user.

Function used to get the complete todo details of particular component ID

getTodo

Parameters:
Component ID
int * pErrorCode error code if any
Returns:
CTodo* Pointer to CTodo class
This function is used to get the elaborate details of particular entry

References CComponent::getFlags(), CCalendarDB::getRecords(), CCalendarDB::Instance(), CComponentDetails::retrieveParameterDetails(), CComponentDetails::retrieveXPropertyDetails(), CAlarm::setAction(), CComponent::setAlarm(), CAlarm::setAttach(), CComponentDetails::setCategories(), CComponentDetails::setClas(), CComponentDetails::setComments(), CTodo::setCompleted(), CComponentDetails::setContact(), CAlarm::setCookie(), CComponent::setDescription(), CAlarm::setDuration(), CTodo::setGeo(), CComponent::setGUid(), CComponentDetails::setHashMap(), CComponent::setId(), CComponent::setLocation(), CComponentDetails::setRelated(), CAlarm::setRepeat(), CComponentDetails::setResources(), CComponent::setSummary(), CAlarm::setTrigger(), CComponent::setType(), CComponent::setTzid(), CComponentDetails::setUid(), CComponentDetails::setUrl(), CComponentDetails::setXProperties(), CCalendarDB::sqliteErrorMapper(), and CTodo::toString().

Referenced by getAllAddedTodos(), getAllAddItems(), getAllModifiedItems(), getAllModifiedTodos(), getEntry(), getTodoListDetailed(), and setNextAlarm().

CJournal * CCalendar::getJournal ( string  sCompId,
int &  pErrorCode 
)

Parameters:
string szComponentId Id of component(Event/Todo/Journal)
int& pErrorCode place holder
Returns:
CJournal * Pointer to CJournal class
NOTE : Them memory for CJournal is allocated in this procedure has to be freed by API user. Function used to get the complete journal details of particular component ID

getJournal

Parameters:
Component ID
int * pErrorCode error code if any
Returns:
CJournal* Pointer to CJournal class
This function is used to get the elaborate details of particular entry

References CCalendarDB::getRecords(), CCalendarDB::Instance(), CComponentDetails::retrieveParameterDetails(), CComponentDetails::retrieveXPropertyDetails(), CComponentDetails::setCategories(), CComponentDetails::setClas(), CComponentDetails::setComments(), CComponentDetails::setContact(), CComponent::setDescription(), CComponent::setGUid(), CComponentDetails::setHashMap(), CComponent::setId(), CComponent::setLocation(), CComponentDetails::setRelated(), CComponentDetails::setResources(), CComponent::setSummary(), CComponent::setTzid(), CComponentDetails::setXProperties(), CCalendarDB::sqliteErrorMapper(), and CJournal::toString().

Referenced by getAllAddedJournals(), getAllAddItems(), getAllModifiedItems(), getAllModifiedJournals(), getEntry(), and getJournalListDetailed().

bool CCalendar::checkDuplicateEntry ( CComponent pEntry,
int  iType,
int &  pErrorCode 
)

checkDuplicateEntry()

Parameters:
CComponent* pEntry - pointer to CComponent
int iType - Type of entry can be event todo or journal
int& pErrorCode -
Returns:
bool - Duplicate is present or not
Function to check whether duplicate entry exist in DB

checkDuplicateEntry()

Parameters:
int iType - Type of entry can be event todo or journal
int iType - Type of entry can be event todo or journal
int& pErrorCode -
Returns:
bool - Duplicate is present or not
Function to check whether duplicate entry exist in DB

References getCalendarId(), CComponent::getDateStart(), CComponent::getDescription(), CComponent::getGUid(), CComponent::getLastModified(), CComponent::getLocation(), CCalendarDB::getRecords(), CComponent::getSummary(), CCalendarDB::Instance(), CComponent::setId(), CComponent::setLastModified(), and CCalendarDB::sqliteErrorMapper().

Referenced by addEvent(), addJournal(), and addTodo().

vector< CEvent * > CCalendar::getDetailedEventList ( int &  pErrorCode  ) 

Parameters:
int& pErrorCode place holder
Returns:
vector<CEvent *> Vector to CEvent
Function used to get the all the events. NOTE : Them memory for vector<CEvent*> is allocated in this procedure has to be freed by API user.

Parameters:
int * pErrorCode error code if any
Returns:
detailed list of Event
This function is called when a Event list is to be retrieved from DB it gives verbose list of all Event in DB this member function is added from sync point of view

References getEvent(), and getIdList().

Referenced by exportCalendarEntries().

vector< CTodo * > CCalendar::getTodoListDetailed ( int &  pErrorCode  ) 

Parameters:
int& pErrorCode place holder
int * pErrorCode error code if any
Returns:
vector<CTodo *> Vector to CTodo
Function used to get the all the todos for a given calendar. NOTE : Them memory for vector<CTodo*> is allocated in this procedure has to be freed by API user.

Parameters:
int * pErrorCode error code if any
Returns:
detailed list of Todo
This function is called when a Todo list is to be retrieved from DB it gives verbose list of all Todo in DB this member function is added from sync point of view

References getIdList(), and getTodo().

Referenced by exportCalendarEntries().

vector< CJournal * > CCalendar::getJournalListDetailed ( int &  pErrorCode  ) 

Parameters:
int& pErrorCode place holder
Returns:
vector<CJournal *> Vector to CJournarl
Function to retrieve all journals for a given calendar NOTE : Them memory for vector<CTodo*> is allocated in this procedure has to be freed by API user.

getJournalListDetailed

Parameters:
int * pErrorCode error code if any
Returns:
detailed list of Journals
This function is called when a journal list is to be retrieved from DB it gives verbose list of all Journals in DB this member function is added from sync point of view

References getIdList(), and getJournal().

Referenced by exportCalendarEntries().

bool CCalendar::deleteBirthDay ( string  szUId,
int &  pErrorCode 
)

Parameters:
string Id of the birthday event in DB
int& pErrorCode place holder
Returns:
TRUE/FALSE
Function will be called by Ebook API's in calendar package, to delete the birthday's in local calendar database, if contact is deleted in Global Address book

deleteBirthDay

Parameters:
sUid Ebook Uid to be deleted
int * pErrorCode error code if any
Returns:
bool (SUCCESS/FAILURE)
Function to delete Birthday contacts from database This fucntion will be only called from contacts Id passed here is different from the local Id stored.

References CAlarm::deleteAlarmEvent(), getCalendarId(), getCookie(), CCalendarDB::getDb(), getExternalToLocalId(), CCalendarDB::Instance(), CCalendarDB::sqliteErrorMapper(), CCalendarDB::updateDB(), and updateTrash().

vector< CComponent * > CCalendar::getComponents ( int  iType,
int  iStDate,
int  iEndDate,
int &  pErrorCode 
)

getComponents

Parameters:
: calid Calendar ID
: 1 -> EVENT 2 -> TODO 3 -> JOURNAL 4 -> BDAY
: stDate to do conditional fetching based on start date. -1 in case of no conditions
: endDate to do conditional fetching based on end date. -1 in case of no conditions
int& pErrorCode place holder
Returns:
: Vector for CComponent
NOTE : Them memory for vector <CComponent*> is allocated in this procedure has to be freed by API user. This function is used to get all the entries associated with particular component type

Parameters:
: calid Calendar ID
: type 0 -> All entries 1 -> EVENT 2 -> TODO 3 -> JOURNAL 4 -> BDAY
: stDate to do conditional fetching based on start date. -1 in case of no conditions
: endDate to do conditional fetching based on end date. -1 in case of no conditions
int * pErrorCode error code if any
Returns:
: Vector for CComponent This function is used to get all the entries associated with particular component type

References CComponent::getAlarmProperties(), getCalendarId(), CComponent::getFlags(), CCalendarDB::getRecords(), CComponent::getRecurrenceProperties(), getRecursiveEventsInRange(), CMulticalendar::getSystemTimeZone(), CComponent::getType(), CCalendarDB::Instance(), CMulticalendar::MCInstance(), CComponent::setAllDay(), CComponent::setCalendarId(), CComponent::setCreatedTime(), CComponent::setDateEnd(), CComponent::setDateStart(), CComponent::setDescription(), CComponent::setFlags(), CComponent::setGUid(), CComponent::setId(), CComponent::setLastModified(), CComponent::setLocation(), CComponent::setSummary(), CComponent::setType(), CComponent::setTzid(), CComponent::setUntil(), CCalendarDB::sqliteErrorMapper(), and CComponent::toString().

Referenced by CMulticalendar::getComponents(), and CMulticalendar::getTodaysAllDay().

vector< CComponent * > CCalendar::getComponents ( int  iType,
int  iStDate,
int  iEndDate,
int  iLimit,
int  iOffset,
int &  pErrorCode 
)

getComponents

Parameters:
: int iCalendarId Calendar ID
: int type 1 -> EVENT 2 -> TODO 3 -> JOURNAL 4 -> BDAY
: int iStDate to do conditional fetching based on start date. -1 in case of no conditions
: int iEndDate to do conditional fetching based on end date. -1 in case of no conditions
: int iLimit limit for number of events fetched by the calenadr
int * pErrorCode error code: CALENDAR_OPERATION_SUCCESSFUL- fetching is successful and can be continued; CALENDAR_FETCH_NOITEMS- fetching is finished (no more items found in DB); other error code- fetching is failed.
Returns:
: Vector for CComponent. If pErrorCode equals to CALENDAR_OPERATION_SUCCESSFUL, but vector is empty, no component (from offset to limit) meets the conditions, continue fetching
This function is used to get all the entries associated with particular component type progressively. It is an overloaded API for get componets used to fetch Components in bursts of specified size

Parameters:
: calid Calendar ID
: type 0 -> All entries 1 -> EVENT 2 -> TODO 3 -> JOURNAL 4 -> BDAY
: stDate to do conditional fetching based on start date. -1 in case of no conditions
: endDate to do conditional fetching based on end date. -1 in case of no conditions
: limit limit for number of events fetched by the calenadr
int * pErrorCode error code: CALENDAR_OPERATION_SUCCESSFUL- fetching is successful and can be continued; CALENDAR_FETCH_NOITEMS- fetching is finished (no more items found in DB); other error code- fetching is failed.
Returns:
: Vector for CComponent. If pErrorCode equals to CALENDAR_OPERATION_SUCCESSFUL, but vector is empty, no component (from offset to limit) meets the conditions, continue fetching This function is used to get all the entries associated with particular component type progressively.It is an overloaded API for get componets used to fetch Components in bursts of specified size.

References CComponent::getAlarmProperties(), getCalendarId(), CComponent::getFlags(), CComponent::getId(), CComponent::getInstanceNumber(), CCalendarDB::getRecords(), CComponent::getRecurrenceProperties(), CMulticalendar::getSystemTimeZone(), CComponent::getType(), iCalId, CCalendarDB::Instance(), CMulticalendar::MCInstance(), CComponent::setCalendarId(), CComponent::setCreatedTime(), CComponent::setDateStart(), CComponent::setDescription(), CComponent::setFlags(), CComponent::setGUid(), CComponent::setId(), CComponent::setLastModified(), CComponent::setLocation(), CComponent::setStatus(), CComponent::setSummary(), CComponent::setType(), CComponent::setTzid(), CCalendarDB::sqliteErrorMapper(), and CComponent::toString().

int CCalendar::updateTrash ( int  iCalId,
string  sCompId,
int  iCompType,
time_t  iDeletedTime,
int &  pErrorCode 
)

Parameters:
int Calendar id
string component id
int component type
time_t Deleted time
int& place holder for pErrorCode error code
Returns:
SUCCESS/FAILURE
This function will be called when components are deleted, to update them in trash table

updateTrash This function will be called when components are deleted, to update them in trash table

Parameters:
int Calendar id
string component id
int component type
time_t Deleted time
int * pErrorCode error code if any
Returns:
SUCCESS/FAILURE

References CCalendarDB::getDb(), CCalendarDB::getRecords(), CCalendarDB::insertRows(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().

Referenced by deleteBirthDay(), deleteEvent(), deleteJournal(), and deleteTodo().

vector< CEvent * > CCalendar::getAllAddedEvents ( int  iDate,
int &  pErrorCode 
)

Parameters:
 int Date Added items after this date
int& place holder for pErrorCode error code
Returns:
: vector of CEvent
This function return all the events which are added after specified date. Memory allocated for vector<CEvent*> has to be freed by API user

getAllAddedEvents()

Parameters:
 int Date Added items after this date
int * pErrorCode error code if any
Returns:
: vector of CEvent
This function return all the events which are added after specified date

References getChangeIds(), and getEvent().

vector< CTodo * > CCalendar::getAllAddedTodos ( int  iDate,
int &  pErrorCode 
)

Parameters:
 int Date Added items after this date
int& place holder for pErrorCode error code
Returns:
: vector of CTodo
This function return all the Todos which are added after specified date Memory allocated for vector<CTodo*> has to be freed by API user

getAllAddedTodos()

Parameters:
 int Date Added items after this date
int * pErrorCode error code if any
Returns:
: vector of CTodo
This function return all the Todos which are added after specified date

References getChangeIds(), and getTodo().

vector< CJournal * > CCalendar::getAllAddedJournals ( int  iDate,
int &  pErrorCode 
)

Parameters:
 int Date Added items after this date
int& place holder for pErrorCode error code
Returns:
: vector of CJournal
This function return all the Journals which are added after specified date Memory allocated for vector<CJournal*> has to be freed by API user

getAllAddedJournals()

Parameters:
 int Date Added items after this date
int * pErrorCode error code if any
Returns:
: vector of CJournal
This function return all the Journals which are added after specified date

References getChangeIds(), and getJournal().

vector< CComponent * > CCalendar::getAllAddItems ( int  iDate,
int &  pErrorCode 
)

Parameters:
 int Date Added items after this date
int& place holder for pErrorCode error code
Returns:
: vector of CComponent
This function returna all the components which are added after specified date NOTE:Memory allocated for vector<CComponent*> inside this procedure has to be freed by API user(using delete)

getAllAddItems()

Parameters:
 int Date Added items after this date
int * pErrorCode error code if any
Returns:
: vector of CComponent
This function returna all the components which are added after specified date

References getChangeIds(), getEvent(), getJournal(), and getTodo().

vector< CEvent * > CCalendar::getAllModifiedEvents ( int  iDate,
int &  pErrorCode 
)

Parameters:
 int Date Modified items after this date
int& place holder for pErrorCode error code
Returns:
: vector of CEvent
This function returns all the events which are Modified after specified date NOTE:Memory allocated for vector<CEvent*> inside this procedure has to be freed by API user(using delete)

getAllModifiedEvents()

Parameters:
 int Date Modified items after this date
int * pErrorCode error code if any
Returns:
: vector of CEvent
This function returns all the events which are Modified after specified date

References getChangeIds(), and getEvent().

vector< CTodo * > CCalendar::getAllModifiedTodos ( int  iDate,
int &  pErrorCode 
)

getAllModifiedTodos()

Parameters:
 int Date Modified items after this date
int& place holder for pErrorCode error code
Returns:
: vector of CTodo
This function returns all the todos which are Modified after specified date NOTE:Memory allocated for vector<CTodo*> inside this procedure has to be freed by API user(using delete)

getAllModifiedTodos()

Parameters:
 int Date Modified items after this date
int * pErrorCode error code if any
Returns:
: vector of CTodo
This function returns all the todos which are Modified after specified date

References getChangeIds(), and getTodo().

vector< CJournal * > CCalendar::getAllModifiedJournals ( int  iDate,
int &  pErrorCode 
)

Parameters:
 int Date Modified items after this date
int& place holder for pErrorCode error code
Returns:
: vector of CJournal
NOTE:Memory allocated for vector<CJournal*> inside this procedure has to be freed by API user(using delete) This function returns all the journals which are Modified after specified date

getAllModifiedJournals()

Parameters:
 int Date Modified items after this date
int * pErrorCode error code if any
Returns:
: vector of CJournal
This function returns all the journals which are Modified after specified date

References getChangeIds(), and getJournal().

vector< CComponent * > CCalendar::getAllModifiedItems ( int  iDate,
int &  pErrorCode 
)

Parameters:
 int Date Modified items after this date
int& place holder for pErrorCode error code
Returns:
: vector of CComponent
This function returns all the components which are Modified after specified date NOTE:Memory allocated for vector<CComponent*> inside this procedure has to be freed by API user(using delete)

getAllModifiedItems()

Parameters:
 int Date Modified items after this date
int * pErrorCode error code if any
Returns:
: vector of CComponent
This function returns all the components which are Modified after specified date

References getChangeIds(), getEvent(), getJournal(), and getTodo().

vector< string > CCalendar::getAllDeletedItems ( int  iLastSyncDate,
int  iType,
int &  pErrorCode 
)

Parameters:
 vector of string id of Deleted items
int iType specifies the component type to be fetched
int& place holder for pErrorCode error code
Returns:
: vector of CComponent
This function returns all the components which are Deleted after specified date NOTE:Memory allocated for vector<CComponent*> inside this procedure has to be freed by API user (using delete)

getAllDeletedItems()

Parameters:
 int Date Deleted items after this date
: int iType signifies the component type can be Event /Todo/Journal
int * pErrorCode error code if any
Returns:
: vector of CComponent
This function returns all the journals which are Deleted after specified date

References getCalendarId(), CCalendarDB::getRecords(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().

Referenced by getAllDeletedEvents(), getAllDeletedJournals(), and getAllDeletedTodos().

int CCalendar::exportCalendarEntries ( string  szFileName,
int &  pErrorCode 
)

Parameters:
string - filename of the ics file
int& place holder for pErrorCode error code
Returns:
string name of the file
Export file format will all be in line with ICAL format

Parameters:
string - filename of the ics file
int * pErrorCode error code if any
Returns:
status of operation Export file format will all be in line with ICAL format

References getCalendarType(), getDetailedBdayList(), getDetailedEventList(), getJournalListDetailed(), getTodoListDetailed(), ICalConverter::localToIcalVcal(), and ICalConverter::setSyncing().

Referenced by CMulticalendar::exportCalendarEntries().

bool CCalendar::setNextAlarm ( string  sComponentId,
int  iType,
int &  pErrorCode 
)

Parameters:
int component id
int& place holder for pErrorCode error code
int iType Component type
Returns:
bool true/false
Function to set the impending alarm for a recursive event. It is invoked on the onset of alarm.

Parameters:
int Component id
int Component Type
int * pErrorCode error code if any
Returns:
bool true/false Function to set the next recurrent alarm, when alarm triggers

References addAlarm(), CAlarm::addAlarmEvent(), CComponent::getAlarm(), CComponent::getAllDay(), getBirthDayEvent(), getCalendarId(), CComponent::getDateEnd(), CComponent::getDateStart(), CComponent::getDescription(), getEvent(), CComponent::getFlags(), CComponent::getId(), CComponent::getLocation(), CComponent::getSummary(), getTodo(), CAlarm::getTrigger(), CComponent::getType(), CComponent::getTzid(), modifyEvent(), modifyTodo(), CComponent::removeAlarm(), CAlarm::setCookie(), CComponent::setFlags(), and CComponent::updateAlarmTriggerTime().

Referenced by CMulticalendar::setNextAlarm().

void CCalendar::setCalendarTune ( string  szCalendarTune  ) 

Parameters:
string szCaeldnarTune
Returns:
none
Function to set Caelndar tune

setCalendarTune

Parameters:
string szCaeldnarTune
Returns:
none Function to set Caelndar tune

Referenced by CMulticalendar::getCalendarById(), CMulticalendar::getListCalFromMc(), and CMulticalendar::modifyCalendar().

string CCalendar::getCalendarTune (  ) 

Parameters:
NONE 
Returns:
string CaelndarTune
Function to retrieve calendar tune

getCalendarTune

Parameters:
NONE 
Returns:
string CaelndarTune
Function to retrieve calendar tune

Referenced by CAlarm::addAlarmEvent(), CMulticalendar::addCalendar(), and CMulticalendar::modifyCalendar().

bool CCalendar::addParameters ( map< string, vector< CParameters * > >  hashMap,
string  sId,
ACTION  iAction,
int &  pErrorCode,
bool  clearHashMap = true 
)

Parameters:
: hashMap to store prop and param values
: sId id of the entry
: iAction action to be taken
int& place holder for pErrorCode error code
: clearHashMap indicator for hashMap content deletion
Returns:
: bool
This function adds/modifies parameters of an entry .

addParameters()

Parameters:
: hashMap to store prop and param values
: sId id of the entry
: iAction action to be taken
: int pErrorCode
: clearHashMap indicator for hashMap content deletion
Returns:
: bool
This function adds/modifies parameters of an entry .

References CCalendarDB::getDb(), CCalendarDB::insertRows(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().

Referenced by addAttendeeDetails(), addEvent(), addJournal(), addOrganizer(), addTodo(), modifyEvent(), and modifyJournal().

bool CCalendar::addXProperties ( vector< CProperties * >  vXProp,
string  sId,
ACTION  iAction,
int &  pErrorCode 
)

Parameters:
vector<Cproperties*> vXprop
string sId
ACTION iAction can be add/modify/delete
int& place holder for pErrorCode error code
Returns:
bool status of operation
Function to add properties in to properties table.

addXProperties()

References CCalendarDB::getDb(), CCalendarDB::insertRows(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().

Referenced by addEvent(), addJournal(), addTodo(), modifyEvent(), and modifyJournal().

string CCalendar::getExternalToLocalId ( string  sId,
bool  fetchLocal,
int &  pErrorCode 
)

Parameters:
sId input Id string for which mapped Id has to be found
bool fetchExternal - flag to fetch external Id
int & reference to error code.
Returns:
string Id - local ID of the birthday event
Function to get local Id corresponding the the external Id fetchLocal- 1 returns local Id corresponding to external Id
  • 0 returns externalId corresponding to local Id

References CCalendarDB::getRecords(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().

Referenced by addBirthDay(), and deleteBirthDay().

bool CCalendar::addMapTableInfo ( string  sLocalId,
string  sExternalId,
int &  pErrorCode 
)

Parameters:
string sLocalId - local Id of Birthday event
string externalId Id maintained by exteranl applications
int& pErrorCode - reference to errorcode
Returns:
boolean - success/failure indicator
Function to map externalId of Bday event with the internal ones

INSERT_IDMAP

References CCalendarDB::getDb(), CCalendarDB::insertRows(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().

Referenced by addBirthDay().

vector< string > CCalendar::getAllDeletedEvents ( int  iLastSyncDate,
int &  pErrorCode 
)

Parameters:
 int Date Deleted items after this date
int * pErrorCode error code if any
Returns:
: vector of CComponent
This function returns all the Events which are Deleted after specified date

References getAllDeletedItems().

vector< string > CCalendar::getAllDeletedJournals ( int  iLastSyncDate,
int &  pErrorCode 
)

Parameters:
 int Date Deleted items after this date
int * pErrorCode error code if any
Returns:
: vector of CComponent
This function returns all the components which are Deleted after specified date

References getAllDeletedItems().

vector< string > CCalendar::getAllDeletedTodos ( int  iLastSyncDate,
int &  pErrorCode 
)

Parameters:
 int Date Deleted items after this date
int * pErrorCode error code if any
Returns:
: vector of CComponent
This function returns all the tasks which are Deleted after specified date

References getAllDeletedItems().

bool CCalendar::destroyExistingValidAlarms ( int &  pErrorCode  ) 

destroyExistingValidAlarms

Parameters:
pErrorCode - reference to error Code
Returns:
status of operation
Function to deregister all the alarms which are already set for a visible calendar

References addAlarm(), CAlarm::deleteAlarmEvent(), CComponent::getAlarm(), getBirthDayEvent(), getCalendarId(), getCalendarType(), getCookie(), getEvent(), CComponent::getId(), CCalendarDB::getRecords(), CComponent::getSummary(), CCalendarDB::Instance(), CAlarm::setCookie(), and CCalendarDB::sqliteErrorMapper().

Referenced by CMulticalendar::clearCalendar(), and CMulticalendar::modifyCalendar().

bool CCalendar::checkEntryExist ( string  szTable,
string  sId,
int &  pErrorCode 
)

Parameters:
string table name
entryid can be Id of event todo or Journal
int& place holder for pErrorCode error code
Returns:
boolean ressult of operation
This function is used to know whether there is any entry present in a table for particular ID

Parameters:
string table name
entryid can be Id of event todo or Journal
int * pErrorCode error code if any
Returns:
boolean ressult of operation this function is used to know whether there is any entry present in a table for particular ID

References CCalendarDB::getRecords(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().

Referenced by modifyBirthDay(), modifyEvent(), and modifyTodo().

CComponent * CCalendar::getEntry ( string  sCompId,
int  iType,
int &  pErrorCode 
)

Parameters:
string sCompId Component Id
int iType cand be E_EVENT,E_TODO or E_JOURNAL
int pErrorCode reference to error code
Function to retrieve Entry from DB , which can be event todo or Journal

Parameters:
string sCompId Component Id
int iType cand be E_EVENT,E_TODO or E_JOURNAL
int pErrorCode reference to error code
Function to retrieve Entry from DB , which can be event todo or Journal It is safe to cast a derived class pointer to base class pointer.

References getEvent(), getJournal(), and getTodo().

vector< CEvent * > CCalendar::getDetailedBdayList ( int &  pErrorCode  ) 

Parameters:
int * pErrorCode error code if any
Returns:
detailed list of Event
This function is called when a Event list is to be retrieved from DB it gives verbose list of all Event in DB this member function is added from sync point of view

References getBirthDayEvent(), and getIdList().

Referenced by exportCalendarEntries().

CEvent * CCalendar::getBirthDayEvent ( string  sCompId,
int &  pErrorCode 
)

getEvent

Parameters:
Component ID
int * pErrorCode error code if any
Returns:
CEvent* Pointer to CEvent class
This function is used to get the elaborate details of particular entry

References CCalendarDB::getRecords(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().

Referenced by destroyExistingValidAlarms(), getDetailedBdayList(), CMulticalendar::getLatestComponent(), CMulticalendar::getPrevNextComponent(), registerAlarmForVisibleCalendar(), and setNextAlarm().

void CCalendar::deleteComponents ( vector< string >  idList,
int &  ErrorCode 
)

Parameters:
vector<string> list of component Ids to be deleted
ErrorCode 
Returns:
none
Function to delete components in batch

References deleteComponent().

Referenced by CMulticalendar::deleteComponents().

void CCalendar::modifyComponents ( vector< CComponent * > &  compList,
int &  ErrorCode 
)

Parameters:
vector<CComponent*> CComponent to be modified
ErrorCode 
Returns:
none FIXME: even if one error is encountered in mofdify entire transaction is rolled back. Function to modify Events in batch

References modifyEvent(), modifyJournal(), and modifyTodo().

Referenced by CMulticalendar::modifyComponents().

vector< string > CCalendar::addComponents ( vector< CComponent * > &  compList,
vector< string > &  duplicateIds,
int &  ErrorCode 
)

Parameters:
vector<CComponent*> vector of CComponent * to be added
vector <string> duplicate Ids if at all they exist
Error code - can be CALENDAR_OPERATION_SUCCESSFUL/CALENDAR_ENTRY_DUPLICATED
Returns:
vector<string> added Component Ids in Calendar database.
To enhance the speed of operation error code when obtained is ignored in failure scenarios , so that we donot rollback the entire transaction if adding one component fails. what it means is the returned IdList contains empty strings in case there is any error while adding the component.

FIXME: will add a set of error codes, which can be passed to API user each one corresponding to one evntry in component list,but this would mean changes in way api is used, will integrate this in coming weeks.

Function to add Events/tasks /Journals in batch

References addEvent(), addJournal(), and addTodo().

Referenced by CMulticalendar::addComponents().

vector< CEvent * > CCalendar::getEvents ( int &  pErrorCode  ) 

Parameters:
int errorcode
Returns:
vector CEvent*
Function returns all events in a particular calendar

batch read API

Parameters:
int errorcode
Returns:
vector CEvent*
Function returns all events in a particular calendar

References getCalendarId(), CCalendarDB::getRecords(), CCalendarDB::Instance(), CAlarm::setAction(), CAlarm::setAttach(), CAlarm::setCookie(), CAlarm::setDuration(), CRecurrence::setEDays(), CRecurrence::setErule(), CRecurrence::setRDays(), CRecurrence::setRecurId(), CAlarm::setRepeat(), CRecurrence::setRrule(), CRecurrence::setRtype(), CAlarm::setTrigger(), and CCalendarDB::sqliteErrorMapper().

vector< CTodo * > CCalendar::getTodos ( int &  pErrorCode  ) 

vector< CJournal * > CCalendar::getJournals ( int &  pErrorCode  ) 

string CCalendar::toString (  ) 

bool CCalendar::checkFieldinTable ( string  szTable,
string  szField,
string  szValue 
) [private]

Parameters:
string szTable table name
string szField column name
string szValue value to be checked

References CCalendarDB::getRecords(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().

vector< CComponent * > CCalendar::getRecursiveEventsInRange ( int  iStDate,
int  iEndDate,
vector< CComponent * >  vListEntry,
int &  pErrorCode 
) [private]

Parameters:
int stDate date start in integer format
int end Date in integer format
vector <CComponent*> vector of CComponent pointers
int& place holder for pErrorCode error code
Returns:
vector <CComponent*> vector of CComponent pointers
Function is used to obtain recursive events in particular time range This is a private API not presented to end user

Parameters:
int iCalid calendar Id
int stDate date start in integer format
vector <CComponent*> vector of CComponent pointers
int * pErrorCode error code if any
Returns:
vector <CComponent*> Modified vector of CComponent pointers
Function is used to obtain recursive events in particular time range

References CComponent::getAlarmProperties(), getCalendarId(), CComponent::getFlags(), CComponent::getInstanceNumber(), CCalendarDB::getRecords(), CComponent::getRecurrenceProperties(), CComponent::getType(), CCalendarDB::Instance(), CComponent::setCalendarId(), CComponent::setCreatedTime(), CComponent::setDescription(), CComponent::setGUid(), CComponent::setId(), CComponent::setLastModified(), CComponent::setLocation(), CComponent::setSummary(), CComponent::setTzid(), CCalendarDB::sqliteErrorMapper(), and CComponent::toString().

Referenced by getComponents().

vector< string > CCalendar::getChangeIds ( int  iCompType,
int  iChangeType,
int  iDate,
int &  pErrorCode 
) [private]

Parameters:
 int iCompType specifies ComponentType (event/todo/journal)
 int iChangeType specifies ChangeType (add/mod/delete)
 int iDate
int& place holder for pErrorCode error code
Returns:
: vector of string Ids
This function returns all the ids required as per the given component type, change type and date

getChangeIds()

Parameters:
 int iCompType specifies ComponentType (event/todo/journal)
 int iChangeType specifies ChangeType (add/mod/delete)
 int iDate
int * pErrorCode error code if any
Returns:
: vector of string Ids
This function returns all the ids required as per the given component type, change type and date

References getCalendarId(), CCalendarDB::getRecords(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().

Referenced by getAllAddedEvents(), getAllAddedJournals(), getAllAddedTodos(), getAllAddItems(), getAllModifiedEvents(), getAllModifiedItems(), getAllModifiedJournals(), and getAllModifiedTodos().

bool CCalendar::entrySetModifiedTime ( CComponent pEntry,
int &  pErrorCode 
) [private]

Parameters:
CComponent *
int& place holder for pErrorCode error code
Returns:
boolean value to indicate success or failure
Function is used to get Modified time from component-Details table this is a kind of work -around, better solution would be to move the domain ModifiedTime in to Component table

template<class comp>
bool CCalendar::addCompDetails ( sqlite3_stmt *  pStmt,
comp *  cDet,
int &  pErrorCode 
) [inline, private]

Parameters:
sqlite3_stmt* Sqlite pPreparedStmttement comp* template to CEvent, CTodo, CJournal
int& place holder for pErrorCode error code
Returns:
bool true/false
This function is used to do the prepared statement for common parameters

addCompDetails

Parameters:
sqlite3_stmt* Sqlite pPreparedStmttement comp* template to CEvent, CTodo, CJournal
int * pErrorCode error code if any
returns bool true/false

This function is used to do the prepared statement for common parameters

Referenced by addEventCompDetails(), addJournalCompDetails(), and addTodoCompDetails().

bool CCalendar::addEventCompDetails ( CEvent pEvent,
int &  pErrorCode 
) [private]

Parameters:
CEvent* Pointer to CEvent class
int& place holder for pErrorCode error code
Returns:
bool true or false
This function is used to add event related parameters into database

addEventCompDetails

Parameters:
CEvent* Pointer to CEvent class
int * pErrorCode error code if any
Returns:
istatus of operation
This function is used to add event related parameters into database

References addCompDetails(), CCalendarDB::getDb(), CEvent::getGeo(), CEvent::getPriority(), CEvent::getTransparency(), CCalendarDB::insertRows(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().

Referenced by addEvent().

bool CCalendar::addTodoCompDetails ( CTodo ptrTodo,
int &  pErrorCode 
) [private]

Parameters:
CTodo* Pointer to CTodo class
int& place holder for pErrorCode error code
Returns:
bool true or false
This function is used to add todo related parameters into database

addTodoCompDetails

Parameters:
CTodo* Pointer to CTodo class
int * pErrorCode error code if any
Returns:
bool true or false
This function is used to add todo related parameters into database

References addCompDetails(), CTodo::getCompleted(), CCalendarDB::getDb(), CTodo::getGeo(), CTodo::getPercentComplete(), CTodo::getPriority(), CComponent::getStatus(), CCalendarDB::insertRows(), CCalendarDB::Instance(), CTodo::setCompleted(), and CCalendarDB::sqliteErrorMapper().

Referenced by addTodo().

bool CCalendar::addJournalCompDetails ( CJournal ptrJournal,
int &  pErrorCode 
) [private]

Parameters:
CJournal* Pointer to CJournal class
int& place holder for pErrorCode error code
Returns:
bool true or false
This function is used to add journal related parameters into database

addJournalCompDetails

Parameters:
CJournal* Pointer to CJournal class
int * pErrorCode error code if any
Returns:
bool true or false
This function is used to add journal related parameters into database

References addCompDetails(), CCalendarDB::getDb(), CCalendarDB::insertRows(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().

Referenced by addJournal().

bool CCalendar::manageCookie ( const ACTION  iAction,
CComponent pcomp,
int &  pErrorCode 
) [private]

Parameters:
ACTION Enumerated data type
CComponent pointer
Calendar id
int& place holder for pErrorCode error code
Returns:
TRUE/FALSE
Function used to manage the cookies

Parameters:
ACTION Enumerated data type
CComponent pointer
Calendar id
int * pErrorCode error code if any
Returns:
TRUE/FALSE Function used to manage the cookies

References CAlarm::addAlarmEvent(), CAlarm::deleteAlarmEvent(), CComponent::getAlarm(), CComponent::getAllDay(), getCalendarId(), getCookie(), CComponent::getDateEnd(), CComponent::getDateStart(), CComponent::getDescription(), CComponent::getId(), CComponent::getLocation(), CComponent::getSummary(), CAlarm::getTrigger(), CComponent::getType(), CComponent::getTzid(), CAlarm::setCookie(), and CComponent::updateAlarmTriggerTime().

Referenced by addEvent(), addTodo(), modifyBirthDay(), modifyEvent(), and modifyTodo().

bool CCalendar::addAlarm ( CAlarm ptrAlarm,
ACTION  iAction,
string  sId,
int &  pErrorCode 
) [private]

Parameters:
ptrAlarm pointer to Alarm
sId - id of component string
iAction type of Action
int& place holder for pErrorCode error code
Returns:
bool result of the operation
This function is used to Add alarm in Data base

Parameters:
ptrAlarm pointer to Alarm
sId - id of component string
iAction type of Action
int * pErrorCode error code if any
Returns:
bool result of the operation
This function is used to Add alarm in Data base

References CAlarm::getAction(), CAlarm::getAttach(), CAlarm::getCookie(), CCalendarDB::getDb(), CAlarm::getDuration(), CAlarm::getRepeat(), CAlarm::getTimeBefore(), CAlarm::getTrigger(), CCalendarDB::insertRows(), CCalendarDB::Instance(), CCalendarDB::sqliteErrorMapper(), and CCalendarDB::updateDB().

Referenced by addEvent(), addTodo(), destroyExistingValidAlarms(), modifyBirthDay(), modifyEvent(), modifyTodo(), registerAlarmForVisibleCalendar(), and setNextAlarm().

bool CCalendar::addRecurrence ( CRecurrence ptrRecur,
string  sId,
int &  pErrorCode 
) [private]

Parameters:
ptrRecur Pointer to Recurrence
sId Event id - string
int& place holder for pErrorCode error code
Returns:
TRUE/FALSE
Function to add values in to recurrence table

Parameters:
ptrRecur Pointer to Recurrence
iAction Add / Modify
sId Event id - string
int * pErrorCode error code if any
Returns:
TRUE/FALSE Function to add values in to recurrence table

References CCalendarDB::getDb(), CRecurrence::getEDays(), CRecurrence::getErule(), CRecurrence::getRDays(), CRecurrence::getRecurId(), CRecurrence::getRrule(), CRecurrence::getRtype(), CCalendarDB::insertRows(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().

Referenced by addBirthDay(), addEvent(), addTodo(), modifyBirthDay(), modifyEvent(), and modifyTodo().

bool CCalendar::modifyRecurrence ( CRecurrence ptrRecur,
string  sId,
int &  pErrorCode 
) [private]

Parameters:
ptrRecur Pointer to Recurrence
sId Event id - string
int pErrorCode error code if any
Returns:
TRUE/FALSE Function to modify values in to recurrence table

References CCalendarDB::getDb(), CRecurrence::getEDays(), CRecurrence::getErule(), CRecurrence::getRDays(), CRecurrence::getRecurId(), CRecurrence::getRrule(), CRecurrence::getRtype(), CCalendarDB::Instance(), CCalendarDB::sqliteErrorMapper(), and CCalendarDB::updateDB().

Referenced by modifyBirthDay(), modifyEvent(), and modifyTodo().

bool CCalendar::addAttendeeDetails ( vector< CAttendee * >  vAttenList,
string  sId,
int  iType,
ACTION  iAction,
int &  pErrorCode 
) [private]

Parameters:
vector list of CAttendee pointers
string represents id of the component
int type can be event/todo or journal
iAction type can be Add / Modify
int& place holder for pErrorCode error code
Returns:
whether the operation is successfull or not
This function is called when an entry is to be added in attendee table for event todo or journal it adds an event(provided by CEvent pointer) into database

addAttendeeDetails

Parameters:
vector list of CAttendee pointers
string represents id of the component
int type can be EVENT , TODO or JOURNAL.
ACTION type can be Add / Modify.
int * pErrorCode error code if any
Returns:
whether the operation is successfull or not
This function is called when an entry is to be added in attendee table for event todo or journal it adds an event(provided by CEvent pointer) into database

References addParameters(), CCalendarDB::Instance(), CParameters::setParamName(), and CParameters::setParamValue().

Referenced by addEvent(), addJournal(), addTodo(), modifyEvent(), and modifyJournal().

bool CCalendar::addOrganizer ( COrganizer ptrOrganizer,
string  sId,
int  iType,
ACTION  iAction,
int &  pErrorCode 
) [private]

Parameters:
ptrOrganizer COrganizer pointer
string sId Id of the component
int iType can be event/todo or journal
iAction type can be Add / Modify
int& place holder for pErrorCode error code
Returns:
boolean value
This function is called when an event entry is to be added in to organizer table . it adds an event(provided by CEvent pointer) into database

addOrganizer

Parameters:
ptrOrganizer COrganizer pointer
string sId Id of the component
int * pErrorCode error code if any
iType type can be Event/Todo/Journal
iAction can be add/modify
Returns:
boolean value
This function is called when an event entry is to be added in to organizer table . it adds an event(provided by CEvent pointer) into database

References addParameters(), CParticipant::getCommonName(), CParticipant::getDirectoryParameter(), CParticipant::getLanguage(), CParticipant::getMailTo(), CParticipant::getSentBy(), CCalendarDB::Instance(), CParameters::setParamName(), and CParameters::setParamValue().

Referenced by addEvent(), addJournal(), addTodo(), modifyEvent(), and modifyJournal().

template<class ent>
int CCalendar::addComponent ( ent *  pEvent,
ACTION  iAction,
int &  pErrorCode 
) [inline, private]

Parameters:
Template pointer can be CEvent* ,CTodo* ,CJournal*
ACTION - enumeration for add/del/modify
int& place holder for pErrorCode error code
Returns:
int Add component status
This function is called when an event entry is to be added. it adds an entry into Component table

addComponent

Parameters:
pEvent calEvent pointer
int * pErrorCode error code if any
Returns:
int Add component status
This function is called when an event entry is to be added. it adds an entry into Component table

adding the time zone to which event belongs

References CMulticalendar::addInstance(), CMulticalendar::addInstances(), CMulticalendar::dropInstances(), getCalendarId(), CCalendarDB::getDb(), CMulticalendar::getSystemTimeZone(), CCalendarDB::insertRows(), CCalendarDB::Instance(), CMulticalendar::MCInstance(), CCalendarDB::sqliteErrorMapper(), and CCalendarDB::updateDB().

Referenced by addBirthDay(), addEvent(), addJournal(), addTodo(), modifyBirthDay(), modifyEvent(), modifyJournal(), and modifyTodo().


Field Documentation

string CCalendar::szName [private]

Calendar Name

Referenced by CCalendar(), getCalendarName(), and operator=().

CalendarColour CCalendar::iColor [private]

Calendar color

Referenced by CCalendar(), getCalendarColor(), and operator=().

bool CCalendar::fReadOnly [private]

Calendar read only status

Referenced by CCalendar(), IsReadOnly(), operator=(), and setCalendarReadOnly().

bool CCalendar::fIsVisible [private]

Calendar visibility status

Referenced by CCalendar(), IsShown(), operator=(), and setCalendarShown().

int CCalendar::iCalId [private]

Calendar ID - Primary key in database

Referenced by CCalendar(), getAllEventsTodos(), getCalendarId(), getComponents(), operator=(), and setCalendarId().

CalendarType CCalendar::iCalType [private]

Calendar Type

Referenced by CCalendar(), getCalendarType(), and operator=().


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