// vcard.h - vCard Object header. // // (c) 2012-2015 Xestia Software Development. // // This file is part of Xestia Address Book. // // Xestia Address Book is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by the // Free Software Foundation, version 3 of the license. // // Xestia Address Book is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License along // with Xestia Address Book. If not, see #include #include #include #include #ifndef VCARD_H #define VCARD_H struct ArrayvCardOutData { wxArrayString PropData; wxArrayString PropValues; int PropCount = 0; }; struct vCardName{ wxString Forename; wxString Surname; wxString OtherNames; wxString Title; wxString Suffix; }; class vCard{ private: wxArrayString SettingNames; wxArrayString SettingValues; int SettingCount; bool vCardBegin; bool vCardEnd; bool vCardFN; float vCardVersion; wxString vCardFilename; std::map Cards; void ProcessString(wxString *ContactData); public: vCard(); void Add(wxString SettingName, wxString SettingValue, bool ReplaceMode); void AddRaw(wxString SettingName, wxString SettingValue); wxString Get(wxString SettingName); vCardName GetName(); wxString GetById(int id); ArrayvCardOutData GetByPartial(wxString SettingName); int WriteFile(wxString WriteFilename); int LoadFile(wxString LoadFilename); int LoadString(wxString ContactData); wxString WriteString(); bool MeetBaseSpecification(); wxString Convert(wxString SettingValue, bool ReplaceMode); wxString GetFilename(); std::map* GetAllCards(); }; #endif