File indexing completed on 2024-11-24 04:44:03

0001 /*
0002     SPDX-FileCopyrightText: 2007 Till Adam <adam@kde.org>
0003     SPDX-FileCopyrightText: 2008 Omat Holding B.V. <info@omat.nl>
0004     SPDX-FileCopyrightText: 2009 Kevin Ottens <ervin@kde.org>
0005 
0006     SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
0007     SPDX-FileContributor: Kevin Ottens <kevin@kdab.com>
0008 
0009     SPDX-License-Identifier: LGPL-2.0-or-later
0010 */
0011 
0012 #include "imapaccount.h"
0013 
0014 ImapAccount::ImapAccount()
0015     : m_encryption(KIMAP::LoginJob::Unencrypted)
0016     , m_authentication(KIMAP::LoginJob::ClearText)
0017 {
0018 }
0019 
0020 ImapAccount::~ImapAccount() = default;
0021 
0022 void ImapAccount::setServer(const QString &server)
0023 {
0024     m_server = server;
0025 }
0026 
0027 QString ImapAccount::server() const
0028 {
0029     return m_server;
0030 }
0031 
0032 void ImapAccount::setPort(quint16 port)
0033 {
0034     m_port = port;
0035 }
0036 
0037 quint16 ImapAccount::port() const
0038 {
0039     return m_port;
0040 }
0041 
0042 void ImapAccount::setUserName(const QString &userName)
0043 {
0044     m_userName = userName;
0045 }
0046 
0047 QString ImapAccount::userName() const
0048 {
0049     return m_userName;
0050 }
0051 
0052 void ImapAccount::setEncryptionMode(KIMAP::LoginJob::EncryptionMode mode)
0053 {
0054     m_encryption = mode;
0055 }
0056 
0057 KIMAP::LoginJob::EncryptionMode ImapAccount::encryptionMode() const
0058 {
0059     return m_encryption;
0060 }
0061 
0062 void ImapAccount::setAuthenticationMode(KIMAP::LoginJob::AuthenticationMode mode)
0063 {
0064     m_authentication = mode;
0065 }
0066 
0067 KIMAP::LoginJob::AuthenticationMode ImapAccount::authenticationMode() const
0068 {
0069     return m_authentication;
0070 }
0071 
0072 void ImapAccount::setSubscriptionEnabled(bool enabled)
0073 {
0074     m_subscriptionEnabled = enabled;
0075 }
0076 
0077 bool ImapAccount::isSubscriptionEnabled() const
0078 {
0079     return m_subscriptionEnabled;
0080 }
0081 
0082 void ImapAccount::setTimeout(int timeout)
0083 {
0084     m_timeout = timeout;
0085 }
0086 
0087 int ImapAccount::timeout() const
0088 {
0089     return m_timeout;
0090 }
0091 
0092 void ImapAccount::setUseNetworkProxy(bool useProxy)
0093 {
0094     m_useProxy = useProxy;
0095 }
0096 
0097 bool ImapAccount::useNetworkProxy() const
0098 {
0099     return m_useProxy;
0100 }