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

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 "importwizardutil.h"
0011 #include <QHash>
0012 #include <QStringList>
0013 
0014 class ThunderbirdSettings : public AbstractSettings
0015 {
0016 public:
0017     explicit ThunderbirdSettings(const QString &filename);
0018     ~ThunderbirdSettings() override;
0019     void importSettings();
0020 
0021 private:
0022     void readAccount();
0023     void readIdentity(const QString &account);
0024     void readTransport();
0025     void readGlobalSettings();
0026     void readLdapSettings();
0027     void readTagSettings();
0028     void readExtensionsSettings();
0029     int adaptAutoResizeResolution(int index, const QString &configStrList);
0030 
0031     void insertIntoMap(const QString &line);
0032 
0033     void addAuth(QMap<QString, QVariant> &settings, const QString &argument, const QString &accountName);
0034     void importSieveSettings(QMap<QString, QVariant> &settings, const QString &userName, const QString &imapServerName);
0035 
0036     void addNewMailNotifier(const QString &group, const QString &key, bool value);
0037 
0038     QHash<QString, QVariant> mHashConfig;
0039     QHash<QString, QString> mHashSmtp;
0040     QStringList mAccountList;
0041     QStringList mLdapAccountList;
0042 
0043     QHash<QString, tagStruct> mHashTag;
0044     QString mFileName;
0045 };