#include <wincontactsif.h>
Inheritance diagram for WinContactSIF:
Public Member Functions | |
WinContactSIF () | |
Default Constructor. | |
WinContactSIF (const wstring dataString, const wchar_t **fields) | |
Constructor: fills propertyMap parsing the passed vCard. | |
~WinContactSIF () | |
Destructor. | |
int | parse (const wstring dataString) |
Parse a vCard string and fills the propertyMap. | |
wstring | toString () |
Format and return a vCard string from the propertyMap. | |
wstring | adaptToSpecsSIF (const wstring &propName, const wstring &propValue, const wstring &type) |
Transform the value of the specified property according to the SIF specifications. | |
void | addPropertyToSIF (const wstring propertyName, wstring propertyValue) |
Adds a tag <PropertyName>PropertyValue</PropertyName> into 'sif' string. | |
void | addPhotoToSIF (wstring propertyValue) |
Adds a tag <Photo type="JPEG">PropertyValue</Photo> into 'sif' string. | |
wstring | trim (const wstring &str) |
wstring | formatDateWithMinus (const wstring &stringDate) |
wstring | adaptToSIFSpecs (const wstring &propName, const wstring &propValue) |
Transform the value of the specified property according to the SIF specifications. | |
Private Attributes | |
wstring | sif |
Internal string formatted (SIF). | |
const wchar_t ** | sifFields |
The object can be filled passing a vCard, or filling directly the map. Calling 'toString()' a vCard is formatted and returned.
int WinContactSIF::parse | ( | const wstring | dataString | ) | [virtual] |
Parse a vCard string and fills the propertyMap.
The map is cleared and will contain only found properties at the end of the parsing.
dataString | input vCard string to be parsed |
Reimplemented from WinContact.
wstring WinContactSIF::toString | ( | ) | [virtual] |
Format and return a vCard string from the propertyMap.
Not supported properties are ignored and so not formatted as they don't have a correspondence in propertyMap.
Reimplemented from WinContact.
wstring WinContactSIF::adaptToSpecsSIF | ( | const wstring & | propName, | |
const wstring & | propValue, | |||
const wstring & | type | |||
) |
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 | |
type | [IN] the type of the data (contact, calendar...) |
wstring WinContactSIF::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 |