kmail

kmacctimap.h
1 /*
2  * kmacctimap.h
3  *
4  * Copyright (c) 2000-2002 Michael Haeckel <haeckel@kde.org>
5  *
6  * This file is based on popaccount.h by Don Sanders
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; version 2 of the License
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  */
21 
22 #ifndef KMAcctImap_h
23 #define KMAcctImap_h
24 
25 #include "imapaccountbase.h"
26 #include <tqdict.h>
27 
28 class KMFolderImap;
29 class KMFolderTreeItem;
30 namespace KMail {
31  class ImapJob;
32  class ActionScheduler;
33 }
34 namespace TDEIO {
35  class Job;
36 }
37 class FolderStorage;
38 
39 //-----------------------------------------------------------------------------
40 class KMAcctImap: public KMail::ImapAccountBase
41 {
42  TQ_OBJECT
43 
44  friend class KMail::ImapJob;
45 
46 public:
47  virtual ~KMAcctImap();
48 
50  virtual void pseudoAssign( const KMAccount * a );
51 
55  virtual TQString type(void) const;
56  virtual void processNewMail(bool);
57  ConnectionState makeConnection();
58 
62  virtual void ignoreJobsForMessage( KMMessage * msg );
63  virtual void ignoreJobsForFolder( KMFolder * folder );
64  virtual void removeSlaveJobsForFolder( KMFolder * folder );
65 
69  virtual void killAllJobs( bool disconnectSlave=false );
70 
74  virtual void setImapFolder(KMFolderImap *);
75 
79  virtual void listDirectory();
80 
86  virtual void readConfig(TDEConfig& config);
87 
91  virtual FolderStorage* rootFolder() const;
92 
96  void execFilters(TQ_UINT32 serNum);
97 
98 public slots:
102  void slotFiltered(TQ_UINT32 serNum);
103  void slotUpdateFolderList();
104 
105 protected:
106  friend class ::AccountManager;
107  KMAcctImap(AccountManager* owner, const TQString& accountName, uint id);
112  virtual bool handleError( int error, const TQString &errorMsg, TDEIO::Job* job, const TQString& context, bool abortSync = false );
113  virtual void cancelMailCheck();
114 
115  TQPtrList<KMail::ImapJob> mJobList;
116  TQGuardedPtr<KMFolderImap> mFolder;
117 
118 protected slots:
120  void postProcessNewMail(KMFolderImap*, bool);
125  void postProcessNewMail( KMFolder * f );
126 
131  void slotMailCheckCanceled();
132 
136  void slotResetConnectionError();
137 
141  void slotFolderSelected( KMFolderImap*, bool );
142  int slotFilterMsg( KMMessage* );
143 
144 private:
145  int mCountRemainChecks;
147  TQTimer mErrorTimer;
148  TQValueList<TQ_UINT32> mFilterSerNums;
149  TQDict<int> mFilterSerNumsToSave;
150  KMail::ActionScheduler *mScheduler;
151 };
152 
153 #endif /*KMAcctImap_h*/
The FolderStorage class is the bass class for the storage related aspects of a collection of mail (a ...
Definition: folderstorage.h:80
Mail folder.
Definition: kmfolder.h:69
This is a Mime Message.
Definition: kmmessage.h:68
The account manager is responsible for creating accounts of various types via the factory method crea...
folderdiaquotatab.h
Definition: aboutdata.cpp:40