summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/nntpwrapper.cpp15
-rw-r--r--noncore/net/mail/libmailwrapper/nntpwrapper.h2
-rw-r--r--noncore/net/mail/libmailwrapper/settings.cpp1
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
@@ -93,20 +93,20 @@ RecBody NNTPwrapper::fetchBody( const RecMail &mail ) {
free(message);
return body;
}
-void NNTPwrapper::listMessages(const QString &, QList<RecMail> &target )
+void NNTPwrapper::listMessages(const QString & which, QList<RecMail> &target )
{
login();
if (!m_nntp)
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);
}
void NNTPwrapper::login()
{
if (account->getOffline())
return;
@@ -189,14 +189,19 @@ void NNTPwrapper::logout()
}
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;
}
clist * NNTPwrapper::listAllNewsgroups() {
login();
clist *result = 0;
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
@@ -22,13 +22,13 @@ public:
/* mailbox will be ignored */
virtual void listMessages(const QString & mailbox, QList<RecMail> &target );
/* should only get the subscribed one */
virtual QList<Folder>* listFolders();
/* 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);
virtual int deleteAllMail(const Folder*);
virtual RecBody fetchBody( const RecMail &mail );
virtual encodedString* fetchRawBody(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
@@ -435,7 +435,6 @@ void NNTPaccount::save()
QString NNTPaccount::getFileName()
{
return (QString) getenv( "HOME" ) + "/Applications/opiemail/nntp-" + file;
}
-