#include <CMulticalendar.h>
Public Member Functions | |
| CCalendar * | getSynchronizedCalendar () |
| CCalendar * | getDefaultCalendar () |
| bool | getICSFileInfo (string szFileName, unsigned int &iEventCount, unsigned int &iTodoCount, unsigned int &iJournalCount, int &pErrorCode) |
| string | getSynchronizedCalendarName () |
| string | getCTCapXML () |
| bool | importIcsFileData (string szFileName, int iCalid, string &eventId, int &pErrorCode) |
| int | exportCalendarEntries (int iCalendarId, string szFileName, int &pErrorCode) |
| bool | deleteEventBeyond (int iCalId, time_t iUtc, int &pErrorCode) |
| bool | deleteTodosBeyond (int iCalId, time_t iUtc, int &pErrorCode) |
| CCalendar * | getCalendarByName (string szName, int &pErrorCode) |
| bool | deleteJournalsBeyond (int iCalId, time_t iUtc, int &pErrorCode) |
| bool | enableAutomaticDeletion (int iDayBefore, int &pErrorCode) |
| vector< time_t > | getRecurrentTimes (string szRRule, icaltimetype iDtStart, time_t iViewEnd, int &pErrorCode) |
| vector< CComponent * > | getComponents (int iCalId, int iType, int iStDate, int iEndDatei, int &pErrorCode) |
| int | getNoofCalendars () |
| int | addCalendar (string szTitle, CalendarColour iColor, int iReadOnly, int iVisible, CalendarType iType, string szCalendarTune, string szCalendarVersion, int &pErrorCode) |
| bool | modifyCalendar (int iId, string szTitle, CalendarColour iColor, int iReadOnly, int iVisible, CalendarType iType, string szCalendarTune, string szCalendarVersion, int &pErrorCode) |
| bool | deleteCalendar (int iCalId, int &pErrorCode) |
| CCalendar * | getCalendarById (int iCalId, int &pErrorCode) |
| void | setMaxId (int iMaxId) |
| int | getMaxId () |
| int | searchMaxId () |
| vector< CComponent * > | getComponentsAllCalendars (int iType, int iStDate, int iEndDate, int iLimit, int iOffset, vector< int > &vCalid, int &pErrorCode) |
| vector< CComponent * > | getAllEventsTodosForCalendar (int iCalid, int iStDate, int iEndDate, int iLimit, int iOffset, int &pErrorCode) |
| bool | addEvent (CEvent *pEvent, int iCalendarId, int &pErrorCode) |
| bool | modifyEvent (CEvent *pEvent, int iCalendarId, int &pErrorCode) |
| bool | deleteEvent (int iCalId, string sCompId, int &pErrorCode) |
| bool | addTodo (CTodo *pTodo, int iCalendarId, int &pErrorCode) |
| bool | modifyTodo (CTodo *pTodo, int iCalendarId, int &pErrorCode) |
| bool | deleteTodo (int iCalId, string sCompId, int &pErrorCode) |
| bool | addJournal (CJournal *pJournal, int iCalendarId, int &pErrorCode) |
| bool | modifyJournal (CJournal *pJournal, int iCalendarId, int &pErrorCode) |
| bool | deleteJournal (int iCalId, string sCompId, int &pErrorCode) |
| int | getEventCount (int iCalId, int &pErrorCode) |
| int | getTodoCount (int iCalId, int &pErrorCode) |
| int | getNoteCount (int iCalId, int &pErrorCode) |
| vector< CCalendar * > | getListCalFromMc () |
| bool | modifyCalendar (CCalendar *pCal, int &pErrorCode) |
| int | addCalendar (CCalendar *pCal, int &pErrorCode) |
| int | getNumOfUndoneTasks (int *iCalId, int &pErrorCode) |
| int | getNumOfAllDayEventsForToday (int &pErrorCode) |
| vector< CComponent * > | getTodaysAllDay (int &pErrorCode) |
| CMulticalendar () | |
| ~CMulticalendar () | |
| bool | addBirthDay (CBdayEvent *pBday, int &pErrorCode) |
| bool | modifyBirthDay (CBdayEvent *pBday, int &pErrorCode) |
| bool | deleteBirthDay (string szEUid, int &pErrorCode) |
| CCalendar * | getCalendarByType (int iCalTypei, int &pErrorCode) |
| vector< CComponent * > | getComponents (int iCalId, int iType, int iStDate, int iEndDate, int iLimit, int iOffset, int &pErrorCode) |
| int | setAutocommitOff () |
| bool | commitAllChanges () |
| bool | rollbackAllChanges () |
| bool | setNextAlarm (int iCalendarId, string sComponentId, int &pErrorCode) |
| void | setApplicationName (string ApplicationName) |
| string | getApplicationName () |
| bool | checkCalendarNameExists (string szName) |
| CComponent * | getLatestComponent (int iType, time_t startdate, int ioffset, int &pErrorCode) |
| string | getDefaultCalendarName () |
| CComponent * | getPrevNextComponent (string szId, time_t iDateStart, bool isPrev, int &iCalid, int &perrorcode) |
| void | MCdestroy () |
| vector< CComponent * > | popEventDetails (QueryResult *pQr) |
| int | getCalendarIdForComponent (string iI, int &pErrorCode) |
| vector< CCalendar * > | getAllCalendars () |
| CCalendar * | getBirthdayCalendar () |
| bool | deleteBirthdaysForCalendar (int iCalid, int &pErrorCode) |
| int | getBdayEventCount (int iCalId, int &pErrorCode) |
Static Public Member Functions | |
| static CMulticalendar * | MCInstance () |
Private Member Functions | |
| vector< string > | giveRecursiveExpiredEvents (int iCalId, int iType, int iDayBefore, int &pErrorCode) |
| time_t | getInstanceBeyond (string szRRule, icaltimetype iDtStart, time_t iViewEnd, int &pErrorCode) |
| vector< string > | giveExpiredEntries (int iCalId, int iType, int iConfiguredTime, int &pErrorCode) |
| int | getCount (int iCalId, int iType, int &pErrorCode) |
| string | generateRrule (int iRepeatType, time_t iUntil, int &pErrorCode) |
| CMulticalendar (CMulticalendar &ref) | |
| CMulticalendar & | operator= (CMulticalendar &calendardb) |
Private Attributes | |
| vector< CCalendar * > | vCalendarList |
| int | iMaxId |
| string | AppName |
Static Private Attributes | |
| static CMulticalendar * | pMc |
CMulticalendar class
| CMulticalendar::CMulticalendar | ( | ) |
Default constructor for CMulticalendar class
| CMulticalendar::~CMulticalendar | ( | ) |
Destructor for Multicalendar class
| CMulticalendar::CMulticalendar | ( | CMulticalendar & | ref | ) | [private] |
private Dummy copy constructor because only one object needs to present To make sure copies are not created at runtime
| CCalendar * CMulticalendar::getSynchronizedCalendar | ( | ) |
| NONE |
| CCalendar * CMulticalendar::getDefaultCalendar | ( | ) |
| NONE |
| bool CMulticalendar::getICSFileInfo | ( | string | szFileName, | |
| unsigned int & | iEventCount, | |||
| unsigned int & | iTodoCount, | |||
| unsigned int & | iJournalCount, | |||
| int & | pErrorCode | |||
| ) |
| string | szFilenName | |
| int& | iEventCount Count of events in file | |
| int& | iTodoCount Number of todos in file | |
| int& | iJournalCount Number of journals in file | |
| int& | pErrorCode - error indicator |
| string CMulticalendar::getSynchronizedCalendarName | ( | ) |
| NONE |
| string CMulticalendar::getCTCapXML | ( | ) |
getCTCapXML
| none |
| bool CMulticalendar::importIcsFileData | ( | string | szFileName, | |
| int | iCalid, | |||
| string & | eventId, | |||
| int & | pErrorCode | |||
| ) |
| string filename to be imported | ||
| int iCalid - calendar id to which entries should be imported. | ||
| string Eventid of added event | ||
| int & reference to ErrorCode |
| int CMulticalendar::exportCalendarEntries | ( | int | iCalendarId, | |
| string | szFileName, | |||
| int & | pErrorCode | |||
| ) |
| CalendarId - Id of the calendar for which export has to happen | ||
| string - filename of the ics file | ||
| int & reference to ErrorCode |
| bool CMulticalendar::deleteEventBeyond | ( | int | iCalId, | |
| time_t | iUtc, | |||
| int & | pErrorCode | |||
| ) |
| int iCalid id of the calendar | ||
| utc time ( int utc) before wich all events should be deleted | ||
| int& pErrorcode reference to errorcode |
| bool CMulticalendar::deleteTodosBeyond | ( | int | iCalId, | |
| time_t | iUtc, | |||
| int & | pErrorCode | |||
| ) |
| int iCalid id of the calendar | ||
| time iUtc( int utc) before wich all todos should be deleted | ||
| int& pErrorcode reference to errorcode |
| CCalendar * CMulticalendar::getCalendarByName | ( | string | szName, | |
| int & | pErrorCode | |||
| ) |
| string szName calendar Name | ||
| int& pErrorCode reference to integer |
| bool CMulticalendar::deleteJournalsBeyond | ( | int | iCalId, | |
| time_t | iUtc, | |||
| int & | pErrorCode | |||
| ) |
| int iCalid id of the calendar | ||
| time iUtc( int utc) before which all journals should be deleted | ||
| int & pErrorCode reference to integer |
| bool CMulticalendar::enableAutomaticDeletion | ( | int | iDayBefore, | |
| int & | pErrorCode | |||
| ) |
| int iDayBefore configuration time for deletion of old events | ||
| int& pErrorcode reference to integer |
| vector< time_t > CMulticalendar::getRecurrentTimes | ( | string | szRRule, | |
| icaltimetype | iDtStart, | |||
| time_t | iViewEnd, | |||
| int & | pErrorCode | |||
| ) |
| string rrule recurrencerule | ||
| icaltimetype iDtdtstart datestart in Icaltime format. | ||
| time_t iViewEnd end range of current claendar view | ||
| int& pErrorCode pointer to ErrorCode |
| vector< CComponent * > CMulticalendar::getComponents | ( | int | iCalId, | |
| int | iType, | |||
| int | iStDate, | |||
| int | iEndDatei, | |||
| int & | pErrorCode | |||
| ) |
| int iCalId Calendar ID | ||
| int iType 1 -> EVENT 2 -> TODO 3 -> JOURNAL | ||
| 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 & refernce to ErrorCode |
| int CMulticalendar::getNoofCalendars | ( | ) |
| NONE |
| int CMulticalendar::addCalendar | ( | string | szTitle, | |
| CalendarColour | iColor, | |||
| int | iReadOnly, | |||
| int | iVisible, | |||
| CalendarType | iType, | |||
| string | szCalendarTune, | |||
| string | szCalendarVersion, | |||
| int & | pErrorCode | |||
| ) |
| string szTitle title of the calendar | ||
| CalendarColour colour of the calendar | ||
| int readonly flag | ||
| int visible flag | ||
| CalendarType type of the calendar | ||
| string szCalendarTune Calendar tune | ||
| string szCalendarVersion Calendar version | ||
| int& refernce to ErrorCode |
| bool CMulticalendar::modifyCalendar | ( | int | iId, | |
| string | szTitle, | |||
| CalendarColour | iColor, | |||
| int | iReadOnly, | |||
| int | iVisible, | |||
| CalendarType | iType, | |||
| string | szCalendarTune, | |||
| string | szCalendarVersion, | |||
| int & | pErrorCode | |||
| ) |
| int iId of the calendar | ||
| string szTitle title of the calendar | ||
| CalendarColour colour of the calendar | ||
| int iReadonly flag | ||
| int iVisible flag | ||
| string szCalendarTune Calendar tune | ||
| string szCalendarVersion Calendar version | ||
| CalendarType type of the calendar | ||
| int reference to ErrorCode |
| bool CMulticalendar::deleteCalendar | ( | int | iCalId, | |
| int & | pErrorCode | |||
| ) |
| int iCalid Calendar id | ||
| int & reference to ErrorCode |
| CCalendar * CMulticalendar::getCalendarById | ( | int | iCalId, | |
| int & | pErrorCode | |||
| ) |
| calid Calendar id | ||
| int * pointer reference to ErrorCode |
| void CMulticalendar::setMaxId | ( | int | iMaxId | ) |
| int | Max id of component found from DB |
| int CMulticalendar::getMaxId | ( | ) |
| none |
| int CMulticalendar::searchMaxId | ( | ) |
| none |
| vector< CComponent * > CMulticalendar::getComponentsAllCalendars | ( | int | iType, | |
| int | iStDate, | |||
| int | iEndDate, | |||
| int | iLimit, | |||
| int | iOffset, | |||
| vector< int > & | vCalid, | |||
| int & | pErrorCode | |||
| ) |
| : | type 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 Max limit of components to be obtanined by this function call | |
| : | offset from which we need to fetch | |
| : | vector<int> vCalid reference to place holder for calenadr id for each entry | |
| int * pointer to ErrorCode |
| vector< CComponent * > CMulticalendar::getAllEventsTodosForCalendar | ( | int | iCalid, | |
| int | iStDate, | |||
| int | iEndDate, | |||
| int | iLimit, | |||
| int | iOffset, | |||
| int & | pErrorCode | |||
| ) |
| : | iCalid Id of the Calendar for which event belongs | |
| : | 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 |
| bool CMulticalendar::addEvent | ( | CEvent * | pEvent, | |
| int | iCalendarId, | |||
| int & | pErrorCode | |||
| ) |
| CEvent *CEvent object pointer | ||
| int iCalendarId calendar ID | ||
| int & reference to ErrorCode |
| bool CMulticalendar::modifyEvent | ( | CEvent * | pEvent, | |
| int | iCalendarId, | |||
| int & | pErrorCode | |||
| ) |
| ptr CEvent object pointer | ||
| calendarId calendar ID | ||
| int * pointer reference to ErrorCode |
| bool CMulticalendar::deleteEvent | ( | int | iCalId, | |
| string | sCompId, | |||
| int & | pErrorCode | |||
| ) |
| cal_id Calendar id | ||
| compId Event ID | ||
| int * pointer reference to ErrorCode |
| bool CMulticalendar::addTodo | ( | CTodo * | pTodo, | |
| int | iCalendarId, | |||
| int & | pErrorCode | |||
| ) |
| ptr CTodo object pointer | ||
| calendarId calendar ID | ||
| int * pointer reference to ErrorCode |
| bool CMulticalendar::modifyTodo | ( | CTodo * | pTodo, | |
| int | iCalendarId, | |||
| int & | pErrorCode | |||
| ) |
| ptr CTodo object pointer | ||
| calendarId calendar ID | ||
| int * pointer reference to ErrorCode |
| bool CMulticalendar::deleteTodo | ( | int | iCalId, | |
| string | sCompId, | |||
| int & | pErrorCode | |||
| ) |
| cal_id Calendar id | ||
| compId Todo ID | ||
| int * pointer reference to ErrorCode |
| bool CMulticalendar::addJournal | ( | CJournal * | pJournal, | |
| int | iCalendarId, | |||
| int & | pErrorCode | |||
| ) |
| ptr CJournal object pointer | ||
| calendarId calendar ID | ||
| int * pointer reference to ErrorCode |
| bool CMulticalendar::modifyJournal | ( | CJournal * | pJournal, | |
| int | iCalendarId, | |||
| int & | pErrorCode | |||
| ) |
| CJournal* pJournal pointer to CJournal. | ||
| int iCalendarId Calendar id | ||
| int reference to error code. |
| bool CMulticalendar::deleteJournal | ( | int | iCalId, | |
| string | sCompId, | |||
| int & | pErrorCode | |||
| ) |
| int iCalId Calendar id | ||
| string sCompId Journal id | ||
| int reference to error code |
| CMulticalendar * CMulticalendar::MCInstance | ( | ) | [static] |
This fuction is used to create single multicalendar instance Function used to get the CMulticalendar instance
| int CMulticalendar::getEventCount | ( | int | iCalId, | |
| int & | pErrorCode | |||
| ) |
| int iCalid Calendar id | ||
| int & reference to error code. |
| int CMulticalendar::getTodoCount | ( | int | iCalId, | |
| int & | pErrorCode | |||
| ) |
| int iCalid calendar ID | ||
| int & reference to error code |
| int CMulticalendar::getNoteCount | ( | int | iCalId, | |
| int & | pErrorCode | |||
| ) |
| int iCalid calenadar Id | ||
| int * pointer reference to ErrorCode |
| vector< CCalendar * > CMulticalendar::getListCalFromMc | ( | ) |
| NONE |
| bool CMulticalendar::modifyCalendar | ( | CCalendar * | pCal, | |
| int & | pErrorCode | |||
| ) |
| CCalendar* pCal Pointer to CCalendar object | ||
| int refernce to ErrorCode |
| int CMulticalendar::addCalendar | ( | CCalendar * | pCal, | |
| int & | pErrorCode | |||
| ) |
| pCal pointer to CCalendar object | ||
| int& reference to ErrorCode |
| int CMulticalendar::getNumOfUndoneTasks | ( | int * | iCalId, | |
| int & | pErrorCode | |||
| ) |
| iCalId | int |
| int CMulticalendar::getNumOfAllDayEventsForToday | ( | int & | pErrorCode | ) |
| pErrorCode | int |
| vector< CComponent * > CMulticalendar::getTodaysAllDay | ( | int & | pErrorCode | ) |
getTodaysAllDay
| pErrorcode | reference to error code |
| bool CMulticalendar::addBirthDay | ( | CBdayEvent * | pBday, | |
| int & | pErrorCode | |||
| ) |
| pBday CBdayEvent object pointer | ||
| int &refernce to ErrorCode |
| bool CMulticalendar::modifyBirthDay | ( | CBdayEvent * | pBday, | |
| int & | pErrorCode | |||
| ) |
| pBday CBdayEvent object pointer | ||
| int reference to ErrorCode |
| bool CMulticalendar::deleteBirthDay | ( | string | szEUid, | |
| int & | pErrorCode | |||
| ) |
| string szEUid Id of the birthday event | ||
| int& pointer to ErrorCode |
| CCalendar * CMulticalendar::getCalendarByType | ( | int | iCalTypei, | |
| int & | pErrorCode | |||
| ) |
| iCalType Calendar Type | ||
| int & irefernce to ErrorCode |
| vector< CComponent * > CMulticalendar::getComponents | ( | int | iCalId, | |
| int | iType, | |||
| int | iStDate, | |||
| int | iEndDate, | |||
| int | iLimit, | |||
| int | iOffset, | |||
| int & | pErrorCode | |||
| ) |
| : | int iCalid Calendar ID | |
| : | type 1 -> EVENT 2 -> TODO 3 -> JOURNAL 4 -> BDAY | |
| : | int stDate to do conditional fetching based on start date. -1 in case of no conditions | |
| : | int endDate to do conditional fetching based on end date. -1 in case of no conditions | |
| : | int limit Max limit of components to be obtanined by this function call | |
| : | int offset from which we need to fetch | |
| int& reference to ErrorCode |
| int CMulticalendar::setAutocommitOff | ( | ) |
| none |
| bool CMulticalendar::commitAllChanges | ( | ) |
| NONE |
| bool CMulticalendar::rollbackAllChanges | ( | ) |
| none |
| bool CMulticalendar::setNextAlarm | ( | int | iCalendarId, | |
| string | sComponentId, | |||
| int & | pErrorCode | |||
| ) |
| : | int iCalendar of the calendar | |
| : | string sComponentId of the component | |
| : | int& reference to errorcode |
| void CMulticalendar::setApplicationName | ( | string | ApplicationName | ) |
| string name of the application |
| string CMulticalendar::getApplicationName | ( | ) |
| : | None |
| bool CMulticalendar::checkCalendarNameExists | ( | string | szName | ) |
| string | szName Name of Calendar |
| CComponent * CMulticalendar::getLatestComponent | ( | int | iType, | |
| time_t | startdate, | |||
| int | ioffset, | |||
| int & | pErrorCode | |||
| ) |
| int | iType Can be Event or todo( E_EVENT,E_TODO) | |
| time_t | time beyond which event can be fetched | |
| ioffset | - offset period on which the event can be fetched | |
| int | reference pErrorCode , error code to define the possible errros Function used by calendar applet to retrieve the latest components Function to retrieve upcoming events,todos |
| string CMulticalendar::getDefaultCalendarName | ( | ) |
| NONE |
| CComponent * CMulticalendar::getPrevNextComponent | ( | string | szId, | |
| time_t | iDateStart, | |||
| bool | isPrev, | |||
| int & | iCalid, | |||
| int & | perrorcode | |||
| ) |
| string | Id of the event | |
| datestart | of the event | |
| isPrev | flag to check query from previous/next event | |
| iCalid | calendar Id of the component | |
| perrorcode | reference to int to store error code if any |
| void CMulticalendar::MCdestroy | ( | ) |
| vector< CComponent * > CMulticalendar::popEventDetails | ( | QueryResult * | pQr | ) |
| vector<CComponent | *> | |
| struct | QueryResult pointer |
| int CMulticalendar::getCalendarIdForComponent | ( | string | iI, | |
| int & | pErrorCode | |||
| ) |
| string | iI | |
| error_code |
| vector< CCalendar * > CMulticalendar::getAllCalendars | ( | ) |
| NONE |
| CCalendar * CMulticalendar::getBirthdayCalendar | ( | ) |
| NONE |
| bool CMulticalendar::deleteBirthdaysForCalendar | ( | int | iCalid, | |
| int & | pErrorCode | |||
| ) |
| int | iCalid smart calendar Id to be deleted | |
| pErrorcode | int reference to error code |
| int CMulticalendar::getBdayEventCount | ( | int | iCalId, | |
| int & | pErrorCode | |||
| ) |
| iCalid Calendar id | ||
| int * pointer to ErrorCode |
| vector< string > CMulticalendar::giveRecursiveExpiredEvents | ( | int | iCalId, | |
| int | iType, | |||
| int | iDayBefore, | |||
| int & | pErrorCode | |||
| ) | [private] |
| iCalId - calendar ID | ||
| int type E_EVENT = 1 | ||
| int iDaybefore time for deletion of entries | ||
| int reference to ErrorCode |
| vector< string > CMulticalendar::giveExpiredEntries | ( | int | iCalId, | |
| int | iType, | |||
| int | iConfiguredTime, | |||
| int & | pErrorCode | |||
| ) | [private] |
| int iCalId - calendar ID | ||
| int type E_EVENT = 1,E_TODO = 2 | ||
| int Configured time for deletion of entries | ||
| int & pointer to ErrorCode |
select only non recursive events ,Modify the recursive events such that only previous instances are deleted
define GET_EXPIRED_EVENTS select s from components where s=d and s= d and s < d
define GET_EXPIRED_EVENTS select s from components where s=d and s= d and s < d
define GET_EXPIRED_TODOS select s from components where s=d and s= d and s = d and s < d
| int CMulticalendar::getCount | ( | int | iCalId, | |
| int | iType, | |||
| int & | pErrorCode | |||
| ) | [private] |
| int calendar id | ||
| int type of component | ||
| int& pointer to ErrorCode |
| string CMulticalendar::generateRrule | ( | int | iRepeatType, | |
| time_t | iUntil, | |||
| int & | pErrorCode | |||
| ) | [private] |
| repeattype frequency in int | ||
| until time in utc | ||
| int & reference to ErrorCode |
| CMulticalendar & CMulticalendar::operator= | ( | CMulticalendar & | calendardb | ) | [private] |
private dummy overloaded assignment operator to avoid creation of mutiple instances
vector< CCalendar * > CMulticalendar::vCalendarList [private] |
Calendar vector to maintain the list of calendars
CMulticalendar * CMulticalendar::pMc [static, private] |
Static multicalendar private object
1.5.1