| 1 |
/* |
| 2 |
* This file is part of buteo-sync-plugins package |
| 3 |
* |
| 4 |
* Copyright (C) 2015 Jolla Ltd. |
| 5 |
* Contact: Chris Adams <[email protected]> |
| 6 |
* |
| 7 |
* This library is free software; you can redistribute it and/or |
| 8 |
* modify it under the terms of the GNU Lesser General Public License |
| 9 |
* version 2.1 as published by the Free Software Foundation. |
| 10 |
* |
| 11 |
* This library is distributed in the hope that it will be useful, but |
| 12 |
* WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 |
* Lesser General Public License for more details. |
| 15 |
* |
| 16 |
* You should have received a copy of the GNU Lesser General Public |
| 17 |
* License along with this library; if not, write to the Free Software |
| 18 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA |
| 19 |
* 02110-1301 USA |
| 20 |
* |
| 21 |
*/ |
| 22 |
|
| 23 |
#ifndef CONTACTBUILDER_H |
| 24 |
#define CONTACTBUILDER_H |
| 25 |
|
| 26 |
#include <seasidecontactbuilder.h> |
| 27 |
|
| 28 |
#include <QString> |
| 29 |
|
| 30 |
class ContactBuilder : public SeasideContactBuilder |
| 31 |
{ |
| 32 |
public: |
| 33 |
enum MatchFilterMode { |
| 34 |
NoFilterRequiredMode = 0, |
| 35 |
FilterRequiredMode |
| 36 |
}; |
| 37 |
|
| 38 |
ContactBuilder(QContactManager *mgr, const QString &syncTarget, const QString &originId, MatchFilterMode mode); |
| 39 |
~ContactBuilder(); |
| 40 |
|
| 41 |
QContactFilter mergeSubsetFilter() const; |
| 42 |
bool mergeLocalIntoImport(QContact &import, const QContact &local, bool *erase); |
| 43 |
|
| 44 |
// no-op functions: |
| 45 |
bool mergeImportIntoImport(QContact &, QContact &, bool *erase); |
| 46 |
int previousDuplicateIndex(QList<QContact> &, QContact &, int); |
| 47 |
}; |
| 48 |
|
| 49 |
#endif |