#include <WineventSIF.h>
Public Member Functions | |
WinEventSIF () | |
Default Constructor. | |
WinEventSIF (const wstring dataString, const wchar_t **fields, const wchar_t **recFields) | |
Constructor: fills propertyMap parsing the passed SIF. | |
~WinEventSIF () | |
Destructor. | |
WinRecurrenceSIF * | getRecPattern () |
Returns a pointer to the (internally owned) WinRecurrenceSIF. | |
int | parse (const wstring dataString) |
Parse a SIF string and fills the propertyMap. | |
wstring & | toString () |
Format and return a SIF string from the propertyMap. | |
wstring | adaptToSIFSpecs (const wstring &propName, const wstring &propValue) |
Transform the value of the specified property according to the SIF specifications. | |
wstring | adaptFromSIFSpecs (const wstring &propName, const wstring &propValue) |
Transform the value of the specified property found in SIF structure to the one expected by Outlook. | |
Private Member Functions | |
void | parseExceptions (const wstring &sifString) |
Parse appointment exceptions from SIF string, and fill exception lists. | |
void | addTimezone (wstring &sif) |
Adds the Timezone tag into the passed SIF string. | |
bool | parseTimezone (const wstring &data) |
Parse the timezone properties from the passed SIF data string and fills the 'tzInfo' timezone structure. | |
Private Attributes | |
wstring | sif |
Internal string formatted (SIF). | |
const wchar_t ** | sifFields |
NULL terminated array of SIF fields names. | |
WinRecurrenceSIF | recPatternSIF |
The recurrence pattern object for SIF data, containing recurring properties. |
The object can be filled passing a SIF string, or filling directly the map. Calling 'toString()' a SIF is formatted and returned.
WinEventSIF::WinEventSIF | ( | const wstring | dataString, | |
const wchar_t ** | fields, | |||
const wchar_t ** | recFields | |||
) |
Constructor: fills propertyMap parsing the passed SIF.
dataString | the input SIF string | |
fields | the NULL terminated array of SIF fields | |
fields | the NULL terminated array of SIF fields for recurrence pattern |
wstring WinEventSIF::adaptFromSIFSpecs | ( | const wstring & | propName, | |
const wstring & | propValue | |||
) |
Transform the value of the specified property found in SIF structure to the one expected by Outlook.
The values are formatted following the vcard and icalendar specs that in some cases they are different from the SIF expectations. If there are no differences the same value is returned.
propName | the property name | |
propValue | the property value |
wstring WinEventSIF::adaptToSIFSpecs | ( | const wstring & | propName, | |
const wstring & | propValue | |||
) |
Transform the value of the specified property according to the SIF specifications.
The values are formatted following the vcard and icalendar specs that in some cases they are different from the SIF expectations. If there are no differences, propValue is returned.
propName | [IN] the property name | |
propValue | [IN] the property value |
void WinEventSIF::addTimezone | ( | wstring & | sif | ) | [private] |
Adds the Timezone tag into the passed SIF string.
Used from Client to Server. Example of formatted tags added: <Timezone> <BasicOffset>-0800</DSTOffset> <DayLight> <DSTOffset>-0900</DSTOffset> <DSTStart>20080406T020000</DSTStart> <DSTEnd>20081026T020000</DSTEnd> <StandardName>Pacific Standard Time</StandardName> <DSTName>Pacific Daylight Time</DSTName> </DayLight> [... more <DayLight> tags may follow ] </Timezone>
When using timezone properties, recurrence data is in local time.
WinRecurrenceSIF* WinEventSIF::getRecPattern | ( | ) | [virtual] |
Returns a pointer to the (internally owned) WinRecurrenceSIF.
Reimplemented from WinEvent.
int WinEventSIF::parse | ( | const wstring | dataString | ) | [virtual] |
Parse a SIF string and fills the propertyMap.
The map is cleared and will contain only found properties at the end of the parsing.
dataString | input SIF string to be parsed |
Reimplemented from WinEvent.
bool WinEventSIF::parseTimezone | ( | const wstring & | data | ) | [private] |
Parse the timezone properties from the passed SIF data string and fills the 'tzInfo' timezone structure.
Used from Server to Client. When using timezone properties, recurrence data is expected in local time.
wstring& WinEventSIF::toString | ( | ) | [virtual] |
Format and return a SIF string from the propertyMap.
Not supported properties are ignored and so not formatted as they don't have a correspondence in propertyMap.
Reimplemented from WinEvent.