VCalConverter Class Reference

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

#include <VCalConverter.h>


Public Member Functions

 VCalConverter ()
 ~VCalConverter ()
FileType checkContentsType (string szContents)
string vCalToICalRule (string vcal)
string iCalToVCalRule (string ical, time_t startTime)
string vCalToICalDate (string vcal)
string iCalToVCalDate (string ical)
string vCalToICalAlarm (string vCalAlarm)
string iCalToVCalAlarm (string iCalAlarm)
vector< string > getTokens (string str, string delimiter)
string getTranspFromVcal (string szContents)
icaltimetype getCreatedTimeFromVcal (string szContents)
int getStatusFromVcal (string szContents)
icalproperty * getVcalTransp (string szTransp)
string getVcalStatus (statusParam iStatus)
int getParticipationRoleFromVcal (string szAtten)
string getVcalPartRole (int iRole)
string getVcalCreatedTime (string szTime, string szContents)
icalparameter * getVcalRSVP (bool fRSVP)
bool getRSVPFromVcal (string szContents)

Private Member Functions

void Tokenize (const string &str, vector< string > &tokens, string delimiters=" ")
string getNoDelimiterString (string str, string delimiters, string repStr)
void initRecurrenceItem (RecurrenceItem *item)
int getDay (string vcal, bool opFlag)
string getByMonthFromVcal (string vcal)
string getByDayFromVcal (string vcal)
string getDurationFromVcal (string vcal)
string getFrequency (vector< string > tokens, int index)
string getInterval (vector< string > tokens, int index)
string getCount (vector< string > tokens, int index)
string getUntil (vector< string > tokens, int index)
string getByDayFromIcal (vector< string > tokens, int index)
string getByMonthFromIcal (vector< string > tokens, int index)
time_t tzStringTogmtime (string strIcalComp)
string gmttimeToTZString (time_t tTime, bool onlyDate)
string getVCalDate (vector< string > tokens, int index, int type)
string getAudioAlarm (string alarm)


Detailed Description

converts local database format to vcal data and vice versa

VCalConverter


Constructor & Destructor Documentation

VCalConverter::VCalConverter (  ) 

constructor

header files included in this file consttructor

VCalConverter::~VCalConverter (  ) 

destructor

destructor


Member Function Documentation

FileType VCalConverter::checkContentsType ( string  szContents  ) 

Parameters:
szContents string
Returns:
FileType (ICAL/VCAL)
This function returns the format of the given contents as ICAL/VCAL.

Referenced by ICalConverter::icalVcalToLocal().

string VCalConverter::vCalToICalRule ( string  vcal  ) 

Parameters:
vcal string
Returns:
string
This function is used to convert vcal recurrence format to ical recurence format

vCalToICal

Parameters:
vcal string
Returns:
ical string
This function is used to convert vcal recurrence format to ical recurence format

References getByDayFromVcal(), getByMonthFromVcal(), getDurationFromVcal(), and initRecurrenceItem().

Referenced by ICalConverter::getRecurrenceRule().

string VCalConverter::iCalToVCalRule ( string  ical,
time_t  startTime 
)

Parameters:
ical string
string This function is used to convert ical recurrence rule to vcal recurrence rule format
iCalToVCal

vcal:RRULE:FREQ=MONTHLY;INTERVAL=10;BYMONTHDAY=6,7,8;COUNT=10 ical:MD10 6 7 8 #10 RRULE FREQ MONTHLY INTERVAL 10 BYMONTHDAY 6 7 8 COUNT 10

Referenced by ICalConverter::localToIcalVcal().

string VCalConverter::vCalToICalDate ( string  vCalDate  ) 

Parameters:
vcal string
Returns:
string
This function is used to convert vcal recurrence date format to ical recurence date format

vCalToICalDate

string VCalConverter::iCalToVCalDate ( string  iCalDate  ) 

Parameters:
ical string
Returns:
string
This function is used to convert ical recurrence date to vcal recurrence date format

iCalToVcalDate

Parameters:
iCal Date
Returns:
Vcal Date
This function is used to convert ical date to vcal date

References getNoDelimiterString(), getVCalDate(), and Tokenize().

Referenced by ICalConverter::getRecurrenceDates().

string VCalConverter::vCalToICalAlarm ( string  vCalAlarm  ) 

Parameters:
vcalAlarm string
Returns:
string
This function is used to convert vcal alarm to ical alarm format

References getAudioAlarm().

Referenced by ICalConverter::getAlarm().

string VCalConverter::iCalToVCalAlarm ( string  iCalAlarm  ) 

Parameters:
icalAlarm string
Returns:
string
This function is used to convert ical alarm to vcal alarm format

vector< string > VCalConverter::getTokens ( string  str,
string  delimiter 
)

Parameters:
str string
delimiter string
Returns:
vector<string>
getTokens
Parameters:
string 
delimiters 
Returns:
list of tokens
This function is public function used to get tokens for given string

References Tokenize().

Referenced by ICalConverter::findEffectiveDSToffset(), ICalConverter::findLocationFromOffset(), and ICalConverter::getRecurrenceDates().

string VCalConverter::getTranspFromVcal ( string  szContents  ) 

Parameters:
szContents string
Returns:
string
This function returns the mapping for transparency from VCAL format to local calendar database format.

icaltimetype VCalConverter::getCreatedTimeFromVcal ( string  szContents  ) 

Parameters:
szContents string
Returns:
icaltimetype
This function returns the mapping for created time from VCAL format to local calendar database format.

int VCalConverter::getStatusFromVcal ( string  szContents  ) 

Parameters:
szContents string
Returns:
int
This function returns the mapping for status from VCAL format to local calendar database format.

icalproperty * VCalConverter::getVcalTransp ( string  szTransp  ) 

Parameters:
szTransp string
Returns:
icalproperty object
This function returns the mapping for Transparency from local databse format to VCAL format.

string VCalConverter::getVcalStatus ( statusParam  iStatus  ) 

Parameters:
iStatus statusParam
Returns:
string
This function returns the mapping for statusParam from local databse format to VCAL format.

int VCalConverter::getParticipationRoleFromVcal ( string  szAtten  ) 

Parameters:
szAtten string
Returns:
int
This function returns the mapping for ParticipationRole from VCAL format to local calendar database format.

Referenced by ICalConverter::getAttendeeFromIcal().

string VCalConverter::getVcalPartRole ( int  iRole  ) 

Parameters:
iRole int
Returns:
string
This function returns the mapping for ParticipationRole from local databse format to VCAL format.

Referenced by ICalConverter::getIcalAttendee_vcal().

string VCalConverter::getVcalCreatedTime ( string  szTime,
string  szContents 
)

Parameters:
szTime string
szContents string
Returns:
string
This function returns the mapping for created time from local databse format to VCAL format.

icalparameter * VCalConverter::getVcalRSVP ( bool  fRSVP  ) 

Parameters:
fRSVP bool
Returns:
icalparameter
This function returns the mapping for RSVP from local databse format to VCAL format.

Referenced by ICalConverter::getIcalAttendee_vcal().

bool VCalConverter::getRSVPFromVcal ( string  szContents  ) 

Parameters:
szContents string
Returns:
int
This function returns the mapping for RSVP from VCAL format to local calendar database format.

Referenced by ICalConverter::getAttendeeFromIcal().

void VCalConverter::Tokenize ( const string &  str,
vector< string > &  tokens,
string  delimiters = " " 
) [private]

Tokenize

Parameters:
string to be tokenize
list of tokens
delimiters 
Returns:
None
This function is used to get tokens from given string

Referenced by getByDayFromVcal(), getByMonthFromVcal(), getDurationFromVcal(), getTokens(), and iCalToVCalDate().

string VCalConverter::getNoDelimiterString ( string  str,
string  delimiters,
string  repStr 
) [private]

Parameters:
str string
delimiters string
repStr string
Returns:
string
This function returns a string by removing the given delimiters in the given string.

getNoDelimiterString

This function is used to get string with no delimiters

Referenced by iCalToVCalDate().

void VCalConverter::initRecurrenceItem ( RecurrenceItem *  item  )  [private]

Parameters:
item RecurrenceItem object
Returns:
void
initRecurrence
Parameters:
recurrence item
Returns:
None
It initializes the recurrence item

Referenced by vCalToICalRule().

int VCalConverter::getDay ( string  vcal,
bool  opFlag 
) [private]

Parameters:
vcal string
opFlag bool
Returns:
int
This function returns the Day from the given vcal string

getDay

Parameters:
vcal string
opFlag,indicates 1+ / 1-
Returns:
day value
This function is used to get the day

Referenced by getByDayFromVcal().

string VCalConverter::getByMonthFromVcal ( string  vcal  )  [private]

Parameters:
vcal string
Returns:
string
This function returns ByMonth from the given vcal string.

getByMonthFromVcal

Parameters:
vcal string
Returns:
BYMONTH ical modifier
This function is used to get BYMONTH modifier for recurrence

References Tokenize().

Referenced by vCalToICalRule().

string VCalConverter::getByDayFromVcal ( string  vcal  )  [private]

Parameters:
vcal string
Returns:
string
This function returns ByDay from the given vcal string.

getByDayFromVcal

Parameters:
vcal string
Returns:
BYDAY modifier
This function is used to get BYDAY modifier for recurrence

References getDay(), and Tokenize().

Referenced by vCalToICalRule().

string VCalConverter::getDurationFromVcal ( string  vcal  )  [private]

Parameters:
vcal string
Returns:
string
This function returns Duration from the given vcal string.

getDurationFromVcal

Parameters:
vcal string
Returns:
duration in string format
This function is used to get duration for recurrence

References Tokenize().

Referenced by vCalToICalRule().

string VCalConverter::getFrequency ( vector< string >  tokens,
int  index 
) [private]

Parameters:
tokens vector<string>
index int
Returns:
string
This function returns the frequency from the given vector of string.

string VCalConverter::getInterval ( vector< string >  tokens,
int  index 
) [private]

Parameters:
tokens vector<string>
index int
Returns:
string
This function returns the interval from the given vector of string.

string VCalConverter::getCount ( vector< string >  tokens,
int  index 
) [private]

Parameters:
tokens vector<string>
index int
Returns:
string
This function returns the count from the given vector of string.

string VCalConverter::getUntil ( vector< string >  tokens,
int  index 
) [private]

Parameters:
tokens vector<string>
index int
Returns:
string
This function returns the until from the given vector of string.

string VCalConverter::getByDayFromIcal ( vector< string >  tokens,
int  index 
) [private]

Parameters:
tokens vector<string>
index int
Returns:
string
This function returns the ByDay from the given vector of string.

string VCalConverter::getByMonthFromIcal ( vector< string >  tokens,
int  index 
) [private]

Parameters:
tokens vector<string>
index int
Returns:
string
This function returns the ByMonth from the given vector of string.

time_t VCalConverter::tzStringTogmtime ( string  strIcalComp  )  [private]

Parameters:
strIcalComp string
Returns:
time_t
This function returns gmt time from the given string.

tzStringTogmtime

Parameters:
strIcalComp,: Time in TZ string format
Returns:
time in seconds since 1970 in time_t format
This function converts TZ string to time_t seconds

Referenced by getVCalDate().

string VCalConverter::gmttimeToTZString ( time_t  tTime,
bool  onlyDate 
) [private]

Parameters:
tTime time_t
onlyDate bool
Returns:
string
This function returns ignt time in string format.

Referenced by getVCalDate().

string VCalConverter::getVCalDate ( vector< string >  tokens,
int  index,
int  type 
) [private]

Parameters:
tokens vector<string>
index int
Returns:
string
This function returns the Vcal Date from the given vector of string.

getVcalDate

Parameters:
tokens in ical
pos of date
type of date (i.e RDATE/EXDATE)
Returns:
date in vcal format
This function is used to getDATE in Vcal format

References gmttimeToTZString(), and tzStringTogmtime().

Referenced by iCalToVCalDate().

string VCalConverter::getAudioAlarm ( string  alarm  )  [private]

Parameters:
alarm string
Returns:
string
This function returns Audio Alarm from the given string.

getAudioAlarm

Referenced by vCalToICalAlarm().


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