00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef FILTERLOG_H
00019 #define FILTERLOG_H
00020
00021
00022 #include <qlist.h>
00023 #include <qdom.h>
00024 #include <qfile.h>
00025 #include <qtextstream.h>
00026
00027
00028 #include <kdebug.h>
00029 #include <kmessagebox.h>
00030 #include <klocale.h>
00031 #include <kstandarddirs.h>
00032 #include <kapplication.h>
00033 #include <kconfig.h>
00034 #include <KConfigGroup>
00035 #include <KDateTime>
00036
00037
00038 #include "filterlogentry.h"
00039 #include "constants.h"
00040
00041
00042 typedef QList<FilterLogEntry> LogEntryList;
00043
00052 class FilterLog{
00053
00054
00055 public:
00056
00060 FilterLog();
00061
00065 ~FilterLog();
00066
00074 void addDeletedMail( const KDateTime& dateTime, const QString& sender, const QString& account, const QString& subject );
00075
00084 void addMovedMail( const KDateTime& dateTime, const QString& sender, const QString& account, const QString& subject, const QString& mailbox );
00085
00089 void print();
00090
00094 void clearDeletedMailsLog();
00095
00099 void clearMovedMailsLog();
00100
00104 void save();
00105
00109 void load();
00110
00115 LogEntryList getDeletedMails();
00116
00121 LogEntryList getMovedMails();
00122
00126 void loadSetup();
00127
00132 int numberDeletedMails();
00133
00138 int numberMovedMails();
00139
00140
00141 private:
00142
00146 KSharedConfigPtr config;
00147
00151 LogEntryList listDeletedMails;
00152
00156 LogEntryList listMovedMails;
00157
00161 bool logDeletedMails;
00162
00166 bool logMovedMails;
00167
00172 enum{ exit, days } deletedMailsStorageMode;
00173
00177 unsigned int daysStoreDeletedMails;
00178
00179 protected:
00180
00192 void addEntry( FilterAction_Type action, const KDateTime& dateTime, const QString& sender, const QString& account, const QString& subject, const QString& mailbox = QString() );
00193
00194 };
00195
00196
00197 #endif