#define __CLIENTDATAOBJECT_H__
#include <wx/wx.h>
+#include <wx/file.h>
#include <map>
+#include <wx/tokenzr.h>
+
+#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
};
class ContactDataObject{
public:
+ ContactKindType ContactKind = CONTACTKIND_NONE;
+
/* Items on General Tab */
wxString NameTitle;
std::map<int, wxString> GroupsListAltID;
std::map<int, wxString> GroupsListPID;
std::map<int, wxString> GroupsListType;
+ std::map<int, wxString> GroupsListMediaType;
std::map<int, wxString> GroupsListTokens;
std::map<int, int> GroupsListPref;
// 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 SplitValues(wxString *PropertyLine,
+ std::map<int,int> *SplitPoints,
+ std::map<int,int> *SplitLength,
+ int intSize);
+
#endif
\ No newline at end of file