summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/nntpwrapper.cpp40
1 files changed, 27 insertions, 13 deletions
diff --git a/noncore/net/mail/libmailwrapper/nntpwrapper.cpp b/noncore/net/mail/libmailwrapper/nntpwrapper.cpp
index e73a890..c68964d 100644
--- a/noncore/net/mail/libmailwrapper/nntpwrapper.cpp
+++ b/noncore/net/mail/libmailwrapper/nntpwrapper.cpp
@@ -158,8 +158,8 @@ void NNTPwrapper::login()
158 158
159 nntp_mailstorage_init(m_nntp,(char*)server, port, NULL, conntype, NNTP_AUTH_TYPE_PLAIN, 159 nntp_mailstorage_init(m_nntp,(char*)server, port, NULL, conntype, NNTP_AUTH_TYPE_PLAIN,
160 (char*)user,(char*)pass,0,0,0); 160 (char*)user,(char*)pass,0,0,0);
161 161
162 err = mailstorage_connect(m_nntp); 162 err = mailstorage_connect( m_nntp );
163 163
164 if (err != NEWSNNTP_NO_ERROR) { 164 if (err != NEWSNNTP_NO_ERROR) {
165 qDebug( QString( "FEHLERNUMMER %1" ).arg( err ) ); 165 qDebug( QString( "FEHLERNUMMER %1" ).arg( err ) );
@@ -168,3 +168,5 @@ void NNTPwrapper::login()
168 m_nntp = 0; 168 m_nntp = 0;
169
169 } 170 }
171
170} 172}
@@ -177,3 +179,3 @@ void NNTPwrapper::logout()
177 mailstorage_free(m_nntp); 179 mailstorage_free(m_nntp);
178 m_nntp = 0; 180 m_nntp = 0;
179} 181}
@@ -181,15 +183,27 @@ void NNTPwrapper::logout()
181QList<Folder>* NNTPwrapper::listFolders() { 183QList<Folder>* NNTPwrapper::listFolders() {
182 QList<Folder> * folders = new QList<Folder>();
183 folders->setAutoDelete( false );
184 clist *result = 0;
185 184
186 // int err =
187// if ( err == _NO_ERROR ) {
188// current = result->first;
189// for ( current=clist_begin(result);current!=NULL;current=clist_next(current)) {
190 185
191 186
192// Folder*inb=new Folder("INBOX","/");
193
194 187
188 QList<Folder> * folders = new QList<Folder>();
189 folders->setAutoDelete( false );
190 clist *result = 0;
191 clistcell *current;
192 newsnntp_group_description *list;
193
194 login();
195 if ( m_nntp ) {
196 mailsession * session = m_nntp->sto_session;
197 newsnntp * news = ( ( nntp_session_state_data * )session->sess_data )->nntp_session;
198 int err = newsnntp_list_newsgroups(news, NULL, &result);
199
200 if ( err == NEWSNNTP_NO_ERROR ) {
201 current = result->first;
202 for ( current=clist_begin(result);current!=NULL;current=clist_next(current)) {
203 list = ( newsnntp_group_description* ) current->data;
204 qDebug( list->grp_name );
205 }
206// Folder*inb=new Folder("INBOX","/");
207 }
208 }
195// folders->append(inb); 209// folders->append(inb);