Libksieve

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

KDE's Doxygen guidelines are available online.