#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 | checkRecurrentTimes (string szRRule, icaltimetype iDtStart, 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) |
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 | 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 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) |
bool | checkFileExists (string szPath) |
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) |
Static Public Member Functions | |
static CMulticalendar * | MCInstance () |
static time_t | getSystemTimeShift () |
static string | getSystemTimeZone () |
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) |
int | regenerateInstances () |
Private Attributes | |
int | iMaxId |
string | AppName |
Static Private Attributes | |
static CMulticalendar * | pMc = 0 |
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 ASSERTION, 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 ASSERTION, 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 ASSERTION, BEGIN_EVENT, and ICalConverter::checkCount().
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(), ASSERTION, 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(), ASSERTION, 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
References BEGIN_EVENT.
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 ASSERTION, CComponent::getDateEnd(), CComponent::getDateStart(), CCalendarDB::getDb(), CComponent::getId(), getInstanceBeyond(), getListCalFromMc(), CCalendarDB::getRecords(), getSystemTimeZone(), CComponent::getTzid(), giveRecursiveExpiredEvents(), CCalendarDB::Instance(), modifyComponents(), releaseListCalendars(), CComponent::setDateEnd(), CComponent::setDateStart(), CCalendarDB::sqliteErrorMapper(), and CCalendarDB::updateDB().
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(), getLocation(), CCalendar::manageCookie(), and CCalendar::setNextAlarm().
bool CMulticalendar::checkRecurrentTimes | ( | string | szRRule, | |
icaltimetype | iDtStart, | |||
time_t | iViewEnd, | |||
icaltimezone * | pTz, | |||
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 |
rrule recurrencerule | ||
dtstart datestart in Icaltime format. | ||
viewEnd end range of current claendar view |
References getRecurrentTimes().
Referenced by CRecurrence::checkInstances().
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 | ||
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 CCalendar::setCalendarId().
bool CMulticalendar::deleteCalendar | ( | int | iCalId, | |
int & | pErrorCode | |||
) |
int iCalid Calendar id | ||
int & reference to ErrorCode |
calid Calendar id | ||
int * pointer to ErrorCode |
References ASSERTION, clearCalendar(), commitAllChanges(), getCalendarById(), CCalendar::getCalendarId(), CCalendar::getCalendarName(), 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 ASSERTION, CCalendarDB::getRecords(), CCalendarDB::Instance(), CCalendar::setCalendarColor(), CCalendar::setCalendarId(), CCalendar::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(), modifyComponents(), modifyEvent(), modifyJournal(), modifyTodo(), and setNextAlarm().
vector< CComponent * > CMulticalendar::getComponentsAllCalendars | ( | 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 |
: | 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 ASSERTION, CComponent::getAlarmProperties(), CComponent::getFlags(), CComponent::getId(), CComponent::getInstanceNumber(), CCalendarDB::getRecords(), CComponent::getRecurrenceProperties(), CComponent::getType(), CCalendarDB::Instance(), CComponent::setDescription(), CComponent::setGUid(), CComponent::setId(), CComponent::setLocation(), CComponent::setSummary(), CComponent::setTzid(), CCalendarDB::sqliteErrorMapper(), and CComponent::toString().
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 ASSERTION, 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(), CCalendar::getCalendarName(), 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(), CCalendar::getCalendarName(), 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(), CCalendar::getCalendarName(), 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(), CCalendar::getCalendarName(), 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(), CCalendar::getCalendarName(), 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(), CCalendar::getCalendarName(), 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(), CCalendar::getCalendarName(), 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(), CCalendar::getCalendarName(), 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(), CCalendar::getCalendarName(), 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 ASSERTION, CMulticalendar(), and enableDisableCalendarLogs().
Referenced by CAlarm::addAlarmEvent(), CCalendar::addComponent(), CRecurrence::checkInstances(), deleteEventAndTodoBeyond(), deleteEventBeyond(), deleteJournalsBeyond(), deleteTodosBeyond(), CRecurrence::generateInstanceTimes(), getAllEventsTodos(), CCalendar::getAllEventsTodos(), CCalendar::getComponents(), ICalConverter::getImpendingAlarm(), getLocation(), ICalConverter::importEventDateEnd(), ICalConverter::importEventDateStartAndDateEnd(), CCalendar::manageCookie(), CCalendarDB::sendDBusMessage(), CCalendar::setNextAlarm(), 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 ASSERTION, CCalendarDB::getRecords(), CCalendarDB::Instance(), CCalendar::setCalendarColor(), CCalendar::setCalendarId(), CCalendar::setCalendarName(), CCalendar::setCalendarTune(), CCalendar::setCalendarType(), CCalendar::setCalendarVersion(), CCalendar::setProfileType(), and CCalendar::toString().
Referenced by checkCalendarNameExists(), enableAutomaticDeletion(), getBirthdayCalendar(), getCalendarByName(), getCalendarByType(), getDefaultCalendar(), getDefaultCalendarName(), getNoofCalendars(), getSynchronizedCalendar(), getSynchronizedCalendarName(), and modifyCalendar().
void CMulticalendar::releaseListCalendars | ( | vector< CCalendar * > | Calendars | ) |
Vector of CCalendar* |
Referenced by checkCalendarNameExists(), enableAutomaticDeletion(), getDefaultCalendarName(), getNoofCalendars(), getSynchronizedCalendarName(), 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 ASSERTION, 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 ASSERTION, checkCalendarNameExists(), commitAllChanges(), CCalendar::getCalendarColor(), CCalendar::getCalendarId(), CCalendar::getCalendarName(), CCalendar::getCalendarTune(), CCalendar::getCalendarType(), CCalendar::getCalendarVersion(), CCalendarDB::getDb(), CCalendar::getProfileType(), CCalendarDB::insertRows(), CCalendarDB::Instance(), CCalendar::IsReadOnly(), CCalendar::IsShown(), rollbackAllChanges(), setAutocommitOff(), CCalendar::setCalendarId(), and CCalendarDB::sqliteErrorMapper().
int CMulticalendar::getNumOfUndoneTasks | ( | int * | iCalId, | |
int & | pErrorCode | |||
) |
iCalId | int |
select * from components where Status =0 AND ComponentType =2 AND CalendarId in (select CalendarId from calendars where IsVisible =1);
References ASSERTION, CCalendarDB::getRecords(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().
int CMulticalendar::getNumOfAllDayEventsForToday | ( | int & | pErrorCode | ) |
pErrorCode | int |
References ASSERTION, CCalendarDB::getRecords(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().
vector< CComponent * > CMulticalendar::getTodaysAllDay | ( | int & | pErrorCode | ) |
getTodaysAllDay
pErrorcode | reference to error code |
References ASSERTION, getBirthdayCalendar(), CCalendar::getCalendarId(), CCalendar::getComponents(), CCalendarDB::getRecords(), getSystemTimeZone(), CCalendarDB::Instance(), CCalendar::IsShown(), CComponent::setAllDay(), 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 CCalendar::addBirthDay(), commitAllChanges(), getCalendarByType(), CCalendar::getCalendarId(), CCalendar::getCalendarName(), rollbackAllChanges(), and setAutocommitOff().
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(), CCalendar::getCalendarName(), 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 commitAllChanges(), CCalendar::deleteBirthDay(), getCalendarByType(), CCalendar::getCalendarId(), CCalendar::getCalendarName(), rollbackAllChanges(), and setAutocommitOff().
CCalendar * CMulticalendar::getCalendarByType | ( | int | iCalType, | |
int & | pErrorCode | |||
) |
iCalType Calendar Type | ||
int & irefernce to ErrorCode |
References getListCalFromMc().
Referenced by addBirthDay(), deleteBirthDay(), 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 ASSERTION, CCalendarDB::Instance(), and CCalendarDB::setAutocommitOff().
Referenced by addBirthDay(), addCalendar(), addComponents(), addEvent(), addJournal(), addTodo(), clearCalendarContents(), deleteBirthDay(), 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 ASSERTION, CCalendarDB::commitDB(), CCalendarDB::Instance(), and intToString().
Referenced by addBirthDay(), addCalendar(), addComponents(), addEvent(), addJournal(), addTodo(), clearCalendarContents(), deleteBirthDay(), deleteBirthdaysForCalendar(), deleteCalendar(), deleteComponents(), deleteEvent(), deleteJournal(), deleteTodo(), modifyBirthDay(), modifyCalendar(), modifyComponents(), modifyEvent(), modifyJournal(), modifyTodo(), and setNextAlarm().
bool CMulticalendar::rollbackAllChanges | ( | ) |
none |
none |
References ASSERTION, CCalendarDB::Instance(), and CCalendarDB::rollbackDB().
Referenced by addBirthDay(), addCalendar(), addComponents(), addEvent(), addJournal(), addTodo(), clearCalendar(), clearCalendarContents(), deleteBirthDay(), 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(), rollbackAllChanges(), setAutocommitOff(), and CCalendar::setNextAlarm().
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 ASSERTION, 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::setDateStart(), CComponent::setId(), CComponent::setStatus(), 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 ASSERTION, CCalendar::getBirthDayEvent(), getCalendarById(), CCalendar::getCalendarType(), CComponent::getDateStart(), CCalendar::getEvent(), CCalendarDB::getRecords(), CComponent::getStatus(), CCalendarDB::Instance(), popEventDetails(), and CCalendarDB::sqliteErrorMapper().
void CMulticalendar::MCdestroy | ( | ) |
vector< CComponent * > CMulticalendar::popEventDetails | ( | QueryResult * | pQr | ) |
vector<CComponent | *> | |
struct | QueryResult pointer |
References ASSERTION, CComponent::getAlarmProperties(), CComponent::getFlags(), CComponent::getRecurrenceProperties(), CComponent::getType(), 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 ASSERTION, 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 ASSERTION, 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
References ASSERTION.
Referenced by CAlarm::addAlarmEvent(), CCalendar::addComponent(), enableAutomaticDeletion(), CCalendar::getAllEventsTodos(), CCalendar::getComponents(), getSystemTimeShift(), getSystemTimeZoneAsIcalTimeZone(), getTodaysAllDay(), ICalConverter::importEventDateEnd(), ICalConverter::importEventDateStartAndDateEnd(), CCalendar::setNextAlarm(), and ICalConverter::toLocal().
void CMulticalendar::clearCalendar | ( | int | iCalId, | |
int & | pErrorCode | |||
) |
iCalId | Calendar Id | |
pErrorCode | - Reference to errror Code |
References ASSERTION, CCalendar::destroyExistingValidAlarms(), 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 |
References clearCalendar(), commitAllChanges(), rollbackAllChanges(), and setAutocommitOff().
icaltimezone * CMulticalendar::getSystemTimeZoneAsIcalTimeZone | ( | ) |
getSystemTimeZoneAsIcalTimeZone
References getSystemTimeZone().
Referenced by ICalConverter::getImpendingAlarm(), CCalendar::manageCookie(), and CCalendar::setNextAlarm().
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(), rollbackAllChanges(), and setAutocommitOff().
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 ASSERTION, CCalendarDB::getRecords(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().
void CMulticalendar::enableDisableCalendarLogs | ( | int | value | ) |
int | Value |
Referenced by checkFileExists(), MCInstance(), and moveFileFromSkel().
bool CMulticalendar::moveFileFromSkel | ( | string | oldpath, | |
string | newpath | |||
) |
moving the calendardb file from /etc/skel/.claendar/calendardb
References enableDisableCalendarLogs().
bool CMulticalendar::checkFileExists | ( | string | szPath | ) |
API to see if DB file already exists
References enableDisableCalendarLogs().
int CMulticalendar::getComponentCount | ( | int & | pErrorCode | ) |
API to find the number of Components in the DB
References ASSERTION, CCalendarDB::getRecords(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().
CEvent * CMulticalendar::localBdayEventFromRemoteId | ( | string | szExId, | |
int & | pErrorCode | |||
) |
API to find the Birthday using Contact Application Id
References ASSERTION, 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 ASSERTION, and 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 ASSERTION, 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 ASSERTION, CCalendarDB::execSQL(), and CCalendarDB::Instance().
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 ASSERTION, CCalendarDB::getDb(), CCalendarDB::insertRows(), CCalendarDB::Instance(), and CCalendarDB::sqliteErrorMapper().
Referenced by addInstances().
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().
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 ASSERTION, CComponent::getFlags(), CComponent::getId(), CComponent::getInstanceNumber(), CCalendarDB::getRecords(), CComponent::getRecurrenceProperties(), CComponent::getType(), CCalendarDB::Instance(), CComponent::setId(), CComponent::setSummary(), CComponent::setTzid(), CCalendarDB::sqliteErrorMapper(), and CComponent::toString().
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 ASSERTION, 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 ASSERTION, 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 ASSERTION, 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