X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcontacteditor%2FContactDataObject.h;h=f91ea61aff5489c90892652929aa5edc760115fc;hb=02248b76582978705c083ef8ffb85c8d4efe4a23;hp=dda72386ad5828bbbda779842ffd34edbad4d1a4;hpb=cbb594a87fa3bf6d8511d637f8a390f0e9edc9ea;p=xestiaab%2F.git diff --git a/source/contacteditor/ContactDataObject.h b/source/contacteditor/ContactDataObject.h index dda7238..f91ea61 100644 --- a/source/contacteditor/ContactDataObject.h +++ b/source/contacteditor/ContactDataObject.h @@ -22,19 +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_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; @@ -453,6 +474,7 @@ class ContactDataObject{ std::map GroupsListAltID; std::map GroupsListPID; std::map GroupsListType; + std::map GroupsListMediaType; std::map GroupsListTokens; std::map GroupsListPref; @@ -542,7 +564,28 @@ 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 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