File indexing completed on 2024-11-24 04:49:52

0001 /*
0002    SPDX-FileCopyrightText: 2017-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "akonadiimapsettinginterface.h"
0008 #include <pimcommon/imapresourcesettings.h>
0009 
0010 using namespace KSieveCore;
0011 
0012 AkonadiImapSettingInterface::AkonadiImapSettingInterface(std::unique_ptr<OrgKdeAkonadiImapSettingsInterface> &interface)
0013     : KSieveCore::AbstractAkonadiImapSettingInterface()
0014     , mInterface(interface.release())
0015 {
0016 }
0017 
0018 AkonadiImapSettingInterface::~AkonadiImapSettingInterface() = default;
0019 
0020 bool AkonadiImapSettingInterface::sieveSupport() const
0021 {
0022     return mInterface->sieveSupport();
0023 }
0024 
0025 bool AkonadiImapSettingInterface::sieveReuseConfig() const
0026 {
0027     return mInterface->sieveReuseConfig();
0028 }
0029 
0030 QString AkonadiImapSettingInterface::imapServer() const
0031 {
0032     QDBusReply<QString> reply = mInterface->imapServer();
0033     if (reply.isValid()) {
0034         return reply;
0035     }
0036     return {};
0037 }
0038 
0039 QString AkonadiImapSettingInterface::userName() const
0040 {
0041     return mInterface->userName();
0042 }
0043 
0044 int AkonadiImapSettingInterface::sievePort() const
0045 {
0046     return mInterface->sievePort();
0047 }
0048 
0049 QString AkonadiImapSettingInterface::sieveCustomUsername() const
0050 {
0051     return mInterface->sieveCustomUsername();
0052 }
0053 
0054 QString AkonadiImapSettingInterface::sieveCustomAuthentification() const
0055 {
0056     return mInterface->sieveCustomAuthentification();
0057 }
0058 
0059 QString AkonadiImapSettingInterface::sieveVacationFilename() const
0060 {
0061     return mInterface->sieveVacationFilename();
0062 }
0063 
0064 QString AkonadiImapSettingInterface::safety() const
0065 {
0066     return mInterface->safety();
0067 }
0068 
0069 int AkonadiImapSettingInterface::alternateAuthentication() const
0070 {
0071     return mInterface->alternateAuthentication();
0072 }
0073 
0074 int AkonadiImapSettingInterface::authentication() const
0075 {
0076     return mInterface->authentication();
0077 }
0078 
0079 QString AkonadiImapSettingInterface::sieveAlternateUrl() const
0080 {
0081     return mInterface->sieveAlternateUrl();
0082 }
0083 
0084 int AkonadiImapSettingInterface::imapPort() const
0085 {
0086     return mInterface->imapPort();
0087 }