2
* Copyright 2015 Canonical Ltd.
4
* This file is part of address-book-service.
6
* sync-monitor 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/>.
20
#include <QtCore/QObject>
22
class ABUpdateModule : public QObject
29
ApplicationAreadyUpdated = 0,
31
FailToConnectWithButeo,
32
FailToCreateButeoProfiles,
35
OnlineAccountNotFound,
40
ABUpdateModule(QObject *parent = 0);
41
~ABUpdateModule() override;
43
virtual QString name() const = 0;
44
virtual bool needsUpdate() = 0;
45
virtual bool prepareToUpdate() = 0;
46
virtual bool update() = 0;
47
virtual bool canUpdate() = 0;
48
virtual bool requireInternetConnection() = 0;
49
virtual bool commit() = 0;
50
virtual bool rollback() = 0;
51
virtual ImportError lastError() const = 0;
55
void updateError(const QString &accountName, ABUpdateModule::ImportError errorCode);