X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcontacteditor%2FContactDataObject.h;h=fad1f0046591621619272aa5a6c59d189304fdc7;hb=fb85e5194a16222937abf13bcfd53a28e47675ee;hp=2c6b394a758eec5ab5dc671e0ff0e8585cedff9b;hpb=cdd1530fcf2b19be9187604deb6aa78fba091366;p=xestiaab%2F.git diff --git a/source/contacteditor/ContactDataObject.h b/source/contacteditor/ContactDataObject.h index 2c6b394..fad1f00 100644 --- a/source/contacteditor/ContactDataObject.h +++ b/source/contacteditor/ContactDataObject.h @@ -22,20 +22,40 @@ #include #include #include +#include + #include "../vcard/vcard.h" +#include "../common/textprocessing.h" enum ContactLoadStatus{ CONTACTLOAD_UNITTESTFAIL = -1, + 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{ public: + ContactKindType ContactKind = CONTACTKIND_NONE; + /* Items on General Tab */ wxString NameTitle; @@ -122,6 +142,7 @@ class ContactDataObject{ std::map GeneralTelephoneListPID; std::map GeneralTelephoneListType; std::map GeneralTelephoneListTokens; + std::map GeneralTelephoneListTypeInfo; std::map GeneralTelephoneListPref; std::map GeneralLanguageList; @@ -243,6 +264,7 @@ class ContactDataObject{ std::map HomeTelephoneListPID; std::map HomeTelephoneListType; std::map HomeTelephoneListTokens; + std::map HomeTelephoneListTypeInfo; std::map HomeTelephoneListPref; std::map HomeLanguageList; @@ -363,6 +385,7 @@ class ContactDataObject{ std::map BusinessTelephoneListAltID; std::map BusinessTelephoneListPID; std::map BusinessTelephoneListType; + std::map BusinessTelephoneListTypeInfo; std::map BusinessTelephoneListTokens; std::map BusinessTelephoneListPref; @@ -454,6 +477,7 @@ class ContactDataObject{ std::map GroupsListAltID; std::map GroupsListPID; std::map GroupsListType; + std::map GroupsListMediaType; std::map GroupsListTokens; std::map GroupsListPref; @@ -543,7 +567,33 @@ class ContactDataObject{ // Subroutines. ContactLoadStatus LoadFile(wxString Filename); + 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 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