D:/develop/v65/clients/outlook/install/output/export/funambol/clients/outlook/mainclientDll/src/include/outlook/ClientItem.h

00001  /*
00002  * Copyright (C) 2006-2007 Funambol, Inc.
00003  *
00004  * This program is free software; you can redistribute it and/or modify
00005  * it under the terms of the GNU General Public License version 2 as
00006  * published by the Free Software Foundation.
00007  *
00008  * This program is distributed in the hope that it will be useful,
00009  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  * MERCHANTABILITY, TITLE, NONINFRINGEMENT or FITNESS FOR A PARTICULAR
00011  * PURPOSE.  See the GNU General Public License for more details.
00012  *
00013  * You should have received a copy of the GNU General Public License
00014  * along with this program; if not, write to the Free Software
00015  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00016  * 02111-1307  USA
00017 */
00018 
00019 #ifndef INCL_CLIENTITEM
00020 #define INCL_CLIENTITEM
00021 
00026 #include "outlook/defs.h"
00027 
00028 #include <map>
00029 #include <string>
00030 
00031 
00032 
00043 class ClientItem {
00044 
00045 protected:
00046 
00047     std::wstring ID;            
00048     std::wstring itemType;      
00049     std::wstring parentPath;    
00052 
00053     std::map<std::wstring,int> propertyMap;
00054     int propertiesCount;
00055     int propertiesIndex;
00056 
00058     ItemPropertiesPtr   pItemProperties;
00059     ItemPropertyPtr     pItemProperty;
00060 
00062     HRESULT hr;
00063 
00064 
00065     void createPropertyMap();
00066     const std::wstring convertPropertyName(const std::wstring& SIFName);
00067 
00068     virtual bool isSecureProperty  (const std::wstring& propertyName) = 0;
00069     virtual bool isComplexProperty (const std::wstring& propertyName) = 0;
00070 
00071     const         std::wstring getSimpleProperty (const std::wstring& propertyName);
00072     virtual const std::wstring getSafeProperty   (const std::wstring& propertyName) = 0;
00073     virtual const std::wstring getComplexProperty(const std::wstring& propertyName) = 0;
00074 
00075     int         setSimpleProperty (const std::wstring& propertyName, const std::wstring& propertyValue);
00076     virtual int setComplexProperty(const std::wstring& propertyName, const std::wstring& propertyValue) = 0;
00077 
00078 public:
00079 
00081     ClientItem();
00082 
00084     virtual ~ClientItem();
00085 
00086 
00087     const std::wstring& getID();
00088     const std::wstring& getType();
00089     const std::wstring& getParentPath();
00090 
00091 
00092     //
00093     // Client operations on the item.
00094     //
00095     virtual int         saveItem() = 0;
00096     virtual int       deleteItem() = 0;
00097     virtual ClientItem* copyItem() = 0;
00098     //virtual int       moveItem(ClientFolder* destFolder) = 0;
00099     // saveAs/close...?
00100 
00101 
00102     //
00103     // Methods to menage item properties.
00104     //
00105     const int getPropertiesCount();
00106     const int getPropertiesIndex();
00107 
00109     const std::wstring getProperty(const std::wstring& propertyName);
00111     int setProperty(const std::wstring& propertyName, const std::wstring& propertyValue);
00112 
00113 };
00114 
00117 #endif

Generated on Fri Nov 9 12:21:26 2007 for Funambol Outlook Plug-in Library by  doxygen 1.5.2