1 #ifndef kmfoldermaildir_h 2 #define kmfoldermaildir_h 4 #include "kmfolderindex.h" 6 #include <tdefileitem.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; } 40 virtual DwString getDwString( int idx); 52 virtual int addMsg( KMMessage* msg, int* index_return = 0); 55 virtual void removeMsg( int i, bool imapQuiet = false); 56 virtual void removeMsg(TQPtrList<KMMessage> msgList, bool imapQuiet = false) 61 virtual void msgStatusChanged( const KMMsgStatus oldStatus, 62 const KMMsgStatus newStatus, 70 virtual int open( const char *owner); 72 virtual int canAccess(); 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; 113 virtual FolderJob* doCreateJob( KMMessage *msg, FolderJob::JobType jt, KMFolder *folder, 114 TQString partSpecifier, const AttachmentStrategy *as ) const; 115 virtual FolderJob* doCreateJob( TQPtrList<KMMessage>& msgList, const TQString& sets, 116 FolderJob::JobType jt, KMFolder *folder ) const; 124 virtual int removeContents(); 129 virtual int expungeContents(); 134 virtual int createIndexFromContents(); 145 int addMsgInternal( KMMessage* msg, int* index_return = 0, bool stripUid= false ); 148 void slotDirSizeJobResult( TDEIO::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); 161 virtual IndexStatus indexStatus(); 163 typedef TQPair<TQGuardedPtr<const KMFolderMaildir>,KFileItemList> DirSizeJobQueueEntry; 164 static TQValueList<DirSizeJobQueueEntry> s_DirSizeJobQueue; 166 TQStrList mIdxToFileList; 168 mutable bool mCurrentlyCheckingFolderSize; A FolderStorage with an index for faster access to often used message properties. ...
virtual void removeMsg(int i, bool imapQuiet=false) Remove (first occurrence of) given message from the folder.
|