Libksieve

findaccountinfojob.h
1/*
2 SPDX-FileCopyrightText: 2020-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "ksievecore_export.h" //TODO use specific export for testing ?
10#include "util.h"
11#include <QObject>
12class OrgKdeAkonadiImapSettingsInterface;
13namespace KSieveCore
14{
15class SieveImapPasswordProvider;
16class AbstractAkonadiImapSettingInterface;
17class KSIEVECORE_EXPORT FindAccountInfoJob : public QObject
18{
19 Q_OBJECT
20public:
21 explicit FindAccountInfoJob(QObject *parent = nullptr);
22 ~FindAccountInfoJob() override;
23
24 void start();
25
26 [[nodiscard]] QString identifier() const;
27 void setIdentifier(const QString &newIdentifier);
28
29 [[nodiscard]] bool withVacationFileName() const;
30 void setWithVacationFileName(bool newWithVacationFileName);
31
32 SieveImapPasswordProvider *provider() const;
33 void setProvider(SieveImapPasswordProvider *newProvider);
34
35 [[nodiscard]] bool canStart() const;
36
37 void setCustomImapSettingsInterface(KSieveCore::AbstractAkonadiImapSettingInterface *newCustomImapSettingsInterface);
38
39Q_SIGNALS:
40 void findAccountInfoFinished(const KSieveCore::Util::AccountInfo &info);
41
42private:
43 KSIEVECORE_NO_EXPORT void sendAccountInfo();
44 KSIEVECORE_NO_EXPORT void slotPasswordsRequested(const QString &sievePassword, const QString &sieveCustomPassword);
45 KSieveCore::Util::AccountInfo mAccountInfo;
46 QString mIdentifier;
47 KSieveCore::AbstractAkonadiImapSettingInterface *mCustomImapSettingsInterface = nullptr;
48 SieveImapPasswordProvider *mPasswordProvider = nullptr;
49 bool mWithVacationFileName = true;
50 std::unique_ptr<OrgKdeAkonadiImapSettingsInterface> mInterfaceImap;
51 std::unique_ptr<KSieveCore::AbstractAkonadiImapSettingInterface> mInterface;
52};
53}
Q_SCRIPTABLE Q_NOREPLY void start()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:09:39 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.