1 /* 2 SPDX-FileCopyrightText: 2012-2021 Laurent Montel <montel@kde.org> 3 4 SPDX-License-Identifier: GPL-2.0-or-later 5 */ 6 7 #pragma once 8 #include "libimportwizard_export.h" 9 #include <QColor> 10 #include <QString> 11 #include <QUrl> 12 13 struct LIBIMPORTWIZARD_EXPORT ldapStruct { ldapStructldapStruct14 ldapStruct() 15 { 16 } 17 18 QUrl ldapUrl; 19 QString dn; 20 QString saslMech; 21 QString fileName; 22 QString description; 23 QString password; 24 int maxHint = -1; 25 int port = -1; 26 int limit = -1; 27 int timeout = -1; 28 bool useSSL = false; 29 bool useTLS = false; 30 }; 31 32 struct tagStruct { 33 QString name; 34 QColor color; 35 }; 36 Q_DECLARE_TYPEINFO(tagStruct, Q_MOVABLE_TYPE); 37 38 namespace ImportWizardUtil 39 { 40 enum ResourceType { Imap, Pop3, Ldap }; 41 42 LIBIMPORTWIZARD_EXPORT void mergeLdap(const ldapStruct &ldap); 43 LIBIMPORTWIZARD_EXPORT void addAkonadiTag(const QVector<tagStruct> &tagList); 44 void storePassword(const QString &name, ImportWizardUtil::ResourceType type, const QString &password); 45 } 46 47