2
* Copyright 2014 Canonical Ltd.
4
* This file is part of contact-service-app.
6
* contact-service-app is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; version 3.
10
* contact-service-app is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
#ifndef __GALERA_DIRTYCONTACT_NOTIFY_H__
20
#define __GALERA_DIRTYCONTACT_NOTIFY_H__
22
#include <QtCore/QObject>
23
#include <QtCore/QTimer>
24
#include <QtCore/QSet>
25
#include <QtCore/QString>
26
#include <QtCore/QStringList>
30
class AddressBookAdaptor;
32
// this is a helper class uses a timer with a small timeout to notify the client about
33
// any contact change notification. This class should be used instead of emit the signal directly
34
// this will avoid notify about the contact update several times when updating different fields simultaneously
35
// With that we can reduce the dbus traffic and skip some client calls to query about the new contact info.
36
class DirtyContactsNotify : public QObject
41
DirtyContactsNotify(AddressBookAdaptor *adaptor, QObject *parent=0);
43
void append(QSet<QString> ids);
49
AddressBookAdaptor *m_adaptor;