44 #ifndef CACHEDIMAPJOB_H
45 #define CACHEDIMAPJOB_H
47 #include "folderjob.h"
48 #include <tdeio/job.h>
49 #include <tdeio/global.h>
51 #include <tqptrlist.h>
52 #include <tqvaluelist.h>
53 #include <tqcstring.h>
55 class KMFolderCachedImap;
56 class KMAcctCachedImap;
61 class CachedImapJob :
public FolderJob {
69 : uid(_uid), flags(_flags), size(_size) {}
76 CachedImapJob(
const TQValueList<MsgForDownload>& msgs,
77 JobType type = tGetMessage, KMFolderCachedImap* folder = 0 );
79 CachedImapJob(
const TQPtrList<KMMessage>& msgs,
80 JobType type, KMFolderCachedImap* folder=0 );
81 CachedImapJob(
const TQValueList<unsigned long>& msgs,
82 JobType type, KMFolderCachedImap* folder=0 );
84 CachedImapJob(
const TQValueList<KMFolderCachedImap*>& folders,
85 JobType type = tAddSubfolders,
86 KMFolderCachedImap* folder = 0 );
88 CachedImapJob(
const TQString& string1, JobType type,
89 KMFolderCachedImap* folder );
91 CachedImapJob(
const TQStringList& foldersOrMsgs, JobType type,
92 KMFolderCachedImap* folder );
94 CachedImapJob( JobType type, KMFolderCachedImap* folder );
96 virtual ~CachedImapJob();
98 void setParentFolder(
const KMFolderCachedImap* parent );
102 void permanentFlags(
int flags );
105 virtual void execute();
106 void expungeFolder();
107 void checkUidValidity();
108 void renameFolder(
const TQString &newName );
112 virtual void slotGetNextMessage( TDEIO::Job *job = 0 );
113 virtual void slotAddNextSubfolder( TDEIO::Job *job = 0 );
114 virtual void slotPutNextMessage();
115 virtual void slotPutMessageDataReq( TDEIO::Job *job, TQByteArray &data );
116 virtual void slotPutMessageResult( TDEIO::Job *job );
117 virtual void slotPutMessageInfoData(TDEIO::Job *,
const TQString &data);
118 virtual void slotExpungeResult( TDEIO::Job *job );
119 virtual void slotDeleteNextFolder( TDEIO::Job *job = 0 );
120 virtual void slotCheckUidValidityResult( TDEIO::Job *job );
121 virtual void slotRenameFolderResult( TDEIO::Job *job );
122 virtual void slotListMessagesResult( TDEIO::Job * job );
123 void slotDeleteNextMessages( TDEIO::Job* job = 0 );
124 void slotProcessedSize( TDEIO::Job *, TDEIO::filesize_t processed );
125 void slotSubscribtionChange1Done(
const TQString&,
bool );
126 void slotSubscribtionChange2Done(
const TQString&,
bool );
127 void slotSubscribtionChange1Failed(
const TQString &errorMessage );
128 void slotSubscribtionChange2Failed(
const TQString &errorMessage );
133 void revertLabelChange();
135 KMFolderCachedImap *mFolder;
136 KMAcctCachedImap *mAccount;
137 TQValueList<KMFolderCachedImap*> mFolderList;
138 TQValueList<MsgForDownload> mMsgsForDownload;
139 TQValueList<unsigned long> mSerNumMsgList;
142 TQStringList mFoldersOrMessages;
145 TQString mOldImapPath, mNewImapPath, mNewName;
146 KMFolderCachedImap *mParentFolder;
Information about a message to be downloaded (from the 'IMAP envelope')