#include <CMulticalendar.h>
Public Member Functions | |
bool | getRequiredDates (time_t iCurrTime, int iFutureDateNum, int iBackDateNum, int &iStartDate, int &iEndDate, vector< string > &vIdList, int &pErrorCode) |
int | getDateRange (time_t currTime, int iNum, bool iOperation, string &szTemp, int &pErrorCode) |
vector< CComponent * > | getEventInList (vector< string > listId, vector< int > &vCalId, int &pErrorCode) |
CCalendar * | getSynchronizedCalendar () |
CCalendar * | getDefaultCalendar () |
bool | getICSFileInfo (string szFileName, unsigned int &iEventCount, unsigned int &iTodoCount, unsigned int &iJournalCount, int &pErrorCode) |
bool | getICSFileInfoProgressive (string szFileName, unsigned int &iEventCount, unsigned int &iTodoCount, unsigned int &iJournalCount, int &pErrorCode, bool *bFileReadingOver, unsigned int iRequestLimit) |
void | cancelImportIcsFileData () |
string | getSynchronizedCalendarName () |
string | getCTCapXML () |
bool | importIcsFileDataProgressive (string szFileName, int iCalId, string &eventId, int &iDuplicateCountTask, int &iDuplicateCountEvent, int &iDuplicateCountJournal, int &pErrorCode, bool *bFileReadingOver, unsigned int iRequestLimit) |
bool | importIcsFileData (string szFileName, int iCalId, string &eventId, int &iDuplicateCountTask, int &iDuplicateCountEvent, int &iDuplicateCountJournal, int &pErrorCode) |
int | totalComponentsRead (string szLine, bool &bError, int &iEventBegin, int &iJournalBegin, int &iToDoBegin, unsigned int &iEventCount, unsigned int &iTodoCount, unsigned int &iJournalCount) |
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 iMax, int &iLimit, int &pErrorCode) |
vector< time_t > | getRecurrentTimes (string szRRule, icaltimetype iDtStart, time_t iViewEnd, icaltimezone *pTz, int &pErrorCode, int limit=-1) |
bool | getRecurrentTimes (string szRRule, icaltimetype iDtStart, int iEventDuration, time_t iViewBegin, time_t iViewEnd, icaltimezone *pTz, vector< time_t > &outTimes, int &pErrorCode, int limit=-1) |
bool | checkRecurrentTimes (string szRRule, icaltimetype iDtStart, time_t iViewEnd, icaltimezone *pTz, int &pErrorCode) |
bool | checkRecurrentTimes (string szRRule, icaltimetype iDtStart, int iEventDuration, time_t iViewBegin, time_t iViewEnd, icaltimezone *pTz, int &pErrorCode) |
vector< CComponent * > | getComponents (int iCalId, int iType, int iStDate, int iEndDatei, int &pErrorCode) |
int | getNoofCalendars () |
CCalendar * | 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) |
vector< CComponent * > | getComponentsAllCalendars (int iStDate, int iEndDate, int iLimit, int iOffset, vector< int > &vCalid, int &pErrorCode, int iQueryType=0) |
int | getComponentsAllCalendars (int iStDate, int iEndDate, int iLimit, int iOffset, vector< CComponent * > &vComponents, int iQueryType=0) |
int | getComponentsAllCalendarsBySummary (std::string sSummary, int iLimit, int iOffset, vector< CComponent * > &vComponents) |
vector< CComponent * > | getAllEventsTodos (int iCalid, int iStDate, int iEndDate, int iLimit, int iOffset, int &pErrorCode) |
bool | deleteEventAndTodoBeyond (int iCalId, time_t iUtc, int iType, 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 () |
void | releaseListCalendars (vector< CCalendar * > Calendars) |
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 () | |
bool | addBirthDay (CBdayEvent *pBday, int &pErrorCode) |
bool | addBirthdays (vector< CBdayEvent * > &pBdays, int &pErrorCode) |
bool | modifyBirthDay (CBdayEvent *pBday, int &pErrorCode) |
bool | deleteBirthDay (string szEUid, int &pErrorCode) |
bool | deleteBirthdays (vector< string > &szEUidList, 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 iType, 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, time_t &instance_time, int &perrorcode) |
void | MCdestroy () |
vector< CComponent * > | popEventDetails (QueryResult *pQr) |
int | getCalendarIdForComponent (string iI, int &pErrorCode) |
CCalendar * | getBirthdayCalendar () |
bool | deleteBirthdaysForCalendar (int iCalid, int &pErrorCode) |
int | getBdayEventCount (int iCalId, int &pErrorCode) |
void | clearCalendar (int iCalId, int &pErrorCode) |
void | clearCalendarContents (int iCalId, int &pErrorCode) |
icaltimezone * | getSystemTimeZoneAsIcalTimeZone () |
void | printCurrentTime () |
vector< string > | addComponents (vector< CComponent * > &compList, int iCalId, vector< string > &duplicateId, int &ErroCode) |
void | deleteComponents (vector< string > &idList, int iCalId, int &ErrorCode) |
void | modifyComponents (vector< CComponent * > &compList, int iCalId, int &ErrorCode) |
int | getVisibleCalendarCount (int &pErrorCode) |
void | findRecursiveImpendingEventId (time_t OriginalDateStart, time_t timebasedDateStart, bool isPrev, string &szEventId, time_t &instance_time, int &pErrorCode) |
string | getEventIdFromMap (map< time_t, string > &timeEventIdMap, time_t &timebasedDateStart, time_t &OriginalDateStart, bool isPrev, time_t &instance_time) |
void | enableDisableCalendarLogs (int value) |
void | deleteItemsByIdList (vector< string > &listId, int &pErrorCode) |
bool | moveFileFromSkel (string oldpath, string newpath) |
int | getComponentCount (int &pErrorCode) |
CEvent * | localBdayEventFromRemoteId (string szExId, int &pErrorCode) |
bool | getInstances (string sId, time_t timeFrom, time_t timeTo, vector< time_t > &result, time_t tzshift=0) |
int | getInstanceNumber (string sId, time_t timeFrom, time_t timeTo, time_t tzshift=0) |
bool | dropInstances (string sId) |
bool | addInstance (string sId, time_t instTime, time_t duration, time_t tzshift=0) |
bool | addInstances (string sId, vector< time_t > instances, time_t duration, time_t tzshift=0) |
vector< CComponent * > | getComponentsWithLimitedData (int iStDate, int iEndDate, int iLimit, int iOffset, vector< int > &vCalid, int &pErrorCode) |
bool | checkExistenceOfFutureRepeatingEvent (time_t OriginalDateStart, string sId, int &pErrorCode) |
bool | checkForNextPrev (time_t instanceTime, string Id, bool isPrev, int &pErrorCode) |
CalendarColour | getUnusedCalendarColor (void) |
void | getImpendingAlarm (string szRrule, time_t &triggerTime, time_t dateStart, int alarmFlag, icaltimezone *pTz) |
Static Public Member Functions | |
static CMulticalendar * | MCInstance () |
static time_t | getSystemTimeShift () |
static string | getSystemTimeZone () |
static bool | checkFileExists (string szPath) |
static void | reloadSystemTimezone () |
Private Member Functions | |
CMulticalendar () | |
vector< string > | giveRecursiveExpiredEvents (int iCalId, int iType, int iDayBefore, int iMax, int &iLimit, int &pErrorCode) |
time_t | getInstanceBeyond (string szRRule, icaltimetype iDtStart, time_t iViewEnd, icaltimezone *pTz, 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) |
void | setCalendarName (CCalendar *pCalendar, string szCalendarName) const |
int | regenerateInstances () |
Current timezone. | |
int | deleteNonRecurrentComponents (int iDayBefore, int iMax, int &pErrorCode) |
bool | deleteAllComponents (int iCalId, int &pErrorCode) |
void | cleanupIcsString (std::string &ics_line) |
void | restoreAlarms () |
int | comparePrevNextComponent (CComponent *c1, CComponent *c2, time_t t1=-1, time_t t2=-1) |
Private Attributes | |
int | iMaxId |
string | AppName |
Static Private Attributes | |
static CMulticalendar * | pMc = 0 |
static std::string | szSystemTimezone |
CMulticalendar class
CMulticalendar::~CMulticalendar | ( | ) |
Destructor for Multicalendar class
Destructor for CMulticalendar class
References CCalendarDB::closeDB(), and CCalendarDB::Instance().
CMulticalendar::CMulticalendar | ( | ) | [private] |
Default constructor for CMulticalendar class
Constructor for CMulticalendar class
Referenced by MCInstance().
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
bool CMulticalendar::getRequiredDates | ( | time_t | iCurrTime, | |
int | iFutureDateNum, | |||
int | iBackDateNum, | |||
int & | iStartDate, | |||
int & | iEndDate, | |||
vector< string > & | vIdList, | |||
int & | pErrorCode | |||
) |
Function to return the dates ranges for events distributed for given number of days
References getDateRange().
int CMulticalendar::getDateRange | ( | time_t | currTime, | |
int | iNum, | |||
bool | iOperation, | |||
string & | szTemp, | |||
int & | pErrorCode | |||
) |
fundtion to find the actual numner of events
References CCalendarDB::getRecords(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().
Referenced by getRequiredDates().
vector< CComponent * > CMulticalendar::getEventInList | ( | vector< string > | listId, | |
vector< int > & | vCalId, | |||
int & | pErrorCode | |||
) |
this function is responsible to retrieve the values stored in Component table and uses the set function to add values in to event object
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::setTrigger(), and CCalendarDB::sqliteErrorMapper().
CCalendar * CMulticalendar::getSynchronizedCalendar | ( | ) |
NONE |
NONE |
References getListCalFromMc().
CCalendar * CMulticalendar::getDefaultCalendar | ( | ) |
NONE |
NONE |
References getListCalFromMc().
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 |
References ICalConverter::checkCount(), and cleanupIcsString().
void CMulticalendar::cancelImportIcsFileData | ( | ) |
cancelImportIcsFileData
string CMulticalendar::getSynchronizedCalendarName | ( | ) |
NONE |
References getListCalFromMc(), and releaseListCalendars().
string CMulticalendar::getCTCapXML | ( | ) |
getCTCapXML
none |
none |
bool CMulticalendar::importIcsFileDataProgressive | ( | string | szFileName, | |
int | iCalId, | |||
string & | eventId, | |||
int & | iDuplicateCountTask, | |||
int & | iDuplicateCountEvent, | |||
int & | iDuplicateCountJournal, | |||
int & | pErrorCode, | |||
bool * | bFileReadingOver, | |||
unsigned int | iRequestLimit | |||
) |
Progressive API for importing events
importIcsFileDataProgressive()
string filename to be imported | ||
int iCalId Calendar in to which event have to be imported | ||
string Eventid of added event | ||
int * pointer to ErrorCode |
References addComponents(), cleanupIcsString(), ICalConverter::icalVcalToLocal(), and totalComponentsRead().
bool CMulticalendar::importIcsFileData | ( | string | szFileName, | |
int | iCalId, | |||
string & | eventId, | |||
int & | iDuplicateCountTask, | |||
int & | iDuplicateCountEvent, | |||
int & | iDuplicateCountJournal, | |||
int & | pErrorCode | |||
) |
string filename to be imported | ||
int iCalId Calendar in to which event have to be imported | ||
string Eventid of added event | ||
int * pointer to ErrorCode |
References addComponents(), cleanupIcsString(), and ICalConverter::icalVcalToLocal().
int CMulticalendar::totalComponentsRead | ( | string | szLine, | |
bool & | bError, | |||
int & | iEventBegin, | |||
int & | iJournalBegin, | |||
int & | iToDoBegin, | |||
unsigned int & | iEventCount, | |||
unsigned int & | iTodoCount, | |||
unsigned int & | iJournalCount | |||
) |
Function to fetch the count of component read from file
Referenced by importIcsFileDataProgressive().
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 |
CalendarId - Id of the calendar for which export has to happen | ||
string - filename of the ics file | ||
int * pointer to ErrorCode |
References CCalendar::exportCalendarEntries(), and getCalendarById().
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 |
icalid calendar ID | ||
time utc beyond which all todos should be deleted | ||
int * pointer to ErrorCode |
References deleteEvent(), getCalendarById(), giveExpiredEntries(), and MCInstance().
Referenced by deleteEventAndTodoBeyond().
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 |
int iCalid id of the calendar | ||
utc time ( int utc) before wich all todos should be deleted | ||
int * pointer to ErrorCode |
References deleteTodo(), getCalendarById(), giveExpiredEntries(), and MCInstance().
Referenced by deleteEventAndTodoBeyond().
CCalendar * CMulticalendar::getCalendarByName | ( | string | szName, | |
int & | pErrorCode | |||
) |
string szName calendar Name | ||
int& pErrorCode reference to integer |
References getListCalFromMc().
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 |
int iCalid id of the calendar | ||
utc time ( int utc) before which all journals should be deleted | ||
int * pointer to ErrorCode |
References deleteJournal(), getCalendarById(), giveExpiredEntries(), and MCInstance().
bool CMulticalendar::enableAutomaticDeletion | ( | int | iDayBefore, | |
int | iMax, | |||
int & | iLimit, | |||
int & | pErrorCode | |||
) |
int iDayBefore configuration time for deletion of old events | ||
int& pErrorcode reference to integer |
int configuration time for deletion of old events | ||
int * pointer to ErrorCode |
References deleteNonRecurrentComponents(), CComponent::getDateEnd(), CComponent::getDateStart(), CComponent::getId(), getInstanceBeyond(), getListCalFromMc(), getSystemTimeZone(), CComponent::getTzid(), giveRecursiveExpiredEvents(), CCalendarDB::Instance(), modifyComponents(), releaseListCalendars(), CComponent::setDateEnd(), and CComponent::setDateStart().
vector< time_t > CMulticalendar::getRecurrentTimes | ( | string | szRRule, | |
icaltimetype | iDtStart, | |||
time_t | iViewEnd, | |||
icaltimezone * | pTz, | |||
int & | pErrorCode, | |||
int | limit = -1 | |||
) |
string rrule recurrencerule | ||
icaltimetype iDtdtstart datestart in Icaltime format. | ||
time_t iViewEnd end range of current claendar view | ||
int& pErrorCode pointer to ErrorCode | ||
int limit will return if this number of instances has found |
rrule recurrencerule | ||
dtstart datestart in Icaltime format. | ||
viewEnd end range of current claendar view |
Referenced by checkRecurrentTimes(), CRecurrence::generateInstanceTimes(), ICalConverter::getImpendingAlarm(), and getImpendingAlarm().
bool CMulticalendar::getRecurrentTimes | ( | string | szRRule, | |
icaltimetype | iDtStart, | |||
int | iEventDuration, | |||
time_t | iViewBegin, | |||
time_t | iViewEnd, | |||
icaltimezone * | pTz, | |||
vector< time_t > & | outTimes, | |||
int & | pErrorCode, | |||
int | limit = -1 | |||
) |
string rrule recurrencerule | ||
icaltimetype iDtdtstart datestart in Icaltime format. | ||
int iEventDuration duration of original event | ||
time_t iViewBegin start range of current claendar view | ||
time_t iViewEnd end range of current claendar view | ||
vector<time_t> outTimes - generated event times | ||
int& pErrorCode pointer to ErrorCode | ||
int limit will return if this number of instances has found |
rrule recurrencerule | ||
dtstart datestart in Icaltime format. | ||
iEventDuration duration of original event | ||
iViewBegin start range of current claendar view | ||
viewEnd end range of current claendar view | ||
outTimes generated event times | ||
pErrorCode pointer to ErrorCode | ||
limit will return if this number of instances has found |
bool CMulticalendar::checkRecurrentTimes | ( | string | szRRule, | |
icaltimetype | iDtStart, | |||
time_t | iViewEnd, | |||
icaltimezone * | pTz, | |||
int & | pErrorCode | |||
) |
time_t iViewEnd end range of current claendar view | ||
int& pErrorCode pointer to ErrorCode |
rrule recurrencerule | ||
dtstart datestart in Icaltime format. | ||
viewEnd end range of current claendar view |
bool CMulticalendar::checkRecurrentTimes | ( | string | szRRule, | |
icaltimetype | iDtStart, | |||
int | iEventDuration, | |||
time_t | iViewBegin, | |||
time_t | iViewEnd, | |||
icaltimezone * | pTz, | |||
int & | pErrorCode | |||
) |
string rrule recurrencerule | ||
icaltimetype iDtdtstart datestart in Icaltime format. | ||
int iEventDuration duration of original event | ||
time_t iViewBegin start range of current claendar view | ||
time_t iViewEnd end range of current claendar view | ||
int& pErrorCode pointer to ErrorCode |
rrule recurrencerule | ||
dtstart datestart in Icaltime format. | ||
viewEnd end range of current claendar view |
References getRecurrentTimes().
vector< CComponent * > CMulticalendar::getComponents | ( | int | iCalId, | |
int | iType, | |||
int | iStDate, | |||
int | iEndDate, | |||
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 |
calid Calendar ID | ||
type 1 -> EVENT 2 -> TODO 3 -> JOURNAL | ||
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 * pointer to ErrorCode |
References getCalendarById(), and CCalendar::getComponents().
int CMulticalendar::getNoofCalendars | ( | ) |
NONE |
getNoofCalendars ()
NONE |
References getListCalFromMc(), and releaseListCalendars().
CCalendar * 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. If it is COLOUR_NEXT_FREE, next available free color will be choosen automatically. | ||
int readonly flag | ||
int visible flag | ||
CalendarType type of the calendar | ||
string szCalendarTune Calendar tune | ||
string szCalendarVersion Calendar version | ||
int& refernce to ErrorCode |
title 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 * pointer 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 |
Id of the calendar | ||
title title of the calendar | ||
CalendarColour colour of the calendar | ||
int readonly flag | ||
int visible flag | ||
CalendarType type of the calendar | ||
string CalendarTune of the calendar | ||
string CalendarVersion of the calendar | ||
int * pointer to ErrorCode |
References getCalendarById(), CCalendar::setCalendarColor(), setCalendarName(), CCalendar::setCalendarReadOnly(), CCalendar::setCalendarShown(), CCalendar::setCalendarTune(), CCalendar::setCalendarType(), and CCalendar::setCalendarVersion().
bool CMulticalendar::deleteCalendar | ( | int | iCalId, | |
int & | pErrorCode | |||
) |
int iCalid Calendar id | ||
int & reference to ErrorCode |
calid Calendar id | ||
int * pointer to ErrorCode |
References clearCalendar(), commitAllChanges(), getCalendarById(), CCalendar::getCalendarId(), CCalendar::getCalendarType(), CCalendarDB::getDb(), CCalendarDB::Instance(), rollbackAllChanges(), setAutocommitOff(), CCalendarDB::sqliteErrorMapper(), and CCalendarDB::updateDB().
CCalendar * CMulticalendar::getCalendarById | ( | int | iCalId, | |
int & | pErrorCode | |||
) |
calid Calendar id | ||
int * pointer reference to ErrorCode |
References CCalendarDB::getRecords(), CCalendarDB::Instance(), CCalendar::setCalendarColor(), CCalendar::setCalendarId(), setCalendarName(), CCalendar::setCalendarTune(), CCalendar::setCalendarType(), CCalendar::setCalendarVersion(), CCalendar::setProfileType(), and CCalendar::toString().
Referenced by CAlarm::addAlarmEvent(), addComponents(), addEvent(), addJournal(), addTodo(), clearCalendar(), deleteCalendar(), deleteComponents(), deleteEvent(), deleteEventBeyond(), deleteJournal(), deleteJournalsBeyond(), deleteTodo(), deleteTodosBeyond(), exportCalendarEntries(), getAllEventsTodos(), getComponents(), getLatestComponent(), getPrevNextComponent(), modifyCalendar(), modifyComponents(), modifyEvent(), modifyJournal(), modifyTodo(), and setNextAlarm().
vector< CComponent * > CMulticalendar::getComponentsAllCalendars | ( | int | iStDate, | |
int | iEndDate, | |||
int | iLimit, | |||
int | iOffset, | |||
vector< int > & | vCalid, | |||
int & | pErrorCode, | |||
int | iQueryType = 0 | |||
) |
: | 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: 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. | |
: | int iQueryType value 1 - Indicates simple events and tasks value 2 - indicates Repeating events Any other value fetches all ( repeating events , non repeating events and tasks) Default value is 0. |
: | 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: 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. | ||
: | iQueryType - default parameter with value 0 0- Fetches all Events + tasks 1- Fetches non repeating events + tasks 2- Fetches repeating events alone in the given range. |
define SELECT_ALL_CALCOMP__UNION "select * from %s where ((%s = %d AND %s < %d AND %s >= %d) OR ( %s = %d AND %s >= %d AND %s <= %d )) AND (%s != %d AND %s != %d) AND calendarId in (select calendarid from calendars where IsVisible =1 ) union select * from %s where (%s = %d OR %s=%d) AND (%s = %d OR %s = %d) AND (%d < %s OR %d = %s) AND calendarId in (select calendarid from calendars where IsVisible =1) ORDER BY CalendarId LIMIT %d OFFSET %d "
References CComponent::getAlarmProperties(), CComponent::getFlags(), CComponent::getInstanceNumber(), CCalendarDB::getRecords(), CComponent::getRecurrenceProperties(), CComponent::getType(), CCalendarDB::Instance(), CComponent::setCalendarId(), CComponent::setDescription(), CComponent::setGUid(), CComponent::setId(), CComponent::setLocation(), CComponent::setSummary(), CComponent::setTzid(), and CCalendarDB::sqliteErrorMapper().
Referenced by getPrevNextComponent(), and regenerateInstances().
int CMulticalendar::getComponentsAllCalendars | ( | int | iStDate, | |
int | iEndDate, | |||
int | iLimit, | |||
int | iOffset, | |||
vector< CComponent * > & | vComponents, | |||
int | iQueryType = 0 | |||
) |
: | 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 for CComponent. If pErrorCode equals to CALENDAR_OPERATION_SUCCESSFUL, but vector is empty, no component (from offset to limit) meets the conditions, continue fetching | |
: | int iQueryType value 1 - Indicates simple events and tasks value 2 - indicates Repeating events Any other value fetches all ( repeating events , non repeating events and tasks) Default value is 0. |
References CCalendarDB::Instance().
int CMulticalendar::getComponentsAllCalendarsBySummary | ( | std::string | sSummary, | |
int | iLimit, | |||
int | iOffset, | |||
vector< CComponent * > & | vComponents | |||
) |
sSummary | text for finding in summary of components (should be specified in format of SQL LIKE operator) | |
iLimit | Max limit of components to be obtanined by this function call | |
iOffset | offset from which we need to fetch | |
vComponents | 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 |
References CCalendarDB::Instance().
vector< CComponent * > CMulticalendar::getAllEventsTodos | ( | 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 |
: | 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 |
References CCalendar::getAllEventsTodos(), getCalendarById(), and MCInstance().
bool CMulticalendar::deleteEventAndTodoBeyond | ( | int | iCalId, | |
time_t | iUtc, | |||
int | iType, | |||
int & | pErrorCode | |||
) |
icalid calendar ID | ||
time utc beyond which all todos should be deleted | ||
iType Component type | ||
int * pointer to ErrorCode |
References deleteEventBeyond(), deleteTodosBeyond(), and MCInstance().
bool CMulticalendar::addEvent | ( | CEvent * | pEvent, | |
int | iCalendarId, | |||
int & | pErrorCode | |||
) |
CEvent *CEvent object pointer | ||
int iCalendarId calendar ID | ||
int & reference to ErrorCode |
ptr CEvent object pointer | ||
calendarId calendar ID | ||
int * pointer to ErrorCode |
References CCalendar::addEvent(), commitAllChanges(), getCalendarById(), CCalendar::getCalendarId(), CComponent::getId(), rollbackAllChanges(), and setAutocommitOff().
bool CMulticalendar::modifyEvent | ( | CEvent * | pEvent, | |
int | iCalendarId, | |||
int & | pErrorCode | |||
) |
ptr CEvent object pointer | ||
calendarId calendar ID | ||
int * pointer reference to ErrorCode |
ptr CEvent object pointer | ||
calendarId calendar ID | ||
int * pointer to ErrorCode |
References commitAllChanges(), getCalendarById(), CCalendar::getCalendarId(), CComponent::getId(), CCalendar::modifyEvent(), rollbackAllChanges(), and setAutocommitOff().
bool CMulticalendar::deleteEvent | ( | int | iCalId, | |
string | sCompId, | |||
int & | pErrorCode | |||
) |
cal_id Calendar id | ||
compId Event ID | ||
int * pointer reference to ErrorCode |
cal_id Calendar id | ||
compId Event ID | ||
int * pointer to ErrorCode |
References commitAllChanges(), CCalendar::deleteEvent(), getCalendarById(), CCalendar::getCalendarId(), rollbackAllChanges(), and setAutocommitOff().
Referenced by deleteEventBeyond().
bool CMulticalendar::addTodo | ( | CTodo * | pTodo, | |
int | iCalendarId, | |||
int & | pErrorCode | |||
) |
ptr CTodo object pointer | ||
calendarId calendar ID | ||
int * pointer reference to ErrorCode |
ptr CTodo object pointer | ||
calendarId calendar ID | ||
int * pointer to ErrorCode |
References CCalendar::addTodo(), commitAllChanges(), getCalendarById(), CCalendar::getCalendarId(), CComponent::getId(), rollbackAllChanges(), and setAutocommitOff().
bool CMulticalendar::modifyTodo | ( | CTodo * | pTodo, | |
int | iCalendarId, | |||
int & | pErrorCode | |||
) |
ptr CTodo object pointer | ||
calendarId calendar ID | ||
int * pointer reference to ErrorCode |
ptr CTodo object pointer | ||
calendarId calendar ID | ||
int * pointer to ErrorCode |
References commitAllChanges(), getCalendarById(), CCalendar::getCalendarId(), CComponent::getId(), CCalendar::modifyTodo(), rollbackAllChanges(), and setAutocommitOff().
bool CMulticalendar::deleteTodo | ( | int | iCalId, | |
string | sCompId, | |||
int & | pErrorCode | |||
) |
cal_id Calendar id | ||
compId Todo ID | ||
int * pointer reference to ErrorCode |
cal_id Calendar id | ||
compId Todo ID | ||
int * pointer to ErrorCode |
References commitAllChanges(), CCalendar::deleteTodo(), getCalendarById(), CCalendar::getCalendarId(), rollbackAllChanges(), and setAutocommitOff().
Referenced by deleteTodosBeyond().
bool CMulticalendar::addJournal | ( | CJournal * | pJournal, | |
int | iCalendarId, | |||
int & | pErrorCode | |||
) |
ptr CJournal object pointer | ||
calendarId calendar ID | ||
int * pointer reference to ErrorCode |
ptr CJournal object pointer | ||
calendarId calendar ID | ||
int * pointer to ErrorCode |
References CCalendar::addJournal(), commitAllChanges(), getCalendarById(), CCalendar::getCalendarId(), CComponent::getId(), rollbackAllChanges(), and setAutocommitOff().
bool CMulticalendar::modifyJournal | ( | CJournal * | pJournal, | |
int | iCalendarId, | |||
int & | pErrorCode | |||
) |
CJournal* pJournal pointer to CJournal. | ||
int iCalendarId Calendar id | ||
int reference to error code. |
ptr CJournal object pointer | ||
calendarId Calendar id | ||
int * pointer to ErrorCode |
References commitAllChanges(), getCalendarById(), CCalendar::getCalendarId(), CComponent::getId(), CCalendar::modifyJournal(), rollbackAllChanges(), and setAutocommitOff().
bool CMulticalendar::deleteJournal | ( | int | iCalId, | |
string | sCompId, | |||
int & | pErrorCode | |||
) |
int iCalId Calendar id | ||
string sCompId Journal id | ||
int reference to error code |
cal_id Calendar id | ||
compId Journal id | ||
int * pointer to ErrorCode |
References commitAllChanges(), CCalendar::deleteJournal(), getCalendarById(), CCalendar::getCalendarId(), rollbackAllChanges(), and setAutocommitOff().
Referenced by deleteJournalsBeyond().
CMulticalendar * CMulticalendar::MCInstance | ( | ) | [static] |
This fuction is used to create single multicalendar instance Function used to get the CMulticalendar instance
Function used to get the CMulticalendar instance
References checkFileExists(), CMulticalendar(), enableDisableCalendarLogs(), and restoreAlarms().
Referenced by CAlarm::addAlarmEvent(), CCalendar::addComponent(), deleteEventAndTodoBeyond(), deleteEventBeyond(), deleteJournalsBeyond(), deleteTodosBeyond(), ICalConverter::findZoneStartTime(), CRecurrence::generateInstanceTimes(), CComponent::generateYearlyInstanceTime(), getAllEventsTodos(), CCalendar::getAllEventsTodos(), CCalendar::getComponents(), ICalConverter::getImpendingAlarm(), ICalConverter::importEventDateEnd(), ICalConverter::importEventDateStartAndDateEnd(), CCalendarDB::sendDBusMessage(), and ICalConverter::toLocal().
int CMulticalendar::getEventCount | ( | int | iCalId, | |
int & | pErrorCode | |||
) |
int iCalid Calendar id | ||
int & reference to error code. |
iCalid Calendar id | ||
int * pointer to ErrorCode |
References getCount().
int CMulticalendar::getTodoCount | ( | int | iCalId, | |
int & | pErrorCode | |||
) |
int iCalid calendar ID | ||
int & reference to error code |
iCalid | ||
int * pointer to ErrorCode |
References getCount().
int CMulticalendar::getNoteCount | ( | int | iCalId, | |
int & | pErrorCode | |||
) |
int iCalid calenadar Id | ||
int * pointer reference to ErrorCode |
ICalid | ||
int * pointer to ErrorCode |
References getCount().
vector< CCalendar * > CMulticalendar::getListCalFromMc | ( | ) |
NONE |
References CCalendarDB::getRecords(), CCalendarDB::Instance(), CCalendar::setCalendarColor(), CCalendar::setCalendarId(), setCalendarName(), CCalendar::setCalendarTune(), CCalendar::setCalendarType(), CCalendar::setCalendarVersion(), CCalendar::setProfileType(), and CCalendar::toString().
Referenced by checkCalendarNameExists(), enableAutomaticDeletion(), getBirthdayCalendar(), getCalendarByName(), getCalendarByType(), getDefaultCalendar(), getDefaultCalendarName(), getNoofCalendars(), getSynchronizedCalendar(), getSynchronizedCalendarName(), getUnusedCalendarColor(), and modifyCalendar().
void CMulticalendar::releaseListCalendars | ( | vector< CCalendar * > | Calendars | ) |
Vector of CCalendar* |
Referenced by checkCalendarNameExists(), enableAutomaticDeletion(), getDefaultCalendarName(), getNoofCalendars(), getSynchronizedCalendarName(), getUnusedCalendarColor(), and modifyCalendar().
bool CMulticalendar::modifyCalendar | ( | CCalendar * | pCal, | |
int & | pErrorCode | |||
) |
CCalendar* pCal Pointer to CCalendar object | ||
int refernce to ErrorCode |
pCal Pointer to CCalendar object | ||
int * pointer to ErrorCode |
References commitAllChanges(), CCalendar::destroyExistingValidAlarms(), CCalendar::getCalendarColor(), CCalendar::getCalendarId(), CCalendar::getCalendarName(), CCalendar::getCalendarTune(), CCalendar::getCalendarType(), CCalendar::getCalendarVersion(), CCalendarDB::getDb(), getListCalFromMc(), CCalendar::getProfileType(), CCalendarDB::Instance(), CCalendar::IsReadOnly(), CCalendar::IsShown(), CCalendar::registerAlarmForVisibleCalendar(), releaseListCalendars(), rollbackAllChanges(), setAutocommitOff(), CCalendar::setCalendarType(), CCalendarDB::sqliteErrorMapper(), and CCalendarDB::updateDB().
int CMulticalendar::addCalendar | ( | CCalendar * | pCal, | |
int & | pErrorCode | |||
) |
pCal pointer to CCalendar object | ||
int& reference to ErrorCode |
pCal pointer to CCalendar object | ||
int * pointer to ErrorCode |
References checkCalendarNameExists(), commitAllChanges(), CCalendar::getCalendarColor(), CCalendar::getCalendarId(), CCalendar::getCalendarName(), CCalendar::getCalendarTune(), CCalendar::getCalendarType(), CCalendar::getCalendarVersion(), CCalendarDB::getDb(), CCalendar::getProfileType(), getUnusedCalendarColor(), CCalendarDB::insertRows(), CCalendarDB::Instance(), CCalendar::IsReadOnly(), CCalendar::IsShown(), rollbackAllChanges(), setAutocommitOff(), CCalendar::setCalendarColor(), CCalendar::setCalendarId(), and CCalendarDB::sqliteErrorMapper().
int CMulticalendar::getNumOfUndoneTasks | ( | int * | iCalId, | |
int & | pErrorCode | |||
) |
iCalId | int |
select * from Components where Status <>1 AND ComponentType =2 AND CalendarId in (select CalendarId from calendars where IsVisible =1); NOTE: Status<>1 means not completed status. This shall be changed if it will be possible to have more than 1 completed status.
References CCalendarDB::getRecords(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().
int CMulticalendar::getNumOfAllDayEventsForToday | ( | int & | pErrorCode | ) |
pErrorCode | int |
References CCalendarDB::getRecords(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().
vector< CComponent * > CMulticalendar::getTodaysAllDay | ( | int & | pErrorCode | ) |
getTodaysAllDay
pErrorcode | reference to error code |
References getBirthdayCalendar(), CCalendar::getCalendarId(), CCalendar::getComponents(), CCalendarDB::getRecords(), getSystemTimeZone(), CCalendarDB::Instance(), CCalendar::IsShown(), CComponent::setAllDay(), CComponent::setCalendarId(), CComponent::setId(), CComponent::setSummary(), CComponent::setTzid(), CCalendarDB::sqliteErrorMapper(), and CComponent::toString().
bool CMulticalendar::addBirthDay | ( | CBdayEvent * | pBday, | |
int & | pErrorCode | |||
) |
pBday CBdayEvent object pointer | ||
int &refernce to ErrorCode |
pBday CBdayEvent object pointer | ||
int * pointer to ErrorCode |
References addBirthdays().
bool CMulticalendar::addBirthdays | ( | vector< CBdayEvent * > & | pBdays, | |
int & | pErrorCode | |||
) |
pBdays list of CBdayEvent object pointer | ||
int * pointer to ErrorCode |
References CCalendar::addBirthDay(), commitAllChanges(), getCalendarByType(), CCalendar::getCalendarId(), rollbackAllChanges(), and setAutocommitOff().
Referenced by addBirthDay().
bool CMulticalendar::modifyBirthDay | ( | CBdayEvent * | pBday, | |
int & | pErrorCode | |||
) |
pBday CBdayEvent object pointer | ||
int reference to ErrorCode |
pBday CBdayEvent object pointer | ||
int * pointer to ErrorCode |
References commitAllChanges(), getCalendarByType(), CCalendar::getCalendarId(), CComponent::getId(), CCalendar::modifyBirthDay(), rollbackAllChanges(), and setAutocommitOff().
bool CMulticalendar::deleteBirthDay | ( | string | szEUid, | |
int & | pErrorCode | |||
) |
string szEUid Id of the birthday event | ||
int& pointer to ErrorCode |
eUid Ebook Uid | ||
int & pointer to ErrorCode |
References deleteBirthdays().
bool CMulticalendar::deleteBirthdays | ( | vector< string > & | szEUidList, | |
int & | pErrorCode | |||
) |
vector<string>& szEUidList list of Ids of the birthday events | ||
int& pointer to ErrorCode |
References commitAllChanges(), CCalendar::deleteBirthDay(), getCalendarByType(), CCalendar::getCalendarId(), rollbackAllChanges(), and setAutocommitOff().
Referenced by deleteBirthDay().
CCalendar * CMulticalendar::getCalendarByType | ( | int | iCalType, | |
int & | pErrorCode | |||
) |
iCalType Calendar Type | ||
int & irefernce to ErrorCode |
References getListCalFromMc().
Referenced by addBirthdays(), deleteBirthdays(), and modifyBirthDay().
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 |
getComponents ()
: | calid Calendar ID | |
: | 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 | |
int * pointer to ErrorCode |
References getCalendarById(), and CCalendar::getComponents().
int CMulticalendar::setAutocommitOff | ( | ) |
none |
none |
References CCalendarDB::Instance(), and CCalendarDB::setAutocommitOff().
Referenced by addBirthdays(), addCalendar(), addComponents(), addEvent(), addJournal(), addTodo(), deleteBirthdays(), deleteBirthdaysForCalendar(), deleteCalendar(), deleteComponents(), deleteEvent(), deleteJournal(), deleteTodo(), modifyBirthDay(), modifyCalendar(), modifyComponents(), modifyEvent(), modifyJournal(), modifyTodo(), and setNextAlarm().
bool CMulticalendar::commitAllChanges | ( | ) |
NONE |
string DBus message to be sent when commit happens |
References CCalendarDB::commitDB(), and CCalendarDB::Instance().
Referenced by addBirthdays(), addCalendar(), addComponents(), addEvent(), addJournal(), addTodo(), clearCalendarContents(), deleteBirthdays(), deleteBirthdaysForCalendar(), deleteCalendar(), deleteComponents(), deleteEvent(), deleteJournal(), deleteTodo(), modifyBirthDay(), modifyCalendar(), modifyComponents(), modifyEvent(), modifyJournal(), modifyTodo(), and setNextAlarm().
bool CMulticalendar::rollbackAllChanges | ( | ) |
none |
none |
References CCalendarDB::Instance(), and CCalendarDB::rollbackDB().
Referenced by addBirthdays(), addCalendar(), addComponents(), addEvent(), addJournal(), addTodo(), clearCalendar(), deleteBirthdays(), deleteBirthdaysForCalendar(), deleteCalendar(), deleteComponents(), deleteEvent(), deleteJournal(), deleteTodo(), modifyBirthDay(), modifyCalendar(), modifyComponents(), modifyEvent(), modifyJournal(), modifyTodo(), and setNextAlarm().
bool CMulticalendar::setNextAlarm | ( | int | iCalendarId, | |
string | sComponentId, | |||
int | iType, | |||
int & | pErrorCode | |||
) |
: | int iCalendar of the calendar | |
: | string sComponentId of the component | |
: | int iType Component type | |
: | int& reference to errorcode |
: | int id of the calendar | |
: | string id of the component | |
: | int errorcode |
References commitAllChanges(), getCalendarById(), CCalendar::IsShown(), rollbackAllChanges(), setAutocommitOff(), and CCalendar::setNextAlarm().
Referenced by restoreAlarms().
void CMulticalendar::setApplicationName | ( | string | ApplicationName | ) |
string name of the application |
string CMulticalendar::getApplicationName | ( | ) |
: | None |
Referenced by CCalendarDB::sendDBusMessage().
bool CMulticalendar::checkCalendarNameExists | ( | string | szName | ) |
string | szName Name of Calendar |
szName | Name of Calendar |
References getListCalFromMc(), and releaseListCalendars().
Referenced by addCalendar().
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 |
type | Can be Event or todo | |
ioffset | offset from which the event can be fetched | |
pErrorCode,error | code to define the possible errros |
References CComponent::getAllDay(), CCalendar::getBirthDayEvent(), getCalendarById(), CCalendar::getCalendarType(), CComponent::getDateStart(), CCalendar::getEvent(), CComponent::getId(), CCalendarDB::getRecords(), CComponent::getSummary(), CComponent::getTzid(), CCalendarDB::Instance(), CCalendar::IsShown(), CComponent::setAllDay(), CComponent::setCalendarId(), CComponent::setDateStart(), CComponent::setId(), CComponent::setSummary(), CComponent::setTzid(), and CCalendarDB::sqliteErrorMapper().
string CMulticalendar::getDefaultCalendarName | ( | ) |
NONE |
NONE |
References getListCalFromMc(), and releaseListCalendars().
CComponent * CMulticalendar::getPrevNextComponent | ( | string | szId, | |
time_t | iDateStart, | |||
bool | isPrev, | |||
int & | iCalid, | |||
time_t & | instance_time, | |||
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 |
string | Id of the event | |
datestart | of the event | |
isPrev | flag to check query from previous/next event | |
iCalid | calendar Id of the component |
References comparePrevNextComponent(), CCalendar::getBirthDayEvent(), getCalendarById(), CComponent::getCalendarId(), CCalendar::getCalendarType(), getComponentsAllCalendars(), CComponent::getDateStart(), CCalendar::getEvent(), CComponent::getId(), CCalendarDB::getRecords(), CComponent::getSummary(), CCalendarDB::Instance(), popEventDetails(), and CCalendarDB::sqliteErrorMapper().
void CMulticalendar::MCdestroy | ( | ) |
vector< CComponent * > CMulticalendar::popEventDetails | ( | QueryResult * | pQr | ) |
vector<CComponent | *> | |
struct | QueryResult pointer |
References CComponent::getAlarmProperties(), CComponent::getFlags(), CComponent::getRecurrenceProperties(), CComponent::getType(), CComponent::setCalendarId(), CComponent::setDescription(), CComponent::setGUid(), CComponent::setId(), CComponent::setLocation(), CComponent::setSummary(), CComponent::setTzid(), and CComponent::toString().
Referenced by getPrevNextComponent().
int CMulticalendar::getCalendarIdForComponent | ( | string | iI, | |
int & | pErrorCode | |||
) |
string | iI | |
error_code |
References CCalendarDB::getRecords(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().
CCalendar * CMulticalendar::getBirthdayCalendar | ( | ) |
NONE |
NONE |
References getListCalFromMc().
Referenced by getTodaysAllDay().
bool CMulticalendar::deleteBirthdaysForCalendar | ( | int | iCalId, | |
int & | pErrorCode | |||
) |
int | iCalid smart calendar Id to be deleted | |
pErrorcode | int reference to error code |
References commitAllChanges(), CCalendarDB::getDb(), CCalendarDB::Instance(), rollbackAllChanges(), setAutocommitOff(), CCalendarDB::sqliteErrorMapper(), and CCalendarDB::updateDB().
int CMulticalendar::getBdayEventCount | ( | int | iCalId, | |
int & | pErrorCode | |||
) |
iCalid Calendar id | ||
int * pointer to ErrorCode |
References getCount().
time_t CMulticalendar::getSystemTimeShift | ( | ) | [static] |
utility API can be used by applications using backend to get the current timezone
References getSystemTimeZone().
string CMulticalendar::getSystemTimeZone | ( | ) | [static] |
utility API can be used by applications using backend to get the current timezone
Referenced by CAlarm::addAlarmEvent(), CCalendar::addComponent(), enableAutomaticDeletion(), ICalConverter::findZoneStartTime(), CComponent::generateYearlyInstanceTime(), CCalendar::getAllEventsTodos(), CCalendar::getComponents(), getSystemTimeShift(), getSystemTimeZoneAsIcalTimeZone(), getTodaysAllDay(), ICalConverter::importEventDateEnd(), ICalConverter::importEventDateStartAndDateEnd(), and ICalConverter::toLocal().
void CMulticalendar::clearCalendar | ( | int | iCalId, | |
int & | pErrorCode | |||
) |
iCalId | Calendar Id | |
pErrorCode | - Reference to errror Code |
References deleteAllComponents(), CCalendar::destroyExistingValidAlarms(), CCalendarDB::execSQL(), getCalendarById(), CCalendar::getCalendarType(), CCalendarDB::getDb(), CCalendarDB::Instance(), rollbackAllChanges(), CCalendarDB::sqliteErrorMapper(), and CCalendarDB::updateDB().
Referenced by clearCalendarContents(), and deleteCalendar().
void CMulticalendar::clearCalendarContents | ( | int | iCalId, | |
int & | pErrorCode | |||
) |
iCalId | Calendar Id | |
pErrorCode | - Reference to errror Code |
iCalId | Calendar Id | |
pErrorCode | - Reference to errror Code |
References clearCalendar(), and commitAllChanges().
icaltimezone * CMulticalendar::getSystemTimeZoneAsIcalTimeZone | ( | ) |
getSystemTimeZoneAsIcalTimeZone
References getSystemTimeZone().
Referenced by ICalConverter::getImpendingAlarm().
void CMulticalendar::printCurrentTime | ( | ) |
This function is used esp for debugging logs time in microsec
vector< string > CMulticalendar::addComponents | ( | vector< CComponent * > & | compList, | |
int | iCalId, | |||
vector< string > & | duplicateId, | |||
int & | ErroCode | |||
) |
Function to disable debugging at runtime
vector<CComponent*> | vector of CComponent * to be added | |
Calendar | Id for which the entry belongs | |
vector | <string> duplicate Ids if at all they exist | |
Error | code |
fetch the Calendar for which the Component has to be added
Call the CCalendar batch API here
References CCalendar::addComponents(), commitAllChanges(), getCalendarById(), rollbackAllChanges(), and setAutocommitOff().
Referenced by importIcsFileData(), and importIcsFileDataProgressive().
void CMulticalendar::deleteComponents | ( | vector< string > & | idList, | |
int | iCalId, | |||
int & | ErrorCode | |||
) |
vector<string> | id of Component to be deleted | |
Calendar | Id for which the entry belongs | |
ErrorCode |
fetch the Calendar for which the Component has to be added
Call the CCalendar batch API here
References commitAllChanges(), CCalendar::deleteComponents(), getCalendarById(), CCalendarDB::Instance(), rollbackAllChanges(), CCalendarDB::sendDBusMessage(), and setAutocommitOff().
Referenced by deleteAllComponents(), and deleteNonRecurrentComponents().
void CMulticalendar::modifyComponents | ( | vector< CComponent * > & | compList, | |
int | iCalId, | |||
int & | ErrorCode | |||
) |
vector<CComponent*> | vector of CComponent* | |
Calendar | Id for which the entry belongs | |
ErrorCode |
fetch the Calendar for which the Component has to be added
Call the CCalendar batch API here
References commitAllChanges(), getCalendarById(), CCalendar::modifyComponents(), rollbackAllChanges(), and setAutocommitOff().
Referenced by enableAutomaticDeletion().
int CMulticalendar::getVisibleCalendarCount | ( | int & | pErrorCode | ) |
getVisibleCalendarCount
ErrorCode |
References CCalendarDB::getRecords(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().
void CMulticalendar::enableDisableCalendarLogs | ( | int | value | ) |
int | Value |
Referenced by MCInstance().
bool CMulticalendar::moveFileFromSkel | ( | string | oldpath, | |
string | newpath | |||
) |
moving the calendardb file from /etc/skel/.claendar/calendardb
bool CMulticalendar::checkFileExists | ( | string | szPath | ) | [static] |
API to see if DB file already exists
Referenced by MCInstance().
int CMulticalendar::getComponentCount | ( | int & | pErrorCode | ) |
API to find the number of Components in the DB
References CCalendarDB::getRecords(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().
CEvent * CMulticalendar::localBdayEventFromRemoteId | ( | string | szExId, | |
int & | pErrorCode | |||
) |
API to find the Birthday using Contact Application Id
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::setTrigger(), and CCalendarDB::sqliteErrorMapper().
bool CMulticalendar::getInstances | ( | string | sId, | |
time_t | timeFrom, | |||
time_t | timeTo, | |||
vector< time_t > & | result, | |||
time_t | tzshift = 0 | |||
) |
string | sId Id of the component | |
time_t | timeFrom the start time of the interval | |
time_t | timeTo the end time of the interval | |
vector<time_t> | result placeholder for the results | |
time_t | tzshift time zone shitf to be added from each value |
string | sId Id of the component | |
time_t | timeFrom the start time of the interval | |
time_t | timeTo the end time of the interval | |
vector<time_t> | result placeholder for the results |
References CCalendarDB::Instance().
int CMulticalendar::getInstanceNumber | ( | string | sId, | |
time_t | timeFrom, | |||
time_t | timeTo, | |||
time_t | tzshift = 0 | |||
) |
string | sId Id of the component | |
time_t | timeFrom the start time of the interval | |
time_t | timeTo the end time of the interval | |
time_t | tzshift time zone shitf to be added to each value |
string | sId Id of the component | |
time_t | timeFrom the start time of the interval | |
time_t | timeTo the end time of the interval |
References CCalendarDB::getRecords(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().
bool CMulticalendar::dropInstances | ( | string | sId | ) |
string | sId Id of the component |
string | sId Id of the component |
References CCalendarDB::getDb(), CCalendarDB::Instance(), CCalendarDB::sqliteErrorMapper(), and CCalendarDB::updateDB().
Referenced by CCalendar::addComponent().
bool CMulticalendar::addInstance | ( | string | sId, | |
time_t | instTime, | |||
time_t | duration, | |||
time_t | tzshift = 0 | |||
) |
string | sId Id of the component | |
time_t | instTime one instance time | |
time_t | duration duration of the event | |
time_t | tzshift time zone shitf to be substracted from each value |
string | sId Id of the component | |
time_t | instTime one instance time |
References CCalendarDB::getDb(), CCalendarDB::insertRows(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().
Referenced by CCalendar::addComponent(), addInstances(), and regenerateInstances().
bool CMulticalendar::addInstances | ( | string | sId, | |
vector< time_t > | instances, | |||
time_t | duration, | |||
time_t | tzshift = 0 | |||
) |
string | sId Id of the component | |
vector<time_t> | instances array of instances | |
time_t | duration duration of the event | |
time_t | tzshift time zone shitf to be substracted from each value |
string | sId Id of the component | |
vector<time_t> | instances array of instances |
References addInstance().
Referenced by CCalendar::addComponent(), and regenerateInstances().
vector< CComponent * > CMulticalendar::getComponentsWithLimitedData | ( | int | iStDate, | |
int | iEndDate, | |||
int | iLimit, | |||
int | iOffset, | |||
vector< int > & | vCalid, | |||
int & | pErrorCode | |||
) |
: | 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 |
define SELECT_ALL_CALCOMP__UNION "select * from %s where ((%s = %d AND %s < %d AND %s >= %d) OR ( %s = %d AND %s >= %d AND %s <= %d )) AND (%s != %d AND %s != %d) AND calendarId in (select calendarid from calendars where IsVisible =1 ) union select * from %s where (%s = %d OR %s=%d) AND (%s = %d OR %s = %d) AND (%d < %s OR %d = %s) AND calendarId in (select calendarid from calendars where IsVisible =1) ORDER BY CalendarId LIMIT %d OFFSET %d "
References CComponent::getFlags(), CComponent::getId(), CComponent::getInstanceNumber(), CCalendarDB::getRecords(), CComponent::getRecurrenceProperties(), CComponent::getType(), CCalendarDB::Instance(), CComponent::setCalendarId(), CComponent::setId(), CComponent::setSummary(), CComponent::setTzid(), CCalendarDB::sqliteErrorMapper(), and CComponent::toString().
bool CMulticalendar::checkExistenceOfFutureRepeatingEvent | ( | time_t | OriginalDateStart, | |
string | sId, | |||
int & | pErrorCode | |||
) |
checkExistenceOfFutureRepeatingEvent
References CComponent::getInstanceTimes(), CCalendarDB::getRecords(), CComponent::getRecurrenceProperties(), CCalendarDB::Instance(), CComponent::setCalendarId(), CComponent::setDescription(), CComponent::setGUid(), CComponent::setId(), CComponent::setLocation(), CComponent::setSummary(), CComponent::setTzid(), and CCalendarDB::sqliteErrorMapper().
Referenced by checkForNextPrev().
bool CMulticalendar::checkForNextPrev | ( | time_t | instanceTime, | |
string | Id, | |||
bool | isPrev, | |||
int & | pErrorCode | |||
) |
: | time_t instanceTime time beyond which Next/Prev entry has to be fetched | |
: | string Id Id of event currently visible in Event view. | |
: | bool isPrev whether we want previous event. | |
: | int &pErrorCode place holder for error code. |
1. Api quickly indicates the presence of PREV /NEXT event 2. If the event opened in event view is nth repeat and the event has p repeats event 1 has total p repeats and Ui is showing the nth repeat in event view 0, 1,2,........ n ........p In this case no need to call the checkNextPrev as the instance being shown in UI middle instance there will be next and previous instances. So enable the Next and Previous menus. ( exception case is when repeat type is complex In this case call getNextPrevious to get the actual instance in this case it will be a bit slower )
3. PRev logic checks if previous event exist or not , idea is event has to start before the input date for it to be previous event ( same logic holds goog for timebased and repeating events) 5. Next logic is optimised to see if there is any event which starts after this time / any repeating event if this fails then we check for any repeating event with until=-1 ( if one such event is found then we return at that point itself with out expanding any further.)
Next prev Presence can be found by this method. API used to see if there is next prev instance so that NEXT PREV Menus are updated in UI in event view. This has to be used intelligently by UI How to use this API:
1. Api quickly indicates the presence of PREV /NEXT event 2. If the event opened in event view is nth repeat and the event has p repeats event 1 has total p repeats and Ui is showing the nth repeat in event view 0, 1,2,........ n ........p In this case no need to call the checkNextPrev as the instance being shown in UI middle instance there will be next and previous instances. So enable the Next and Previous menus. ( exception case is when repeat type is complex In this case call getNextPrevious to get the actual instance in this case it will be a bit slower )
3. PRev logic checks if previous event exist or not is --- event has to start before the input date be it timebased repeating 5. Next logic is optimised to see if there is any event which starts after this time / any repeating event if this fails then we check for any repeating event with until=-1 ( if one such event is found then we return at that point in time.)
If there is next previous present then return
References checkExistenceOfFutureRepeatingEvent(), CCalendarDB::getRecords(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().
CalendarColour CMulticalendar::getUnusedCalendarColor | ( | void | ) |
Get the unused color in the calendar applcation. Returns COLOUR_DARKBLUE if all the colors have been used.
void | No arguments |
References CCalendar::getCalendarColor(), getListCalFromMc(), and releaseListCalendars().
Referenced by addCalendar().
void CMulticalendar::reloadSystemTimezone | ( | ) | [static] |
Reload timezone information from system
void CMulticalendar::getImpendingAlarm | ( | string | szRrule, | |
time_t & | triggerTime, | |||
time_t | dateStart, | |||
int | alarmFlag, | |||
icaltimezone * | pTz | |||
) |
Function to get the impending alarm time
References getRecurrentTimes().
vector< string > CMulticalendar::giveRecursiveExpiredEvents | ( | int | iCalId, | |
int | iType, | |||
int | iConfiguredTime, | |||
int | iMax, | |||
int & | iLimit, | |||
int & | pErrorCode | |||
) | [private] |
iCalId - calendar ID | ||
int type E_EVENT = 1 | ||
int iDaybefore time for deletion of entries | ||
int reference to ErrorCode |
References CCalendarDB::getRecords(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().
Referenced by enableAutomaticDeletion().
time_t CMulticalendar::getInstanceBeyond | ( | string | szRRule, | |
icaltimetype | iDtStart, | |||
time_t | iViewEnd, | |||
icaltimezone * | pTz, | |||
int & | pErrorCode | |||
) | [private] |
string | recurence rule icaltimetype date start value in icaltimetype | |
time_t | view end parameter | |
icaltimezone | pointer | |
pErrorCode | reference to error code |
string | recurence rule icaltimetype date start value in icaltimetype | |
time_t | view end parameter | |
pErrorCode | reference to error code |
Referenced by enableAutomaticDeletion().
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 |
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
References CCalendarDB::getRecords(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().
Referenced by deleteEventBeyond(), deleteJournalsBeyond(), and deleteTodosBeyond().
int CMulticalendar::getCount | ( | int | iCalId, | |
int | iType, | |||
int & | pErrorCode | |||
) | [private] |
int calendar id | ||
int type of component | ||
int& pointer to ErrorCode |
int calendar id | ||
int type of component | ||
int * pointer to ErrorCode |
References CCalendarDB::getRecords(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().
Referenced by getBdayEventCount(), getEventCount(), getNoteCount(), and getTodoCount().
string CMulticalendar::generateRrule | ( | int | iRepeatType, | |
time_t | iUntil, | |||
int & | pErrorCode | |||
) | [private] |
repeattype frequency in int | ||
until time in utc | ||
int & reference to ErrorCode |
repeattype frequency in int | ||
until time in utc | ||
int * pointer to ErrorCode |
CMulticalendar & CMulticalendar::operator= | ( | CMulticalendar & | right | ) | [private] |
private dummy overloaded assignment operator to avoid creation of mutiple instances
overloaded function dummy
void CMulticalendar::setCalendarName | ( | CCalendar * | pCalendar, | |
string | szCalendarName | |||
) | const [private] |
pCalendar | pointer to calendar to set name to | |
szCalendarName | calendar name read from database |
References CCalendar::setCalendarName().
Referenced by getCalendarById(), getListCalFromMc(), and modifyCalendar().
int CMulticalendar::deleteNonRecurrentComponents | ( | int | iDayBefore, | |
int | iMax, | |||
int & | pErrorCode | |||
) | [private] |
Remove non-recurrent events older than specified date
iDayBefore | - target date. All events older than that date will be deleted. | |
iMax | - max nubmer of events to be deleted at once | |
pErrorCode | - error code |
References deleteComponents(), CCalendarDB::getRecords(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().
Referenced by enableAutomaticDeletion().
bool CMulticalendar::deleteAllComponents | ( | int | iCalId, | |
int & | pErrorCode | |||
) | [private] |
Remove all events from specified calendar (prior calendar deletion)
iCalId | - calendar to be flushed | |
pErrorCode | - error code |
References deleteComponents(), CCalendarDB::getRecords(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().
Referenced by clearCalendar().
void CMulticalendar::cleanupIcsString | ( | std::string & | ics_line | ) | [private] |
Remove unsupported symbols from ICS file string.
ics_line | string to clean up |
Referenced by getICSFileInfo(), importIcsFileData(), and importIcsFileDataProgressive().
void CMulticalendar::restoreAlarms | ( | ) | [private] |
Restore daemon-side alarms based on calendar alarms
References CAlarm::deleteAlarmEvent(), CCalendarDB::getRecords(), CCalendarDB::Instance(), CAlarm::purgeAlarms(), and setNextAlarm().
Referenced by MCInstance().
int CMulticalendar::comparePrevNextComponent | ( | CComponent * | c1, | |
CComponent * | c2, | |||
time_t | t1 = -1 , |
|||
time_t | t2 = -1 | |||
) | [private] |
Compare compoenents in the order of "Prev/Next event"
c1 | - pointer to first compoenent | |
c2 | - pointer to second compoenent |
References CComponent::getAllDay(), CComponent::getDateEnd(), CComponent::getDateStart(), CComponent::getId(), and CComponent::getSummary().
Referenced by getPrevNextComponent().