/* SPDX-FileCopyrightText: 2015 Aleix Pol Gonzalez SPDX-FileCopyrightText: 2015 Martin Klapetek SPDX-License-Identifier: LGPL-2.1-or-later */ #ifndef KPEOPLEVCARD_H #define KPEOPLEVCARD_H #include #include #include #include #include class QFileInfo; class KPeopleVCard : public KPeople::AllContactsMonitor { Q_OBJECT public: KPeopleVCard(); ~KPeopleVCard() override; QMap contacts() override; static QString contactsVCardPath(); static QString contactsVCardWritePath(); private: void processVCard(const QString &path); void deleteVCard(const QString &path); void processDirectory(const QFileInfo &fi); QMap m_contactForUri; KDirWatch *m_fs; }; class VCardDataSource : public KPeople::BasePersonsDataSourceV2 { public: VCardDataSource(QObject *parent, const QVariantList &data); ~VCardDataSource() override; QString sourcePluginId() const override; KPeople::AllContactsMonitor *createAllContactsMonitor() override; bool addContact(const QVariantMap &properties) override; bool deleteContact(const QString &uri) override; }; #endif