kmail Library API Documentation

KMFolder Class Reference

Mail folder. More...

#include <kmfolder.h>

Inheritance diagram for KMFolder:

KMAcctFolder List of all members.

Public Types

enum  CompactOptions { CompactLater, CompactNow, CompactSilentlyNow }
enum  ExpireAction { ExpireDelete, ExpireMove }

Public Slots

int updateIndex ()
void reallyAddMsg (KMMessage *aMsg)
void reallyAddCopyOfMsg (KMMessage *aMsg)

Signals

void changed ()
void cleared ()
void expunged ()
void iconsChanged ()
void nameChanged ()
void msgRemoved (KMFolder *, Q_UINT32 sernum)
void msgRemoved (int idx, QString msgIdMD5, QString strippedSubjMD5)
void msgRemoved (KMFolder *)
void msgAdded (int idx)
void msgAdded (KMFolder *, Q_UINT32 sernum)
void msgChanged (KMFolder *, Q_UINT32 sernum, int delta)
void msgHeaderChanged (KMFolder *, int)
void statusMsg (const QString &)
void numUnreadMsgsChanged (KMFolder *)
void removed (KMFolder *, bool)

Public Member Functions

 KMFolder (KMFolderDir *parent, const QString &name, KMFolderType aFolderType)
void readConfig (KConfig *config)
void writeConfig (KConfig *config) const
FolderStoragestorage ()
KMFolderType folderType () const
QString fileName () const
QString location () const
QString indexLocation () const
QString subdirLocation () const
KMFolderDirchild () const
KMFolderDircreateChildFolder ()
void setChild (KMFolderDir *aChild)
bool noContent () const
void setNoContent (bool aNoContent)
bool noChildren () const
void setNoChildren (bool aNoChildren)
KMMessage * getMsg (int idx)
KMMsgInfo * unGetMsg (int idx)
bool isMessage (int idx)
QCStringgetMsgString (int idx, QCString &mDest)
DwString getDwString (int idx)
void ignoreJobsForMessage (KMMessage *)
FolderJob * createJob (KMMessage *msg, FolderJob::JobType jt=FolderJob::tGetMessage, KMFolder *folder=0, QString partSpecifier=QString::null, const AttachmentStrategy *as=0) const
FolderJob * createJob (QPtrList< KMMessage > &msgList, const QString &sets, FolderJob::JobType jt=FolderJob::tGetMessage, KMFolder *folder=0) const
const KMMsgBase * getMsgBase (int idx) const
KMMsgBase * getMsgBase (int idx)
const KMMsgBase * operator[] (int idx) const
KMMsgBase * operator[] (int idx)
KMMessage * take (int idx)
void take (QPtrList< KMMessage > msgList)
int addMsg (KMMessage *msg, int *index_return=0)
int addMsgKeepUID (KMMessage *msg, int *index_return=0)
void emitMsgAddedSignals (int idx)
void removeMsg (int i, bool imapQuiet=FALSE)
void removeMsg (QPtrList< KMMessage > msgList, bool imapQuiet=FALSE)
int expungeOldMsg (int days)
int moveMsg (KMMessage *msg, int *index_return=0)
int moveMsg (QPtrList< KMMessage >, int *index_return=0)
int find (const KMMsgBase *msg) const
int find (const KMMessage *msg) const
int count (bool cache=false) const
int countUnread ()
int countUnreadRecursive ()
void msgStatusChanged (const KMMsgStatus oldStatus, const KMMsgStatus newStatus, int idx)
int open ()
int canAccess ()
void close (bool force=FALSE)
void sync ()
bool isOpened () const
void markNewAsUnread ()
void markUnreadAsRead ()
int create (bool imap=FALSE)
void remove ()
int expunge ()
void compact (CompactOptions options)
int rename (const QString &newName, KMFolderDir *aParent=0)
bool autoCreateIndex () const
void setAutoCreateIndex (bool)
bool dirty () const
void setDirty (bool f)
bool needsCompacting () const
void setNeedsCompacting (bool f)
void quiet (bool beQuiet)
bool isReadOnly () const
bool isSystemFolder () const
void setSystemFolder (bool itIs)
virtual QString label () const
void setLabel (const QString &l)
virtual QString systemLabel () const
void setSystemLabel (const QString &l)
virtual QString prettyURL () const
const char * type () const
bool hasAccounts () const
void setMailingListEnabled (bool enabled)
bool isMailingListEnabled () const
void setMailingList (const MailingList &mlist)
MailingList mailingList () const
QString mailingListPostAddress () const
void setIdentity (uint identity)
uint identity () const
QString whoField () const
void setWhoField (const QString &aWhoField)
QString userWhoField (void)
void setUserWhoField (const QString &whoField, bool writeConfig=true)
void correctUnreadMsgsCount ()
QString idString () const
void setAutoExpire (bool enabled)
bool isAutoExpire () const
void setUnreadExpireAge (int age)
void setUnreadExpireUnits (ExpireUnits units)
void setReadExpireAge (int age)
void setReadExpireUnits (ExpireUnits units)
int getUnreadExpireAge () const
int getReadExpireAge () const
ExpireUnits getUnreadExpireUnits () const
ExpireUnits getReadExpireUnits () const
ExpireAction expireAction () const
void setExpireAction (ExpireAction a)
QString expireToFolderId () const
void setExpireToFolderId (const QString &id)
void expireOldMessages (bool immediate)
int writeIndex (bool createEmptyIndex=false)
void fillMsgDict (KMMsgDict *dict)
int writeMsgDict (KMMsgDict *dict=0)
int touchMsgDict ()
int appendtoMsgDict (int idx=-1)
void setRDict (KMMsgDictREntry *rentry)
KMMsgDictREntry * rDict () const
void setStatus (int idx, KMMsgStatus status, bool toggle=false)
void setStatus (QValueList< int > &ids, KMMsgStatus status, bool toggle=false)
bool useCustomIcons () const
void setUseCustomIcons (bool useCustomIcons)
QString normalIconPath () const
QString unreadIconPath () const
void setIconPaths (const QString &normalPath, const QString &unreadPath)
void removeJobs ()
void daysToExpire (int &unreadDays, int &readDays)
KMFoldertrashFolder () const
bool putRepliesInSameFolder () const
void setPutRepliesInSameFolder (bool b)
bool ignoreNewMail () const
void setIgnoreNewMail (bool b)

Static Public Member Functions

size_t crlf2lf (char *str, const size_t strLen)

Detailed Description

Mail folder.

(description will be here).

Accounts: The accounts (of KMail) that are fed into the folder are represented as the children of the folder. They are only stored here during runtime to have a reference for which accounts point to a specific folder.

Definition at line 55 of file kmfolder.h.


Constructor & Destructor Documentation

KMFolder::KMFolder KMFolderDir parent,
const QString name,
KMFolderType  aFolderType
 

Usually a parent is given.

But in some cases there is no fitting parent object available. Then the name of the folder is used as the absolute path to the folder file.

Definition at line 29 of file kmfolder.cpp.

References changed(), cleared(), expunged(), KMFolder(), KMFolderDir::manager(), msgAdded(), msgChanged(), msgHeaderChanged(), msgRemoved(), nameChanged(), numUnreadMsgsChanged(), FolderStorage::readConfig(), removed(), and statusMsg().

Referenced by KMFolder().


Member Function Documentation

void KMFolder::readConfig KConfig *  config  ) 
 

This is used by the storage to read the folder specific configuration.

Definition at line 99 of file kmfolder.cpp.

References iconsChanged(), and readConfig().

Referenced by readConfig(), and FolderStorage::readConfig().

void KMFolder::writeConfig KConfig *  config  )  const
 

This is used by the storage to save the folder specific configuration.

Definition at line 132 of file kmfolder.cpp.

References writeConfig().

Referenced by writeConfig(), and FolderStorage::writeConfig().

KMFolderType KMFolder::folderType  )  const
 

Returns the type of this folder.

Definition at line 158 of file kmfolder.cpp.

References FolderStorage::folderType().

Referenced by FolderStorage::canAddMsgNow(), createChildFolder(), KMSystemTray::prettyName(), and KMail::FolderDiaGeneralTab::save().

QString KMFolder::fileName  )  const
 

Returns the filename of the folder (reimplemented in KMFolderImap).

Definition at line 163 of file kmfolder.cpp.

References FolderStorage::fileName().

Referenced by createChildFolder(), KMFolderDir::reload(), and subdirLocation().

QString KMFolder::location  )  const
 

Returns full path to folder file.

Definition at line 168 of file kmfolder.cpp.

References FolderStorage::location().

QString KMFolder::indexLocation  )  const
 

Returns full path to index file.

Definition at line 173 of file kmfolder.cpp.

References FolderStorage::indexLocation().

QString KMFolder::subdirLocation  )  const
 

Returns full path to sub directory file.

Definition at line 178 of file kmfolder.cpp.

References fileName().

Referenced by FolderStorage::rename().

KMFolderDir* KMFolder::child  )  const [inline]
 

Returns the folder directory associated with this node or 0 if no such directory exists.

Definition at line 94 of file kmfolder.h.

Referenced by countUnreadRecursive(), KMail::FolderDiaGeneralTab::save(), and FolderStorage::updateChildrenState().

KMFolderDir * KMFolder::createChildFolder  ) 
 

Create a child folder directory and associates it with this folder.

Definition at line 189 of file kmfolder.cpp.

References fileName(), folderType(), and KMFolderDir::reload().

Referenced by KMail::FolderDiaGeneralTab::save().

void KMFolder::setChild KMFolderDir aChild  ) 
 

Set the folder directory associated with this node.

Definition at line 215 of file kmfolder.cpp.

References setChild(), and FolderStorage::updateChildrenState().

Referenced by KMFolderDir::reload(), and setChild().

bool KMFolder::noContent  )  const
 

Returns, if the folder can't contain mails, but only subfolder.

Definition at line 221 of file kmfolder.cpp.

References FolderStorage::noContent().

void KMFolder::setNoContent bool  aNoContent  ) 
 

Specify, that the folder can't contain mails.

Definition at line 226 of file kmfolder.cpp.

References FolderStorage::setNoContent(), and setNoContent().

Referenced by setNoContent().

bool KMFolder::noChildren  )  const
 

Returns, if the folder can't have children.

Definition at line 231 of file kmfolder.cpp.

References FolderStorage::noChildren().

void KMFolder::setNoChildren bool  aNoChildren  ) 
 

Specify, that the folder can't have children.

Definition at line 236 of file kmfolder.cpp.

References FolderStorage::setNoChildren(), and setNoChildren().

Referenced by setNoChildren().

KMMessage * KMFolder::getMsg int  idx  ) 
 

Read message at given index.

Indexing starts at zero

Definition at line 241 of file kmfolder.cpp.

References FolderStorage::getMsg(), and getMsg().

Referenced by getMsg().

KMMsgInfo * KMFolder::unGetMsg int  idx  ) 
 

Replace KMMessage with KMMsgInfo and delete KMMessage.

Definition at line 246 of file kmfolder.cpp.

References FolderStorage::unGetMsg(), and unGetMsg().

Referenced by KMHeaders::slotFilterMsg(), and unGetMsg().

bool KMFolder::isMessage int  idx  ) 
 

Checks if the message is already "gotten" with getMsg.

Definition at line 251 of file kmfolder.cpp.

References FolderStorage::isMessage(), and isMessage().

Referenced by isMessage().

QCString & KMFolder::getMsgString int  idx,
QCString mDest
 

Read a message and return a referece to a string.

Definition at line 256 of file kmfolder.cpp.

References FolderStorage::getMsgString(), and getMsgString().

Referenced by getMsgString().

DwString KMFolder::getDwString int  idx  ) 
 

Read a message and returns a DwString.

Definition at line 261 of file kmfolder.cpp.

References FolderStorage::getDwString(), and getDwString().

Referenced by getDwString().

void KMFolder::ignoreJobsForMessage KMMessage *   ) 
 

Removes and deletes all jobs associated with the particular message.

Definition at line 266 of file kmfolder.cpp.

References FolderStorage::ignoreJobsForMessage(), and ignoreJobsForMessage().

Referenced by ignoreJobsForMessage().

FolderJob * KMFolder::createJob KMMessage *  msg,
FolderJob::JobType  jt = FolderJob::tGetMessage,
KMFolder folder = 0,
QString  partSpecifier = QString::null,
const AttachmentStrategy *  as = 0
const
 

These methods create respective FolderJob (You should derive FolderJob for each derived KMFolder).

Definition at line 271 of file kmfolder.cpp.

References FolderStorage::createJob(), and createJob().

Referenced by FolderStorage::canAddMsgNow(), and createJob().

const KMMsgBase * KMFolder::getMsgBase int  idx  )  const
 

Provides access to the basic message fields that are also stored in the index.

Whenever you only need subject, from, date, status you should use this method instead of getMsg() because getMsg() will load the message if necessary and this method does not.

Definition at line 285 of file kmfolder.cpp.

References FolderStorage::getMsgBase(), and getMsgBase().

Referenced by getMsgBase().

const KMMsgBase * KMFolder::operator[] int  idx  )  const
 

Same as getMsgBase(int).

Definition at line 295 of file kmfolder.cpp.

References operator[]().

Referenced by operator[]().

KMMsgBase * KMFolder::operator[] int  idx  ) 
 

Same as getMsgBase(int).

This time non-const.

Definition at line 300 of file kmfolder.cpp.

References operator[]().

KMMessage * KMFolder::take int  idx  ) 
 

Detach message from this folder.

Usable to call addMsg() afterwards. Loads the message if it is not loaded up to now.

Definition at line 305 of file kmfolder.cpp.

References FolderStorage::take(), and take().

Referenced by take().

int KMFolder::addMsg KMMessage *  msg,
int *  index_return = 0
 

Add the given message to the folder.

Usually the message is added at the end of the folder. Returns zero on success and an errno error code on failure. The index of the new message is stored in index_return if given. Please note that the message is added as is to the folder and the folder takes ownership of the message (deleting it in the destructor).

Definition at line 315 of file kmfolder.cpp.

References FolderStorage::addMsg(), and addMsg().

Referenced by addMsg().

int KMFolder::addMsgKeepUID KMMessage *  msg,
int *  index_return = 0
 

(Note(bo): This needs to be fixed better at a later point.) This is overridden by dIMAP because addMsg strips the X-UID header from the mail.

Definition at line 320 of file kmfolder.cpp.

References FolderStorage::addMsgKeepUID(), and addMsgKeepUID().

Referenced by addMsgKeepUID().

void KMFolder::emitMsgAddedSignals int  idx  ) 
 

Called by derived classes implementation of addMsg.

Emits msgAdded signals

Definition at line 325 of file kmfolder.cpp.

References FolderStorage::emitMsgAddedSignals(), and emitMsgAddedSignals().

Referenced by emitMsgAddedSignals().

void KMFolder::removeMsg int  i,
bool  imapQuiet = FALSE
 

Remove (first occurrence of) given message from the folder.

Definition at line 330 of file kmfolder.cpp.

References FolderStorage::removeMsg(), and removeMsg().

Referenced by removeMsg().

int KMFolder::expungeOldMsg int  days  ) 
 

Delete messages in the folder that are older than days.

Return the number of deleted messages.

Definition at line 340 of file kmfolder.cpp.

References FolderStorage::expungeOldMsg(), and expungeOldMsg().

Referenced by expungeOldMsg().

int KMFolder::moveMsg KMMessage *  msg,
int *  index_return = 0
 

Detaches the given message from it's current folder and adds it to this folder.

Returns zero on success and an errno error code on failure. The index of the new message is stored in index_return if given.

Definition at line 345 of file kmfolder.cpp.

References FolderStorage::moveMsg(), and moveMsg().

Referenced by moveMsg().

int KMFolder::find const KMMsgBase *  msg  )  const
 

Returns the index of the given message or -1 if not found.

Definition at line 355 of file kmfolder.cpp.

References FolderStorage::find(), and find().

Referenced by find().

int KMFolder::count bool  cache = false  )  const
 

Number of messages in this folder.

Definition at line 365 of file kmfolder.cpp.

References FolderStorage::count(), and count().

Referenced by count(), and countUnreadRecursive().

int KMFolder::countUnread  ) 
 

Number of new or unread messages in this folder.

Definition at line 370 of file kmfolder.cpp.

References FolderStorage::countUnread().

Referenced by countUnreadRecursive().

int KMFolder::countUnreadRecursive  ) 
 

Number of new or unread messages in this folder and all folders contained by this folder.

Definition at line 375 of file kmfolder.cpp.

References child(), count(), and countUnread().

void KMFolder::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 unread messages variable current.

Definition at line 393 of file kmfolder.cpp.

References FolderStorage::msgStatusChanged(), and msgStatusChanged().

Referenced by msgStatusChanged().

int KMFolder::open  ) 
 

Open folder for access.

Does not work if the parent is not set. Does nothing if the folder is already opened. To reopen a folder call close() first. Returns zero on success and an error code equal to the c-library fopen call otherwise (errno).

Definition at line 399 of file kmfolder.cpp.

References FolderStorage::open().

Referenced by FolderStorage::moveMsg().

int KMFolder::canAccess  ) 
 

Check folder for permissions Returns zero if readable and writable.

Definition at line 404 of file kmfolder.cpp.

References FolderStorage::canAccess().

void KMFolder::close bool  force = FALSE  ) 
 

Close folder.

If force is TRUE the files are closed even if others still use it (e.g. other mail reader windows).

Definition at line 409 of file kmfolder.cpp.

References FolderStorage::close(), and close().

Referenced by close(), FolderStorage::moveMsg(), and KMail::FolderDiaGeneralTab::save().

void KMFolder::sync  ) 
 

fsync buffers to disk

Definition at line 414 of file kmfolder.cpp.

References FolderStorage::sync().

bool KMFolder::isOpened  )  const
 

Test if folder is opened.

Definition at line 419 of file kmfolder.cpp.

References FolderStorage::isOpened().

void KMFolder::markNewAsUnread  ) 
 

Mark all new messages as unread.

Definition at line 424 of file kmfolder.cpp.

References FolderStorage::markNewAsUnread().

void KMFolder::markUnreadAsRead  ) 
 

Mark all new and unread messages as read.

Definition at line 429 of file kmfolder.cpp.

References FolderStorage::markUnreadAsRead().

int KMFolder::create bool  imap = FALSE  ) 
 

Create a new folder with the name of this object and open it.

Returns zero on success and an error code equal to the c-library fopen call otherwise.

Definition at line 434 of file kmfolder.cpp.

References FolderStorage::create(), and create().

Referenced by create(), and KMFolderDir::createFolder().

void KMFolder::remove  ) 
 

Removes the folder physically from disk and empties the contents of the folder in memory.

Note that the folder is closed during this process, whether there are others using it or not.

See also:
KMFolder::removeContents

Definition at line 439 of file kmfolder.cpp.

References FolderStorage::remove().

int KMFolder::expunge  ) 
 

Delete entire folder.

Forces a close *but* opens the folder again afterwards. Returns errno(3) error code or zero on success.

See also:
KMFolder::expungeContents

Definition at line 444 of file kmfolder.cpp.

References FolderStorage::expunge().

void KMFolder::compact CompactOptions  options  ) 
 

Compact this folder.

Options: CompactLater: schedule it as a background task CompactNow: do it now, and inform the user of the result (manual compaction) CompactSilentlyNow: do it now, and keep silent about it (e.g. for outbox)

Definition at line 712 of file kmfolder.cpp.

References FolderStorage::compact(), and compact().

Referenced by compact(), and expireOldMessages().

int KMFolder::rename const QString newName,
KMFolderDir aParent = 0
 

Physically rename the folder.

Returns zero on success and an errno on failure.

Definition at line 449 of file kmfolder.cpp.

References FolderStorage::rename(), and rename().

Referenced by rename(), and KMail::FolderDiaGeneralTab::save().

bool KMFolder::autoCreateIndex  )  const
 

Returns TRUE if a table of contents file is automatically created.

Definition at line 454 of file kmfolder.cpp.

References FolderStorage::autoCreateIndex().

void KMFolder::setAutoCreateIndex bool   ) 
 

Allow/disallow automatic creation of a table of contents file.

Default is TRUE.

Definition at line 459 of file kmfolder.cpp.

References FolderStorage::setAutoCreateIndex(), and setAutoCreateIndex().

Referenced by setAutoCreateIndex().

bool KMFolder::dirty  )  const
 

Returns TRUE if the table of contents is dirty.

This happens when a message is deleted from the folder. The toc will then be re-created when the folder is closed.

Definition at line 464 of file kmfolder.cpp.

References FolderStorage::dirty().

void KMFolder::setDirty bool  f  ) 
 

Change the dirty flag.

Definition at line 469 of file kmfolder.cpp.

References FolderStorage::setDirty(), and setDirty().

Referenced by setDirty().

bool KMFolder::needsCompacting  )  const
 

Returns TRUE if the folder contains deleted messages.

Definition at line 474 of file kmfolder.cpp.

References FolderStorage::needsCompacting().

Referenced by KMail::ScheduledCompactionTask::run().

void KMFolder::quiet bool  beQuiet  ) 
 

If set to quiet the folder will not emit msgAdded(idx) signal.

This is necessary because adding the messages to the listview one by one as they come in ( as happens on msgAdded(idx) ) is very slow for large ( >10000 ) folders. For pop, where whole bodies are downloaded this is not an issue, but for imap, where we only download headers it becomes a bottleneck. We therefore set the folder quiet() and rebuild the listview completely once the complete folder has been checked.

Definition at line 484 of file kmfolder.cpp.

References FolderStorage::quiet(), and quiet().

Referenced by quiet().

bool KMFolder::isReadOnly  )  const
 

Is the folder read-only?

Definition at line 489 of file kmfolder.cpp.

References FolderStorage::isReadOnly().

bool KMFolder::isSystemFolder  )  const [inline]
 

Returns TRUE if the folder is a kmail system folder.

These are the folders 'outbox', 'sent', 'trash'. The name of these folders is nationalized in the folder display and they cannot have accounts associated. Deletion is also forbidden. Etc.

Definition at line 308 of file kmfolder.h.

Referenced by label(), and KMail::FolderDiaGeneralTab::save().

QString KMFolder::label  )  const [virtual]
 

Returns the label of the folder for visualization.

Definition at line 494 of file kmfolder.cpp.

References isSystemFolder().

Referenced by KMFolderDir::label(), FolderStorage::label(), KMail::JobScheduler::notifyOpeningFolder(), KMSystemTray::prettyName(), prettyURL(), and KMail::JobScheduler::registerTask().

virtual QString KMFolder::systemLabel  )  const [inline, virtual]
 

Set the label that is used as a system default.

Definition at line 316 of file kmfolder.h.

QString KMFolder::prettyURL  )  const [virtual]
 

URL of the node for visualization purposes.

Definition at line 506 of file kmfolder.cpp.

References label().

const char * KMFolder::type  )  const
 

Type of the folder.

Inherited.

Definition at line 530 of file kmfolder.cpp.

References FolderStorage::type().

bool KMFolder::hasAccounts  )  const
 

Returns TRUE if accounts are associated with this folder.

Definition at line 535 of file kmfolder.cpp.

References FolderStorage::hasAccounts().

void KMFolder::setMailingListEnabled bool  enabled  ) 
 

Returns TRUE if this folder is associated with a mailing-list.

Definition at line 540 of file kmfolder.cpp.

References setMailingListEnabled(), and FolderStorage::writeConfig().

Referenced by KMail::FolderDiaMailingListTab::save(), and setMailingListEnabled().

QString KMFolder::whoField  )  const [inline]
 

Get / set the name of the field that is used for the Sender/Receiver column in the headers (From/To).

Definition at line 341 of file kmfolder.h.

QString KMFolder::userWhoField void   )  [inline]
 

Get / set the user-settings for the WhoField (From/To/Empty).

Definition at line 345 of file kmfolder.h.

void KMFolder::correctUnreadMsgsCount  ) 
 

A cludge to help make sure the count of unread messges is kept in sync.

Definition at line 603 of file kmfolder.cpp.

References FolderStorage::correctUnreadMsgsCount().

Referenced by KMFolderDir::createFolder().

QString KMFolder::idString  )  const
 

Returns a string that can be used to identify this folder.

Definition at line 608 of file kmfolder.cpp.

Referenced by KMail::FolderDiaExpiryTab::save().

void KMFolder::setAutoExpire bool  enabled  ) 
 

Set whether this folder automatically expires messages.

Definition at line 628 of file kmfolder.cpp.

References setAutoExpire(), and FolderStorage::writeConfig().

Referenced by KMail::FolderDiaExpiryTab::save(), and setAutoExpire().

bool KMFolder::isAutoExpire  )  const [inline]
 

Does this folder automatically expire old messages?

Definition at line 362 of file kmfolder.h.

void KMFolder::setUnreadExpireAge int  age  ) 
 

Set the maximum age for unread messages in this folder.

Age should not be negative. Units are set using setUnreadExpireUnits().

Definition at line 636 of file kmfolder.cpp.

References setUnreadExpireAge(), and FolderStorage::writeConfig().

Referenced by KMail::FolderDiaExpiryTab::save(), and setUnreadExpireAge().

void KMFolder::setUnreadExpireUnits ExpireUnits  units  ) 
 

Set units to use for expiry of unread messages.

Values are 1 = days, 2 = weeks, 3 = months.

Definition at line 644 of file kmfolder.cpp.

References setUnreadExpireUnits().

Referenced by KMail::FolderDiaExpiryTab::save(), and setUnreadExpireUnits().

void KMFolder::setReadExpireAge int  age  ) 
 

Set the maximum age for read messages in this folder.

Age should not be negative. Units are set using setReadExpireUnits().

Definition at line 650 of file kmfolder.cpp.

References setReadExpireAge(), and FolderStorage::writeConfig().

Referenced by KMail::FolderDiaExpiryTab::save(), and setReadExpireAge().

void KMFolder::setReadExpireUnits ExpireUnits  units  ) 
 

Set units to use for expiry of read messages.

Values are 1 = days, 2 = weeks, 3 = months.

Definition at line 658 of file kmfolder.cpp.

References setReadExpireUnits().

Referenced by KMail::FolderDiaExpiryTab::save(), and setReadExpireUnits().

int KMFolder::getUnreadExpireAge  )  const [inline]
 

Get the age at which unread messages are expired.

Units are determined by getUnreadExpireUnits().

Definition at line 394 of file kmfolder.h.

int KMFolder::getReadExpireAge  )  const [inline]
 

Get the age at which read messages are expired.

Units are determined by getReadExpireUnits().

Definition at line 400 of file kmfolder.h.

ExpireUnits KMFolder::getUnreadExpireUnits  )  const [inline]
 

Units getUnreadExpireAge() is returned in.

1 = days, 2 = weeks, 3 = months.

Definition at line 406 of file kmfolder.h.

ExpireUnits KMFolder::getReadExpireUnits  )  const [inline]
 

Units getReadExpireAge() is returned in.

1 = days, 2 = weeks, 3 = months.

Definition at line 412 of file kmfolder.h.

ExpireAction KMFolder::expireAction  )  const [inline]
 

What should expiry do? Delete or move to another folder?

Definition at line 418 of file kmfolder.h.

QString KMFolder::expireToFolderId  )  const [inline]
 

If expiry should move to folder, return the ID of that folder.

Definition at line 424 of file kmfolder.h.

void KMFolder::expireOldMessages bool  immediate  ) 
 

Expire old messages in this folder.

If immediate is true, do it immediately; otherwise schedule it for later

Definition at line 702 of file kmfolder.cpp.

References compact(), and expireOldMessages().

Referenced by expireOldMessages().

int KMFolder::writeIndex bool  createEmptyIndex = false  ) 
 

Write index to index-file.

Returns 0 on success and errno error on failure.

Definition at line 727 of file kmfolder.cpp.

References FolderStorage::writeIndex(), and writeIndex().

Referenced by writeIndex().

void KMFolder::fillMsgDict KMMsgDict *  dict  ) 
 

Inserts messages into the message dictionary.

Might be called during kernel initialization.

Definition at line 732 of file kmfolder.cpp.

References FolderStorage::fillMsgDict(), and fillMsgDict().

Referenced by fillMsgDict().

int KMFolder::writeMsgDict KMMsgDict *  dict = 0  ) 
 

Writes the message serial number file.

Definition at line 737 of file kmfolder.cpp.

References FolderStorage::writeMsgDict(), and writeMsgDict().

Referenced by writeMsgDict().

int KMFolder::touchMsgDict  ) 
 

Touches the message serial number file.

Definition at line 742 of file kmfolder.cpp.

References FolderStorage::touchMsgDict().

int KMFolder::appendtoMsgDict int  idx = -1  ) 
 

Append message to end of message serial number file.

Definition at line 747 of file kmfolder.cpp.

References FolderStorage::appendtoMsgDict(), and appendtoMsgDict().

Referenced by appendtoMsgDict().

void KMFolder::setRDict KMMsgDictREntry *  rentry  ) 
 

Sets the reverse-dictionary for this folder.

Definition at line 752 of file kmfolder.cpp.

References FolderStorage::setRDict(), and setRDict().

Referenced by setRDict().

KMMsgDictREntry * KMFolder::rDict  )  const
 

Returns the reverse-dictionary for this folder.

Definition at line 757 of file kmfolder.cpp.

References FolderStorage::rDict().

void KMFolder::setStatus int  idx,
KMMsgStatus  status,
bool  toggle = false
 

Set the status of the message at index idx to status.

Definition at line 762 of file kmfolder.cpp.

References FolderStorage::setStatus(), and setStatus().

Referenced by setStatus().

void KMFolder::setStatus QValueList< int > &  ids,
KMMsgStatus  status,
bool  toggle = false
 

Set the status of the message(s) in the QValueList ids to status.

Definition at line 767 of file kmfolder.cpp.

References FolderStorage::setStatus(), and setStatus().

bool KMFolder::useCustomIcons  )  const [inline]
 

Icon related methods.

Definition at line 463 of file kmfolder.h.

Referenced by KMail::FolderDiaGeneralTab::save().

size_t KMFolder::crlf2lf char *  str,
const size_t  strLen
[static]
 

Convert "\r\n" line endings in "\n" line endings.

The conversion happens in place. Returns the length of the resulting string.

Definition at line 787 of file kmfolder.cpp.

References crlf2lf().

Referenced by crlf2lf().

KMFolder * KMFolder::trashFolder  )  const
 

If this folder has a special trash folder set, return it.

Otherwise return 0.

Definition at line 722 of file kmfolder.cpp.

References FolderStorage::trashFolder().

bool KMFolder::putRepliesInSameFolder  )  const [inline]
 

Returns true if the replies to mails from this folder should be put in the same folder.

Definition at line 488 of file kmfolder.h.

bool KMFolder::ignoreNewMail  )  const [inline]
 

Returns true if the user doesn't want to get notified about new mail in this folder.

Definition at line 495 of file kmfolder.h.

void KMFolder::changed  )  [signal]
 

Emitted when the status, name, or associated accounts of this folder changed.

Referenced by KMFolder().

void KMFolder::cleared  )  [signal]
 

Emitted when the contents of a folder have been cleared (new search in a search folder, for example).

Referenced by KMFolder().

void KMFolder::expunged  )  [signal]
 

Emitted after an expunge.

If not quiet, changed() will be emmitted first.

Referenced by KMFolder().

void KMFolder::iconsChanged  )  [signal]
 

Emitted when the icon paths are set.

Referenced by readConfig().

void KMFolder::nameChanged  )  [signal]
 

Emitted when the name of the folder changes.

Referenced by KMFolder().

void KMFolder::msgRemoved KMFolder ,
Q_UINT32  sernum
[signal]
 

Emitted before a message is removed from the folder.

Referenced by KMFolder().

void KMFolder::msgRemoved int  idx,
QString  msgIdMD5,
QString  strippedSubjMD5
[signal]
 

Emitted after a message is removed from the folder.

void KMFolder::msgAdded int  idx  )  [signal]
 

Emitted when a message is added from the folder.

Referenced by KMFolder().

void KMFolder::msgChanged KMFolder ,
Q_UINT32  sernum,
int  delta
[signal]
 

Emitted, when the status of a message is changed.

Referenced by KMFolder().

void KMFolder::msgHeaderChanged KMFolder ,
int 
[signal]
 

Emitted when a field of the header of a specific message changed.

Referenced by KMFolder().

void KMFolder::statusMsg const QString  )  [signal]
 

Emmited to display a message somewhere in a status line.

Referenced by KMFolder().

void KMFolder::numUnreadMsgsChanged KMFolder  )  [signal]
 

Emitted when number of unread messages has changed.

Referenced by KMFolder().

void KMFolder::removed KMFolder ,
bool 
[signal]
 

Emitted when a folder was removed.

Referenced by KMFolder().

int KMFolder::updateIndex  )  [slot]
 

Incrementally update the index if possible else call writeIndex.

Definition at line 792 of file kmfolder.cpp.

References FolderStorage::updateIndex().

void KMFolder::reallyAddMsg KMMessage *  aMsg  )  [slot]
 

Add the message to the folder after it has been retrieved from an IMAP server.

Definition at line 797 of file kmfolder.cpp.

References FolderStorage::reallyAddMsg(), and reallyAddMsg().

Referenced by reallyAddMsg().

void KMFolder::reallyAddCopyOfMsg KMMessage *  aMsg  )  [slot]
 

Add a copy of the message to the folder after it has been retrieved from an IMAP server.

Definition at line 802 of file kmfolder.cpp.

References FolderStorage::reallyAddCopyOfMsg(), and reallyAddCopyOfMsg().

Referenced by reallyAddCopyOfMsg().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kmail Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Oct 1 15:19:25 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003