File indexing completed on 2024-11-24 04:49:54

0001 /*
0002   SPDX-FileCopyrightText: 2013-2024 Laurent Montel <montel@kde.org>
0003 
0004   SPDX-License-Identifier: GPL-2.0-only
0005 */
0006 
0007 #pragma once
0008 
0009 #include <QUrl>
0010 
0011 #include <QObject>
0012 namespace KManageSieve
0013 {
0014 class SieveJob;
0015 }
0016 
0017 namespace KSieveCore
0018 {
0019 class VacationHelperJob : public QObject
0020 {
0021     Q_OBJECT
0022 public:
0023     explicit VacationHelperJob(const QUrl &url, QObject *parent = nullptr);
0024     ~VacationHelperJob() override;
0025 
0026     void searchActiveJob();
0027 
0028 Q_SIGNALS:
0029     void canNotGetScriptList();
0030     void resourceHasNotSieveSupport();
0031     void scriptListResult(const QStringList &scriptList, const QString &activeScript, bool hasIncludeSupport);
0032 
0033 private:
0034     Q_DISABLE_COPY(VacationHelperJob)
0035     void slotGetScriptList(KManageSieve::SieveJob *job, bool success, const QStringList &scriptList, const QString &activeScript);
0036     void killJob();
0037     const QUrl mUrl;
0038     KManageSieve::SieveJob *mSieveJob = nullptr;
0039 };
0040 }