#include <wincontact.h>
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). |
The object can be filled passing a vCard, or filling directly the map. Calling 'toString()' a vCard is formatted and returned.
bool WinContact::checkVCardTypeAndVersion | ( | VObject * | vo | ) | [private] |
Checks the productID and version of VObject passed for vCard.
vo | the VObject to check |
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.
dataString | input vCard string to be parsed |
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.
Implements WinItem.
Reimplemented in WinContactSIF.