Libksieve

renamescriptjob.h
1 /*
2  Copyright (C) 2016-2020 Laurent Montel <[email protected]>
3 
4  This program is free software; you can redistribute it and/or modify it
5  under the terms of the GNU General Public License, version 2, as
6  published by the Free Software Foundation.
7 
8  This program is distributed in the hope that it will be useful, but
9  WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License along
14  with this program; if not, write to the Free Software Foundation, Inc.,
15  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17 
18 #ifndef RENAMESCRIPTJOB_H
19 #define RENAMESCRIPTJOB_H
20 
21 #include <QObject>
22 #include <QUrl>
23 #include "ksieveui_export.h"
24 namespace KManageSieve {
25 class SieveJob;
26 }
27 
28 namespace KSieveUi {
29 class RenameScriptJobPrivate;
34 class KSIEVEUI_EXPORT RenameScriptJob : public QObject
35 {
36  Q_OBJECT
37 public:
38  explicit RenameScriptJob(QObject *parent = nullptr);
39  ~RenameScriptJob();
40 
41  void setOldUrl(const QUrl &url);
42  void setIsActive(bool active);
43  void setNewName(const QString &newName);
44 
45  Q_REQUIRED_RESULT bool canStart() const;
46 
47  void start();
48 
49 Q_SIGNALS:
50  void finished(const QUrl &oldUrl, const QUrl &newUrl, const QString &error, bool success);
51 
52 private Q_SLOTS:
53  void slotDeleteResult(KManageSieve::SieveJob *job, bool success);
54  void slotPutScript(KManageSieve::SieveJob *job, bool success);
55  void slotGetResult(KManageSieve::SieveJob *job, bool success, const QString &script, bool isActive);
56 
57 private:
58  Q_DISABLE_COPY(RenameScriptJob)
59  RenameScriptJobPrivate *const d;
60 };
61 }
62 #endif // RENAMESCRIPTJOB_H
The RenameScriptJob class.
A job to manage sieve scripts.
Definition: sievejob.h:41
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 1 2020 23:08:20 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.