Libksieve

generateglobalscriptjob.h
1/*
2 SPDX-FileCopyrightText: 2013-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 <QStringList>
12#include <QUrl>
13namespace KManageSieve
14{
15class SieveJob;
16}
17namespace KSieveCore
18{
19class KSIEVECORE_EXPORT GenerateGlobalScriptJob : public QObject
20{
21 Q_OBJECT
22public:
23 explicit GenerateGlobalScriptJob(const QUrl &url, QObject *parent = nullptr);
24 ~GenerateGlobalScriptJob() override;
25
26 void start();
27 void kill();
28
29 void addUserActiveScripts(const QStringList &lstScript);
30
31 void setForceActivateUserScript(bool f);
32
33Q_SIGNALS:
34 void success();
35 void error(const QString &msgError);
36
37private:
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}
A job to manage sieve scripts.
Definition sievejob.h:31
Q_SCRIPTABLE Q_NOREPLY void start()
void error(QWidget *parent, const QString &text, const QString &title, const KGuiItem &buttonOk, Options options=Notify)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:09:39 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.