00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef MARKASCOMMAND_H
00021 #define MARKASCOMMAND_H
00022
00023 #include "commandbase_p.h"
00024
00025 #include <akonadi/collection.h>
00026 #include <akonadi/item.h>
00027 #include <akonadi/kmime/messagestatus.h>
00028
00029 #include <QList>
00030
00031 class KJob;
00032 class MarkAsCommand : public CommandBase
00033 {
00034 Q_OBJECT
00035 public:
00036 MarkAsCommand( const Akonadi::MessageStatus& targetStatus, const Akonadi::Item::List & msgList, bool invert = false, QObject* parent = 0 );
00037 MarkAsCommand( const Akonadi::MessageStatus& targetStatus, const Akonadi::Collection::List& folders, bool invert = false, QObject* parent = 0 );
00038 void execute();
00039
00040 private Q_SLOTS:
00041 void slotFetchDone( KJob* job );
00042 void slotModifyItemDone( KJob * job );
00043
00044 private:
00045 void markMessages();
00046
00047 Akonadi::Collection::List mFolders;
00048 QList<Akonadi::Item> mMessages;
00049 Akonadi::MessageStatus mTargetStatus;
00050 int mMarkJobCount;
00051 int mFolderListJobCount;
00052 int mInvertMark;
00053 };
00054
00055 #endif // MARKASCOMMAND_H