vacation.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef __KMAIL_VACATION_H__
00034 #define __KMAIL_VACATION_H__
00035
00036 #include <qobject.h>
00037
00038 #include <kurl.h>
00039
00040 class QString;
00041 class QStringList;
00042 template <typename T> class QValueList;
00043 namespace KMail {
00044 class SieveJob;
00045 class VacationDialog;
00046 }
00047 namespace KMime {
00048 namespace Types {
00049 struct AddrSpec;
00050 typedef QValueList<AddrSpec> AddrSpecList;
00051 }
00052 }
00053
00054 namespace KMail {
00055
00056 class Vacation : public QObject {
00057 Q_OBJECT
00058 public:
00059 Vacation( QObject * parent=0, const char * name=0 );
00060 virtual ~Vacation();
00061
00062 bool isUsable() const { return !mUrl.isEmpty(); }
00063
00064 static QString defaultMessageText();
00065 static int defaultNotificationInterval();
00066 static QStringList defaultMailAliases();
00067 static bool defaultSendForSpam();
00068 static QString defaultDomainName();
00069
00070 protected:
00071 static QString composeScript( const QString & messageText,
00072 int notificationInterval,
00073 const KMime::Types::AddrSpecList & aliases,
00074 bool sendForSpam, const QString & excludeDomain );
00075 static bool parseScript( const QString & script, QString & messageText,
00076 int & notificationInterval, QStringList & aliases,
00077 bool & sendForSpam, QString & domainName );
00078 KURL findURL() const;
00079 void handlePutResult( KMail::SieveJob * job, bool success, bool );
00080
00081
00082 signals:
00083 void result( bool success );
00084
00085 protected slots:
00086 void slotDialogDefaults();
00087 void slotGetResult( KMail::SieveJob * job, bool success,
00088 const QString & script, bool active );
00089 void slotDialogOk();
00090 void slotDialogCancel();
00091 void slotPutActiveResult( KMail::SieveJob *, bool );
00092 void slotPutInactiveResult( KMail::SieveJob *, bool );
00093 protected:
00094
00095 KMail::SieveJob * mSieveJob;
00096 KURL mUrl;
00097
00098 KMail::VacationDialog * mDialog;
00099 bool mWasActive;
00100 };
00101
00102 }
00103
00104 #endif // __KMAIL_VACATION_H__
This file is part of the documentation for kmail Library Version 3.3.2.