HarmattanSyncApplications
ContactsChangeNotifier.h
1#ifndef CONTACTSCHANGENOTIFIER_H
2#define CONTACTSCHANGENOTIFIER_H
3
4#include <QObject>
5#include <QContactManager>
6#include <QList>
7#include <QLoggingCategory>
8
9#include <QContactId>
10
11using namespace QtContacts;
12
13class ContactsChangeNotifier : public QObject
14{
15 Q_OBJECT
16
17public:
21
25
28 void enable();
29
32 void disable();
33
34Q_SIGNALS:
37 void change();
38
39private Q_SLOTS:
40 void onContactsAdded(const QList<QContactId>& ids);
41 void onContactsRemoved(const QList<QContactId>& ids);
42 void onContactsChanged(const QList<QContactId>& ids);
43
44private:
45 QContactManager* iManager;
46 bool iDisabled;
47};
48
49
50Q_DECLARE_LOGGING_CATEGORY(lcSyncMLContactChange)
51Q_DECLARE_LOGGING_CATEGORY(lcSyncMLContactChangeTrace)
52
53#endif
Definition ContactsChangeNotifier.h:14
~ContactsChangeNotifier()
constructor
void disable()
stop listening to changes from QContactManager
void enable()
start listening to changes from QContactManager
ContactsChangeNotifier()
constructor