Libksieve

generateglobalscriptjob.h
1 /*
2  SPDX-FileCopyrightText: 2013-2021 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-only
5 */
6 
7 #pragma once
8 
9 #include <QObject>
10 #include <QStringList>
11 #include <QUrl>
12 namespace KManageSieve
13 {
14 class SieveJob;
15 }
16 namespace KSieveUi
17 {
18 class GenerateGlobalScriptJob : public QObject
19 {
20  Q_OBJECT
21 public:
22  explicit GenerateGlobalScriptJob(const QUrl &url, QObject *parent = nullptr);
23  ~GenerateGlobalScriptJob() override;
24 
25  void start();
26  void kill();
27 
28  void addUserActiveScripts(const QStringList &lstScript);
29 
30  void setForceActivateUserScript(bool f);
31 
32 Q_SIGNALS:
33  void success();
34  void error(const QString &msgError);
35 
36 private:
37  Q_DISABLE_COPY(GenerateGlobalScriptJob)
38  void slotPutMasterResult(KManageSieve::SieveJob *job, bool success);
39  void slotPutUserResult(KManageSieve::SieveJob *, bool success);
40  void disableAllOtherScripts();
41  void writeMasterScript();
42  void writeUserScript();
43  QStringList mListUserActiveScripts;
44  const QUrl mCurrentUrl;
45  bool mForceActivateUserScript = false;
46  KManageSieve::SieveJob *mMasterJob = nullptr;
47  KManageSieve::SieveJob *mUserJob = nullptr;
48 };
49 }
50 
void error(QWidget *parent, const QString &text, const QString &caption=QString(), Options options=Notify)
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.