First commit
[jenirok] / src / common / contactmanager.h
1 /*
2  * This file is part of Jenirok.
3  *
4  * Jenirok is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * Jenirok is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with Jenirok.  If not, see <http://www.gnu.org/licenses/>.
16  *
17  */
18
19 #ifndef CONTACTMANAGER_H
20 #define CONTACTMANAGER_H
21
22 #include <QtCore/QLibrary>
23 #include <QtCore/QString>
24 #include <QtCore/QStringList>
25 #include <QtCore/QVector>
26 #include <libebook/e-book.h>
27
28 class ContactManager
29 {
30 public:
31         struct Contact
32         {
33                 QString name;
34                 QString number;
35                 QString street;
36                 QString city;
37         };
38
39         ContactManager();
40         ~ContactManager();
41         bool addContact(Contact const& contact);
42         bool numberExists(QString const& number);
43         static QString& removeCountryCode(QString& number);
44
45 private:
46         bool load();
47         EBook* book_;
48 };
49
50 #endif