#include <ClientItem.h>
Inheritance diagram for ClientItem:
Public Member Functions | |
ClientItem () | |
Constructor. | |
virtual | ~ClientItem () |
Destructor. | |
const std::wstring & | getID () |
const std::wstring & | getType () |
const std::wstring & | getParentPath () |
virtual int | saveItem ()=0 |
virtual int | deleteItem ()=0 |
virtual ClientItem * | copyItem ()=0 |
const int | getPropertiesCount () |
const int | getPropertiesIndex () |
const std::wstring | getProperty (const std::wstring &propertyName) |
To retrieve a property value from its name. | |
int | setProperty (const std::wstring &propertyName, const std::wstring &propertyValue) |
To set a property value from its name. | |
Protected Member Functions | |
void | createPropertyMap () |
const std::wstring | convertPropertyName (const std::wstring &SIFName) |
Convert SIF property name into Outlook property name. | |
virtual bool | isSecureProperty (const std::wstring &propertyName)=0 |
virtual bool | isComplexProperty (const std::wstring &propertyName)=0 |
const std::wstring | getSimpleProperty (const std::wstring &propertyName) |
Returns the Item property value from the propertiesIndex (class member). | |
virtual const std::wstring | getSafeProperty (const std::wstring &propertyName)=0 |
virtual const std::wstring | getComplexProperty (const std::wstring &propertyName)=0 |
int | setSimpleProperty (const std::wstring &propertyName, const std::wstring &propertyValue) |
virtual int | setComplexProperty (const std::wstring &propertyName, const std::wstring &propertyValue)=0 |
Protected Attributes | |
std::wstring | ID |
The item entry-ID. | |
std::wstring | itemType |
The item-type of the item (contact/task/mail. | |
std::wstring | parentPath |
The full path of parent folder. | |
Properties | |
std::map< std::wstring, int > | Map |
Map of item properties: <name, index>. | |
int | propertiesCount |
int | propertiesIndex |
ItemPropertiesPtr | pItemProperties |
Pointers to microsoft outlook objects. | |
ItemPropertyPtr | pItemProperty |
HRESULT | hr |
Result of COM pointers operations. |
Methods to get/set simple item properties are defined here, more specific properties are retrieved using the implemented methods in each Client object. Class methods automatically catch and manage COM pointers exceptions. Class methods throw ClientException pointer in case of error.
const wstring ClientItem::convertPropertyName | ( | const std::wstring & | SIFName | ) | [protected] |
Convert SIF property name into Outlook property name.
Uses the vector 'diffPropertyNames' with correspondances. If property not found, it means that the name is the same.
const wstring ClientItem::getSimpleProperty | ( | const std::wstring & | propertyName | ) | [protected] |
Returns the Item property value from the propertiesIndex (class member).
Used for normal properties, simple copy into a string value.
propertyName | the name of the property |
const wstring ClientItem::getProperty | ( | const std::wstring & | propertyName | ) |
To retrieve a property value from its name.
PropertyMap is used to get the index of selected property, then different methods are called to retrieve the correct property value: 1. getSafeProperty -> for properties with security patch protection 2. getComplexProperty -> for properties that need specific conversion 3. getSimpleProperty -> for all other properties
propertyName | the name of the property |
int ClientItem::setProperty | ( | const std::wstring & | propertyName, | |
const std::wstring & | propertyValue | |||
) |
To set a property value from its name.
PropertyMap is used to get the index of selected property.
propertyName | the name of the property | |
propertyValue | the value to store |
std::wstring ClientItem::ID [protected] |
The item entry-ID.
std::wstring ClientItem::itemType [protected] |
The item-type of the item (contact/task/mail.
..)