CComponentDetails Class Reference

This class holds the complete the information about the Components. Will be used when UI/other parties needs the full details of component. More...

#include <CComponentDetails.h>

Inheritance diagram for CComponentDetails:

CComponent CEvent CJournal CTodo

Public Member Functions

 CComponentDetails ()
 CComponentDetails (string description)
 CComponentDetails (string summary, int tododue, int status)
 CComponentDetails (string summary, string description, string location, int dateStart, int dateEnd)
void initEvent ()
 CComponentDetails (CComponentDetails &ref)
const CComponentDetailsoperator= (const CComponentDetails &right)
bool setClas (string szClas)
string getClas ()
bool setDateStamp (int iDateStamp)
int getDateStamp ()
bool setOrganizer (COrganizer *pOrg)
COrganizergetOrganizer ()
void removeOrganizer ()
bool setAttendees (vector< CAttendee * > vAttendeeList)
vector< CAttendee * > getAttendees ()
void removeAttendees ()
bool setAttachments (vector< string > vAttachList)
vector< string > getAttachments ()
bool setSequence (int iSequence)
int getSequence ()
bool setUid (int iUId)
int getUid ()
bool setUrl (string szUrl)
string getUrl ()
bool setCategories (string szCategories)
string getCategories ()
bool setComments (string szComments)
string getComments ()
bool setContact (string szContact)
string getContact ()
bool setRelated (string szRelated)
string getRelated ()
bool setResources (string szResources)
string getResources ()
vector< CAttendee * > retrieveAttendeeDetails ()
COrganizerretrieveOrganizerDetails ()
bool setXProperties (vector< CProperties * >)
vector< CProperties * > getXProperties ()
void removeXProperties ()
virtual ~CComponentDetails ()
map< string, vector
< CParameters * > > 
getHashMap ()
bool setHashMap (map< string, vector< CParameters * > > hashMap)
void removeHashMap ()
map< string, vector
< CParameters * > > 
retrieveParameterDetails ()
map< string, vector
< CParameters * > > 
retrieveXParameterDetails ()
vector< CParameters * > getParameter (QueryResult *pQr)
vector< CProperties * > retrieveXPropertyDetails ()
vector< string > getPropertyValues (string szProperty)
CAttendeeconvertParamToAttendee (vector< CParameters * > vParam)
vector< CParameters * > getParameter (string szPropName, string szPropValue)
COrganizerconvertParamToOrganizer (vector< CParameters * > vParam)
string toString ()

Private Member Functions

void copyHashMap (map< string, vector< CParameters * > > hashMap)

Private Attributes

int iDateStamp
COrganizerpOrganizer
vector< string > vAttachments
vector< CAttendee * > vAttendee
int iSequence
int iUId
string szUrl
string szCategory
string szComments
string szContacts
string szRelated
string szResources
vector< CProperties * > vXProp
string szClas
map< string, vector
< CParameters * > > 
hashMap

Detailed Description

This class holds the complete the information about the Components. Will be used when UI/other parties needs the full details of component.

CComponentDetails class


Constructor & Destructor Documentation

CComponentDetails::CComponentDetails (  ) 

CComponentDetails Default constructor

References initEvent().

CComponentDetails::CComponentDetails ( string  szDescription  ) 

CComponentDetails Overloaded parameterized constructor

References initEvent().

CComponentDetails::CComponentDetails ( string  szSummary,
int  iTodoDue,
int  iStatus 
)

CComponentDetails Overloaded parameterized constructor

References initEvent().

CComponentDetails::CComponentDetails ( string  szSummary,
string  szDescription,
string  szLocation,
int  iDateStart,
int  iDateEnd 
)

CComponentDetails Overloaded parameterized constructor

References initEvent().

CComponentDetails::CComponentDetails ( CComponentDetails ref  ) 

CComponentDetails::~CComponentDetails (  )  [virtual]

Destructor

~CComponentDetails Destructor for CComponentDetails class

References removeAttendees(), removeHashMap(), removeOrganizer(), and removeXProperties().


Member Function Documentation

void CComponentDetails::initEvent (  ) 

InitEvent Function used to initialize the class members

References iDateStamp, iSequence, iUId, pOrganizer, vAttendee, and vXProp.

Referenced by CComponentDetails().

const CComponentDetails & CComponentDetails::operator= ( const CComponentDetails right  ) 

bool CComponentDetails::setClas ( string  szClas  ) 

Parameters:
 string Class
Returns:
: bool indicating result of operation
This function is used to set class parameter for an entry (Event,todo)

setClas

Parameters:
Class string
Returns:
bool indicating result of operation This function is used to set clas

Referenced by CCalendar::getJournal(), CCalendar::getJournals(), CCalendar::getTodo(), and CCalendar::getTodos().

string CComponentDetails::getClas (  ) 

Parameters:
 none
Returns:
: string class
This function is used to get class string

getClas

Parameters:
none 
Returns:
clas string This function is used to get clas string

References szClas.

Referenced by CCalendar::modifyEvent(), CCalendar::modifyJournal(), and CCalendar::modifyTodo().

bool CComponentDetails::setDateStamp ( int  iDateStamp  ) 

Parameters:
 int time in utc
Returns:
: bool indicating result of operation
This function is used to setDateStamp

setDateStamp

Parameters:
int time in utc
Returns:
bool indicating result of operation
This function is used to setDateStamp

Referenced by ICalConverter::toLocal().

int CComponentDetails::getDateStamp (  ) 

Parameters:
 none
Returns:
:int datestamp in utc
This function is used to get date stamp

getDateStamp

Parameters:
none 
Returns:
datestamp in utc This function is used to get date stamp

References iDateStamp.

Referenced by CCalendar::modifyEvent(), CCalendar::modifyJournal(), CCalendar::modifyTodo(), and ICalConverter::toLocal().

bool CComponentDetails::setOrganizer ( COrganizer ptrOrganizer  ) 

Parameters:
 COrganizer* pointer to COrganizer object
Returns:
: bool indicating result of operation
This function is used to set organizer

setOrganizer

Parameters:
pointer to COrganizer class
Returns:
bool indicating result of operation
This function is used to set organizer

References pOrganizer, and removeOrganizer().

Referenced by CComponentDetails(), and operator=().

COrganizer * CComponentDetails::getOrganizer (  ) 

Parameters:
 none
Returns:
: COrganizer* pointer to Organizer class
This function is used to get organizer

getOrganizer

Parameters:
none 
Returns:
pointer to Organizer class This function is used to get organizer

References pOrganizer.

Referenced by CCalendar::addEvent(), CCalendar::addJournal(), CCalendar::addTodo(), CCalendar::modifyEvent(), CCalendar::modifyJournal(), CCalendar::modifyTodo(), and toString().

void CComponentDetails::removeOrganizer (  ) 

Parameters:
 none
Returns:
: none
This function is used to remove organizer

removeOrganizer

Parameters:
none 
Returns:
none This function is used to get organizer

References pOrganizer.

Referenced by operator=(), setOrganizer(), and ~CComponentDetails().

bool CComponentDetails::setAttendees ( vector< CAttendee * >  vAttendee  ) 

Parameters:
 vector<CAttendee*> vector of pointers to CAttendee objets
Returns:
: bool indicating result of operation
This function is used to set Attendees

setAttendees

Parameters:
vector of pointers to CAttendee class
Returns:
bool indicating result of operation
This function is used to set Attendees

References removeAttendees().

Referenced by CComponentDetails(), and operator=().

vector< CAttendee * > CComponentDetails::getAttendees (  ) 

Parameters:
 none
Returns:
: vector<CAttendee*> vector of pointers to CAttendee class
This function is used to get vector of pointers to CAttendee class

getAttendees

Parameters:
none 
Returns:
vector of pointers to CAttendee class This function is used to get vector of pointers to CAttendee class

References vAttendee.

Referenced by CCalendar::addEvent(), CCalendar::addJournal(), CCalendar::addTodo(), CCalendar::modifyEvent(), CCalendar::modifyJournal(), and CCalendar::modifyTodo().

void CComponentDetails::removeAttendees (  ) 

Parameters:
 none
Returns:
: none
This function is used to remove Attendees

removeAttendees

Parameters:
 none
Returns:
: none
This function is used to remove Attendees

References vAttendee.

Referenced by operator=(), setAttendees(), and ~CComponentDetails().

bool CComponentDetails::setAttachments ( vector< string >  vAttachments  ) 

Parameters:
 vector<string> vector of Attachments
Returns:
: bool indicating result of operation
TODO: have to change this to string This function is used to set Attachments

setAttachments

Parameters:
vector of pointers to CAttachments class
Returns:
bool indicating result of operation
This function is used to set Attachments

Referenced by CComponentDetails(), operator=(), and ICalConverter::toLocal().

vector< string > CComponentDetails::getAttachments (  ) 

Parameters:
 none
Returns:
: vector<string> vector of attachments
This function is used to get attachments

getAttachments

Parameters:
none 
Returns:
vector of pointers to attachments This function is used to get attachments

References vAttachments.

Referenced by CCalendar::modifyEvent(), CCalendar::modifyJournal(), and CCalendar::modifyTodo().

bool CComponentDetails::setSequence ( int  iSequence  ) 

Parameters:
 int sequence
Returns:
: bool indicating result of operation
This function is used to set sequence

setSequence

Parameters:
int sequence
Returns:
bool indicating result of operation
This function is used to set sequence

int CComponentDetails::getSequence (  ) 

Parameters:
 none
Returns:
: int sequence
This function is used to get sequence

getSequence

Parameters:
none 
Returns:
int sequence This function is used to get sequence

References iSequence.

Referenced by CCalendar::modifyEvent(), CCalendar::modifyJournal(), and CCalendar::modifyTodo().

bool CComponentDetails::setUid ( int  iUId  ) 

Parameters:
 int uid
Returns:
: bool indicating result of operation
This function is used to set uid

setUid

Parameters:
int uid
Returns:
bool indicating result of operation
This function is used to set uid

Referenced by CCalendar::getTodo(), and CCalendar::getTodos().

int CComponentDetails::getUid (  ) 

Parameters:
 none
Returns:
: int Uid
This function is used to get Uid might be needed from sync point of view

getUid

Parameters:
none 
Returns:
int Uid This function is used to get Uid might be needed from sync point of view

References iUId.

Referenced by CCalendar::modifyEvent(), CCalendar::modifyJournal(), and CCalendar::modifyTodo().

bool CComponentDetails::setUrl ( string  szUrl  ) 

Parameters:
 string url
Returns:
: bool indicating result of operation
This function is used to set url

setUrl

Parameters:
url string
Returns:
bool indicating result of operation This function is used to set url

Referenced by CCalendar::getTodo(), and CCalendar::getTodos().

string CComponentDetails::getUrl (  ) 

Parameters:
 none
Returns:
: string url
This function is used to get url string

getUrl

Parameters:
none 
Returns:
url string This function is used to get url string

References szUrl.

Referenced by CCalendar::modifyEvent(), CCalendar::modifyJournal(), and CCalendar::modifyTodo().

bool CComponentDetails::setCategories ( string  szCategory  ) 

Parameters:
 string szCategories
Returns:
: bool indicating result of operation true/false
This function is used to set categories

setCategories

Parameters:
categories string
Returns:
bool indicating result of operation This function is used to set categories

Referenced by CCalendar::getJournal(), CCalendar::getJournals(), CCalendar::getTodo(), and CCalendar::getTodos().

string CComponentDetails::getCategories (  ) 

Parameters:
 none
Returns:
: string Categories
This function is used to get categories string

getCategories

Parameters:
none 
Returns:
Categories string This function is used to get categories string

References szCategory.

Referenced by CCalendar::modifyEvent(), CCalendar::modifyJournal(), and CCalendar::modifyTodo().

bool CComponentDetails::setComments ( string  szComments  ) 

Parameters:
 string comments
Returns:
: bool indicating result of operation
This function is used to set comments

setComments

Parameters:
comments string
Returns:
bool indicating result of operation This function is used to set comments

Referenced by CCalendar::getJournal(), CCalendar::getJournals(), CCalendar::getTodo(), and CCalendar::getTodos().

string CComponentDetails::getComments (  ) 

Parameters:
 none
Returns:
: string comments
This function is used to get comments

getComments

Parameters:
none 
Returns:
comments string This function is used to get comments

References szComments.

Referenced by CCalendar::modifyEvent(), CCalendar::modifyJournal(), CCalendar::modifyTodo(), and ICalConverter::replaceWithEncodedString().

bool CComponentDetails::setContact ( string  szContacts  ) 

Parameters:
 string contact
Returns:
: bool indicating result of operation
This function is used to set contact

setContact

Parameters:
contact string
Returns:
bool indicating result of operation This function is used to set contact

Referenced by CCalendar::getJournal(), CCalendar::getJournals(), CCalendar::getTodo(), and CCalendar::getTodos().

string CComponentDetails::getContact (  ) 

Parameters:
 none
Returns:
: string contact
This function is used to get Contact

getContact

Parameters:
none 
Returns:
contact string This function is used to get Contact

References szContacts.

Referenced by CCalendar::modifyEvent(), CCalendar::modifyJournal(), and CCalendar::modifyTodo().

bool CComponentDetails::setRelated ( string  szRelated  ) 

Parameters:
 string Related
Returns:
: bool indicating result of operation
This function is used to set Related

setRelated

Parameters:
Related string
Returns:
bool indicating result of operation This function is used to set Related

Referenced by CCalendar::getJournal(), CCalendar::getJournals(), CCalendar::getTodo(), and CCalendar::getTodos().

string CComponentDetails::getRelated (  ) 

Parameters:
 none
Returns:
: string related
This function is used to get related

getRelated

Parameters:
none 
Returns:
related string This function is used to get related

References szRelated.

Referenced by CCalendar::modifyEvent(), CCalendar::modifyJournal(), and CCalendar::modifyTodo().

bool CComponentDetails::setResources ( string  szResources  ) 

Parameters:
 string Resources
Returns:
: bool indicating result of operation
This function is used to set Resources

setResources

Parameters:
Resources string
Returns:
bool indicating result of operation This function is used to set Resources

Referenced by CCalendar::getJournal(), CCalendar::getJournals(), CCalendar::getTodo(), and CCalendar::getTodos().

string CComponentDetails::getResources (  ) 

Parameters:
 none
Returns:
: string Resources
This function is used to get resources

getResources

Parameters:
none 
Returns:
resources string This function is used to get resources

References szResources.

Referenced by CCalendar::modifyEvent(), CCalendar::modifyJournal(), and CCalendar::modifyTodo().

vector< CAttendee * > CComponentDetails::retrieveAttendeeDetails (  ) 

Parameters:
NONE 
Returns:
vector<CAttendee*> vector of CAttendee pointers
Memory is alocated inside the procedure for each of the CAttendee has to be freed by the API user. Function used to retrieve Attendee details from DB

retrieveAttendeeDetails

Parameters:
NONE 
Returns:
vector<CAttendee*> Function used to retrieve Attendee details from DB

References convertParamToAttendee(), CComponent::getId(), getParameter(), getPropertyValues(), and CParticipant::setMailTo().

COrganizer * CComponentDetails::retrieveOrganizerDetails (  ) 

Parameters:
NONE 
Returns:
COrganizer*
Function used to retrieve organizer details Memory is allocated inside the prodcedure for COrganizer has to be freed by the API user.

retrieveOrganizerDetails

Parameters:
NONE 
Returns:
COrganizer* Function used to retrieve organizer details

References convertParamToOrganizer(), CComponent::getId(), getParameter(), getPropertyValues(), and CParticipant::setMailTo().

bool CComponentDetails::setXProperties ( vector< CProperties * >  vXProp  ) 

Parameters:
string Xproperties
Returns:
bool indicating result of operation
This function is used to set Xproperties

setXproperties

Parameters:
Xproperties string
Returns:
bool indicating result of operation This function is used to set Xproperties

References removeXProperties().

Referenced by CComponentDetails(), CCalendar::getJournal(), CCalendar::getJournals(), CCalendar::getTodo(), CCalendar::getTodos(), operator=(), and ICalConverter::toLocal().

vector< CProperties * > CComponentDetails::getXProperties (  ) 

Parameters:
none 
Returns:
vector <CProperties*> vector of Cpropertied
This function is used to get Xproperties

getXProperties

Parameters:
none 
Returns:
xproperties string This function is used to get Xproperties

References vXProp.

Referenced by CCalendar::addEvent(), CCalendar::addJournal(), CCalendar::addTodo(), CCalendar::modifyEvent(), CCalendar::modifyJournal(), and CCalendar::modifyTodo().

void CComponentDetails::removeXProperties (  ) 

Parameters:
 none
Returns:
: none
This function is used to remove Xproperties

removeXProperties

Parameters:
 none
Returns:
: none
This function is used to remove Xproperties

References vXProp.

Referenced by operator=(), setXProperties(), and ~CComponentDetails().

map< string, vector< CParameters * > > CComponentDetails::getHashMap (  ) 

Parameters:
 NONE
Returns:
: map <string, vector <CParameters*> >
This function is used to get the hash map from the CComponentDetails object.

getHashMap()

Parameters:
 NONE
Returns:
: map <string, vector <CParameters*> >
This function is used to get the hash map

Referenced by CCalendar::addEvent(), CCalendar::addJournal(), CCalendar::addTodo(), CCalendar::modifyEvent(), CCalendar::modifyJournal(), and CCalendar::modifyTodo().

bool CComponentDetails::setHashMap ( map< string, vector< CParameters * > >  hashMap  ) 

Parameters:
 hashMap
Returns:
bool
This function is used to set the hashmap in CComponentDetails object. CComponentDetails takes ownership of the CParameters pointers in hashMap, so you mustn't delete them yourself.

setHashMap()

Parameters:
 hashmap
Returns:
bool
This function is used to set the hashmap. CComponentDetails takes ownership of the CParameters pointers in hashMap, so you mustn't delete them yourself.

References removeHashMap().

Referenced by CCalendar::getJournal(), CCalendar::getJournals(), CCalendar::getTodo(), CCalendar::getTodos(), and ICalConverter::toLocal().

void CComponentDetails::removeHashMap (  ) 

Parameters:
 none
Returns:
: none
This function is used to remove hashmap

removeHashMap

Parameters:
 none
Returns:
: none
This function is used to remove the hashmap

Referenced by copyHashMap(), setHashMap(), and ~CComponentDetails().

map< string, vector< CParameters * > > CComponentDetails::retrieveParameterDetails (  ) 

Parameters:
: NONE
Returns:
: map with string and vector <CParameters*> as (key,value)
This function retrieves details from parameters table and returns a hashmap. Memory for vector <CParameters*> will be allocated inside this procedure has to be freed by the API user.

retrieveParameterDetails()

Parameters:
: NONE
Returns:
: map with string and vector <CParameters*> as (key,value)
This function retrieves details from parameters table and returns a hashmap.

References CParameters::getDataType(), CProperties::getDataType(), CComponent::getId(), CParameters::getParamName(), CProperties::getPropName(), CCalendarDB::getRecords(), CCalendarDB::Instance(), CParameters::setParamName(), CParameters::setParamValue(), CProperties::setPropName(), and CProperties::setPropValue().

Referenced by CCalendar::getJournal(), CCalendar::getJournals(), CCalendar::getTodo(), and CCalendar::getTodos().

vector< CParameters * > CComponentDetails::getParameter ( QueryResult *  pQr  ) 

Parameters:
 QueryResult pQr
Returns:
: vector < CParameters* >
This function returns all cparameters.

getParameter()

Parameters:
 QueryResult pQr
Returns:
: vector < CParameters* >
This function returns all cparameters.

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

Referenced by getParameter(), retrieveAttendeeDetails(), and retrieveOrganizerDetails().

vector< CProperties * > CComponentDetails::retrieveXPropertyDetails (  ) 

Parameters:
 NONE
Returns:
: vector <CProperties*> vector of extra properties if any for this event
Memory is allocated for vector <CProperties*> inside this procedure has to be freed by the API user. Function to retrieve xtra properties.

retrieveXPropertyDetails()

References CProperties::getDataType(), CComponent::getId(), CProperties::getPropName(), CCalendarDB::getRecords(), CCalendarDB::Instance(), CProperties::setPropName(), and CProperties::setPropValue().

Referenced by CCalendar::getJournal(), CCalendar::getJournals(), CCalendar::getTodo(), and CCalendar::getTodos().

vector< string > CComponentDetails::getPropertyValues ( string  szProperty  ) 

Parameters:
string Property Name
Returns:
vector<string> vector of unique Property values for specific ID
Function used to retrieve MailTo parameters for attendee

getPropertyValues

Parameters:
string Property Name
Returns:
vector<string> vector of unique Property values for specific ID
Function used to retrieve MailTo parameters for attendee

References CComponent::getId(), CCalendarDB::getRecords(), and CCalendarDB::Instance().

Referenced by retrieveAttendeeDetails(), and retrieveOrganizerDetails().

CAttendee * CComponentDetails::convertParamToAttendee ( vector< CParameters * >  vParam  ) 

vector< CParameters * > CComponentDetails::getParameter ( string  szPropName,
string  szPropValue 
)

Parameters:
string 
string 
Returns:
vector <CParameters*>
Function to retrieve parameters for a particular property This is an overloaded method.

getParameter

Parameters:
string 
string 
Returns:
vector <CParameters*>
Function to retrieve parameters for a particular property

define SELECT_PROP_AND select * from Parametes where ComponentId= AND PropertyName = s AND PropertyValue = s

References CComponent::getId(), getParameter(), CCalendarDB::getRecords(), and CCalendarDB::Instance().

COrganizer * CComponentDetails::convertParamToOrganizer ( vector< CParameters * >  vParam  ) 

Parameters:
@return Function to convert vector of parameters to COrganizer
convertParamToOrganizer
Parameters:
@return Function to convert vector of parameters to COrganizer

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

Referenced by retrieveOrganizerDetails().

string CComponentDetails::toString (  ) 

void CComponentDetails::copyHashMap ( map< string, vector< CParameters * > >  hashMap  )  [private]

Parameters:
 hashmap
Returns:
none
This function is used to set the hashmap in CComponentDetails object.

copyHashMap()

Parameters:
 hashmap
Returns:
bool
This function is used to set the hashmap.

References removeHashMap().

Referenced by CComponentDetails(), and operator=().


Field Documentation

vector< string > CComponentDetails::vAttachments [private]

Attachments

Referenced by CComponentDetails(), getAttachments(), operator=(), and toString().

int CComponentDetails::iUId [private]

string CComponentDetails::szUrl [private]

Component category

Referenced by CComponentDetails(), getCategories(), operator=(), and toString().

Comments

Referenced by CComponentDetails(), getComments(), operator=(), and toString().

Contacts

Referenced by CComponentDetails(), getContact(), operator=(), and toString().

string CComponentDetails::szRelated [private]

Related

Referenced by CComponentDetails(), getRelated(), operator=(), and toString().

Resources

Referenced by CComponentDetails(), getResources(), operator=(), and toString().

string CComponentDetails::szClas [private]

Class

Referenced by CComponentDetails(), getClas(), operator=(), and toString().


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