File indexing completed on 2024-12-01 10:39:41

0001 /*
0002    SPDX-FileCopyrightText: 2018-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "authenticationmanager.h"
0010 #include "libruqolacore_export.h"
0011 #include <QDebug>
0012 class LIBRUQOLACORE_EXPORT AuthenticationInfo
0013 {
0014     Q_GADGET
0015 public:
0016     AuthenticationInfo();
0017     ~AuthenticationInfo();
0018 
0019     [[nodiscard]] QString name() const;
0020     void setName(const QString &name);
0021 
0022     [[nodiscard]] QString iconName() const;
0023     void setIconName(const QString &iconName);
0024 
0025     [[nodiscard]] AuthenticationManager::AuthMethodType oauthType() const;
0026     void setOauthType(AuthenticationManager::AuthMethodType oauthType);
0027 
0028     [[nodiscard]] bool isValid() const;
0029 
0030 private:
0031     QString mName;
0032     QString mIconName;
0033     AuthenticationManager::AuthMethodType mOauthType = AuthenticationManager::AuthMethodType::Unknown;
0034 };
0035 Q_DECLARE_TYPEINFO(AuthenticationInfo, Q_MOVABLE_TYPE);
0036 LIBRUQOLACORE_EXPORT QDebug operator<<(QDebug d, const AuthenticationInfo &t);