Libksieve

checkscriptjob.h
1/*
2 SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-only
5*/
6
7#pragma once
8
9#include "ksievecore_export.h"
10#include <QObject>
11#include <QUrl>
12#include <memory>
13namespace KManageSieve
14{
15class SieveJob;
16}
17namespace KSieveCore
18{
19class CheckScriptJobPrivate;
20/**
21 * @brief The CheckScriptJob class
22 * @author Laurent Montel <montel@kde.org>
23 */
24class KSIEVECORE_EXPORT CheckScriptJob : public QObject
25{
26 Q_OBJECT
27public:
28 explicit CheckScriptJob(QObject *parent = nullptr);
29 ~CheckScriptJob() override;
30
31 void setOriginalScript(const QString &script);
32 void setCurrentScript(const QString &script);
33 void setUrl(const QUrl &url);
34 void setIsActive(bool active);
35
36 [[nodiscard]] bool canStart() const;
37 void start();
38
39Q_SIGNALS:
40 void finished(const QString &msg, bool success);
41
42private:
43 KSIEVECORE_NO_EXPORT void slotPutCheckSyntaxResult(KManageSieve::SieveJob *job, bool success);
44 KSIEVECORE_NO_EXPORT void slotRestoreFile(KManageSieve::SieveJob *job, bool success);
45 std::unique_ptr<CheckScriptJobPrivate> const d;
46};
47}
A job to manage sieve scripts.
Definition sievejob.h:31
The CheckScriptJob class.
Q_SCRIPTABLE Q_NOREPLY void start()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:57:10 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.