File indexing completed on 2025-01-19 04:46:31
0001 /* 0002 SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <KAddressBookImportExport/PluginInterface> 0010 0011 class LDifImportExportPluginInterface : public KAddressBookImportExport::PluginInterface 0012 { 0013 Q_OBJECT 0014 public: 0015 explicit LDifImportExportPluginInterface(QObject *parent = nullptr); 0016 ~LDifImportExportPluginInterface() override; 0017 0018 void createAction(KActionCollection *ac) override; 0019 void exec() override; 0020 [[nodiscard]] bool canImportFileType(const QUrl &url) override; 0021 void importFile(const QUrl &url) override; 0022 0023 private: 0024 void slotImportLdif(); 0025 void slotExportLdif(); 0026 void importLdif(); 0027 void exportLdif(); 0028 void importLdifFile(const QString &fileName); 0029 };