1 #ifndef CONTACTINTERFACE_H
2 #define CONTACTINTERFACE_H
6 #include <contactwidgetitem.h>
8 #include "itemobserver.h"
15 #include <libebook/e-book.h>
16 #include <libosso-abook/osso-abook.h>
21 class ContactInterface : public QObject
25 static ContactInterface* getInstance();
30 bool updateContactsFromEbookToXml();
32 void setItemObserver( ItemObserver *observer );
33 void setItemSelectObserver( ItemSelectObserver *observer );
36 get all contacts from libosso-abook
38 ItemListPtr getAllContacts();
40 get all contacts from xml file
42 void getAllContactsFromXml();
43 void getAllContactsFromXml(const QString &groupname);
45 QStringList getAllGroupNames();
47 bool createGroup(const QString &groupname);
48 bool removeGroup(const QString &groupname);
49 bool addContactToGroup( ItemListPtr items, const QString &groupname );
50 bool removeContactToGroup( ItemListPtr items, const QString &groupname );
51 bool removeContactToGroup( ItemListPtr items );
54 static ContactInterface* instance;
55 ContactInterface(QObject *parent = 0);
58 ItemListPtr all_contacts_items;
59 ItemListPtr all_contacts_items_db;
60 Item current_contact_item;
62 QString current_fullname;
63 QString current_mobilenumber;
66 OssoABookRoster *roster;
75 #endif // CONTACTINTERFACE_H