author | jgf <jgf> | 2003-12-09 21:36:56 (UTC) |
---|---|---|
committer | jgf <jgf> | 2003-12-09 21:36:56 (UTC) |
commit | 6b45c1f8e0293914c1328f15a665d2ea0fba7b43 (patch) (side-by-side diff) | |
tree | d87ef7d3147a52429849a6921e7a8f31fde89aa8 /noncore/net/mail/accountview.cpp | |
parent | 0a1f6405780b18c9f3d953adcfd072de8fd4dc18 (diff) | |
download | opie-6b45c1f8e0293914c1328f15a665d2ea0fba7b43.zip opie-6b45c1f8e0293914c1328f15a665d2ea0fba7b43.tar.gz opie-6b45c1f8e0293914c1328f15a665d2ea0fba7b43.tar.bz2 |
POP3 support - first steps
Diffstat (limited to 'noncore/net/mail/accountview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/accountview.cpp | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/noncore/net/mail/accountview.cpp b/noncore/net/mail/accountview.cpp index df9fc11..6963027 100644 --- a/noncore/net/mail/accountview.cpp +++ b/noncore/net/mail/accountview.cpp @@ -2,2 +2,3 @@ #include "imapwrapper.h" +#include "pop3wrapper.h" #include "mailtypes.h" @@ -5,2 +6,38 @@ + +/** + * POP3 Account stuff + */ + +POP3viewItem::POP3viewItem( POP3account *a, QListView *parent ) + : AccountViewItem( parent ) +{ + account = a; + wrapper = new POP3wrapper( account ); + setPixmap( 0, PIXMAP_POP3FOLDER ); + setText( 0, account->getAccountName() ); +} + +POP3viewItem::~POP3viewItem() +{ + delete wrapper; +} + +void POP3viewItem::refresh( QList<RecMail> &target ) +{ + qDebug( "POP3: refresh" ); + wrapper->listMessages( target ); +} + + +RecBody POP3viewItem::fetchBody( const RecMail & ) +{ + qDebug( "POP3 fetchBody: IMPLEMENT ME!!" ); + return RecBody(); +} + +/** + * IMAP Account stuff + */ + IMAPviewItem::IMAPviewItem( IMAPaccount *a, QListView *parent ) @@ -71,2 +108,6 @@ RecBody IMAPfolderItem::fetchBody(const RecMail&aMail) +/** + * Generic stuff + */ + AccountView::AccountView( QWidget *parent, const char *name, WFlags flags ) @@ -88,2 +129,6 @@ void AccountView::populate( QList<Account> list ) (void) new IMAPviewItem( imap, this ); + } else if ( it->getType().compare( "POP3" ) == 0 ) { + POP3account *pop3 = static_cast<POP3account *>(it); + qDebug( "added POP3 " + pop3->getAccountName() ); + (void) new POP3viewItem( pop3, this ); } |