WinContactSIF Class Reference
[Windows Adapter]

Rapresents a contact object for Windows Clients, in SIF format. More...

#include <wincontactsif.h>

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

List of all members.

Public Member Functions

 WinContactSIF ()
 Default Constructor.
 WinContactSIF (const wstring dataString, const wchar_t **fields)
 Constructor: fills propertyMap parsing the passed SIF.
 ~WinContactSIF ()
 Destructor.
int parse (const wstring dataString)
 Parse a vCard string and fills the propertyMap.
wstring & toString ()
 Format and return a SIF string from the propertyMap.
void addPhotoToSIF (wstring propertyValue)
 Adds a tag <Photo type="JPEG">PropertyValue</Photo> into 'sif' string.
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
 NULL terminated array of SIF fields names.


Detailed Description

Rapresents a contact object for Windows Clients, in SIF format.

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


Constructor & Destructor Documentation

WinContactSIF::WinContactSIF ( const wstring  dataString,
const wchar_t **  fields 
)

Constructor: fills propertyMap parsing the passed SIF.

Parameters:
dataString the input SIF string
fields the NULL terminated array of SIF fields


Member Function Documentation

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.

Parameters:
propName [IN] the property name
propValue [IN] the property value
Returns:
the converted value if necessary

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.

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

Reimplemented from WinContact.

wstring& WinContactSIF::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.

Returns:
the SIF string formatted, reference to internal wstring

Reimplemented from WinContact.


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

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