WinContact Class Reference
[Windows Adapter]

Rapresents a contact object for Windows Clients. More...

#include <wincontact.h>

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

List of all members.

Public Member Functions

 WinContact ()
 Default Constructor.
 WinContact (const wstring dataString)
 Constructor: fills propertyMap parsing the passed vCard.
virtual ~WinContact ()
 Destructor.
virtual int parse (const wstring dataString)
 Parse a vCard string and fills the propertyMap.
virtual wstring & toString ()
 Format and return a vCard string from the propertyMap.
const wstring getPhotoType ()
 Returns the picture type ("JPEG", "GIF", ...).
void setPhotoType (const wstring type)
 Sets the picture type.
wstring & getName ()
 Utility: returns "FileAs" property value.

Protected Attributes

wstring photoType
 The format of internal picure for this contact.

Private Member Functions

bool checkVCardTypeAndVersion (VObject *vo)
 Checks the productID and version of VObject passed for vCard.

Private Attributes

wstring vCard
 Internal string formatted (VCARD).


Detailed Description

Rapresents a contact object for Windows Clients.

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


Member Function Documentation

bool WinContact::checkVCardTypeAndVersion ( VObject *  vo  )  [private]

Checks the productID and version of VObject passed for vCard.

  • 'productID' MUST be "VCARD"
  • '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

virtual int WinContact::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 vCard string to be parsed
Returns:
0 if no errors

Implements WinItem.

Reimplemented in WinContactSIF.

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

Returns:
the vCard string formatted, reference to internal wstring

Implements WinItem.

Reimplemented in WinContactSIF.


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