author | harlekin <harlekin> | 2004-03-05 23:08:46 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2004-03-05 23:08:46 (UTC) |
commit | 6afcd375a640d5c6888bc111cd1d80a08f554136 (patch) (unidiff) | |
tree | 520b12836ea13ee6e58f36a8851994fcfbe16051 /noncore/net/mail/libmailwrapper | |
parent | b4ec902435df4e3c834b7790c1dc70a235157477 (diff) | |
download | opie-6afcd375a640d5c6888bc111cd1d80a08f554136.zip opie-6afcd375a640d5c6888bc111cd1d80a08f554136.tar.gz opie-6afcd375a640d5c6888bc111cd1d80a08f554136.tar.bz2 |
list newsgroups in nntp config
Diffstat (limited to 'noncore/net/mail/libmailwrapper') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/nntpwrapper.cpp | 24 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/nntpwrapper.h | 2 |
2 files changed, 9 insertions, 17 deletions
diff --git a/noncore/net/mail/libmailwrapper/nntpwrapper.cpp b/noncore/net/mail/libmailwrapper/nntpwrapper.cpp index 54e0ed4..2d6f9a3 100644 --- a/noncore/net/mail/libmailwrapper/nntpwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/nntpwrapper.cpp | |||
@@ -6,10 +6,8 @@ | |||
6 | 6 | ||
7 | #include <stdlib.h> | 7 | #include <stdlib.h> |
8 | 8 | ||
9 | #include <libetpan/libetpan.h> | 9 | #include <libetpan/libetpan.h> |
10 | #include <libetpan/nntpdriver.h> | ||
11 | |||
12 | 10 | ||
13 | 11 | ||
14 | #define HARD_MSG_SIZE_LIMIT 5242880 | 12 | #define HARD_MSG_SIZE_LIMIT 5242880 |
15 | 13 | ||
@@ -191,37 +189,31 @@ void NNTPwrapper::logout() | |||
191 | } | 189 | } |
192 | 190 | ||
193 | QList<Folder>* NNTPwrapper::listFolders() { | 191 | QList<Folder>* NNTPwrapper::listFolders() { |
194 | 192 | ||
195 | |||
196 | |||
197 | |||
198 | QList<Folder> * folders = new QList<Folder>(); | 193 | QList<Folder> * folders = new QList<Folder>(); |
199 | folders->setAutoDelete( false ); | 194 | folders->setAutoDelete( false ); |
195 | |||
196 | // folders->append(inb); | ||
197 | return folders; | ||
198 | } | ||
199 | |||
200 | clist * NNTPwrapper::listAllNewsgroups() { | ||
201 | login(); | ||
200 | clist *result = 0; | 202 | clist *result = 0; |
201 | clistcell *current; | 203 | clistcell *current; |
202 | newsnntp_group_description *list; | 204 | newsnntp_group_description *list; |
203 | |||
204 | login(); | ||
205 | if ( m_nntp ) { | 205 | if ( m_nntp ) { |
206 | mailsession * session = m_nntp->sto_session; | 206 | mailsession * session = m_nntp->sto_session; |
207 | newsnntp * news = ( ( nntp_session_state_data * )session->sess_data )->nntp_session; | 207 | newsnntp * news = ( ( nntp_session_state_data * )session->sess_data )->nntp_session; |
208 | int err = newsnntp_list_newsgroups(news, NULL, &result); | 208 | int err = newsnntp_list_newsgroups(news, NULL, &result); |
209 | 209 | ||
210 | if ( err == NEWSNNTP_NO_ERROR ) { | 210 | if ( err == NEWSNNTP_NO_ERROR ) { |
211 | current = result->first; | 211 | return result; |
212 | for ( current=clist_begin(result);current!=NULL;current=clist_next(current)) { | ||
213 | list = ( newsnntp_group_description* ) current->data; | ||
214 | qDebug( list->grp_name ); | ||
215 | } | ||
216 | // Folder*inb=new Folder("INBOX","/"); | ||
217 | } | 212 | } |
218 | } | 213 | } |
219 | // folders->append(inb); | ||
220 | return folders; | ||
221 | } | 214 | } |
222 | 215 | ||
223 | |||
224 | void NNTPwrapper::answeredMail(const RecMail&) {} | 216 | void NNTPwrapper::answeredMail(const RecMail&) {} |
225 | 217 | ||
226 | void NNTPwrapper::statusFolder(folderStat&target_stat,const QString&) { | 218 | void NNTPwrapper::statusFolder(folderStat&target_stat,const QString&) { |
227 | login(); | 219 | login(); |
diff --git a/noncore/net/mail/libmailwrapper/nntpwrapper.h b/noncore/net/mail/libmailwrapper/nntpwrapper.h index e47e68f..e4d4a37 100644 --- a/noncore/net/mail/libmailwrapper/nntpwrapper.h +++ b/noncore/net/mail/libmailwrapper/nntpwrapper.h | |||
@@ -24,9 +24,9 @@ public: | |||
24 | /* should only get the subscribed one */ | 24 | /* should only get the subscribed one */ |
25 | virtual QList<Folder>* listFolders(); | 25 | virtual QList<Folder>* listFolders(); |
26 | /* mailbox will be ignored */ | 26 | /* mailbox will be ignored */ |
27 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); | 27 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); |
28 | 28 | clist * listAllNewsgroups(); | |
29 | virtual void deleteMail(const RecMail&mail); | 29 | virtual void deleteMail(const RecMail&mail); |
30 | virtual void answeredMail(const RecMail&mail); | 30 | virtual void answeredMail(const RecMail&mail); |
31 | virtual int deleteAllMail(const Folder*); | 31 | virtual int deleteAllMail(const Folder*); |
32 | 32 | ||