X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcontacteditor%2FContactDataObject.h;h=8cb40d54f20cee3ce3105aa2fed05aab8669eadd;hb=a45c3a46e4e37da415a8b8da2aaabe6a4abc4551;hp=00b9a7200d05c2cc7641a3a9eb7480cb5a222346;hpb=d2c744f3bcfe1ff78525e4311302f7ffd3a6a6c6;p=xestiaab%2F.git diff --git a/source/contacteditor/ContactDataObject.h b/source/contacteditor/ContactDataObject.h index 00b9a72..8cb40d5 100644 --- a/source/contacteditor/ContactDataObject.h +++ b/source/contacteditor/ContactDataObject.h @@ -20,17 +20,74 @@ #define __CLIENTDATAOBJECT_H__ #include +#include #include +#include + +#include "../vcard/vcard.h" +#include "../common/textprocessing.h" enum ContactLoadStatus{ CONTACTLOAD_UNITTESTFAIL = -1, - CONTACTLOAD_FILEMISSING + CONTACTLOAD_OK, + CONTACTLOAD_FILEMISSING, + CONTACTLOAD_FILEERROR, + CONTACTLOAD_FILEINVALIDFORMAT, + CONTACTLOAD_FILEBASESPECFAIL +}; + +enum ContactKindType{ + CONTACTKIND_NONE, + CONTACTKIND_INDIVIDUAL, + CONTACTKIND_GROUP, + CONTACTKIND_ORGANISATION, + CONTACTKIND_LOCATION +}; + +enum PropertyType{ + PROPERTY_NONE, + PROPERTY_HOME, + PROPERTY_WORK }; class ContactDataObject{ + private: + + void ProcessKind(wxString KindData); + void ProcessMember(wxString PropertySeg1, wxString PropertySeg2, int *GroupCount); + void ProcessFN(wxString PropertySeg1, wxString PropertySeg2, int *FNCount); + void ProcessN(wxString PropertySeg1, wxString PropertySeg2); + void ProcessNickname(wxString PropertySeg1, wxString PropertySeg2, int *NicknameCount); + void ProcessGender(wxString PropertySeg1, wxString PropertySeg2); + void ProcessBirthday(wxString PropertySeg1, wxString PropertySeg2); + void ProcessAnniversary(wxString PropertySeg1, wxString PropertySeg2); + void ProcessTimeZone(wxString PropertySeg1, wxString PropertySeg2, int *TimeZoneCount); + void ProcessAddress(wxString PropertySeg1, wxString PropertySeg2, int *AddressCount); + void ProcessEmail(wxString PropertySeg1, wxString PropertySeg2, int *EmailCount); + void ProcessIM(wxString PropertySeg1, wxString PropertySeg2, int *IMCount); + void ProcessTelephone(wxString PropertySeg1, wxString PropertySeg2, int *TelephoneCount); + void ProcessLanguage(wxString PropertySeg1, wxString PropertySeg2, int *LanguageCount); + void ProcessGeographic(wxString PropertySeg1, wxString PropertySeg2, int *GeographicCount); + void ProcessRelated(wxString PropertySeg1, wxString PropertySeg2, int *RelatedCount); + void ProcessURL(wxString PropertySeg1, wxString PropertySeg2, int *URLCount); + void ProcessTitle(wxString PropertySeg1, wxString PropertySeg2, int *TitleCount); + void ProcessRole(wxString PropertySeg1, wxString PropertySeg2, int *RoleCount); + void ProcessOrganisation(wxString PropertySeg1, wxString PropertySeg2, int *OrganisationCount); + void ProcessNote(wxString PropertySeg1, wxString PropertySeg2, int *NoteCount); + void ProcessCategory(wxString PropertySeg1, wxString PropertySeg2, int *CategoryCount); + void ProcessPhoto(wxString PropertySeg1, wxString PropertySeg2, int *PhotoCount); + void ProcessLogo(wxString PropertySeg1, wxString PropertySeg2, int *LogoCount); + void ProcessSound(wxString PropertySeg1, wxString PropertySeg2, int *SoundCount); + void ProcessCalendarURI(wxString PropertySeg1, wxString PropertySeg2, int *CalAdrCount); + void ProcessCalendarAddressURI(wxString PropertySeg1, wxString PropertySeg2, int *CalAdrURICount); + void ProcessCalendarFreeBusy(wxString PropertySeg1, wxString PropertySeg2, int *FreeBusyAddressCount); + void ProcessKey(wxString PropertySeg1, wxString PropertySeg2, int *KeyCount); + public: + ContactKindType ContactKind = CONTACTKIND_NONE; + /* Items on General Tab */ wxString NameTitle; @@ -117,6 +174,7 @@ class ContactDataObject{ std::map GeneralTelephoneListPID; std::map GeneralTelephoneListType; std::map GeneralTelephoneListTokens; + std::map GeneralTelephoneListTypeInfo; std::map GeneralTelephoneListPref; std::map GeneralLanguageList; @@ -238,6 +296,7 @@ class ContactDataObject{ std::map HomeTelephoneListPID; std::map HomeTelephoneListType; std::map HomeTelephoneListTokens; + std::map HomeTelephoneListTypeInfo; std::map HomeTelephoneListPref; std::map HomeLanguageList; @@ -263,15 +322,6 @@ class ContactDataObject{ std::map HomeGeographyListMediatype; std::map HomeGeographyListPref; - std::map HomeRelatedList; - std::map HomeRelatedListRelType; - std::map HomeRelatedListLanguage; - std::map HomeRelatedListAltID; - std::map HomeRelatedListPID; - std::map HomeRelatedListType; - std::map HomeRelatedListTokens; - std::map HomeRelatedListPref; - std::map HomeWebsiteList; std::map HomeWebsiteListAltID; std::map HomeWebsiteListPID; @@ -358,6 +408,7 @@ class ContactDataObject{ std::map BusinessTelephoneListAltID; std::map BusinessTelephoneListPID; std::map BusinessTelephoneListType; + std::map BusinessTelephoneListTypeInfo; std::map BusinessTelephoneListTokens; std::map BusinessTelephoneListPref; @@ -382,16 +433,7 @@ class ContactDataObject{ std::map BusinessGeographyListType; std::map BusinessGeographyListTokens; std::map BusinessGeographyListMediatype; - std::map BusinessGeographyListPref; - - std::map BusinessRelatedList; - std::map BusinessRelatedListRelType; - std::map BusinessRelatedListLanguage; - std::map BusinessRelatedListAltID; - std::map BusinessRelatedListPID; - std::map BusinessRelatedListType; - std::map BusinessRelatedListTokens; - std::map BusinessRelatedListPref; + std::map BusinessGeographyListPref; std::map BusinessWebsiteList; std::map BusinessWebsiteListAltID; @@ -441,6 +483,7 @@ class ContactDataObject{ std::map CategoriesListPID; std::map CategoriesListType; std::map CategoriesListTokens; + std::map CategoriesListLanguage; std::map CategoriesListPref; /* Items on the Groups tab */ @@ -449,6 +492,7 @@ class ContactDataObject{ std::map GroupsListAltID; std::map GroupsListPID; std::map GroupsListType; + std::map GroupsListMediaType; std::map GroupsListTokens; std::map GroupsListPref; @@ -485,7 +529,8 @@ class ContactDataObject{ std::map SoundsListAudioEncType; std::map SoundsListAudioType; std::map SoundsListTokens; - std::map SoundsListMediatype; + std::map SoundsListMediatype; + std::map SoundsListLanguage; std::map SoundsListPref; /* Items on the Calendaring tab */ @@ -541,4 +586,15 @@ class ContactDataObject{ }; +void SplitValues(wxString *PropertyLine, + std::map *SplitPoints, + std::map *SplitLength, + int intSize); + +void CheckType(wxString *PropertySeg1, + std::map *SplitPoints, + std::map *SplitLength, + int *intPrevValue, + PropertyType *intType); + #endif \ No newline at end of file