Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Move INSTALL, LICENSE, README, THANKS and TODO into root directory
[xestiaab/.git] / source / vcard / vcard.h
1 // vcard.h - vCard Object header.
2 //
3 // (c) 2012-2015 Xestia Software Development.
4 //
5 // This file is part of Xestia Address Book.
6 //
7 // Xestia Address Book is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by the
9 // Free Software Foundation, version 3 of the license.
10 //
11 // Xestia Address Book is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License along
17 // with Xestia Address Book. If not, see <http://www.gnu.org/licenses/>
19 #include <iostream>
20 #include <wx/wx.h>
21 #include <wx/arrstr.h>
22 #include <map>
24 #ifndef VCARD_H
25 #define VCARD_H
27 struct ArrayvCardOutData {
28         wxArrayString PropData;
29         wxArrayString PropValues;
30         int PropCount = 0;
31 };
33 struct vCardName{
34         wxString Forename;
35         wxString Surname;
36         wxString OtherNames;
37         wxString Title;
38         wxString Suffix;
39 };
41 class vCard{
42 private:
43     wxArrayString SettingNames;
44     wxArrayString SettingValues;
45     int SettingCount;
46     bool vCardBegin;
47     bool vCardEnd;
48     bool vCardFN;
49     float vCardVersion;
50     wxString vCardFilename;
51     std::map<int,wxString> Cards;
52     void ProcessString(wxString *ContactData);
53 public:
54     vCard();
55     void Add(wxString SettingName, wxString SettingValue, bool ReplaceMode);
56     void AddRaw(wxString SettingName, wxString SettingValue);    
57     wxString Get(wxString SettingName);
58     vCardName GetName();
59     wxString GetById(int id);
60     ArrayvCardOutData GetByPartial(wxString SettingName);
61     int WriteFile(wxString WriteFilename);
62     int LoadFile(wxString LoadFilename);
63     int LoadString(wxString ContactData);
64     wxString WriteString();
65     bool MeetBaseSpecification();
66     wxString Convert(wxString SettingValue, bool ReplaceMode);
67     wxString GetFilename();
68     std::map<int,wxString>* GetAllCards();
69 };
71 #endif
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy