1 #ifndef kmfoldermaildir_h
2 #define kmfoldermaildir_h
4 #include "kmfolderindex.h"
8 #include <tqguardedptr.h>
10 class KMFolderMaildir;
14 class AttachmentStrategy;
20 using KMail::FolderJob;
21 using KMail::MaildirJob;
22 using KMail::AttachmentStrategy;
28 friend class ::KMail::MaildirJob;
33 KMFolderMaildir( KMFolder* folder, const char* name=0);
34 virtual ~KMFolderMaildir();
37 virtual KMFolderType folderType() const { return KMFolderTypeMaildir; }
55 virtual void removeMsg( int i, bool imapQuiet = FALSE);
56 virtual void removeMsg(TQPtrList<KMMessage> msgList, bool imapQuiet = FALSE)
62 const KMMsgStatus newStatus,
70 virtual int open( const char *owner);
79 virtual void reallyDoClose( const char *owner);
87 static int createMaildirFolders( const TQString & folderPath );
89 static TQString constructValidFileName( const TQString & filename = TQString(),
90 KMMsgStatus status = KMMsgStatusNew );
92 static bool removeFile( const TQString & folderPath,
93 const TQString & filename );
100 int compact( unsigned int startIndex, int nbMessages, const TQStringList& entryList, bool& done );
104 virtual int compact( bool silent );
107 virtual bool isReadOnly() const { return false; }
110 virtual TQ_INT64 doFolderSize() const;
114 TQString partSpecifier, const AttachmentStrategy *as ) const;
115 virtual FolderJob* doCreateJob( TQPtrList<KMMessage>& msgList, const TQString& sets,
116 FolderJob::JobType jt, KMFolder *folder ) const;
145 int addMsgInternal( KMMessage* msg, int* index_return = 0, bool stripUid= false );
148 void slotDirSizeJobResult( KIO::Job* job );
151 void readFileHeaderIntern( const TQString& dir, const TQString& file, KMMsgStatus status);
152 TQString moveInternal( const TQString& oldLoc, const TQString& newLoc, KMMsgInfo* mi);
153 TQString moveInternal( const TQString& oldLoc, const TQString& newLoc, TQString& aFileName, KMMsgStatus status);
154 bool removeFile( const TQString& filename);
163 typedef TQPair<TQGuardedPtr<const KMFolderMaildir>,KFileItemList> DirSizeJobQueueEntry;
164 static TQValueList<DirSizeJobQueueEntry> s_DirSizeJobQueue;
166 TQStrList mIdxToFileList;
168 mutable bool mCurrentlyCheckingFolderSize;
|