00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef INCL_CLIENTITEM
00037 #define INCL_CLIENTITEM
00038
00043 #include "outlook/defs.h"
00044
00045 #include <map>
00046 #include <string>
00047 #include <vector>
00048
00049
00050 class ClientFolder;
00051
00062 class ClientItem {
00063
00064 protected:
00065
00066 std::wstring ID;
00067 std::wstring itemType;
00068 std::wstring parentPath;
00071
00072 std::map<std::wstring,int> propertyMap;
00073 int propertiesCount;
00074 int propertiesIndex;
00075
00076 std::map<std::wstring,int> userPropertyMap;
00077 int userPropertiesCount;
00078
00080 ItemPropertiesPtr pItemProperties;
00081 ItemPropertyPtr pItemProperty;
00082 UserPropertiesPtr pUserProperties;
00083
00085 HRESULT hr;
00086
00087
00088 void createPropertyMap();
00089 const std::wstring convertPropertyName(const std::wstring& SIFName);
00090
00091 virtual bool isSecureProperty (const std::wstring& propertyName) = 0;
00092 virtual bool isComplexProperty (const std::wstring& propertyName) = 0;
00093
00094 const std::wstring getSimpleProperty (const std::wstring& propertyName);
00095 virtual const std::wstring getSafeProperty (const std::wstring& propertyName) = 0;
00096 virtual const std::wstring getComplexProperty(const std::wstring& propertyName) = 0;
00097
00098 int setSimpleProperty (const std::wstring& propertyName, const std::wstring& propertyValue);
00099 virtual int setComplexProperty(const std::wstring& propertyName, const std::wstring& propertyValue) = 0;
00100
00103 void removeLastNewLine(std::wstring& value);
00104
00105 public:
00106
00108 ClientItem();
00109
00111 virtual ~ClientItem();
00112
00113
00114 const std::wstring& getID();
00115 const std::wstring& getType();
00116 const std::wstring& getParentPath();
00117
00118
00119
00120
00121
00122 virtual int saveItem() = 0;
00123 virtual int deleteItem() = 0;
00124 virtual ClientItem* copyItem() = 0;
00125 virtual int moveItem(ClientFolder* destFolder) = 0;
00126
00127
00128 void createUserPropertyMap();
00129
00130
00131
00132
00133 const int getPropertiesCount();
00134 const int getPropertiesIndex();
00135
00137 const std::wstring getProperty(const std::wstring& propertyName);
00139 int setProperty(const std::wstring& propertyName, const std::wstring& propertyValue);
00140
00141 const std::wstring getUserPropertyValue(std::wstring name);
00142 const bool getUserProperty(std::wstring &name, std::wstring &value);
00143 const int getUserPropertiesCount();
00144 const std::vector<std::wstring>
00145 getUserPropertyNames();
00146 void removeUserProperty(std::wstring name);
00147 void setUserProperty(std::wstring name, std::wstring value);
00148 void clearUserProperties();
00149 void recreatePropertyMap();
00150
00151 bool isReadOnly();
00152
00153 };
00154
00157 #endif