kmail
KMAccount Class Reference
#include <kmaccount.h>

Detailed Description
Definition at line 75 of file kmaccount.h.
Public Types | |
| enum | CheckStatus { CheckOK, CheckIgnored, CheckCanceled, CheckAborted, CheckError } |
Signals | |
| void | finishedCheck (bool newMail, CheckStatus status) |
| void | newMailsProcessed (const QMap< QString, int > &newInFolder) |
Public Member Functions | |
| virtual void | cancelMailCheck () |
| void | checkDone (bool newMail, CheckStatus status) |
| bool | checkExclude (void) const |
| bool | checkingMail () |
| int | checkInterval () const |
| virtual void | clearPasswd () |
| int | defaultCheckInterval (void) const |
| void | deleteFolderJobs () |
| KMFolder * | folder (void) const |
| bool | hasInbox () const |
| uint | identityId () const |
| virtual void | ignoreJobsForMessage (KMMessage *) |
| virtual void | init () |
| virtual void | invalidateIMAPFolders () |
| virtual bool | mailCheckCanProceed () const |
| ProgressItem * | mailCheckProgressItem () const |
| virtual QString | name () const |
| const QString & | precommand (void) const |
| virtual void | processNewMail (bool interactive)=0 |
| virtual void | pseudoAssign (const KMAccount *a) |
| virtual void | readConfig (KConfigGroup &config) |
| bool | runPrecommand (const QString &precommand) |
| virtual void | setCheckExclude (bool aExclude) |
| virtual void | setCheckingMail (bool checking) |
| virtual void | setCheckInterval (int aInterval) |
| virtual void | setFolder (KMFolder *, bool addAccount=false) |
| virtual void | setHasInbox (bool has) |
| void | setIdentityId (uint identityId) |
| virtual void | setName (const QString &) |
| virtual void | setPrecommand (const QString &cmd) |
| virtual void | setTrash (const QString &aTrash) |
| void | setUseDefaultIdentity (bool useDefaultIdentity) |
| QString | trash () const |
| bool | useDefaultIdentity () const |
| virtual void | writeConfig (KConfigGroup &config) |
| virtual | ~KMAccount () |
Static Public Member Functions | |
| static QString | importPassword (const QString &) |
Static Public Attributes | |
| static const int | DefaultCheckInterval = 5 |
Protected Slots | |
| virtual void | mailCheck () |
| virtual void | precommandExited (bool) |
| virtual void | sendReceipts () |
| void | slotIdentitiesChanged () |
Protected Member Functions | |
| void | addToNewInFolder (const QString &folderId, int num) |
| virtual void | deinstallTimer () |
| virtual void | installTimer () |
| KMAccount (AccountManager *owner, const QString &accountName, uint id) | |
| virtual bool | processNewMsg (KMMessage *msg) |
| virtual void | sendReceipt (KMMessage *msg) |
Protected Attributes | |
| bool | mCheckingMail: 1 |
| bool | mExclude |
| QPointer< KMAcctFolder > | mFolder |
| bool | mHasInbox: 1 |
| uint | mIdentityId |
| int | mInterval |
| QList< FolderJob * > | mJobList |
| ProgressItem * | mMailCheckProgressItem |
| AccountManager * | mOwner |
| QString | mPrecommand |
| bool | mPrecommandSuccess |
| QList< KMMessage * > | mReceipts |
| QTimer * | mTimer |
| QString | mTrash |
| bool | mUseDefaultIdentity |
Member Enumeration Documentation
Definition at line 86 of file kmaccount.h.
Constructor & Destructor Documentation
| KMAccount::~KMAccount | ( | ) | [virtual] |
Definition at line 117 of file kmaccount.cpp.
| KMAccount::KMAccount | ( | AccountManager * | owner, | |
| const QString & | accountName, | |||
| uint | id | |||
| ) | [protected] |
Definition at line 87 of file kmaccount.cpp.
Member Function Documentation
| void KMAccount::addToNewInFolder | ( | const QString & | folderId, | |
| int | num | |||
| ) | [protected] |
Call this to increase the number of new messages in a folder for messages which are _not_ processed with processNewMsg().
- Parameters:
-
folderId the id of the folder num the number of new message in this folder
Definition at line 510 of file kmaccount.cpp.
| virtual void KMAccount::cancelMailCheck | ( | ) | [inline, virtual] |
Abort all running mail checks.
Used when closing the last KMMainWin. Ensure that mail check can be restarted later, e.g. if reopening a mainwindow from a composer window.
Reimplemented in KMail::ImapAccountBase, KMAcctCachedImap, and KMAcctImap.
Definition at line 226 of file kmaccount.h.
| void KMAccount::checkDone | ( | bool | newMail, | |
| CheckStatus | status | |||
| ) |
Call this if the newmail-check ended.
- Parameters:
-
newMail true if new mail arrived status the status of the mail check
Definition at line 484 of file kmaccount.cpp.
| bool KMAccount::checkExclude | ( | void | ) | const [inline] |
Definition at line 173 of file kmaccount.h.
| bool KMAccount::checkingMail | ( | ) | [inline] |
Set/Get if this account is currently checking mail.
Reimplemented in KMail::ImapAccountBase.
Definition at line 211 of file kmaccount.h.
| int KMAccount::checkInterval | ( | ) | const |
Definition at line 308 of file kmaccount.cpp.
| void KMAccount::clearPasswd | ( | ) | [virtual] |
Set password to "" (empty string).
Reimplemented in KMail::NetworkAccount.
Definition at line 132 of file kmaccount.cpp.
| int KMAccount::defaultCheckInterval | ( | void | ) | const [inline] |
This can be used to provide a more complex calculation later if we want.
Definition at line 157 of file kmaccount.h.
| void KMAccount::deinstallTimer | ( | ) | [protected, virtual] |
Definition at line 362 of file kmaccount.cpp.
| void KMAccount::deleteFolderJobs | ( | ) |
Deletes the set of FolderJob associated with this account.
Definition at line 316 of file kmaccount.cpp.
| void KMAccount::finishedCheck | ( | bool | newMail, | |
| CheckStatus | status | |||
| ) | [signal] |
Emitted after the mail check is finished.
- Parameters:
-
newMail true if there was new mail status the status of the mail check
| KMFolder* KMAccount::folder | ( | void | ) | const [inline] |
There can be exactly one folder that is fed by messages from an account.
Definition at line 120 of file kmaccount.h.
| bool KMAccount::hasInbox | ( | ) | const [inline] |
| uint KMAccount::identityId | ( | ) | const |
Definition at line 501 of file kmaccount.cpp.
| void KMAccount::ignoreJobsForMessage | ( | KMMessage * | msg | ) | [virtual] |
delete jobs associated with this message
Reimplemented in KMAcctImap.
Definition at line 323 of file kmaccount.cpp.
Definition at line 446 of file kmaccount.cpp.
| void KMAccount::init | ( | void | ) | [virtual] |
Set intelligent default values to the fields of the account.
Reimplemented in KMail::ImapAccountBase, KMAcctCachedImap, KMAcctLocal, KMAcctMaildir, KMail::NetworkAccount, and KMail::PopAccount.
Definition at line 109 of file kmaccount.cpp.
| void KMAccount::installTimer | ( | ) | [protected, virtual] |
| void KMAccount::invalidateIMAPFolders | ( | ) | [virtual] |
If this account is a disconnected IMAP account, invalidate it.
Reimplemented in KMAcctCachedImap.
Definition at line 464 of file kmaccount.cpp.
| void KMAccount::mailCheck | ( | ) | [protected, virtual, slot] |
Definition at line 423 of file kmaccount.cpp.
| virtual bool KMAccount::mailCheckCanProceed | ( | ) | const [inline, virtual] |
Determines whether the account can be checked, currently.
Reimplementations can use this to prevent mailchecks due to exceeded connection limits, or because a network link iis down.
- Returns:
- whether mail checks can proceed
Reimplemented in KMail::NetworkAccount.
Definition at line 206 of file kmaccount.h.
| ProgressItem* KMAccount::mailCheckProgressItem | ( | ) | const [inline] |
Call ->progress( int foo ) on this to update the account's progress indicators.
Definition at line 232 of file kmaccount.h.
| virtual QString KMAccount::name | ( | ) | const [inline, virtual] |
Account name (reimpl because of ambiguous QObject::name()).
Reimplemented from KPIM::KAccount.
Definition at line 100 of file kmaccount.h.
Emitted after the mail check is finished.
- Parameters:
-
newInFolder number of new messages for each folder
| const QString& KMAccount::precommand | ( | void | ) | const [inline] |
| void KMAccount::precommandExited | ( | bool | success | ) | [protected, virtual, slot] |
Definition at line 402 of file kmaccount.cpp.
| virtual void KMAccount::processNewMail | ( | bool | interactive | ) | [pure virtual] |
Process new mail for this account if one arrived.
Returns true if new mail has been found. Whether the mail is automatically loaded to an associated folder or not depends on the type of the account.
Implemented in KMAcctCachedImap, KMAcctImap, KMAcctLocal, KMAcctMaildir, and KMail::PopAccount.
| bool KMAccount::processNewMsg | ( | KMMessage * | msg | ) | [protected, virtual] |
Does filtering and storing in a folder for the given message.
Shall be called from within processNewMail() to process the new messages. Returns false if failed to add new message.
Definition at line 213 of file kmaccount.cpp.
| void KMAccount::pseudoAssign | ( | const KMAccount * | a | ) | [virtual] |
A weak assignment operator.
Reimplemented in KMail::ImapAccountBase, KMAcctCachedImap, KMAcctImap, KMAcctLocal, KMAcctMaildir, KMail::NetworkAccount, and KMail::PopAccount.
Definition at line 469 of file kmaccount.cpp.
| void KMAccount::readConfig | ( | KConfigGroup & | config | ) | [virtual] |
Read config file entries.
This method is called by the account manager when a new account is created.
Reimplemented in KMail::ImapAccountBase, KMAcctCachedImap, KMAcctImap, KMAcctLocal, KMAcctMaildir, KMail::NetworkAccount, and KMail::PopAccount.
Definition at line 151 of file kmaccount.cpp.
| bool KMAccount::runPrecommand | ( | const QString & | precommand | ) |
Runs the precommand.
If the precommand is empty, the method will just return success and not actually do anything
- Returns:
- True if successful, false otherwise
Definition at line 369 of file kmaccount.cpp.
| void KMAccount::sendReceipt | ( | KMMessage * | msg | ) | [protected, virtual] |
Send receipt of message back to sender (confirming delivery).
Checks the config settings, calls
- See also:
- KMMessage::createDeliveryReceipt and queues the resulting message in
mReceipts.
Definition at line 195 of file kmaccount.cpp.
| void KMAccount::sendReceipts | ( | ) | [protected, virtual, slot] |
Definition at line 437 of file kmaccount.cpp.
| void KMAccount::setCheckExclude | ( | bool | aExclude | ) | [virtual] |
Set/get whether account should be part of the accounts checked with "Check Mail".
Definition at line 338 of file kmaccount.cpp.
| virtual void KMAccount::setCheckingMail | ( | bool | checking | ) | [inline, virtual] |
| void KMAccount::setCheckInterval | ( | int | aInterval | ) | [virtual] |
Set/get interval for checking if new mail arrived (in minutes).
An interval of zero (or less) disables the automatic checking.
Definition at line 299 of file kmaccount.cpp.
| void KMAccount::setFolder | ( | KMFolder * | aFolder, | |
| bool | addAccount = false | |||
| ) | [virtual] |
| virtual void KMAccount::setHasInbox | ( | bool | has | ) | [inline, virtual] |
Definition at line 193 of file kmaccount.h.
| void KMAccount::setIdentityId | ( | uint | identityId | ) | [inline] |
Set/get identity for checking account.
If useDefaultIdentity() is true, the getter will always return the default identity of the identity manager.
Definition at line 241 of file kmaccount.h.
| void KMAccount::setName | ( | const QString & | aName | ) | [virtual] |
Reimplemented, set account name.
Reimplemented from KPIM::KAccount.
Definition at line 125 of file kmaccount.cpp.
| virtual void KMAccount::setPrecommand | ( | const QString & | cmd | ) | [inline, virtual] |
Definition at line 179 of file kmaccount.h.
| virtual void KMAccount::setTrash | ( | const QString & | aTrash | ) | [inline, virtual] |
Definition at line 127 of file kmaccount.h.
| void KMAccount::setUseDefaultIdentity | ( | bool | useDefaultIdentity | ) | [inline] |
Set/get whether to use the default identity instead of the identity specified with setIdentityId().
Definition at line 248 of file kmaccount.h.
| void KMAccount::slotIdentitiesChanged | ( | ) | [protected, slot] |
Definition at line 414 of file kmaccount.cpp.
| QString KMAccount::trash | ( | ) | const [inline] |
| bool KMAccount::useDefaultIdentity | ( | ) | const [inline] |
Definition at line 250 of file kmaccount.h.
| void KMAccount::writeConfig | ( | KConfigGroup & | config | ) | [virtual] |
Write all account information to given config file.
Reimplemented in KMail::ImapAccountBase, KMAcctCachedImap, KMAcctLocal, KMAcctMaildir, KMail::NetworkAccount, and KMail::PopAccount.
Definition at line 178 of file kmaccount.cpp.
Member Data Documentation
const int KMAccount::DefaultCheckInterval = 5 [static] |
bool KMAccount::mCheckingMail [protected] |
Definition at line 316 of file kmaccount.h.
bool KMAccount::mExclude [protected] |
Definition at line 315 of file kmaccount.h.
QPointer<KMAcctFolder> KMAccount::mFolder [protected] |
bool KMAccount::mHasInbox [protected] |
Definition at line 321 of file kmaccount.h.
uint KMAccount::mIdentityId [protected] |
Definition at line 323 of file kmaccount.h.
int KMAccount::mInterval [protected] |
Definition at line 310 of file kmaccount.h.
QList<FolderJob*> KMAccount::mJobList [protected] |
Definition at line 320 of file kmaccount.h.
ProgressItem* KMAccount::mMailCheckProgressItem [protected] |
Definition at line 322 of file kmaccount.h.
AccountManager* KMAccount::mOwner [protected] |
Definition at line 307 of file kmaccount.h.
QString KMAccount::mPrecommand [protected] |
Definition at line 305 of file kmaccount.h.
bool KMAccount::mPrecommandSuccess [protected] |
Definition at line 317 of file kmaccount.h.
QList<KMMessage*> KMAccount::mReceipts [protected] |
Definition at line 319 of file kmaccount.h.
QTimer* KMAccount::mTimer [protected] |
Definition at line 309 of file kmaccount.h.
QString KMAccount::mTrash [protected] |
Definition at line 306 of file kmaccount.h.
bool KMAccount::mUseDefaultIdentity [protected] |
Definition at line 318 of file kmaccount.h.
The documentation for this class was generated from the following files:
KDE 4.1 API Reference