KPeople

kpeoplevcard.h
1/*
2 SPDX-FileCopyrightText: 2015 Aleix Pol Gonzalez <aleixpol@kde.org>
3 SPDX-FileCopyrightText: 2015 Martin Klapetek <mklapetek@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.1-or-later
6*/
7
8#ifndef KPEOPLEVCARD_H
9#define KPEOPLEVCARD_H
10
11#include <KDirWatch>
12#include <KPeopleBackend/AbstractContact>
13#include <KPeopleBackend/AbstractEditableContact>
14#include <KPeopleBackend/AllContactsMonitor>
15#include <KPeopleBackend/BasePersonsDataSource>
16
17class QFileInfo;
18
19class KPeopleVCard : public KPeople::AllContactsMonitor
20{
22
23public:
24 KPeopleVCard();
25 ~KPeopleVCard() override;
26
28 static QString contactsVCardPath();
29 static QString contactsVCardWritePath();
30
31private:
32 void processVCard(const QString &path);
33 void deleteVCard(const QString &path);
34 void processDirectory(const QFileInfo &fi);
35
37 KDirWatch *m_fs;
38};
39
40class VCardDataSource : public KPeople::BasePersonsDataSourceV2
41{
42public:
43 VCardDataSource(QObject *parent, const QVariantList &data);
44 ~VCardDataSource() override;
45 QString sourcePluginId() const override;
46
47 KPeople::AllContactsMonitor *createAllContactsMonitor() override;
48 bool addContact(const QVariantMap &properties) override;
49 bool deleteContact(const QString &uri) override;
50};
51
52#endif
This class should be subclassed by each datasource and return a list of all contacts that the datasou...
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:15:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.