Libksieve

renamescriptjob.h
1 /*
2  SPDX-FileCopyrightText: 2016-2021 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-only
5 */
6 
7 #ifndef RENAMESCRIPTJOB_H
8 #define RENAMESCRIPTJOB_H
9 
10 #include <QObject>
11 #include <QUrl>
12 #include "ksieveui_export.h"
13 #include <memory>
14 namespace KManageSieve {
15 class SieveJob;
16 }
17 
18 namespace KSieveUi {
19 class RenameScriptJobPrivate;
24 class KSIEVEUI_EXPORT RenameScriptJob : public QObject
25 {
26  Q_OBJECT
27 public:
28  explicit RenameScriptJob(QObject *parent = nullptr);
29  ~RenameScriptJob();
30 
31  void setOldUrl(const QUrl &url);
32  void setIsActive(bool active);
33  void setNewName(const QString &newName);
34 
35  Q_REQUIRED_RESULT bool canStart() const;
36 
37  void start();
38 
39 Q_SIGNALS:
40  void finished(const QUrl &oldUrl, const QUrl &newUrl, const QString &error, bool success);
41 
42 private Q_SLOTS:
43  void slotDeleteResult(KManageSieve::SieveJob *job, bool success);
44  void slotPutScript(KManageSieve::SieveJob *job, bool success);
45  void slotGetResult(KManageSieve::SieveJob *job, bool success, const QString &script, bool isActive);
46 
47 private:
48  Q_DISABLE_COPY(RenameScriptJob)
49  std::unique_ptr<RenameScriptJobPrivate> const d;
50 };
51 }
52 #endif // RENAMESCRIPTJOB_H
The RenameScriptJob class.
A job to manage sieve scripts.
Definition: sievejob.h:36
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Jan 21 2021 23:12:48 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.