File indexing completed on 2024-12-22 04:52:49

0001 /*
0002    SPDX-FileCopyrightText: 2012-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "abstractsettings.h"
0010 #include <KIdentityManagementCore/Signature>
0011 #include <QString>
0012 
0013 class QDomElement;
0014 
0015 class EvolutionSettings : public AbstractSettings
0016 {
0017 public:
0018     EvolutionSettings();
0019     ~EvolutionSettings() override;
0020     void loadAccount(const QString &filename);
0021     void loadLdap(const QString &filename);
0022 
0023 private:
0024     void readAccount(const QDomElement &account);
0025     void readLdap(const QString &account);
0026     void extractAccountInfo(const QString &info);
0027     void readSignatures(const QDomElement &account);
0028     void extractSignatureInfo(const QString &info);
0029     QString getSecurityMethod(const QStringList &listArgument, bool &found);
0030     QString getAuthMethod(const QString &path, bool &found);
0031     void addAuth(QMap<QString, QVariant> &settings, const QString &argument, const QString &userName);
0032 
0033     QMap<QString, KIdentityManagementCore::Signature> mMapSignature;
0034 };