Changeset View
Changeset View
Standalone View
Standalone View
libksieve/ksieveui/vacation/vacationcheckjob.h
Show All 13 Lines | /* | ||||
with this program; if not, write to the Free Software Foundation, Inc., | with this program; if not, write to the Free Software Foundation, Inc., | ||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||||
*/ | */ | ||||
#ifndef VACATIONCHECKJOB_H | #ifndef VACATIONCHECKJOB_H | ||||
#define VACATIONCHECKJOB_H | #define VACATIONCHECKJOB_H | ||||
#include <QObject> | #include <QObject> | ||||
#include <QStringList> | |||||
#include <KUrl> | #include <KUrl> | ||||
namespace KManageSieve { | namespace KManageSieve { | ||||
class SieveJob; | class SieveJob; | ||||
} | } | ||||
namespace KSieveUi { | namespace KSieveUi { | ||||
class ParseUserScriptJob; | |||||
class VacationCheckJob : public QObject | class VacationCheckJob : public QObject | ||||
{ | { | ||||
Q_OBJECT | Q_OBJECT | ||||
public: | public: | ||||
explicit VacationCheckJob(const KUrl &url, const QString &serverName, QObject *parent=0); | explicit VacationCheckJob(const KUrl &url, const QString &serverName, QObject *parent=0); | ||||
~VacationCheckJob(); | ~VacationCheckJob(); | ||||
void setKep14Support(bool kep14Support); | |||||
void start(); | |||||
bool noScriptFound(); | |||||
QString script(); | |||||
QStringList sieveCapabilities(); | |||||
QString serverName(); | |||||
Q_SIGNALS: | Q_SIGNALS: | ||||
void scriptActive(bool active, const QString &serverName); | void scriptActive(VacationCheckJob* job, const QString &sscriptName, bool active); | ||||
private slots: | private slots: | ||||
void slotGetResult(KManageSieve::SieveJob *job, bool success, const QString &script, bool active); | void slotGetResult(KManageSieve::SieveJob *job, bool success, const QString &script, bool active); | ||||
void slotGotActiveScripts(ParseUserScriptJob *job); | |||||
void slotGotList(KManageSieve::SieveJob *job, bool success, const QStringList &availableScripts, const QString &activeScript); | |||||
void emitError(const QString &errorMessage); | |||||
void searchVacationScript(); | |||||
void getNextScript(); | |||||
bool isVacationScipt(const QString &script) const; | |||||
bool isLastScript() const; | |||||
private: | private: | ||||
QString mServerName; | QString mServerName; | ||||
KUrl mUrl; | KUrl mUrl; | ||||
KManageSieve::SieveJob * mSieveJob; | KManageSieve::SieveJob * mSieveJob; | ||||
ParseUserScriptJob *mParseJob; | |||||
bool mKep14Support; | |||||
QStringList mAvailableScripts; | |||||
QStringList mActiveScripts; | |||||
int mScriptPos; | |||||
bool mNoScriptFound; | |||||
QString mScript; | |||||
QStringList mSieveCapabilities; | |||||
}; | }; | ||||
} | } | ||||
#endif // VACATIONCHECKJOB_H | #endif // VACATIONCHECKJOB_H |