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 Q_DISABLE_COPY(GenerateGlobalScriptJob)
39 void slotPutMasterResult(KManageSieve::SieveJob *job, bool success);
40 void slotPutUserResult(KManageSieve::SieveJob *, bool success);
41 void disableAllOtherScripts();
42 void writeMasterScript();
43 void writeUserScript();
44 QStringList mListUserActiveScripts;
45 const QUrl mCurrentUrl;
46 bool mForceActivateUserScript = false;
47 KManageSieve::SieveJob *mMasterJob = nullptr;
48 KManageSieve::SieveJob *mUserJob = nullptr;
49};
50}
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 Tue Mar 26 2024 11:17:19 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.