32 #ifndef KMAcctCachedImap_h
33 #define KMAcctCachedImap_h
35 #include "imapaccountbase.h"
37 #include <tqguardedptr.h>
39 class KMFolderCachedImap;
40 class KMFolderTreeItem;
48 using KMail::CachedImapJob;
54 class KMAcctCachedImap:
public KMail::ImapAccountBase
58 friend class ::KMail::ImapJob;
59 friend class ::KMail::CachedImapJob;
62 virtual ~KMAcctCachedImap();
66 virtual void pseudoAssign(
const KMAccount * a );
71 virtual void setAutoExpunge(
bool);
76 virtual TQString type()
const;
77 virtual void processNewMail(
bool interactive );
82 virtual void killAllJobs(
bool disconnectSlave=
false );
87 virtual void cancelMailCheck();
92 virtual void setImapFolder(KMFolderCachedImap *);
93 KMFolderCachedImap* imapFolder()
const {
return mFolder; }
95 virtual void readConfig( TDEConfig & config );
96 virtual void writeConfig( TDEConfig & config ) ;
101 virtual void invalidateIMAPFolders();
102 virtual void invalidateIMAPFolders( KMFolderCachedImap* );
107 void addDeletedFolder(
KMFolder* folder );
113 void addDeletedFolder(
const TQString& imapPath );
118 bool isDeletedFolder(
const TQString& subFolderPath )
const;
123 bool isPreviouslyDeletedFolder(
const TQString& subFolderPath )
const;
128 TQStringList deletedFolderPaths(
const TQString& subFolderPath )
const;
133 void removeDeletedFolder(
const TQString& subFolderPath );
138 void addRenamedFolder(
const TQString& subFolderPath,
139 const TQString& oldLabel,
const TQString& newName );
145 void removeRenamedFolder(
const TQString& subFolderPath );
147 struct RenamedFolder {
149 RenamedFolder(
const TQString& oldLabel,
const TQString& newName )
150 : mOldLabel( oldLabel ), mNewName( newName ) {}
158 TQString renamedFolder(
const TQString& imapPath )
const;
162 const TQMap<TQString, RenamedFolder>& renamedFolders()
const {
return mRenamedFolders; }
167 void addUnreadMsgCount(
const KMFolderCachedImap *folder,
int countUnread );
172 void addLastUnreadMsgCount(
const KMFolderCachedImap *folder,
173 int countLastUnread );
181 bool annotationCheckPassed(){
return mAnnotationCheckPassed;};
182 void setAnnotationCheckPassed(
bool a ){ mAnnotationCheckPassed = a; };
192 void setGroupwareType( GroupwareType type ){ mGroupwareType = type; }
193 GroupwareType groupwareType()
const {
return mGroupwareType; }
195 void setSentCustomLoginCommand(
bool value ){ mSentCustomLoginCommand = value; }
196 bool sentCustomLoginCommand()
const {
return mSentCustomLoginCommand; }
199 friend class ::AccountManager;
200 KMAcctCachedImap(
AccountManager* owner,
const TQString& accountName, uint
id);
204 void postProcessNewMail(KMFolderCachedImap*,
bool);
206 void slotProgressItemCanceled( KPIM::ProgressItem* );
208 virtual void slotCheckQueuedFolders();
211 TQValueList<KMFolderCachedImap*> killAllJobsInternal(
bool disconnectSlave );
212 void processNewMail( KMFolderCachedImap* folder,
bool recurse );
215 TQPtrList<CachedImapJob> mJobList;
216 KMFolderCachedImap *mFolder;
217 TQStringList mDeletedFolders;
218 TQStringList mPreviouslyDeletedFolders;
219 TQMap<TQString, RenamedFolder> mRenamedFolders;
220 bool mAnnotationCheckPassed;
222 GroupwareType mGroupwareType;
223 bool mSentCustomLoginCommand;
The FolderStorage class is the bass class for the storage related aspects of a collection of mail (a ...
The account manager is responsible for creating accounts of various types via the factory method crea...