WinEvent Class Reference
[Windows Adapter]

Rapresents an event object for Windows Clients. More...

#include <WinEvent.h>

Inheritance diagram for WinEvent:
[legend]
Collaboration diagram for WinEvent:
[legend]

List of all members.

Public Member Functions

 WinEvent ()
 Default Constructor.
 WinEvent (const wstring dataString)
 Constructor: fills propertyMap parsing the passed vCalendar string.
 ~WinEvent ()
 Destructor.
virtual int parse (const wstring dataString)
 Parse a vCalendar string and fills the propertyMap.
virtual wstring & toString ()
 Format and return a vCalendar string from the propertyMap.
virtual WinRecurrencegetRecPattern ()
 Returns a pointer to the (internally owned) WinRecurrence.
exceptionListgetExcludeDates ()
 Returns a pointer to the list (internally owned) of exclude dates.
exceptionListgetIncludeDates ()
 Returns a pointer to the list (internally owned) of include dates.
recipientList * getRecipients ()
 Returns a pointer to the list (internally owned) of recipients.
const TIME_ZONE_INFORMATION * getTimezone ()
 Returns a pointer to the timezone information for this event, NULL if timezone is not used (not set).
void setTimezone (const TIME_ZONE_INFORMATION *tz)
 Copies the given timezone for this event. 'useTimezone' is set to true.
bool hasTimezone ()
 Returns true if this event has a timezone information, and uses it.
long getCRC ()
 Return the crc value of the internal map with all values.

Protected Member Functions

void getIntervalOfRecurrence (int *yearBegin, int *yearEnd)
 Retrieves the interval when the recurrence occurrs, in years.

Protected Attributes

exceptionList excludeDate
 List of occurrences dates to exclude (recurring exceptions to delete).
exceptionList includeDate
 List of occurrences dates to include (recurring exceptions to add).
recipientList recipients
 List of recipients (attendees) for this event.
TIME_ZONE_INFORMATION tzInfo
 The timezone structure for this event.
bool useTimezone
 true if this event has a timezone information, and uses it.

Private Member Functions

bool checkVCalendarTypeAndVersion (VObject *vo)
 Checks the productID and version of VObject passed for vCalendar.
void addTimezone (VObject *vo)
 Adds the timezone properties (TZ and DAYLIGHT) into the passed VObject.
bool parseTimezone (VObject *vo)
 Parse the timezone properties (TZ and DAYLIGHT) from the passed VObject and fills the 'tzInfo' timezone structure.

Private Attributes

wstring vCalendar
 Internal string formatted (VCALENDAR).
WinRecurrence recPattern
 The recurrence pattern object, containing recurring properties.


Detailed Description

Rapresents an event object for Windows Clients.

The object can be filled passing a vCalendar, or filling directly the map. Calling 'toString()' a vCalendar is formatted and returned.


Member Function Documentation

void WinEvent::addTimezone ( VObject *  vo  )  [private]

Adds the timezone properties (TZ and DAYLIGHT) into the passed VObject.

Used from Client to Server. Example of formatted vProperties added: TZ:-0800 DAYLIGHT:TRUE;-0900;20080406T020000;20081026T020000;Pacific Standard Time;Pacific Daylight Time DAYLIGHT:TRUE;-0900;20090405T020000;20091025T020000;Pacific Standard Time;Pacific Daylight Time When using timezone properties, recurrence data is in local time.

bool WinEvent::checkVCalendarTypeAndVersion ( VObject *  vo  )  [private]

Checks the productID and version of VObject passed for vCalendar.

  • 'productID' MUST be "VCALENDAR"
  • 'version' is only checked to be the one supported (log info if wrong)

Parameters:
vo the VObject to check
Returns:
true if productID is correct

long WinEvent::getCRC (  )  [virtual]

Return the crc value of the internal map with all values.

It uses only the values of the map not the key. Overrides method of WinItem, to include recurring properties and event exceptions in the crc.

Reimplemented from WinItem.

void WinEvent::getIntervalOfRecurrence ( int *  yearBegin,
int *  yearEnd 
) [protected]

Retrieves the interval when the recurrence occurrs, in years.

It checks the "Start" property and the "PatternEndDate" property.

Parameters:
yearBegin [IN-OUT] the year when recurrence begins
yearEnd [IN-OUT] the year when recurrence ends

virtual int WinEvent::parse ( const wstring  dataString  )  [virtual]

Parse a vCalendar string and fills the propertyMap.

The map is cleared and will contain only found properties at the end of the parsing.

Parameters:
dataString input vCalendar string to be parsed
Returns:
0 if no errors

Implements WinItem.

Reimplemented in WinEventSIF.

bool WinEvent::parseTimezone ( VObject *  vo  )  [private]

Parse the timezone properties (TZ and DAYLIGHT) from the passed VObject and fills the 'tzInfo' timezone structure.

Used from Server to Client. When using timezone properties, recurrence data is expected in local time.

Returns:
true if timezone properties found

virtual wstring& WinEvent::toString (  )  [virtual]

Format and return a vCalendar string from the propertyMap.

Not supported properties are ignored and so not formatted as they don't have a correspondence in propertyMap.

Returns:
the vCalendar string formatted, reference to internal wstring

Implements WinItem.

Reimplemented in WinEventSIF.


Member Data Documentation

TIME_ZONE_INFORMATION WinEvent::tzInfo [protected]

The timezone structure for this event.

It can be set/get using getTimezone() and setTimezone() methods. If the timezone is set, it will be formatted following vCalendar 1.0 specs when calling toString() method ("TZ" and "DAYLIGHT" properties).

Note:
Recurring properties will be in local time if timezone is used.


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

Generated on Tue Apr 6 13:00:44 2010 for Funambol Outlook Plug-in Library by  doxygen 1.5.7.1