#include <accountmanager.h>
Inherits TQObject.
Public Slots | |
void | singleCheckMail (KMAccount *, bool interactive=true) |
void | singleInvalidateIMAPFolders (KMAccount *) |
void | intCheckMail (int, bool interactive=true) |
void | processNextCheck (bool newMail) |
void | addToTotalNewMailCount (const TQMap< TQString, int > &newInFolder) |
Signals | |
void | checkedMail (bool newMail, bool interactive, const TQMap< TQString, int > &newInFolder) |
void | accountRemoved (KMAccount *account) |
void | accountAdded (KMAccount *account) |
Public Member Functions | |
AccountManager () | |
void | readConfig (void) |
void | writeConfig (bool withSync=true) |
KMAccount * | create (const TQString &type, const TQString &name=TQString(), uint id=0) |
void | add (KMAccount *account) |
KMAccount * | findByName (const TQString &name) const |
KMAccount * | find (const uint id) const |
bool | remove (KMAccount *) |
const KMAccount * | first () const |
KMAccount * | first () |
const KMAccount * | next () const |
KMAccount * | next () |
void | checkMail (bool interactive=true) |
void | invalidateIMAPFolders () |
TQStringList | getAccounts () const |
void | cancelMailCheck () |
void | readPasswords () |
Friends | |
class | ::KMAccount |
Detailed Description
The account manager is responsible for creating accounts of various types via the factory method create() and for keeping track of them.
Definition at line 35 of file accountmanager.h.
Constructor & Destructor Documentation
◆ AccountManager()
AccountManager::AccountManager | ( | ) |
Initializes the account manager.
readConfig() needs to be called in order to fill it with persisted account information from the config file.
Definition at line 34 of file accountmanager.cpp.
Member Function Documentation
◆ accountAdded
|
signal |
emitted when an account is added
◆ accountRemoved
|
signal |
emitted when an account is removed
◆ add()
void AccountManager::add | ( | KMAccount * | account | ) |
Adds an account to the list of accounts.
Definition at line 268 of file accountmanager.cpp.
◆ addToTotalNewMailCount
|
slot |
this slot increases the count of new mails to show a total number after checking in multiple accounts.
Definition at line 395 of file accountmanager.cpp.
◆ cancelMailCheck()
void AccountManager::cancelMailCheck | ( | ) |
Called on exit (KMMainWin::queryExit)
Definition at line 426 of file accountmanager.cpp.
◆ checkedMail
|
signal |
Emitted if new mail has been collected.
- Parameters
-
newMail true if there was new mail interactive true if the mail check was initiated by the user newInFolder number of new messages for each folder
◆ checkMail()
void AccountManager::checkMail | ( | bool | interactive = true | ) |
Processes all accounts looking for new mail.
Definition at line 338 of file accountmanager.cpp.
◆ create()
KMAccount * AccountManager::create | ( | const TQString & | type, |
const TQString & | name = TQString() , |
||
uint | id = 0 |
||
) |
Create a new account of given type with given name.
Currently the types "local" for local mail folders and "pop" are supported.
Definition at line 237 of file accountmanager.cpp.
◆ find()
KMAccount * AccountManager::find | ( | const uint | id | ) | const |
Find account by id.
Returns 0 if account does not exist.
Definition at line 296 of file accountmanager.cpp.
◆ findByName()
KMAccount * AccountManager::findByName | ( | const TQString & | name | ) | const |
Find account by name.
Returns 0 if account does not exist. Search is done case sensitive.
Definition at line 284 of file accountmanager.cpp.
◆ first()
|
inline |
First account of the list.
Definition at line 75 of file accountmanager.h.
◆ invalidateIMAPFolders()
void AccountManager::invalidateIMAPFolders | ( | ) |
Delete all IMAP folders and resync them.
Definition at line 365 of file accountmanager.cpp.
◆ next()
|
inline |
Next account of the list.
Definition at line 79 of file accountmanager.h.
◆ readConfig()
void AccountManager::readConfig | ( | void | ) |
Completely reload accounts from config.
Definition at line 77 of file accountmanager.cpp.
◆ readPasswords()
void AccountManager::readPasswords | ( | ) |
Read passwords of all accounts from the wallet.
Definition at line 435 of file accountmanager.cpp.
◆ remove()
bool AccountManager::remove | ( | KMAccount * | acct | ) |
Physically remove account.
Also deletes the given account object ! Returns FALSE and does nothing if the account cannot be removed.
Definition at line 328 of file accountmanager.cpp.
◆ writeConfig()
void AccountManager::writeConfig | ( | bool | withSync = true | ) |
Write accounts to config.
Definition at line 50 of file accountmanager.cpp.
The documentation for this class was generated from the following files: