author | alwin <alwin> | 2004-03-06 01:53:46 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-06 01:53:46 (UTC) |
commit | dcddc2bbe09153468a5d994c64011a5dc175baad (patch) (side-by-side diff) | |
tree | 416af037e0147f214fc478a133f78e85343e541d | |
parent | 4aea85aa2e205040da3ebdf50debde8b296e3c61 (diff) | |
download | opie-dcddc2bbe09153468a5d994c64011a5dc175baad.zip opie-dcddc2bbe09153468a5d994c64011a5dc175baad.tar.gz opie-dcddc2bbe09153468a5d994c64011a5dc175baad.tar.bz2 |
- subscribed NG will displayed in main windows
- we get the list of articles inside a newsgroup
- we can read an article
ToDo:
- filter article for that are read.
-rw-r--r-- | noncore/net/mail/libmailwrapper/nntpwrapper.cpp | 15 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/nntpwrapper.h | 2 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/settings.cpp | 1 |
3 files changed, 11 insertions, 7 deletions
diff --git a/noncore/net/mail/libmailwrapper/nntpwrapper.cpp b/noncore/net/mail/libmailwrapper/nntpwrapper.cpp index ecdf848..798879d 100644 --- a/noncore/net/mail/libmailwrapper/nntpwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/nntpwrapper.cpp @@ -97,5 +97,5 @@ RecBody NNTPwrapper::fetchBody( const RecMail &mail ) { -void NNTPwrapper::listMessages(const QString &, QList<RecMail> &target ) +void NNTPwrapper::listMessages(const QString & which, QList<RecMail> &target ) { login(); @@ -103,6 +103,6 @@ void NNTPwrapper::listMessages(const QString &, QList<RecMail> &target ) return; uint32_t res_messages,res_recent,res_unseen; - mailsession_status_folder(m_nntp->sto_session,"INBOX",&res_messages,&res_recent,&res_unseen); - parseList(target,m_nntp->sto_session,"INBOX"); + mailsession_status_folder(m_nntp->sto_session,(char*)which.latin1(),&res_messages,&res_recent,&res_unseen); + parseList(target,m_nntp->sto_session,which); } @@ -193,6 +193,11 @@ QList<Folder>* NNTPwrapper::listFolders() { QList<Folder> * folders = new QList<Folder>(); folders->setAutoDelete( false ); - -// folders->append(inb); + QStringList groups; + if (account) { + groups = account->getGroups(); + } + for ( QStringList::Iterator it = groups.begin(); it != groups.end(); ++it ) { + folders->append(new Folder((*it),".")); + } return folders; } diff --git a/noncore/net/mail/libmailwrapper/nntpwrapper.h b/noncore/net/mail/libmailwrapper/nntpwrapper.h index e4d4a37..e8e2cf4 100644 --- a/noncore/net/mail/libmailwrapper/nntpwrapper.h +++ b/noncore/net/mail/libmailwrapper/nntpwrapper.h @@ -26,5 +26,5 @@ public: /* mailbox will be ignored */ virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); - clist * listAllNewsgroups(); + clist * listAllNewsgroups(); virtual void deleteMail(const RecMail&mail); virtual void answeredMail(const RecMail&mail); diff --git a/noncore/net/mail/libmailwrapper/settings.cpp b/noncore/net/mail/libmailwrapper/settings.cpp index f64c17d..0d34fd5 100644 --- a/noncore/net/mail/libmailwrapper/settings.cpp +++ b/noncore/net/mail/libmailwrapper/settings.cpp @@ -439,3 +439,2 @@ QString NNTPaccount::getFileName() return (QString) getenv( "HOME" ) + "/Applications/opiemail/nntp-" + file; } - |