#include <ClientContact.h>
Public Member Functions | |
ClientContact () | |
Constructor. | |
ClientContact (const ClientContact &c) | |
ClientContact | operator= (const ClientContact &c) |
~ClientContact () | |
Destructor. | |
void | setCOMPtr (_ContactItemPtr &ptr, const std::wstring &itemID) |
Set a COM pointer to this object: refresh all members. | |
void | setCOMPtr (_ContactItemPtr &ptr) |
_ContactItemPtr & | getCOMPtr () |
Returns a reference to the internal COM pointer. | |
int | saveItem () |
int | deleteItem () |
ClientItem * | copyItem () |
Returns a (new allocated) copy of this item. | |
bool | createdAnniversaryEvent () |
Returns true if a Anniversary event has been created silently by Outlook during saveItem(). | |
bool | createdBirthdayEvent () |
Returns true if a Birthday event has been created silently by Outlook during saveItem(). | |
Private Member Functions | |
void | createSafeContactInstance () |
bool | isSecureProperty (const std::wstring &propertyName) |
Moves this ClientContact into the passed destination folder. | |
bool | isComplexProperty (const std::wstring &propertyName) |
const std::wstring | getSafeProperty (const std::wstring &propertyName) |
const std::wstring | getComplexProperty (const std::wstring &propertyName) |
int | setComplexProperty (const std::wstring &propertyName, const std::wstring &propertyValue) |
const std::wstring | getCorrectNameValue (const std::wstring &name, const std::wstring &fullName) |
Internal utility: get the correct format of firstName and lastName fields. | |
WCHAR * | getPictureFromFile (const std::wstring &filename) |
Reads the picture file from disk (path = filename) and returns the file content encoded in base64, already splitted in lines of 72 chars. | |
char * | encodeWithSpaces (const char *msg, int len) |
Encode the message in base64, splitting the result in lines of 72 columns each. | |
int | savePictureToFile (const std::wstring &b64content, const std::wstring &filename) |
Save picture content to a file 'filename' on disk. | |
Private Attributes | |
_ContactItemPtr | pContact |
Pointer to microsoft outlook objects. | |
Redemption::ISafeContactItemPtr | pSafeContact |
Pointer to Redemption safe objects. | |
bool | willCreateAnniversaryEvent |
Used to know if Outlook will automatically create events during saveItem(). | |
bool | willCreateBirthdayEvent |
StringBuffer * | addressStreet |
StringBuffer * | addressExtended |
bool | findAddressStreet |
bool | findAddressExtended |
Static Private Attributes | |
static std::wstring | tmpPicturePath = L"" |
Where the picture is temporary saved. |
Implements methods to get/set specific properties for this object type.
ClientItem * ClientContact::copyItem | ( | ) | [virtual] |
Returns a (new allocated) copy of this item.
Implements ClientItem.
References ClientContact(), pContact, and setCOMPtr().
char * ClientContact::encodeWithSpaces | ( | const char * | msg, | |
int | len | |||
) | [private] |
Encode the message in base64, splitting the result in lines of 72 columns each.
Referenced by getPictureFromFile().
WCHAR * ClientContact::getPictureFromFile | ( | const std::wstring & | filename | ) | [private] |
Reads the picture file from disk (path = filename) and returns the file content encoded in base64, already splitted in lines of 72 chars.
filename | the path of file to read from disk |
References encodeWithSpaces().
bool ClientContact::isSecureProperty | ( | const std::wstring & | propertyName | ) | [private, virtual] |
Moves this ClientContact into the passed destination folder.
The move operation changes only the item location in Outlook, so the item's ID is preserved.
destFolder | the destination ClientFolder to move this object to |
Implements ClientItem.
References safeContactProps.
int ClientContact::savePictureToFile | ( | const std::wstring & | b64content, | |
const std::wstring & | filename | |||
) | [private] |
Save picture content to a file 'filename' on disk.
Picture content is passed in b64 format, will be trimmed and decoded.
b64content | the file content in base64 | |
filename | the path of file to be saved |