37#include "folderstorage.h"
41#include "kmfolderimap.h"
44#include "kmfoldermgr.h"
45#include "kmcommands.h"
48#include "kmsearchpattern.h"
49#include "globalsettings.h"
58#include <mimelib/mimepp.h>
64 : TQObject( folder, aName ), mFolder( folder ), mEmitChangedTimer( 0L )
73 mGuessedUnreadMsgs = -1;
77 mConvertToUtf8 =
false;
82 mDirtyTimer =
new TQTimer(
this,
"mDirtyTimer");
83 connect(mDirtyTimer, TQ_SIGNAL(timeout()),
86 mHasChildren = HasNoChildren;
93FolderStorage::~FolderStorage()
96 TQObject::disconnect( TQ_SIGNAL(destroyed(TQObject*)),
this, 0 );
98 KMMsgDict::deleteRentry(
mRDict);
104 if (mOpenCount <= 0)
return;
105 if (mOpenCount > 0) mOpenCount--;
106 if (mOpenCount > 0 && !aForced)
return;
109 reallyDoClose(owner);
115 if (aStr[0] !=
'.')
return aStr;
116 return aStr.left(aStr.find(TQRegExp(
"[^\\.]"))) + aStr;
121 TQObject::connect( job, TQ_SIGNAL(destroyed(TQObject*)),
122 TQ_SLOT(removeJob(TQObject*)) );
126void FolderStorage::removeJob( TQObject* job )
128 mJobList.remove(
static_cast<FolderJob*
>( job ) );
135 TQString sLocation(
const_cast<FolderStorage*
>(
this)->folder()->path());
137 if (!sLocation.isEmpty()) sLocation +=
'/';
145 return mFolder->name();
161 mDirtyTimer->changeInterval( mDirtyTimerInterval );
172 for (i=0; i<
count(); ++i)
175 if (msgBase->isNew())
177 msgBase->setStatus(KMMsgStatusUnread);
178 msgBase->setDirty(
true);
188 for (
int i=
count()-1; i>=0; --i)
192 if (msgBase->isNew() || msgBase->isUnread())
194 serNums.append( msgBase->getMsgSerNum() );
200 KMCommand *command =
new KMSeStatusCommand( KMMsgStatusRead, serNums );
213 if ( !mEmitChangedTimer) {
214 mEmitChangedTimer=
new TQTimer(
this,
"mEmitChangedTimer" );
215 connect( mEmitChangedTimer, TQ_SIGNAL( timeout() ),
223 delete mEmitChangedTimer;
224 mEmitChangedTimer=0L;
241int operator<( KMMsgBase & m1, KMMsgBase & m2 )
243 return (m1.date() < m2.date());
247int operator==( KMMsgBase & m1, KMMsgBase & m2 )
249 return (m1.date() == m2.date());
257 time_t msgTime, maxTime;
259 TQValueList<int> rmvMsgList;
261 maxTime = time(0) - days * 3600 * 24;
263 for (i=
count()-1; i>=0; i--) {
266 msgTime = mb->date();
268 if (msgTime < maxTime) {
292 if ( !mEmitChangedTimer->isActive() ) {
293 mEmitChangedTimer->start( 3000 );
303 if (aIndex_ret) *aIndex_ret = -1;
304 KMFolder *msgParent = aMsg->parent();
311 FolderJob *job = msgParent->
createJob(aMsg);
312 connect(job, TQ_SIGNAL(messageRetrieved(
KMMessage*)),
331 ulong serNum = aMsg->getMsgSerNum();
332 bool undo = aMsg->enableUndo();
334 if (index < 0)
return;
338 kmkernel->undoStack()->pushSingleAction( serNum, aFolder, folder() );
347 aMsg->setParent( 0 );
360 for( TQPtrListIterator<KMMsgBase> it( msgList ); *it; ++it )
362 int idx =
find(it.current());
371 for( TQPtrListIterator<KMMessage> it( msgList ); *it; ++it )
373 int idx =
find(it.current());
385 kdDebug(5006) <<
"FolderStorage::removeMsg() : idx < 0\n" << endl;
394 mb = takeIndexEntry( idx );
399 if (mb->isUnread() || mb->isNew() ||
400 (folder() == kmkernel->outboxFolder())) {
406 if ( !mEmitChangedTimer->isActive() ) {
408 mEmitChangedTimer->start( 3000 );
416 TQString msgIdMD5 = mb->msgIdMD5();
428 assert(idx>=0 && idx<=
count());
432 if (!mb->isMessage())
readMsg(idx);
438 if (msg->isUnread() || msg->isNew() ||
439 ( folder() == kmkernel->outboxFolder() )) {
444 if ( !mEmitChangedTimer->isActive() ) {
445 mEmitChangedTimer->start( 3000 );
455 TQString msgIdMD5 = msg->msgIdMD5();
464 for (
KMMessage* msg = msgList.first(); msg; msg = msgList.next() )
468 int idx = msg->parent()->find(msg);
479 if ( mOpenCount <= 0 ) {
480 kdWarning(5006) <<
"FolderStorage::getMsg was called on a closed folder: " << folder()->prettyURL() << endl;
483 if ( idx < 0 || idx >=
count() ) {
484 kdWarning(5006) <<
"FolderStorage::getMsg was asked for an invalid index. idx =" << idx <<
" count()=" <<
count() << endl;
490 kdWarning(5006) <<
"FolderStorage::getMsg, getMsgBase failed for index: " << idx << endl;
495 bool undo = mb->enableUndo();
496 if (mb->isMessage()) {
499 TQString mbSubject = mb->subject();
503 kdDebug(5006) <<
"Error: " <<
location() <<
504 " Index file is inconsistent with folder file. This should never happen." << endl;
517 if ( msg->getMsgSerNum() == 0 ) {
518 kdWarning(5006) <<
"FolderStorage::getMsg, message has no sernum, index: " << idx << endl;
521 msg->setEnableUndo(undo);
529 if(!(idx >= 0 && idx <=
count())) {
530 kdDebug(5006) << k_funcinfo <<
"Invalid index " << idx <<
"!" << endl;
536 kdDebug(5006) << k_funcinfo <<
"getMsgBase() for " << idx <<
" failed!" << endl;
540 unsigned long sernum = mb->getMsgSerNum();
543 bool undo = mb->enableUndo();
544 if (mb->isMessage()) {
555 if ( msgString.size() <= 0 ) {
556 kdDebug(5006) << k_funcinfo <<
" Calling getDwString() failed!" << endl;
560 msg->setEnableUndo(undo);
570 if(!(idx >= 0 && idx <=
count()))
577 if (mb->isMessage()) {
583 return setIndexEntry( idx, msg );
594 if (!(idx >= 0 && idx <=
count()))
return false;
596 return (mb && mb->isMessage());
601 KMFolder *folder, TQString partSpecifier,
602 const AttachmentStrategy *as )
const
604 FolderJob * job =
doCreateJob( msg, jt, folder, partSpecifier, as );
612 FolderJob::JobType jt,
KMFolder *folder )
const
614 FolderJob * job =
doCreateJob( msgList, sets, jt, folder );
624 KMFolder* msgParent = aMsg->parent();
627 msgParent->
open(
"moveMsgSrc");
630 int rc =
addMsg(aMsg, aIndex_ret);
631 close(
"moveMsgDest");
634 msgParent->
close(
"moveMsgSrc");
644 KMFolder* msgParent = aMsg->parent();
647 msgParent->
open(
"foldermovemsg");
649 TQValueList<int> index;
651 int rc =
addMsg(msglist, index);
654 if ( !index.isEmpty() )
655 aIndex_ret = &index.first();
658 msgParent->
close(
"foldermovemsg");
667 TQString oldLoc, oldIndexLoc, oldIdsLoc, newLoc, newIndexLoc, newIdsLoc;
668 TQString oldSubDirLoc, newSubDirLoc;
673 assert(!newName.isEmpty());
677 oldSubDirLoc = folder()->subdirLocation();
679 TQString oldConfigString =
"Folder-" + folder()->idString();
681 close(
"rename",
true);
683 oldName = folder()->fileName();
684 oldParent = folder()->parent();
686 folder()->setParent( newParent );
688 folder()->setName(newName);
691 newSubDirLoc = folder()->subdirLocation();
694 if (
::rename(TQFile::encodeName(oldLoc), TQFile::encodeName(newLoc))) {
695 folder()->setName(oldName);
696 folder()->setParent(oldParent);
701 if (!oldIndexLoc.isEmpty()) {
702 ::rename(TQFile::encodeName(oldIndexLoc), TQFile::encodeName(newIndexLoc));
703 ::rename(TQFile::encodeName(oldIndexLoc) +
".sorted",
704 TQFile::encodeName(newIndexLoc) +
".sorted");
708 if (!oldIdsLoc.isEmpty())
709 ::rename(TQFile::encodeName(oldIdsLoc), TQFile::encodeName(newIdsLoc));
714 child = folder()->child();
716 if (!
::rename(TQFile::encodeName(oldSubDirLoc), TQFile::encodeName(newSubDirLoc) )) {
720 if( child && ( oldName != newName ) ) {
721 child->setName(
"." + TQFile::encodeName(newName) +
".directory" );
728 if (oldParent->findRef( folder() ) != -1)
730 newParent->inSort( folder() );
732 if ( child->parent()->findRef( child ) != -1 )
733 child->parent()->take();
734 newParent->inSort( child );
735 child->setParent( newParent );
743 if ( oldConfigString !=
"Folder-" + folder()->idString() )
744 KMKernel::config()->deleteGroup( oldConfigString );
748 kmkernel->folderMgr()->contentsChanged();
757 assert(!folder()->name().isEmpty());
760 close(
"remove",
true);
763 KMMsgDict::mutableInstance()->removeFolderIds( *
this );
774 TDEConfig* config = KMKernel::config();
775 config->deleteGroup(
"Folder-" + folder()->idString() );
778 emit
removed(folder(), (rc ?
false :
true));
785 assert(!folder()->name().isEmpty());
788 close(
"expunge",
true );
791 KMMsgDict::mutableInstance()->removeFolderIds( *
this );
817 return folder()->label();
822 if (cache && mTotalMsgs != -1)
831 if (mGuessedUnreadMsgs > -1)
832 return mGuessedUnreadMsgs;
843 close(
"countunread");
844 return (unread > 0) ? unread : 0;
852 return doFolderSize();
865 const KMMsgStatus newStatus,
int idx)
870 if (((oldStatus & KMMsgStatusUnread || oldStatus & KMMsgStatusNew) &&
871 !(oldStatus & KMMsgStatusIgnored)) ||
872 (folder() == kmkernel->outboxFolder()))
874 if (((newStatus & KMMsgStatusUnread || newStatus & KMMsgStatusNew) &&
875 !(newStatus & KMMsgStatusIgnored)) ||
876 (folder() == kmkernel->outboxFolder()))
878 int deltaUnread = newUnread - oldUnread;
880 mDirtyTimer->changeInterval(mDirtyTimerInterval);
881 if (deltaUnread != 0) {
887 if ( !mEmitChangedTimer->isActive() ) {
888 mEmitChangedTimer->start( 3000 );
893 emit
msgChanged( folder(), serNum, deltaUnread );
901 idx = aMsg->parent()->
find( aMsg );
908 if ( !mEmitChangedTimer->isActive() ) {
909 mEmitChangedTimer->start( 3000 );
921 TDEConfig* config = KMKernel::config();
922 TDEConfigGroupSaver saver(config,
"Folder-" + folder()->idString());
924 mUnreadMsgs = config->readNumEntry(
"UnreadMsgs", -1);
925 if (mTotalMsgs == -1)
926 mTotalMsgs = config->readNumEntry(
"TotalMsgs", -1);
927 mCompactable = config->readBoolEntry(
"Compactable",
true);
929 mSize = config->readNum64Entry(
"FolderSize", -1);
931 int type = config->readNumEntry(
"ContentsType", 0 );
932 if ( type < 0 || type > KMail::ContentsTypeLast ) type = 0;
935 if( folder() ) folder()->readConfig( config );
941 TDEConfig* config = KMKernel::config();
942 TDEConfigGroupSaver saver(config,
"Folder-" + folder()->idString());
943 config->writeEntry(
"UnreadMsgs",
944 mGuessedUnreadMsgs == -1 ?
mUnreadMsgs : mGuessedUnreadMsgs);
945 config->writeEntry(
"TotalMsgs", mTotalMsgs);
948 config->writeEntry(
"FolderSize", mSize);
951 if( folder() ) folder()->writeConfig( config );
953 GlobalSettings::self()->requestSync();
959 open(
"countunreadmsg");
960 close(
"countunreadmsg");
979 if ( KMMsgDict::mutableInstance()->readFolderIds( *
this ) == -1 ) {
982 if ( !KMMsgDict::mutableInstance()->hasFolderIds( *
this ) ) {
993 KMMsgDict::mutableInstance()->writeFolderIds( *
this );
1002 return KMMsgDict::mutableInstance()->writeFolderIds( *
this );
1009 return KMMsgDict::mutableInstance()->touchFolderIds( *
this );
1017 if (
count() == 1 ) {
1018 ret = KMMsgDict::mutableInstance()->writeFolderIds( *
this );
1020 ret = KMMsgDict::mutableInstance()->appendToFolderIds( *
this, idx );
1028 KMMsgDict::mutableInstance()->replace( sernum, msg, idx );
1034 kdDebug(5006) <<
"WTF, this FolderStorage should be invisible to the msgdict, who is calling us?" << kdBacktrace() << endl;
1038 KMMsgDict::deleteRentry(
mRDict );
1048 msg->toggleStatus(status, idx);
1050 msg->setStatus(status, idx);
1058 for ( TQValueList<int>::Iterator it = ids.begin(); it != ids.end(); ++it )
1069 TQPtrListIterator<FolderJob> it(
mJobList );
1070 while ( it.current() )
1075 if ( it.current()->msgList().first() == msg )
1077 FolderJob* job = it.current();
1086void FolderStorage::removeJobs()
1098 if ( folder() && folder()->child() )
1100 if ( kmkernel->folderMgr()->folderCount( folder()->child() ) > 0 )
1110 mNoChildren = aNoChildren;
1128 mSearchPattern = pattern;
1129 mCurrentSearchedMsg = 0;
1136 if ( !mSearchPattern )
1138 TQValueList<TQ_UINT32> matchingSerNums;
1139 const int end = TQMIN( mCurrentSearchedMsg + 15,
count() );
1140 for (
int i = mCurrentSearchedMsg; i < end; ++i )
1143 if ( mSearchPattern->matches( serNum ) )
1144 matchingSerNums.append( serNum );
1146 mCurrentSearchedMsg = end;
1147 bool complete = ( end >=
count() );
1148 emit
searchResult( folder(), matchingSerNums, mSearchPattern, complete );
1156 bool matches = pattern && pattern->
matches( serNum );
1158 emit
searchDone( folder(), serNum, pattern, matches );
1166 for ( TQPtrListIterator<KMMessage> it( msgList ); *it; ++it )
1168 int aret =
addMsg( *it, &index );
1179 return ( folder()->isSystemFolder() ) ? false :
true;
1184KMAccount* FolderStorage::account()
const
1189bool FolderStorage::mailCheckInProgress()
const
1201 const bool changed = aNoContent != mNoContent;
1202 mNoContent = aNoContent;
1207#include "folderstorage.moc"
virtual bool isMessage(int idx)
Checks if the message is already "gotten" with getMsg.
virtual int countUnread()
Number of new or unread messages in this folder.
virtual void ignoreJobsForMessage(KMMessage *)
Removes and deletes all jobs associated with the particular message.
void nameChanged()
Emitted when the name of the folder changes.
virtual DwString getDwString(int idx)=0
Read a message and returns a DwString.
virtual void markNewAsUnread()
Mark all new messages as unread.
int writeFolderIdsFile() const
Writes the message serial number file.
virtual int open(const char *owner)=0
Open folder for access.
virtual TQString indexLocation() const =0
Returns full path to index file.
virtual KMMessage * take(int idx)
Detach message from this folder.
virtual int count(bool cache=false) const
Number of messages in this folder.
void invalidated(KMFolder *)
Emitted when the serial numbers of this folder were invalidated.
void emitMsgAddedSignals(int idx)
Called by derived classes implementation of addMsg.
void msgHeaderChanged(KMFolder *, int)
Emitted when a field of the header of a specific message changed.
virtual bool isMoveable() const
Returns true if this folder can be moved.
void slotEmitChangedTimer()
Emit changed signal if mQuite <=0.
virtual int updateIndex()=0
Incrementally update the index if possible else call writeIndex.
virtual int expungeOldMsg(int days)
Delete messages in the folder that are older than days.
virtual KMMessage * readTemporaryMsg(int idx)
Load message from file and do NOT store it, only return it.
virtual int rename(const TQString &newName, KMFolderDir *aParent=0)
Physically rename the folder.
virtual void setContentsType(KMail::FolderContentsType type, bool quiet=false)
Set the type of contents held in this folder (mail, calendar, etc.).
virtual void msgStatusChanged(const KMMsgStatus oldStatus, const KMMsgStatus newStatus, int idx)
Called by KMMsgBase::setStatus when status of a message has changed required to keep the number unrea...
int appendToFolderIdsFile(int idx=-1)
Append message to end of message serial number file.
void registerWithMessageDict()
Triggers registration with the message dict, which will cause the dict to ask the FolderStorage to fi...
virtual TQString fileName() const
Returns the filename of the folder (reimplemented in KMFolderImap).
void msgRemoved(KMFolder *, TQ_UINT32 sernum)
Emitted before a message is removed from the folder.
virtual int find(const KMMsgBase *msg) const =0
Returns the index of the given message or -1 if not found.
virtual void reallyAddMsg(KMMessage *aMsg)
Add the message to the folder after it has been retrieved from an IMAP server.
bool needsCompact
sven: true if on destruct folder needs to be compacted.
virtual KMMessage * readMsg(int idx)=0
Load message from file and store it at given index.
void msgChanged(KMFolder *, TQ_UINT32 sernum, int delta)
Emitted, when the status of a message is changed.
void expunged(KMFolder *)
Emitted after an expunge.
virtual FolderJob * createJob(KMMessage *msg, FolderJob::JobType jt=FolderJob::tGetMessage, KMFolder *folder=0, TQString partSpecifier=TQString(), const AttachmentStrategy *as=0) const
These methods create respective FolderJob (You should derive FolderJob for each derived KMFolder).
virtual void setHasChildren(ChildrenState state)
Specify if the folder has children.
int touchFolderIdsFile()
Touches the message serial number file.
void addJob(FolderJob *) const
Add job for this folder.
virtual void readConfig()
Read the config file.
virtual const KMMsgBase * getMsgBase(int idx) const =0
Provides access to the basic message fields that are also stored in the index.
static TQString dotEscape(const TQString &)
Escape a leading dot.
FolderStorage(KMFolder *folder, const char *name=0)
Usually a parent is given.
virtual void markUnreadAsRead()
Mark all new and unread messages as read.
void numUnreadMsgsChanged(KMFolder *)
Emitted when number of unread messages has changed.
void replaceMsgSerNum(unsigned long sernum, KMMsgBase *msg, int idx)
Replaces the serial number for the message msg at index idx with sernum.
void changed()
Emitted when the status, name, or associated accounts of this folder changed.
virtual void setStatus(int idx, KMMsgStatus status, bool toggle=false)
Set the status of the message at index idx to status.
void invalidateFolder()
Called when serial numbers for a folder are invalidated, invalidates/recreates data structures depend...
TQPtrList< FolderJob > mJobList
List of jobs created by this folder.
virtual int expunge()
Delete entire folder.
virtual FolderJob * doCreateJob(KMMessage *msg, FolderJob::JobType jt, KMFolder *folder, TQString partSpecifier, const AttachmentStrategy *as) const =0
These two methods actually create the jobs.
bool mExportsSernums
Has this storage exported its serial numbers to the global message dict for lookup?
virtual void correctUnreadMsgsCount()
A cludge to help make sure the count of unread messges is kept in sync.
virtual void reallyAddCopyOfMsg(KMMessage *aMsg)
Add a copy of the message to the folder after it has been retrieved from an IMAP server.
virtual int expungeContents()=0
Called by KMFolder::expunge() to delete the actual contents.
virtual void updateChildrenState()
Updates the hasChildren() state.
void searchDone(KMFolder *, TQ_UINT32, const KMSearchPattern *, bool)
Emitted when a search for a single message is completed The serial number and a bool matching yes/no ...
virtual void removeMsg(int i, bool imapQuiet=false)
Remove (first occurrence of) given message from the folder.
void readFolderIdsFile()
Read the on-disk cache of serial numbers of messages in this store and fill those into the global mes...
virtual bool canAddMsgNow(KMMessage *aMsg, int *aIndex_ret)
Returns false, if the message has to be retrieved from an IMAP account first.
void setDirty(bool f)
Change the dirty flag.
void headerOfMsgChanged(const KMMsgBase *, int idx)
Tell the folder that a header field that is usually used for the index (subject, from,...
KMail::FolderContentsType mContentsType
Type of contents in this folder.
virtual void search(const KMSearchPattern *)
Search for messages The end is signaled with searchDone().
virtual void remove()
Removes the folder physically from disk and empties the contents of the folder in memory.
virtual bool canDeleteMessages() const
Can messages in this folder be deleted?
void close(const char *owner, bool force=false)
Close folder.
virtual KMMsgInfo * unGetMsg(int idx)
Replace KMMessage with KMMsgInfo and delete KMMessage.
virtual int removeContents()=0
Called by KMFolder::remove() to delete the actual contents.
void noContentChanged()
Emitted when the no content state of the folder changes.
bool mDirty
if the index is dirty it will be recreated upon close()
virtual void writeConfig()
Write the config file.
void locationChanged(const TQString &, const TQString &)
Emitted when the location on disk of the folder changes.
virtual int moveMsg(KMMessage *msg, int *index_return=0)
Detaches the given message from it's current folder and adds it to this folder.
virtual int addMsg(KMMessage *msg, int *index_return=0)=0
Add the given message to the folder.
void removed(KMFolder *, bool)
Emitted when a folder was removed.
void slotProcessNextSearchBatch()
Process the next search batch.
void msgAdded(int idx)
Emitted when a message is added from the folder.
virtual void setAutoCreateIndex(bool)
Allow/disallow automatic creation of a table of contents file.
void searchResult(KMFolder *, TQValueList< TQ_UINT32 >, const KMSearchPattern *, bool complete)
Emitted when a search delivers results The matching serial numbers are included If complete is true t...
TQString label() const
Returns the label of the folder for visualization.
bool mCompactable
false if index file is out of sync with mbox file
virtual void setNoChildren(bool aNoChildren)
Specify, that the folder can't have children.
void setRDict(KMMsgDictREntry *rentry) const
Sets the reverse-dictionary for this folder.
KMMsgDictREntry * mRDict
Points at the reverse dictionary for this folder.
TQString location() const
Returns full path to folder file.
void contentsTypeChanged(KMail::FolderContentsType type)
Emitted when the contents type (calendar, mail, tasks, ..) of the folderstorage changes.
virtual void fillMessageDict()
Inserts messages into the message dictionary.
virtual bool isReadOnly() const =0
Is the folder read-only?
virtual KMMessage * getMsg(int idx)
Read message at given index.
int mUnreadMsgs
number of unread messages, -1 if not yet set
bool mAutoCreateIndex
is the automatic creation of a index file allowed ?
void closed(KMFolder *)
Emitted when the folder was closed and ticket owners have to reopen.
virtual bool isCloseToQuota() const
Return whether the folder is close to its quota limit, which can be reflected in the UI.
TQ_INT64 folderSize() const
Total size of the contents of this folder.
virtual void quiet(bool beQuiet)
If set to quiet the folder will not emit msgAdded(idx) signal.
void deregisterFromMessageDict()
Triggers deregistration from the message dict, which will cause the dict to ask the FolderStorage to ...
virtual void setNoContent(bool aNoContent)
Specify, that the folder can't contain mails.
KMail list that manages the contents of one directory that may contain folders and/or other directori...
FolderJob * createJob(KMMessage *msg, FolderJob::JobType jt=FolderJob::tGetMessage, KMFolder *folder=0, TQString partSpecifier=TQString(), const AttachmentStrategy *as=0) const
These methods create respective FolderJob (You should derive FolderJob for each derived KMFolder).
void close(const char *owner, bool force=false)
Close folder.
KMFolderType folderType() const
Returns the type of this folder.
int open(const char *owner)
Open folder for access.
int find(const KMMsgBase *msg) const
Returns the index of the given message or -1 if not found.
void setTransferInProgress(bool value, bool force=false)
Set that the message shall not be deleted because it is still required.
TQString subject() const
Get or set the 'Subject' header field.
void fromDwString(const DwString &str, bool setStatus=false)
Parse the string and create this message from it.
KMMsgBase & toMsgBase()
Get KMMsgBase for this object.
bool transferInProgress() const
Return, if the message should not be deleted.
void setMsgSerNum(unsigned long newMsgSerNum=0)
Sets the message serial number.
void setComplete(bool v)
Set if the message is a complete message.
bool isComplete() const
Return true if the complete message is available without referring to the backing store.
unsigned long getMsgSerNum(KMFolder *folder, int index) const
Find the message serial number for the message located at index index in folder folder.
static const KMMsgDict * instance()
Access the globally unique MessageDict.
This class is an abstraction of a search over messages.
bool matches(const KMMessage *msg, bool ignoreBody=false) const
The central function of this class.
Generic folder list job for (d)imap accounts.