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

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 #include "libimportwizard_export.h"
0009 #include <QColor>
0010 #include <QString>
0011 #include <QUrl>
0012 
0013 struct LIBIMPORTWIZARD_EXPORT ldapStruct {
0014     ldapStruct() = default;
0015 
0016     QUrl ldapUrl;
0017     QString dn;
0018     QString saslMech;
0019     QString fileName;
0020     QString description;
0021     QString password;
0022     int maxHint = -1;
0023     int port = -1;
0024     int limit = -1;
0025     int timeout = -1;
0026     bool useSSL = false;
0027     bool useTLS = false;
0028 };
0029 
0030 struct tagStruct {
0031     QString name;
0032     QColor color;
0033 };
0034 Q_DECLARE_TYPEINFO(tagStruct, Q_RELOCATABLE_TYPE);
0035 
0036 namespace ImportWizardUtil
0037 {
0038 enum ResourceType { Imap, Pop3, Ldap };
0039 
0040 LIBIMPORTWIZARD_EXPORT void mergeLdap(const ldapStruct &ldap);
0041 LIBIMPORTWIZARD_EXPORT void addAkonadiTag(const QList<tagStruct> &tagList);
0042 void storePassword(const QString &name, ImportWizardUtil::ResourceType type, const QString &password);
0043 }