00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef INCL_WINITEM
00020 #define INCL_WINITEM
00021
00027 #include "base/fscapi.h"
00028 #include "base/Log.h"
00029 #include <string>
00030 #include <list>
00031 #include <map>
00032
00033 using namespace std;
00034
00035
00036
00037 #define VCARD_VERSION L"2.1"
00038 #define VCALENDAR_VERSION L"1.0"
00039
00040
00041 #define ERR_ITEM_VOBJ_PARSE "VConverter: error occurred parsing the item data."
00042 #define ERR_ITEM_VOBJ_WRONG_TYPE "Error: wrong vobject type \"%ls\" (\"%ls\" expected)"
00043 #define ERR_ITEM_VOBJ_TYPE_NOTFOUND "Error: vobject type not specified (\"%ls\" expected)"
00044 #define INFO_ITEM_VOBJ_WRONG_VERSION "Warning! Wrong vobject version \"%ls\" (\"%ls\" expected)"
00045 #define INFO_ITEM_VOBJ_VERSION_NOTFOUND "Warning! VObject version not specified (\"%ls\" expected)"
00046
00047
00055 class WinItem {
00056
00057 private:
00058 static wstring badString;
00059
00060
00061 public:
00062
00071 map<wstring,wstring> propertyMap;
00072
00074 WinItem();
00075
00077 virtual ~WinItem();
00078
00079
00081 int getPropertyMapSize();
00082
00083
00091 void setProperty(const wstring propertyName, const wstring propertyValue);
00092
00102 bool getProperty(const wstring propertyName, wstring& propertyValue);
00103
00115 wstring& getPropertyRef(const wstring propertyName, bool* found);
00116
00117 void removeElement(wstring key);
00118
00120 void resetPropertyMap();
00121
00123 void resetAllValues();
00124
00129 long getCRC();
00130 };
00131
00134 #endif