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

 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 * > getAllEventsTodosForCalendar (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 &pErrorCode)
void setCalendarTune (string szCalendarTune)
string getCalendarTune ()
bool addParameters (map< string, vector< CParameters * > > hashMap, string sId, ACTION iAction, int &pErrorCode)
bool addXProperties (vector< CProperties * > vXProp, string sId, ACTION iAction, int &pErrorCode)
bool isComponentExists (string szUid)
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)

Private Member Functions

bool addDataUtility (ACTION iOperation, string sId, 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)
bool checkEntryExist (string szTable, string iId, 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, ACTION iAction, 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

CCalendar::CCalendar ( int  iCalId,
string  szName,
CalendarColour  iColour,
bool  fIsReadOnly,
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.

CCalendar::CCalendar ( string  szName,
CalendarColour  iColour,
bool  fIsReadOnly,
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.

CCalendar::CCalendar (  ) 

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

CCalendar::~CCalendar (  ) 

~Calendar

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


Member Function Documentation

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

overloaded assignment operator for CCalendar class

vector< CComponent * > CCalendar::getAllEventsTodosForCalendar ( 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 if any
Returns:
: Vector for CComponent 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

bool CCalendar::setCalendarColor ( CalendarColour  iCalendarColor  ) 

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.

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.

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.

string CCalendar::getCalendarName (  ) 

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

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.

int CCalendar::getCalendarId (  ) 

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

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

void CCalendar::setProfileType ( SyncProfileType  iProfile  ) 

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

SyncProfileType CCalendar::getProfileType (  ) 

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

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.

bool CCalendar::setCalendarReadOnly ( bool  fIsReadOnly  ) 

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

bool CCalendar::IsReadOnly (  ) 

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

bool CCalendar::setCalendarShown ( bool  fIsVisible  ) 

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

bool CCalendar::IsShown (  ) 

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

bool CCalendar::modifyEvent ( CEvent pEvent,
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.

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.

bool CCalendar::modifyJournal ( CJournal pJournal,
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.

bool CCalendar::modifyTodo ( CTodo pTodo,
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.

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

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

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

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

bool CCalendar::deleteEvent ( string  sEventID,
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.

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.

bool CCalendar::deleteTodo ( string  sTodoID,
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.

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.

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.

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 .

string CCalendar::getCalendarVersion (  ) 

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

void CCalendar::setCalendarVersion ( string  szCalendarVersion  ) 

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

bool CCalendar::registerAlarmForVisibleCalendar ( int &  perrorCode  ) 

Parameters:
perrorCode 
Returns:
bool success/failure indicator Function to register Alarm for visible calendars

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.

CEvent * CCalendar::getEvent ( string  sComponentID,
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

CTodo * CCalendar::getTodo ( string  szComponentID,
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

CJournal * CCalendar::getJournal ( string  sComponentID,
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

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

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.

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.

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.

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

vector< CComponent * > CCalendar::getComponents ( int  iCalendarID,
int  iStartDate,
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

vector< CComponent * > CCalendar::getComponents ( int  iCalendarID,
int  iStartDate,
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 if any
Returns:
: Vector for CComponent
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

int CCalendar::updateTrash ( int  iCalendarID,
string  iComponentID,
int  iComponentType,
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

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

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

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

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)

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)

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)

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

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)

vector< string > CCalendar::getAllDeletedItems ( int  iDate,
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)

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

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

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

void CCalendar::setCalendarTune ( string  szCalendarTune  ) 

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

string CCalendar::getCalendarTune (  ) 

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

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

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
Returns:
: bool
This function adds/modifies parameters of an entry .

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.

bool CCalendar::isComponentExists ( string  szUid  ) 

Parameters:
string szUid
Returns:
bool
Function used by sync to check whether entry exist in DB

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

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

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

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

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

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

bool CCalendar::addDataUtility ( ACTION  iOperation,
string  sId,
int &  pErrorCode 
) [private]

Parameters:
ACTION iOperation tyoe of operation E_ADD/E_MODIFY
string Id of the component added
Returns:
bool status of operation 0 failure 1 success
Function to update data in Utilty table

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

vector< CComponent * > CCalendar::getRecursiveEventsInRange ( int  iStartDate,
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

vector< string > CCalendar::getChangeIds ( int  iComponentType,
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

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

bool CCalendar::checkEntryExist ( string  szTable,
string  iId,
int &  pErrorCode 
) [private]

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

template<class comp>
bool CCalendar::addCompDetails ( sqlite3_stmt *  pStmt,
comp *  cDet,
int &  pErrorCode 
) [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

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

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

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

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

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

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

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

bool CCalendar::addAttendeeDetails ( vector< CAttendee * >  vAttendeeList,
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

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

template<class ent>
int CCalendar::addComponent ( ent *  pEvent,
ACTION  iAction,
int &  pErrorCode 
) [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


Field Documentation

string CCalendar::szName [private]

Calendar Name

CalendarColour CCalendar::iColor [private]

Calendar color

bool CCalendar::fReadOnly [private]

Calendar read only status

bool CCalendar::fIsVisible [private]

Calendar visibility status

int CCalendar::iCalId [private]

Calendar ID - Primary key in database

CalendarType CCalendar::iCalType [private]

Calendar Type


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