ICalConverter Class Reference

converts local database format to ical data and vice versa More...

#include <ICalConverter.h>


Public Member Functions

string localToIcalVcal (CComponent *pEntry, FileType iType, int &pErrorCode)
void setSyncing (bool sync)
void findEffectiveDSToffset (string szLine, string &szDaylight)
CComponenttoLocal (string strIcalComp, FileType iType, int &pErrorCode)
 ICalConverter ()
 ~ICalConverter ()
string appendControlM (string szContents)
string toString ()
vector< CComponent * > icalVcalToLocal (string strIcalComp, FileType iType, int &pErrorCode)
string strip (string szContents)
bool checkCount (string szContents, string szBegin, string szEnd, unsigned int &iCount)
string validateContents (string szContents)
int getIntFromIcaltimetype (struct icaltimetype ical_time)
char * decodeParameterTextFields (string encodedString, icalparameter_encoding encodingType)
char * getCurrentTimeZone ()
void fillvCalTimeZone (string &szContents)
string exportTimeZone (time_t dtstart, string szZone, FileType iType)
string calculateMonthdayFromRule (time_t dtstart, struct icaltimetype &dtstartStd, string ruleStd, string szZone)

Private Member Functions

void findZoneStartTime (string &szRepeatPattern, int correction)
void findLocationFromOffset (string szDaylight)
void limitDateRange (struct icaltimetype &s_time, bool isExport)
void replaceWithEncodedString (string &szIcalComp, CComponentDetails *pEntry)
void convertAttach (string &szAttach)
void getImpendingAlarm (string szRrule, time_t &triggerTime, time_t dateStart, int alarmFlag)
float stringToFloat (string szValue)
string addAlarmDateToString (string strIcalComp, string strVCalAlarmDate, entryType iType)
string addRuleToString (string strIcalComp, vector< string > rrules, int flag)
string getIcalAlarm (CAlarm *cAlarm, string sZone, bool isAllday=false)
void deleteWhiteSpaces (string &szSpaceString)
vector< CRecurrenceRule * > getRecurrence (string strIcalComp, icalcomponent *pComp, icalproperty_kind kind, FileType iFType)
CRecurrenceRulegetRecurrenceRule (string strIcalComp, int index, string strRuleType, FileType iFType)
vector< string > getRecurrenceDates (string strIcalComp, icalcomponent *pComp, CEvent *pEvent, icalproperty_kind kind, int type=ICAL_TYPE)
template<class T>
CAlarmgetAlarm (string strIcalComp, icalcomponent *pComp, T *pEntry)
struct tm initTime (icaltimetype time_ical)
string get_line (string strIcal, int start_loc)
string get_line_in_ical (string strInVcal, string strType, int index)
string getTranspFromIcal (icalproperty_transp iTransp)
COrganizergetOrganizerFromIcal (icalproperty *pProp)
CAttendeegetAttendeeFromIcal (icalproperty *pProp, FileType iType)
int getParticipationRoleFromIcal (icalparameter_role icalRole)
int getParticipationStatusFromIcal (icalparameter_partstat icalPartStat)
bool getRSVPFromIcal (icalparameter_rsvp icalRSVP)
int getCUTypeFromIcal (icalparameter_cutype icalCUType)
string getClasFromIcal (icalproperty_class iClass)
icalproperty * getIcalOrganizer (COrganizer *pOrg)
string getContactFromIcal (icalproperty *pProp)
icalparameter_rsvp getIcalRSVP (bool fRSVP)
icalparameter_partstat getIcalPartStatus (ParticipantStatus iPartStat)
icalparameter_role getIcalPartRole (ParticipantRole iRole)
icalparameter_cutype getIcalCalendarUserType (CalendarUserType iCUType)
icalproperty * getIcalAttendee_ical (CAttendee *pAtten)
icalproperty * getIcalAttendee_vcal (CAttendee *pAtten)
CPropertiesgetXProperty (icalproperty *pProp)
CParametersgetParameters (icalparameter *pParam)
vector< CParameters * > getRelationshipParamFromICal (icalparameter *pParam)
int getStatusFromIcal (icalproperty_status icalStatus)
CParametersgetLanguageFromIcal (icalparameter *pParam)
CParametersgetAlterFromIcal (icalparameter *pParam)
vector< CParameters * > getLangAlterParam (icalproperty *pProp)
int getIcalStatus (statusParam iStatus)
icalparameter_reltype getIcalRelType (RelationshipType iRel)
CParametersgetFMTypeFromIcal (icalparameter *pParam)
icalparameter * getTZIDParam ()
string getTimeInHHMM (int offset)
time_t getTimeDiff (time_t diffTime)
void exportEventProperties (icalcomponent *pEntComp, CEvent *pEvent, FileType iType)
void exportTodoProperties (icalcomponent *pEntComp, CTodo *pTodo, FileType iType)
void exportJournalProperties (icalcomponent *pEntComp, CJournal *pJournal, FileType iType)
template<class T>
void exportCreatedTimeFromLocal (icalcomponent *pEntComp, T *pComp, FileType iType)
template<class T>
void exportDueFromLocal (icalcomponent *pEntcomp, T *pComp)
template<class T>
void exportDateStampFromLocal (icalcomponent *pEntcomp, T *pComp)
template<class T>
void exportSummaryFromLocal (icalcomponent *pEntcomp, T *pComp)
template<class T>
void exportLocationFromLocal (icalcomponent *pEntcomp, T *pComp)
template<class T>
void exportDescriptionFromLocal (icalcomponent *pEntcomp, T *pComp)
template<class T>
void exportUidFromLocal (icalcomponent *pEntcomp, T *pComp)
template<class T>
void exportDateStartFromLocal (icalcomponent *pEntcomp, T *pComp, FileType iType)
template<class T>
void exportAttendeesFromLocal (icalcomponent *pEntcomp, T *pComp, FileType iType)
template<class T>
void exportAttachmentsFromLocal (icalcomponent *pEntcomp, T *pComp)
template<class T>
void exportPriorityFromLocal (icalcomponent *pEntcomp, T *pComp)
template<class T>
void exportSequenceFromLocal (icalcomponent *pEntcomp, T *pComp)
template<class T>
void exportCommentsFromLocal (icalcomponent *pEntcomp, T *pComp)
template<class T>
void exportUrlFromLocal (icalcomponent *pEntcomp, T *pComp)
template<class T>
void exportCategoriesFromLocal (icalcomponent *pEntcomp, T *pComp)
template<class T>
void exportGeoFromLocal (icalcomponent *pEntcomp, T *pComp)
template<class T>
void exportClassFromLocal (icalcomponent *pEntcomp, T *pComp)
template<class T>
void exportRelatedFromLocal (icalcomponent *pEntcomp, T *pComp)
template<class T>
void exportOrganizerFromLocal (icalcomponent *pEntcomp, T *pComp)
template<class T>
void exportXPropFromLocal (icalcomponent *pEntcomp, T *pComp)
template<class T>
void exportResourcesFromLocal (icalcomponent *pEntcomp, T *pComp)
template<class T>
void exportContactsFromLocal (icalcomponent *pEntcomp, T *pComp)
template<class T>
string exportAlarmFromLocal (T *pComp, FileType iType)
void exportEventDateEndFromLocal (icalcomponent *pEntcomp, CEvent *pEvent, FileType iType)
void exportEventTranspFromLocal (icalcomponent *pEntcomp, CEvent *pEvent, FileType iType)
void exportTodoPercentCompleteFromLocal (icalcomponent *pEntcomp, CTodo *pTodo)
void exportTodoCompletedFromLocal (icalcomponent *pEntcomp, CTodo *pTodo)
void exportEntryStatusFromLocal (icalcomponent *pEntcomp, CComponent *pEntry, FileType iType)
void exportEntryLastModifiedFromLocal (icalcomponent *pEntcomp, CComponent *pEntry)
template<class T>
struct icaltimetype importCreatedTime (icalcomponent *pComp, T *tComp, FileType iType, string strIcalComp)
template<class T>
void importDateStamp (icalcomponent *pComp, T *tComp, struct icaltimetype c_time)
template<class T>
void importOrganizer (icalcomponent *pComp, T *tComp)
template<class T>
void importAttendees (icalcomponent *pComp, T *tComp, FileType iType)
template<class T>
void importSequence (icalcomponent *pComp, T *tComp)
template<class T>
void importPriority (icalcomponent *pComp, T *tComp)
template<class T>
void importUrl (icalcomponent *pComp, T *tComp)
template<class T>
void importGeo (icalcomponent *pComp, T *tComp)
template<class T>
void importClass (icalcomponent *pComp, T *tComp)
template<class T>
vector< CParameters * > importResources (icalcomponent *pComp, T *tComp)
template<class T>
vector< CParameters * > importCategories (icalcomponent *pComp, T *tComp)
template<class T>
vector< CParameters * > importContacts (icalcomponent *pComp, T *tComp)
template<class T>
vector< CParameters * > importRelated (icalcomponent *pComp, T *tComp)
template<class T>
vector< CParameters * > importLocation (icalcomponent *pComp, T *tComp)
template<class T>
vector< CParameters * > importDescription (icalcomponent *pComp, T *tComp)
template<class T>
vector< CParameters * > importSummary (icalcomponent *pComp, T *tComp)
template<class T>
vector< CParameters * > importComments (icalcomponent *pComp, T *tComp)
template<class T>
void importDateStart (icalcomponent *pComp, T *pComp)
bool importEventDateStartAndDateEnd (icalcomponent *pComp, CEvent *pEvent, FileType iType, int &pErrorCode)
bool importEventDateEnd (icalcomponent *pComp, CEvent *pEvent, FileType iType)
void importEventXProp (icalcomponent *pComp, CEvent *pEvent)
void importEventTransp (icalcomponent *pComp, CEvent *pEvent, FileType iType, string strIcalComp)
void importEventAttachements (icalcomponent *pComp, CEvent *pEvent)
void importEventAlarm (icalcomponent *pComp, CEvent *pEvent, icalcomponent *pAComp, string strIcalComp, FileType iType)
void importEventRecurrence (icalcomponent *pComp, CEvent *pEvent, string strIcalComp, FileType iType, int &pErrorCode)
void importTodoDue (icalcomponent *pComp, CTodo *pTodo)
void importTodoPercentCompleted (icalcomponent *pComp, CTodo *pTodo)
void importTodoCompleted (icalcomponent *pComp, CTodo *pTodo)
void importTodoAlarm (icalcomponent *pComp, CTodo *pTodo, icalcomponent *pAComp, string strIcalComp, FileType iType)
void importJournalAttach (icalcomponent *pComp, CJournal *pJournal)
void importComponentStatus (icalcomponent *pComp, CComponent *pComponent, FileType iType, string strIcalComp)
void importComponentLastModified (icalcomponent *pComp, CComponent *pComponent)
void parseTimeZone (string &szZone)

Private Attributes

bool bSyncing


Detailed Description

converts local database format to ical data and vice versa

ICalConverter


Constructor & Destructor Documentation

ICalConverter::ICalConverter (  ) 

constructor

ICalConverter::~ICalConverter (  ) 

destructor


Member Function Documentation

string ICalConverter::localToIcalVcal ( CComponent pEntry,
FileType  iType,
int &  pErrorCode 
)

Parameters:
pEntry CComponent object
iType FileType ( ICAL/VCAL/UNKNOWN )
pErrorCode Errorcode for the function
Returns:
string ical format string
This function takes CComponent object as parameter converts this into ical/vcal format and returns vcalendar string

localToIcalVcal

Parameters:
pEntry,: CComponent object
pErrorCode,: Errorcode for the function
Returns:
string, ical format string from local calendar database
This function takes CComponent object as parameter converts this into ical format and returns vcalendar string

References addAlarmDateToString(), addRuleToString(), appendControlM(), CComponent::getAllDay(), CComponent::getCreatedTime(), CComponent::getDateStart(), CComponent::getRecurrence(), CRecurrenceRule::getRrule(), CRecurrenceRule::getRuleType(), CComponent::getType(), CComponent::getTzid(), VCalConverter::iCalToVCalRule(), replaceWithEncodedString(), and CComponent::setType().

Referenced by CCalendar::exportCalendarEntries().

void ICalConverter::setSyncing ( bool  sync  ) 

Parameters:
bool indication whethere syncing is turned on or off
Returns:
void

Referenced by CCalendar::exportCalendarEntries().

void ICalConverter::findEffectiveDSToffset ( string  szLine,
string &  szDaylight 
)

Function to calculate effective DST offset

Function to find effective DST offset

References VCalConverter::getTokens().

CComponent * ICalConverter::toLocal ( string  strIcalComp,
FileType  iType,
int &  pErrorCode 
)

string ICalConverter::appendControlM ( string  szContents  ) 

Parameters:
szContents 
Returns:
string
This function appends ctrl+M to each line as required for pc suite sync

References validateContents().

Referenced by localToIcalVcal().

string ICalConverter::toString (  ) 

Parameters:
string This function prints all the member variable values.

vector< CComponent * > ICalConverter::icalVcalToLocal ( string  szCont,
FileType  iType,
int &  pErrorCode 
)

Parameters:
strIcalComp ical string to be converted
iType FileType ( ICAL/VCAL/UNKNOWN )
pErrorCode Errorcode for the function
Returns:
vector <CComponent*>
This function takes string as parameter converts the ical/vcal formatted string into local calendar database entries and returns them as vector of CComponent object

icalVcalToLocal

Parameters:
strIcalComp,: ical string to be converted
Filetype 
pErrorCode,: Errorcode for the function
Returns:
CComponent, CComponent object pointer
This function takes ical string as parameter converts the ical formatted string into local calendar database entry returns the CComponent object

(checkCount(szCont, BEGIN_CALENDAR, END_CALENDAR, iDummy)) ||

References VCalConverter::checkContentsType(), checkCount(), convertAttach(), fillvCalTimeZone(), findLocationFromOffset(), strip(), and toLocal().

Referenced by CMulticalendar::importIcsFileData(), and CMulticalendar::importIcsFileDataProgressive().

string ICalConverter::strip ( string  szContents  ) 

Parameters:
szContents string
Returns:
string
This function is used to strip the BEGIN and END of VCALENDAR component in the given contents.This is used by icalVcalToLocal function.

References deleteWhiteSpaces().

Referenced by icalVcalToLocal().

bool ICalConverter::checkCount ( string  szContents,
string  szBegin,
string  szEnd,
unsigned int &  iCount 
)

Parameters:
szContents string
szBegin begin string of icalcomponent
szEnd end string of icalcomponent
iCount integer reference Count number of instance of entry(event/todo/journal) in ics file
Returns:
bool
This function is used to validate the string passed to icalVcalToLocal function by counting the number of BEGIN and END tags of the components. This is used by icalVcalToLocal function.

Referenced by CMulticalendar::getICSFileInfo(), and icalVcalToLocal().

string ICalConverter::validateContents ( string  szContents  ) 

Parameters:
szContents string
Returns:
string
This function is used to validate the string passed to icalVcalToLocal function by removing trailing spaces and ctrl+M in the contents.This is used by icalVcalToLocal function.

Referenced by appendControlM().

int ICalConverter::getIntFromIcaltimetype ( struct icaltimetype  ical_time  ) 

Parameters:
ical_time icaltimetype structure
Returns:
integer
This function returns an int value for the given icaltimetype structure.

getIntFromIcaltimetype

Parameters:
icaltime 
Returns:
integer value
This functioni used to get int equivalent for icaltime

References initTime().

Referenced by importEventRecurrence().

char * ICalConverter::decodeParameterTextFields ( string  encodedString,
icalparameter_encoding  encodingType 
)

Parameters:
string Value of property
decoding type - 0 for quoted printable Function to decode the text fields in ICS

void ICalConverter::fillvCalTimeZone ( string &  szContents  ) 

Function to parse the VCAL timezone field

Referenced by icalVcalToLocal().

string ICalConverter::calculateMonthdayFromRule ( time_t  dtstart,
struct icaltimetype &  dtstartStd,
string  ruleStd,
string  szZone 
)

Find the first occurence of week day in in month in which event starts

first day itself is first occurence

once we have the month day we need to keep every thing else same as before for current year

void ICalConverter::findZoneStartTime ( string &  szTime,
int  correction 
) [private]

Find the daylight start time from daylight string from daylight start time we figure out the Repeat pattern for daylight

Find the daylight start time from daylight string from daylight start time we figure out the Repeat pattern in current year for Daylight information.

position of week day from start of the month

Find total number of weekday ( su.Mo,TU ... in that month

References CMulticalendar::getSystemTimeZone(), and CMulticalendar::MCInstance().

Referenced by findLocationFromOffset().

void ICalConverter::findLocationFromOffset ( string  szDaylight  )  [private]

Function to find the localtion from time offset of GMT and daylight information we find the nearest possible match for city name from the timezone configuration table stored in the DB

Function to find the localtion from time offset of GMT from offset and daylight information we find the nearest possible match for city name from the timezone configuration table stored in the DB

Calculating offset from VCalTimeZone value in VCS format

References findZoneStartTime(), and VCalConverter::getTokens().

Referenced by icalVcalToLocal().

void ICalConverter::limitDateRange ( struct icaltimetype &  s_time,
bool  isExport 
) [private]

Private function to limit the Date Range for event coming from sync

Referenced by importEventDateStartAndDateEnd().

void ICalConverter::replaceWithEncodedString ( string &  szIcalComp,
CComponentDetails pEntry 
) [private]

void ICalConverter::convertAttach ( string &  szAttach  )  [private]

Function to convert attach

Referenced by icalVcalToLocal().

void ICalConverter::getImpendingAlarm ( string  szRrule,
time_t &  triggerTime,
time_t  dateStart,
int  alarmFlag 
) [private]

float ICalConverter::stringToFloat ( string  szValue  )  [private]

Parameters:
string the input string value
Returns:
float
This function is used to convert string to float.

string ICalConverter::addAlarmDateToString ( string  strIcalComp,
string  strVCalAlarmDate,
entryType  iType 
) [private]

Parameters:
strIcalComp string
strVCalAlarmDate string
int Type of Component
Returns:
string
This function converts alarm date to string format.

Parameters:
strIcalComp string
strVCalAlarmDate string
int iType
Returns:
string
This function converts alarm date to string format.

Referenced by localToIcalVcal().

string ICalConverter::addRuleToString ( string  strIcalComp,
vector< string >  rrules,
int  flag 
) [private]

Parameters:
strIcalComp string
rrules vector <string>
flag int
Returns:
string
Utility function used for parsing recurrence rules

Referenced by localToIcalVcal().

string ICalConverter::getIcalAlarm ( CAlarm cAlarm,
string  sZone,
bool  isAllday = false 
) [private]

getIcalAlarm()

Parameters:
cAlarm CAlarm object
sZone timezone of the event.
bool allday/task -allday /task.
Returns:
string
Function to get the Alarm string from Alarm component

getIcalAlarm()

Parameters:
cAlarm CAlarm object
Returns:
string
Function to get the Alarm string from Alarm component

References CAlarm::getDuration(), CAlarm::getRepeat(), and CAlarm::getTrigger().

void ICalConverter::deleteWhiteSpaces ( string &  szSpaceString  )  [private]

Parameters:
szSpaceString 
Returns:
NONE
Function to strip all the white spaces

Referenced by strip().

vector< CRecurrenceRule * > ICalConverter::getRecurrence ( string  strIcalComp,
icalcomponent *  pComp,
icalproperty_kind  kind,
FileType  iType 
) [private]

Parameters:
strIcalComp string
pComp icalcomponent object
kind icalproperty_kind
iType FileType (ICAL/VCAL/UNKNOWN)
Returns:
vector <CRecurrenceRule*>
This function is used to get vector of recurrencerule objects from the given strIcalComp.

getRecurrence

References getRecurrenceRule(), and CRecurrenceRule::setRuleType().

Referenced by importEventRecurrence().

CRecurrenceRule * ICalConverter::getRecurrenceRule ( string  strIcalComp,
int  index,
string  strRuleType,
FileType  iType 
) [private]

Parameters:
strIcalComp string
index position of the rule
strRuleType rule type (RRULE/EXRULE)
iType FileType (ICAL/VCAL/UNKNOWN)
Returns:
CRecurrenceRule object
This function is used to create recurrence rule from the given strIcalComp.

getRecurrenceRule()

References get_line_in_ical(), CRecurrenceRule::setRrule(), and VCalConverter::vCalToICalRule().

Referenced by getRecurrence().

vector< string > ICalConverter::getRecurrenceDates ( string  strIcalComp,
icalcomponent *  pComp,
CEvent pEvent,
icalproperty_kind  kind,
int  type = ICAL_TYPE 
) [private]

Parameters:
strIcalComp string
pComp icalcomponent object
CEvent* Pointer to Event.
kind icalproperty_kind kind of property (ICAL_RDATE_PROPERTY/ICAL_EXDATEPROPERTY)
Returns:
vector <string> list of dates
This function is used to get list of dates (RDATE/EXDATE) from given strIcalComp.

getRecurrenceDates()

References get_line_in_ical(), VCalConverter::getTokens(), CComponent::getTzid(), and VCalConverter::iCalToVCalDate().

Referenced by importEventRecurrence().

template<class T>
CAlarm * ICalConverter::getAlarm ( string  strIcalComp,
icalcomponent *  pComp,
T *  pEntry 
) [inline, private]

Parameters:
strIcalComp string
pComp icalcomponent object
Entry pointer can be event or task
diffTime difference in times
Returns:
CAlarm object
This function is used to get the CAlarm object from given strIcalComp.

getAlarm()

References get_line_in_ical(), CAlarm::getTrigger(), CAlarm::setAction(), CAlarm::setDuration(), CAlarm::setRepeat(), CAlarm::setTimeBefore(), CAlarm::setTrigger(), and VCalConverter::vCalToICalAlarm().

struct tm ICalConverter::initTime ( icaltimetype  time_ical  )  [read, private]

Parameters:
time_ical icaltimetype structure
Returns:
tm structure
This function takes icaltimetype structure and coverts it into tm structure.

initTime

Parameters:
icaltimetype structure
Returns:
tm structure
this function takes icaltimetype structure and coverts it into tm structure

Referenced by getIntFromIcaltimetype().

string ICalConverter::get_line ( string  strIcal,
int  start_loc 
) [private]

Parameters:
strIcal Ical data in string format
start_loc Staring position for search
Returns:
string
This function returns string from given start_loc to a newline char in the given contents.

get_line

Parameters:
strIcal,: Ical data in string format
start_loc,: Staring position for search
Returns:
a string fromstart_loc to until newline char

Referenced by get_line_in_ical().

string ICalConverter::get_line_in_ical ( string  strInVcal,
string  type,
int  index 
) [private]

Parameters:
strInVcal string
strType string
index int
Returns:
string
get_line_in_ical
Parameters:
strInVcal,: string in Ical format
type,either RRULE, EXRULE, RDATE, EXDATE, AALARM
This function is used to get substring from strInVcal which is matching with type (string)

References get_line().

Referenced by getAlarm(), getRecurrenceDates(), and getRecurrenceRule().

string ICalConverter::getTranspFromIcal ( icalproperty_transp  iTransp  )  [private]

Parameters:
iTransp icalproperty_transp
Returns:
string
This function returns the mapping for transparency from ICAL format to local calendar database format.

getTranspFromIcal

Parameters:
 iTransp icalproperty_transp, transparency in ICAL format
Returns:
: returns string format of transparency mapping to calendar-backend
This function returns the mapping for transparency from ICAL format to local calendar database.

COrganizer * ICalConverter::getOrganizerFromIcal ( icalproperty *  pProp  )  [private]

Parameters:
pProp icalproperty object
Returns:
COrganizer object
This function converts the ICAL format organizer to COrganizer object.

getOrganizerFromIcal()

Parameters:
 icalproperty pointer
Returns:
: COrganizer pointer
This function converts the ical organizer to COrganizer.

References CParticipant::setCommonName(), CParticipant::setDirectoryParameter(), CParticipant::setLanguage(), CParticipant::setMailTo(), and CParticipant::setSentBy().

CAttendee * ICalConverter::getAttendeeFromIcal ( icalproperty *  pProp,
FileType  iType 
) [private]

Parameters:
pProp icalproperty object
FileType iType (ICAL/VCAL/UNKNOWN)
Returns:
CAttendee object
This function converts the ICAL format attendee to CAttendee object.

getAttendeeFromIcal()

Parameters:
 icalproperty pointer
Returns:
: CAttendee pointer
This function converts the ical attendee to CAttendee.

References getCUTypeFromIcal(), getParticipationRoleFromIcal(), VCalConverter::getParticipationRoleFromVcal(), getParticipationStatusFromIcal(), getRSVPFromIcal(), VCalConverter::getRSVPFromVcal(), CAttendee::setCalendarUserType(), CAttendee::setDelegatees(), CAttendee::setDelegator(), CParticipant::setDirectoryParameter(), CParticipant::setLanguage(), CParticipant::setMailTo(), CAttendee::setRole(), and CAttendee::setRSVP().

int ICalConverter::getParticipationRoleFromIcal ( icalparameter_role  icalRole  )  [private]

Parameters:
icalRole icalparameter_role
Returns:
int
This function returns the mapping for Participation Role from ICAL format to local calendar database format.

getParticipationRoleFromIcal()

Parameters:
 icalparameter_role icalRole
Returns:
: int
This function returns the mapping for Participation Role from ICAL format to local calendar database.

Referenced by getAttendeeFromIcal().

int ICalConverter::getParticipationStatusFromIcal ( icalparameter_partstat  icalPartStat  )  [private]

Parameters:
icalPartStat icalparameter_partstat
Returns:
int
This function returns the mapping for Participation Status from ICAL format to local calendar database format.

getParticipationStatusFromIcal()

Parameters:
 icalparameter_partstat icalpartstat
Returns:
: int
This function returns the mapping for Participation Status from ICAL format to local calendar database.

Referenced by getAttendeeFromIcal().

bool ICalConverter::getRSVPFromIcal ( icalparameter_rsvp  icalRSVP  )  [private]

Parameters:
icalRSVP icalparameter_rsvp
Returns:
bool
This function returns the mapping for RSVP from ICAL format to local calendar database format.

getRSVPFromIcal()

Parameters:
 icalparameter_rsvp icalRSVP
Returns:
: bool
This function returns the mapping for RSVP from ICAL format to local calendar database.

Referenced by getAttendeeFromIcal().

int ICalConverter::getCUTypeFromIcal ( icalparameter_cutype  icalCUType  )  [private]

Parameters:
icalCUType icalparameter_cutype
Returns:
int
This function returns the mapping for CUType from ICAL format to local calendar database format.

getCUTypeFromIcal()

Parameters:
 icalparameter_cutype icalCUType
Returns:
: int
This function returns the mapping for CUType from ICAL format to local calendar database.

Referenced by getAttendeeFromIcal().

string ICalConverter::getClasFromIcal ( icalproperty_class  iClass  )  [private]

Parameters:
iClass icalproperty_class
Returns:
string
This function returns the mapping for Class from ICAL format to local calendar database format.

getClasFromIcal()

Parameters:
 icalproperty_class iClass
Returns:
: string
This function returns the mapping for Class from ICAL format to local calendar database.

icalproperty * ICalConverter::getIcalOrganizer ( COrganizer pOrg  )  [private]

Parameters:
pOrg COrganizer object
Returns:
icalproperty object
This function returns the ical organizer property from the given COrganizer object.

References CParticipant::getCommonName(), CParticipant::getDirectoryParameter(), CParticipant::getLanguage(), CParticipant::getMailTo(), and CParticipant::getSentBy().

string ICalConverter::getContactFromIcal ( icalproperty *  pProp  )  [private]

Parameters:
pProp icalproperty object
Returns:
string
This function returns contact from ICAL format to local database format.

icalparameter_rsvp ICalConverter::getIcalRSVP ( bool  fRSVP  )  [private]

Parameters:
RSVP bool
Returns:
icalparameter_rsvp
This function returns the mapping for RSVP from local databse format to ICAL format.

icalparameter_partstat ICalConverter::getIcalPartStatus ( ParticipantStatus  iPartStat  )  [private]

Parameters:
iPartStat ParticipantStatus
Returns:
icalparameter_partstat
This function returns the mapping for ParticipantStatus from local databse format to ICAL format.

Referenced by getIcalAttendee_ical().

icalparameter_role ICalConverter::getIcalPartRole ( ParticipantRole  iRole  )  [private]

Parameters:
iRole ParticipantRole
Returns:
icalparameter_role
This function returns the mapping for ParticipantRole from local databse format to ICAL format.

Referenced by getIcalAttendee_ical().

icalparameter_cutype ICalConverter::getIcalCalendarUserType ( CalendarUserType  iCalCUType  )  [private]

Parameters:
iCUType CalendarUserType
Returns:
icalparameter_cutype
This function returns the mapping for CalendarUserType from local databse format to ICAL format.

Referenced by getIcalAttendee_ical().

icalproperty * ICalConverter::getIcalAttendee_ical ( CAttendee pAtten  )  [private]

icalproperty * ICalConverter::getIcalAttendee_vcal ( CAttendee pAtten  )  [private]

* getIcalAttendee() *

Parameters:
: pAtten CAttendee pointer *
Returns:
: icalproperty icalproperty pointer

References CParticipant::getMailTo(), CAttendee::getRole(), CAttendee::getRSVP(), VCalConverter::getVcalPartRole(), and VCalConverter::getVcalRSVP().

CProperties * ICalConverter::getXProperty ( icalproperty *  pProp  )  [private]

Parameters:
pProp icalproperty object
Returns:
CProperties object
This function returns CProperties object for fiven ICAL/VCAL X property.

this kind of check is needed because libical is not able to parse X_properties if it doesn't have X- for its parameters

References CProperties::setPropName(), and CProperties::setPropValue().

Referenced by toLocal().

CParameters * ICalConverter::getParameters ( icalparameter *  pParam  )  [private]

Parameters:
pParam icalparameter object
Returns:
CParameters object
This function returns CParameters object for fiven ical parameter.

References CParameters::setParamName(), and CParameters::setParamValue().

Referenced by toLocal().

vector< CParameters * > ICalConverter::getRelationshipParamFromICal ( icalparameter *  pParam  )  [private]

Parameters:
pParam icalparameter object
Returns:
vector <CParameters*>
This function returns Relationship param from ICAL format to local database format.

References CParameters::setParamName(), and CParameters::setParamValue().

int ICalConverter::getStatusFromIcal ( icalproperty_status  icalStatus  )  [private]

Parameters:
icalStatus icalproperty_status
Returns:
int
This function returns Status from ICAL format to local database format.

CParameters * ICalConverter::getLanguageFromIcal ( icalparameter *  pParam  )  [private]

Parameters:
pParam icalparameter object
Returns:
CParameters object
This function returns language param from ICAL format to local database format.

References CParameters::setParamName(), and CParameters::setParamValue().

Referenced by getLangAlterParam().

CParameters * ICalConverter::getAlterFromIcal ( icalparameter *  pParam  )  [private]

Parameters:
pParam icalparameter object
Returns:
CParameters object
This function returns altrep param from ICAL format to local database format.

References CParameters::setParamName(), and CParameters::setParamValue().

Referenced by getLangAlterParam().

vector< CParameters * > ICalConverter::getLangAlterParam ( icalproperty *  pProp  )  [private]

Parameters:
pProp icalproperty object
Returns:
vector <CParameters> object
This function returns language and altrep param from ICAL format to local database format.

References getAlterFromIcal(), and getLanguageFromIcal().

int ICalConverter::getIcalStatus ( statusParam  iStatus  )  [private]

Parameters:
iStatus statusparam
Returns:
int
This function returns the mapping for status from local databse format to ICAL format.

icalparameter_reltype ICalConverter::getIcalRelType ( RelationshipType  iRel  )  [private]

Parameters:
iRel RelationshipType
Returns:
icalparameter_reltype
This function returns the mapping for RelationshipType from local databse format to ICAL format.

CParameters * ICalConverter::getFMTypeFromIcal ( icalparameter *  pParam  )  [private]

Parameters:
pParam icalparameter object
Returns:
CParameters object
This function returns FMType param from ICAL format to local database format.

References CParameters::setParamName(), and CParameters::setParamValue().

Referenced by toLocal().

icalparameter * ICalConverter::getTZIDParam (  )  [private]

Returns:
icalparameter object
This function returns the local timezone.

bool ICalConverter::importEventDateStartAndDateEnd ( icalcomponent *  pComp,
CEvent pEvent,
FileType  iType,
int &  pErrorCode 
) [private]

importEventDateStartAndDateEnd: : The place where we put the start_time_zone/local_time_zone diff. returns: True if the date start is at 00:00:00 (midnight).

Reads and sets the start time for the CEvent object from an icalcomponent. The timeDiff is an in/out parameter for the event/local time zone difference.

Returns true if the start time modified by the time zone difference is at midnight (so it can be considered as a part of an allday event).

References CComponent::getDateStart(), CMulticalendar::getSystemTimeZone(), limitDateRange(), CMulticalendar::MCInstance(), CComponent::setAllDay(), CComponent::setDateEnd(), CComponent::setDateStart(), and CComponent::setTzid().

Referenced by toLocal().

bool ICalConverter::importEventDateEnd ( icalcomponent *  pComp,
CEvent pEvent,
FileType  iType 
) [private]

importEventDateEnd:

Reads and sets the end time for the CEvent object from an icalcomponent. The timeDiff is the time zone difference between the component and the local clock.

References CComponent::getAllDay(), CComponent::getDateStart(), CMulticalendar::getSystemTimeZone(), CMulticalendar::MCInstance(), and CComponent::setDateEnd().

void ICalConverter::importEventRecurrence ( icalcomponent *  pComp,
CEvent pEvent,
string  strIcalComp,
FileType  iType,
int &  pErrorCode 
) [private]

void ICalConverter::importTodoDue ( icalcomponent *  pComp,
CTodo pTodo 
) [private]

Fixes Security related crash

References CComponent::getTzid(), and CComponent::setDateStart().

Referenced by toLocal().


The documentation for this class was generated from the following files:

Generated on Tue Jul 27 14:17:50 2010 for calendar-backend by  doxygen 1.5.6