00001
00020 #ifndef INCL_PIM_CONTACT
00021 #define INCL_PIM_CONTACT
00022
00024 #include "base/fscapi.h"
00025 #include "base/util/ArrayList.h"
00026 #include "vocl/VObject.h"
00027 #include "vocl/vCard/BusinessDetail.h"
00028 #include "vocl/vCard/Name.h"
00029 #include "vocl/vCard/Note.h"
00030 #include "vocl/vCard/Title.h"
00031 #include "vocl/vCard/PersonalDetail.h"
00032 #include "vocl/vCard/Phone.h"
00033 #include "vocl/vCard/Email.h"
00034 #include "vocl/vCard/WebPage.h"
00035
00036 #define MAX_TITLES 10
00037 #define MAX_VPROPERTY_VALUE 200
00038 #define BUSINESS 0
00039 #define HOME 1
00040 #define OTHER 2
00041
00042 class Contact : public VObject {
00043
00044
00045
00046 private:
00047 Name* name;
00048 PersonalDetail* personalDetail;
00049 BusinessDetail* businessDetail;
00050 ArrayList* notes;
00051
00061 void set(WCHAR** p, WCHAR* v);
00062 vCardProperty* getPropertyFromVProperty(VProperty* vp);
00063 VProperty* getVPropertyFromProperty(WCHAR* name, vCardProperty* prop);
00064 VProperty* composeVAddress(Address* adr);
00065 Address* composeAddress(VProperty* vp, int type);
00066 Address* addLabelAddress(VProperty* vp, int type);
00067
00068
00069
00070 public:
00071 Contact();
00072 ~Contact();
00073
00074
00075
00081 WCHAR* getUID(WCHAR* buf = NULL, int size = -1);
00082
00091 WCHAR* getTimezone (WCHAR* buf = NULL, int size = -1);
00092
00098 ArrayList* getNotes();
00099
00104 void setNotes(ArrayList& list);
00105
00114 WCHAR* getRevision(WCHAR* buf = NULL, int size = -1);
00115
00121 Name* getName();
00122
00127 void setName(Name& n);
00128
00134 BusinessDetail* getBusinessDetail ();
00135
00140 void setBusinessDetail(BusinessDetail& d);
00141
00147 PersonalDetail* getPersonalDetail();
00148
00153 void setPersonalDetail(PersonalDetail& d);
00154
00160 void setUID (WCHAR* uid);
00161
00167 void setTimezone (WCHAR* tz);
00168
00174 void setRevision (WCHAR* revision);
00175
00176 Contact* clone();
00177 WCHAR* toString();
00178 };
00179
00181 #endif