summaryrefslogtreecommitdiff
path: root/noncore/net/mail/libmailwrapper
authoralwin <alwin>2004-03-06 03:17:38 (UTC)
committer alwin <alwin>2004-03-06 03:17:38 (UTC)
commit5b49d47174925c1e2415641b77269b753688f5f1 (patch) (unidiff)
tree136274f2c46ef95ea16fc1241acb5ee93931767a /noncore/net/mail/libmailwrapper
parentdcddc2bbe09153468a5d994c64011a5dc175baad (diff)
downloadopie-5b49d47174925c1e2415641b77269b753688f5f1.zip
opie-5b49d47174925c1e2415641b77269b753688f5f1.tar.gz
opie-5b49d47174925c1e2415641b77269b753688f5f1.tar.bz2
removed dependies to libetpan from the frontend and some stuff more
Diffstat (limited to 'noncore/net/mail/libmailwrapper') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/nntpwrapper.cpp21
-rw-r--r--noncore/net/mail/libmailwrapper/nntpwrapper.h2
2 files changed, 16 insertions, 7 deletions
diff --git a/noncore/net/mail/libmailwrapper/nntpwrapper.cpp b/noncore/net/mail/libmailwrapper/nntpwrapper.cpp
index 798879d..a766a59 100644
--- a/noncore/net/mail/libmailwrapper/nntpwrapper.cpp
+++ b/noncore/net/mail/libmailwrapper/nntpwrapper.cpp
@@ -204,7 +204,9 @@ QList<Folder>* NNTPwrapper::listFolders() {
204 204
205 clist * NNTPwrapper::listAllNewsgroups() { 205QStringList NNTPwrapper::listAllNewsgroups() {
206 login(); 206 login();
207 QStringList res;
207 clist *result = 0; 208 clist *result = 0;
208 clistcell *current; 209 clistcell *current = 0;
209 newsnntp_group_description *list; 210 newsnntp_group_description *group;
211
210 if ( m_nntp ) { 212 if ( m_nntp ) {
@@ -213,7 +215,14 @@ QList<Folder>* NNTPwrapper::listFolders() {
213 int err = newsnntp_list_newsgroups(news, NULL, &result); 215 int err = newsnntp_list_newsgroups(news, NULL, &result);
214 216 if ( err == NEWSNNTP_NO_ERROR && result) {
215 if ( err == NEWSNNTP_NO_ERROR ) { 217 for ( current=clist_begin(result);current!=NULL;current=clist_next(current) ) {
216 return result; 218 group = ( newsnntp_group_description* ) current->data;
219 if (!group||!group->grp_name||strlen(group->grp_name)==0) continue;
220 res.append(group->grp_name);
221 }
217 } 222 }
218 } 223 }
224 if (result) {
225 clist_free(result);
226 }
227 return res;
219} 228}
diff --git a/noncore/net/mail/libmailwrapper/nntpwrapper.h b/noncore/net/mail/libmailwrapper/nntpwrapper.h
index e8e2cf4..4d03754 100644
--- a/noncore/net/mail/libmailwrapper/nntpwrapper.h
+++ b/noncore/net/mail/libmailwrapper/nntpwrapper.h
@@ -27,3 +27,3 @@ public:
27 virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); 27 virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX");
28 clist * listAllNewsgroups(); 28 QStringList listAllNewsgroups();
29 virtual void deleteMail(const RecMail&mail); 29 virtual void deleteMail(const RecMail&mail);