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

kmail

accountmanager.h

Go to the documentation of this file.
00001 /* -*- mode: C++ -*-
00002  * kmail: KDE mail client
00003  * Copyright (c) 1996-1998 Stefan Taferner <taferner@kde.org>
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License along
00016  * with this program; if not, write to the Free Software Foundation, Inc.,
00017  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00018  */
00019 #ifndef accountmanager_h
00020 #define accountmanager_h
00021 
00022 #include "kmail_export.h"
00023 #include "kmaccount.h"
00024 #include <QObject>
00025 
00026 class QString;
00027 class QStringList;
00028 
00029 namespace KMail {
00034 class KMAIL_EXPORT AccountManager: public QObject
00035 {
00036   Q_OBJECT
00037   friend class ::KMAccount;
00038 
00039   public:
00044     AccountManager();
00045     ~AccountManager();
00046 
00050     void readConfig( void );
00051 
00055     void writeConfig( bool withSync = true );
00056 
00062     KMAccount *create( const KAccount::Type aType,
00063                        const QString &name = QString(),
00064                        uint id = 0 );
00065 
00069     void add( KMAccount *account );
00070 
00072     bool isUnique( const QString &name ) const;
00073 
00075     QString makeUnique( const QString &aName ) const;
00076 
00081     KMAccount *findByName( const QString &name ) const;
00082 
00086     KMAccount *find( const uint id ) const;
00087 
00093     bool isEnabled( const uint id ) const { return !mDisabledAccounts.contains(id); }
00094 
00099     bool remove( KMAccount *account );
00100 
00104     QList<KMAccount*>::iterator begin();
00105 
00110     QList<KMAccount*>::iterator end();
00111 
00115     void checkMail( bool interactive = true );
00116 
00120     void invalidateIMAPFolders();
00121 
00122     QStringList getAccounts() const;
00123 
00125     void cancelMailCheck();
00126 
00130     void readPasswords();
00131 
00132   public slots:
00133     void singleCheckMail( KMAccount *account, bool interactive = true );
00134     void singleInvalidateIMAPFolders( KMAccount *account );
00135 
00136     void intCheckMail( int, bool interactive = true );
00137     void processNextCheck( bool newMail );
00138 
00143     void addToTotalNewMailCount( const QMap<QString, int> &newInFolder );
00144 
00145   signals:
00152     void checkedMail( bool newMail, bool interactive,
00153                       const QMap<QString, int> &newInFolder );
00154 
00158     void accountRemoved( KMAccount *account );
00159 
00163     void accountAdded( KMAccount *account );
00164 
00165   private:
00169     uint createId();
00170 
00171     AccountList   mAcctList;
00172     AccountList   mAcctChecking;
00173     AccountList   mAcctTodo;
00174     bool mNewMailArrived;
00175     bool mInteractive;
00176     int  mTotalNewMailsArrived;
00177 
00178     // for detailed (per folder) new mail notification
00179     QMap<QString, int> mTotalNewInFolder;
00180 
00181     // if a summary should be displayed
00182     bool mDisplaySummary;
00183 
00184     // IDs of disabled accounts, used in AccountManager::writeConfig()
00185     QSet<uint> mDisabledAccounts;
00186 };
00187 
00188 } // namespace KMail
00189 #endif /*accountmanager_h*/

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