23#include "kmfolderindex.h"
31 class AttachmentStrategy;
33using KMail::FolderJob;
35using KMail::AttachmentStrategy;
51 friend class ::KMail::MboxJob;
58 KMFolderMbox(KMFolder* folder,
const char* name=0);
59 virtual ~KMFolderMbox();
62 virtual KMFolderType
folderType()
const {
return KMFolderTypeMbox; }
65 DwString getDwString(
int idx);
73 virtual int addMsg( KMMessage* msg,
int* index_return = 0 );
80 virtual int open(
const char *owner);
83 virtual void reallyDoClose(
const char *owner);
95 virtual int compact(
bool silent );
99 int compact(
unsigned int startIndex,
int nbMessages, FILE* tmpFile, off_t& offs,
bool& done );
102 virtual bool isReadOnly()
const {
return mReadOnly; }
105 bool isLocked()
const {
return mFilesLocked; }
107 void setLockType( LockType ltype=FCNTL );
109 void setProcmailLockFileName(
const TQString& );
111 static TQByteArray escapeFrom(
const DwString & str );
116 virtual TQ_INT64 doFolderSize()
const;
119 virtual FolderJob* doCreateJob( KMMessage *msg, FolderJob::JobType jt, KMFolder *folder,
120 TQString partSpecifier,
const AttachmentStrategy *as )
const;
121 virtual FolderJob* doCreateJob( TQPtrList<KMMessage>& msgList,
const TQString& sets,
122 FolderJob::JobType jt, KMFolder *folder )
const;
125 virtual KMMessage* readMsg(
int idx);
138 virtual int unlock();
155 TQString mProcmailLockFileName;
virtual int create()=0
Create a new folder with the name of this object and open it.
virtual KMFolderType folderType() const
Returns the type of this folder.
virtual int expungeContents()=0
Called by KMFolder::expunge() to delete the actual contents.
virtual int removeContents()=0
Called by KMFolder::remove() to delete the actual contents.
virtual void sync()=0
fsync buffers to disk
virtual int canAccess()=0
Check folder for permissions Returns zero if readable and writable.
virtual bool isReadOnly() const =0
Is the folder read-only?
A FolderStorage with an index for faster access to often used message properties.
IndexStatus
This enum indicates the status of the index file.
virtual IndexStatus indexStatus()=0
Tests whether the contents of this folder is newer than the index.
virtual int createIndexFromContents()=0
Create index file from messages file and fill the message-info list mMsgList.