summaryrefslogtreecommitdiff
path: root/noncore/net/mail/accountview.h
Unidiff
Diffstat (limited to 'noncore/net/mail/accountview.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/accountview.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/noncore/net/mail/accountview.h b/noncore/net/mail/accountview.h
index 1d2bf19..7131192 100644
--- a/noncore/net/mail/accountview.h
+++ b/noncore/net/mail/accountview.h
@@ -10,119 +10,123 @@
10 10
11class POP3wrapper; 11class POP3wrapper;
12class RecMail; 12class RecMail;
13class RecBody; 13class RecBody;
14class QPopupMenu; 14class QPopupMenu;
15 15
16class AccountViewItem : public QListViewItem 16class AccountViewItem : public QListViewItem
17{ 17{
18 18
19public: 19public:
20 AccountViewItem( QListView *parent ) : QListViewItem( parent ) {} 20 AccountViewItem( QListView *parent ) : QListViewItem( parent ) {}
21 AccountViewItem( QListViewItem *parent) : QListViewItem( parent) {} 21 AccountViewItem( QListViewItem *parent) : QListViewItem( parent) {}
22 AccountViewItem( QListViewItem *parent , QListViewItem*after ) : QListViewItem( parent,after ) {} 22 AccountViewItem( QListViewItem *parent , QListViewItem*after ) : QListViewItem( parent,after ) {}
23 virtual void refresh(QList<RecMail>&)=0; 23 virtual void refresh(QList<RecMail>&)=0;
24 virtual RecBody fetchBody(const RecMail&)=0; 24 virtual RecBody fetchBody(const RecMail&)=0;
25 virtual QPopupMenu * getContextMenu(){return 0;}; 25 virtual QPopupMenu * getContextMenu(){return 0;};
26 virtual void contextMenuSelected(int){} 26 virtual void contextMenuSelected(int){}
27protected: 27protected:
28 virtual void deleteAllMail(AbstractMail*wrapper,Folder*f); 28 virtual void deleteAllMail(AbstractMail*wrapper,Folder*f);
29 static const QString contextName; 29 static const QString contextName;
30}; 30};
31 31
32class POP3viewItem : public AccountViewItem 32class POP3viewItem : public AccountViewItem
33{ 33{
34 34
35public: 35public:
36 POP3viewItem( POP3account *a, QListView *parent ); 36 POP3viewItem( POP3account *a, QListView *parent );
37 ~POP3viewItem(); 37 ~POP3viewItem();
38 virtual void refresh( QList<RecMail> &target ); 38 virtual void refresh( QList<RecMail> &target );
39 virtual RecBody fetchBody( const RecMail &mail ); 39 virtual RecBody fetchBody( const RecMail &mail );
40 AbstractMail *getWrapper(); 40 AbstractMail *getWrapper();
41private: 41private:
42 POP3account *account; 42 POP3account *account;
43 AbstractMail *wrapper; 43 AbstractMail *wrapper;
44 44
45}; 45};
46 46
47class POP3folderItem : public AccountViewItem 47class POP3folderItem : public AccountViewItem
48{ 48{
49 49
50public: 50public:
51 POP3folderItem( Folder *folder, POP3viewItem *parent , QListViewItem*after ); 51 POP3folderItem( Folder *folder, POP3viewItem *parent , QListViewItem*after );
52 ~POP3folderItem(); 52 ~POP3folderItem();
53 virtual void refresh(QList<RecMail>&); 53 virtual void refresh(QList<RecMail>&);
54 virtual RecBody fetchBody(const RecMail&); 54 virtual RecBody fetchBody(const RecMail&);
55 virtual QPopupMenu * getContextMenu(); 55 virtual QPopupMenu * getContextMenu();
56 virtual void contextMenuSelected(int); 56 virtual void contextMenuSelected(int);
57 57
58protected:
59 void downloadMails();
60
58private: 61private:
59 Folder *folder; 62 Folder *folder;
60 POP3viewItem *pop3; 63 POP3viewItem *pop3;
61}; 64};
62 65
63class IMAPfolderItem; 66class IMAPfolderItem;
64 67
65class IMAPviewItem : public AccountViewItem 68class IMAPviewItem : public AccountViewItem
66{ 69{
67 friend class IMAPfolderItem; 70 friend class IMAPfolderItem;
68public: 71public:
69 IMAPviewItem( IMAPaccount *a, QListView *parent ); 72 IMAPviewItem( IMAPaccount *a, QListView *parent );
70 ~IMAPviewItem(); 73 ~IMAPviewItem();
71 virtual void refresh(QList<RecMail>&); 74 virtual void refresh(QList<RecMail>&);
72 virtual RecBody fetchBody(const RecMail&); 75 virtual RecBody fetchBody(const RecMail&);
73 AbstractMail *getWrapper(); 76 AbstractMail *getWrapper();
74 virtual QPopupMenu * getContextMenu(); 77 virtual QPopupMenu * getContextMenu();
75 virtual void contextMenuSelected(int); 78 virtual void contextMenuSelected(int);
76 79
77protected: 80protected:
78 IMAPfolderItem*findSubItem(const QString&path,IMAPfolderItem*start=0); 81 IMAPfolderItem*findSubItem(const QString&path,IMAPfolderItem*start=0);
79 virtual void refreshFolders(bool force=false); 82 virtual void refreshFolders(bool force=false);
80 virtual void createNewFolder(); 83 virtual void createNewFolder();
84 virtual void removeChilds();
81 85
82private: 86private:
83 IMAPaccount *account; 87 IMAPaccount *account;
84 AbstractMail *wrapper; 88 AbstractMail *wrapper;
85}; 89};
86 90
87class IMAPfolderItem : public AccountViewItem 91class IMAPfolderItem : public AccountViewItem
88{ 92{
89 93
90public: 94public:
91 IMAPfolderItem( Folder *folder, IMAPviewItem *parent , QListViewItem*after ); 95 IMAPfolderItem( Folder *folder, IMAPviewItem *parent , QListViewItem*after );
92 IMAPfolderItem( Folder *folder, IMAPfolderItem *parent , QListViewItem*after, IMAPviewItem *master ); 96 IMAPfolderItem( Folder *folder, IMAPfolderItem *parent , QListViewItem*after, IMAPviewItem *master );
93 ~IMAPfolderItem(); 97 ~IMAPfolderItem();
94 virtual void refresh(QList<RecMail>&); 98 virtual void refresh(QList<RecMail>&);
95 virtual RecBody fetchBody(const RecMail&); 99 virtual RecBody fetchBody(const RecMail&);
96 bool matchName(const QString&name)const; 100 bool matchName(const QString&name)const;
97 virtual QPopupMenu * getContextMenu(); 101 virtual QPopupMenu * getContextMenu();
98 virtual void contextMenuSelected(int); 102 virtual void contextMenuSelected(int);
99 virtual const QString& Delemiter()const; 103 virtual const QString& Delemiter()const;
100protected: 104protected:
101 virtual void createNewFolder(); 105 virtual void createNewFolder();
102 virtual void deleteFolder(); 106 virtual void deleteFolder();
103 107
104private: 108private:
105 Folder *folder; 109 Folder *folder;
106 IMAPviewItem *imap; 110 IMAPviewItem *imap;
107}; 111};
108 112
109class MBOXviewItem : public AccountViewItem 113class MBOXviewItem : public AccountViewItem
110{ 114{
111 friend class MBOXfolderItem; 115 friend class MBOXfolderItem;
112 116
113public: 117public:
114// MBOXviewItem( MBOXaccount *a, QListView *parent ); 118// MBOXviewItem( MBOXaccount *a, QListView *parent );
115 MBOXviewItem( const QString&aMboxPath, QListView *parent ); 119 MBOXviewItem( const QString&aMboxPath, QListView *parent );
116 ~MBOXviewItem(); 120 ~MBOXviewItem();
117 virtual void refresh( QList<RecMail> &target ); 121 virtual void refresh( QList<RecMail> &target );
118 virtual RecBody fetchBody( const RecMail &mail ); 122 virtual RecBody fetchBody( const RecMail &mail );
119 AbstractMail *getWrapper(); 123 AbstractMail *getWrapper();
120 virtual QPopupMenu * getContextMenu(); 124 virtual QPopupMenu * getContextMenu();
121 virtual void contextMenuSelected(int); 125 virtual void contextMenuSelected(int);
122 126
123protected: 127protected:
124 virtual void refresh(bool force=false); 128 virtual void refresh(bool force=false);
125 virtual void createFolder(); 129 virtual void createFolder();
126 130
127private: 131private:
128// MBOXaccount *account; 132// MBOXaccount *account;