File indexing completed on 2024-04-28 16:11:02

0001 /*
0002    SPDX-FileCopyrightText: 2018-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "authenticationinfo.h"
0008 
0009 AuthenticationInfo::AuthenticationInfo() = default;
0010 
0011 AuthenticationInfo::~AuthenticationInfo() = default;
0012 
0013 QString AuthenticationInfo::name() const
0014 {
0015     return mName;
0016 }
0017 
0018 void AuthenticationInfo::setName(const QString &name)
0019 {
0020     mName = name;
0021 }
0022 
0023 QString AuthenticationInfo::iconName() const
0024 {
0025     return mIconName;
0026 }
0027 
0028 void AuthenticationInfo::setIconName(const QString &iconName)
0029 {
0030     mIconName = iconName;
0031 }
0032 
0033 AuthenticationManager::AuthMethodType AuthenticationInfo::oauthType() const
0034 {
0035     return mOauthType;
0036 }
0037 
0038 void AuthenticationInfo::setOauthType(AuthenticationManager::AuthMethodType oauthType)
0039 {
0040     mOauthType = oauthType;
0041 }
0042 
0043 bool AuthenticationInfo::isValid() const
0044 {
0045     return (mOauthType != AuthenticationManager::Unknown) && !mName.isEmpty();
0046 }
0047 
0048 QDebug operator<<(QDebug d, const AuthenticationInfo &t)
0049 {
0050     d.space() << "Iconname:" << t.iconName();
0051     d.space() << "Name:" << t.name();
0052     d.space() << "Type:" << t.oauthType();
0053     return d;
0054 }
0055 
0056 #include "moc_authenticationinfo.cpp"