• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

kmail

KMail::AccountManager

KMail::AccountManager Class Reference

#include <accountmanager.h>

Inheritance diagram for KMail::AccountManager:

Inheritance graph
[legend]

List of all members.


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 34 of file accountmanager.h.


Public Slots

void addToTotalNewMailCount (const QMap< QString, int > &newInFolder)
void intCheckMail (int, bool interactive=true)
void processNextCheck (bool newMail)
void singleCheckMail (KMAccount *account, bool interactive=true)
void singleInvalidateIMAPFolders (KMAccount *account)

Signals

void accountAdded (KMAccount *account)
void accountRemoved (KMAccount *account)
void checkedMail (bool newMail, bool interactive, const QMap< QString, int > &newInFolder)

Public Member Functions

 AccountManager ()
void add (KMAccount *account)
void cancelMailCheck ()
void checkMail (bool interactive=true)
KMAccount * create (const KAccount::Type aType, const QString &name=QString(), uint id=0)
KMAccount * find (const uint id) const
KMAccount * findByName (const QString &name) const
KMAccount * first ()
const KMAccount * first () const
QStringList getAccounts () const
void invalidateIMAPFolders ()
bool isEnabled (const uint id) const
KMAccount * next ()
const KMAccount * next () const
void readConfig (void)
void readPasswords ()
bool remove (KMAccount *account)
void writeConfig (bool withSync=true)
 ~AccountManager ()

Constructor & Destructor Documentation

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 28 of file accountmanager.cpp.

AccountManager::~AccountManager (  ) 

Definition at line 37 of file accountmanager.cpp.


Member Function Documentation

void KMail::AccountManager::accountAdded ( KMAccount *  account  )  [signal]

Emitted when an account is added.

void KMail::AccountManager::accountRemoved ( KMAccount *  account  )  [signal]

Emitted when an account is removed.

void AccountManager::add ( KMAccount *  account  ) 

Adds an account to the list of accounts.

Definition at line 253 of file accountmanager.cpp.

void AccountManager::addToTotalNewMailCount ( const QMap< QString, int > &  newInFolder  )  [slot]

Increases the count of new mails to show a total number after checking in multiple accounts.

Definition at line 375 of file accountmanager.cpp.

void AccountManager::cancelMailCheck (  ) 

Called on exit (KMMainWin::queryExit).

Definition at line 406 of file accountmanager.cpp.

void KMail::AccountManager::checkedMail ( bool  newMail,
bool  interactive,
const QMap< QString, int > &  newInFolder 
) [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

void AccountManager::checkMail ( bool  interactive = true  ) 

Processes all accounts looking for new mail.

Definition at line 318 of file accountmanager.cpp.

KMAccount * AccountManager::create ( const KAccount::Type  aType,
const QString &  name = QString(),
uint  id = 0 
)

Create a new account of given type with given name.

Currently the types KAccount::Local for local mail folders and KAccount::Pop are supported.

Definition at line 220 of file accountmanager.cpp.

KMAccount * AccountManager::find ( const uint  id  )  const

Find account by id.

Returns 0 if account does not exist.

Definition at line 276 of file accountmanager.cpp.

KMAccount * AccountManager::findByName ( const QString &  name  )  const

Find account by name.

Returns 0 if account does not exist. Search is done case sensitive.

Definition at line 264 of file accountmanager.cpp.

KMAccount * AccountManager::first (  ) 

Definition at line 287 of file accountmanager.cpp.

const KMAccount* KMail::AccountManager::first (  )  const [inline]

First account of the list.

Definition at line 98 of file accountmanager.h.

QStringList AccountManager::getAccounts (  )  const

Definition at line 353 of file accountmanager.cpp.

void AccountManager::intCheckMail ( int  item,
bool  interactive = true 
) [slot]

Definition at line 363 of file accountmanager.cpp.

void AccountManager::invalidateIMAPFolders (  ) 

Delete all IMAP folders and resync them.

Definition at line 345 of file accountmanager.cpp.

bool KMail::AccountManager::isEnabled ( const uint  id  )  const [inline]

Returns:
true if account with ID id is enabled.

Accounts can be disabled by setting "enabled" flag to false in "Account #" groups of kmailrc.

Definition at line 87 of file accountmanager.h.

KMAccount * AccountManager::next (  ) 

Definition at line 298 of file accountmanager.cpp.

const KMAccount* KMail::AccountManager::next (  )  const [inline]

Next account of the list/.

Definition at line 104 of file accountmanager.h.

void AccountManager::processNextCheck ( bool  newMail  )  [slot]

Definition at line 147 of file accountmanager.cpp.

void AccountManager::readConfig ( void   ) 

Completely reload accounts from config.

Definition at line 92 of file accountmanager.cpp.

void AccountManager::readPasswords (  ) 

Read passwords of all accounts from the wallet.

Definition at line 415 of file accountmanager.cpp.

bool AccountManager::remove ( KMAccount *  account  ) 

Physically remove account.

Also deletes the given account object ! Returns false and does nothing if the account cannot be removed.

Definition at line 308 of file accountmanager.cpp.

void AccountManager::singleCheckMail ( KMAccount *  account,
bool  interactive = true 
) [slot]

Definition at line 129 of file accountmanager.cpp.

void AccountManager::singleInvalidateIMAPFolders ( KMAccount *  account  )  [slot]

Definition at line 340 of file accountmanager.cpp.

void AccountManager::writeConfig ( bool  withSync = true  ) 

Write accounts to config.

Definition at line 44 of file accountmanager.cpp.


The documentation for this class was generated from the following files:
  • accountmanager.h
  • accountmanager.cpp

kmail

Skip menu "kmail"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  •   doc
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal