summaryrefslogtreecommitdiff
path: root/noncore/net/mail/libmailwrapper/nntpwrapper.cpp
Unidiff
Diffstat (limited to 'noncore/net/mail/libmailwrapper/nntpwrapper.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/nntpwrapper.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/noncore/net/mail/libmailwrapper/nntpwrapper.cpp b/noncore/net/mail/libmailwrapper/nntpwrapper.cpp
index 2ec052c..c0b3eec 100644
--- a/noncore/net/mail/libmailwrapper/nntpwrapper.cpp
+++ b/noncore/net/mail/libmailwrapper/nntpwrapper.cpp
@@ -32,7 +32,7 @@ void NNTPwrapper::nntp_progress( size_t current, size_t maximum ) {
32} 32}
33 33
34 34
35RecBody NNTPwrapper::fetchBody( const RecMail &mail ) { 35RecBody NNTPwrapper::fetchBody( const RecMailP &mail ) {
36 int err = NEWSNNTP_NO_ERROR; 36 int err = NEWSNNTP_NO_ERROR;
37 char *message = 0; 37 char *message = 0;
38 size_t length = 0; 38 size_t length = 0;
@@ -44,8 +44,8 @@ RecBody NNTPwrapper::fetchBody( const RecMail &mail ) {
44 44
45 RecBody body; 45 RecBody body;
46 mailmessage * mailmsg; 46 mailmessage * mailmsg;
47 if (mail.Msgsize()>HARD_MSG_SIZE_LIMIT) { 47 if (mail->Msgsize()>HARD_MSG_SIZE_LIMIT) {
48 qDebug("Message to large: %i",mail.Msgsize()); 48 qDebug("Message to large: %i",mail->Msgsize());
49 return body; 49 return body;
50 } 50 }
51 51
@@ -53,13 +53,13 @@ RecBody NNTPwrapper::fetchBody( const RecMail &mail ) {
53 53
54 cleanMimeCache(); 54 cleanMimeCache();
55 55
56 if (mail.getNumber()!=last_msg_id) { 56 if (mail->getNumber()!=last_msg_id) {
57 if (msg_cache.exists()) { 57 if (msg_cache.exists()) {
58 msg_cache.remove(); 58 msg_cache.remove();
59 } 59 }
60 msg_cache.open(IO_ReadWrite|IO_Truncate); 60 msg_cache.open(IO_ReadWrite|IO_Truncate);
61 last_msg_id = mail.getNumber(); 61 last_msg_id = mail->getNumber();
62 err = mailsession_get_message(m_nntp->sto_session, mail.getNumber(), &mailmsg); 62 err = mailsession_get_message(m_nntp->sto_session, mail->getNumber(), &mailmsg);
63 err = mailmessage_fetch(mailmsg,&message,&length); 63 err = mailmessage_fetch(mailmsg,&message,&length);
64 msg_cache.writeBlock(message,length); 64 msg_cache.writeBlock(message,length);
65 } else { 65 } else {
@@ -96,7 +96,7 @@ RecBody NNTPwrapper::fetchBody( const RecMail &mail ) {
96} 96}
97 97
98 98
99void NNTPwrapper::listMessages(const QString & which, QList<RecMail> &target ) 99void NNTPwrapper::listMessages(const QString & which, QValueList<Opie::OSmartPointer<RecMail> > &target )
100{ 100{
101 login(); 101 login();
102 if (!m_nntp) 102 if (!m_nntp)
@@ -188,9 +188,9 @@ void NNTPwrapper::logout()
188 m_nntp = 0; 188 m_nntp = 0;
189} 189}
190 190
191QValueList<Opie::osmart_pointer<Folder> >* NNTPwrapper::listFolders() { 191QValueList<Opie::OSmartPointer<Folder> >* NNTPwrapper::listFolders() {
192 192
193 QValueList<Opie::osmart_pointer<Folder> >* folders = new QValueList<Opie::osmart_pointer<Folder> >(); 193 QValueList<Opie::OSmartPointer<Folder> >* folders = new QValueList<Opie::OSmartPointer<Folder> >();
194 QStringList groups; 194 QStringList groups;
195 if (account) { 195 if (account) {
196 groups = account->getGroups(); 196 groups = account->getGroups();
@@ -239,7 +239,7 @@ QStringList NNTPwrapper::listAllNewsgroups(const QString&mask) {
239 return res; 239 return res;
240} 240}
241 241
242void NNTPwrapper::answeredMail(const RecMail&) {} 242void NNTPwrapper::answeredMail(const RecMailP&) {}
243 243
244void NNTPwrapper::statusFolder(folderStat&target_stat,const QString&) { 244void NNTPwrapper::statusFolder(folderStat&target_stat,const QString&) {
245 login(); 245 login();
@@ -253,12 +253,12 @@ void NNTPwrapper::statusFolder(folderStat&target_stat,const QString&) {
253} 253}
254 254
255 255
256encodedString* NNTPwrapper::fetchRawBody(const RecMail&mail) { 256encodedString* NNTPwrapper::fetchRawBody(const RecMailP&mail) {
257 char*target=0; 257 char*target=0;
258 size_t length=0; 258 size_t length=0;
259 encodedString*res = 0; 259 encodedString*res = 0;
260 mailmessage * mailmsg = 0; 260 mailmessage * mailmsg = 0;
261 int err = mailsession_get_message(m_nntp->sto_session, mail.getNumber(), &mailmsg); 261 int err = mailsession_get_message(m_nntp->sto_session, mail->getNumber(), &mailmsg);
262 err = mailmessage_fetch(mailmsg,&target,&length); 262 err = mailmessage_fetch(mailmsg,&target,&length);
263 if (mailmsg) 263 if (mailmsg)
264 mailmessage_free(mailmsg); 264 mailmessage_free(mailmsg);
@@ -276,7 +276,7 @@ const QString&NNTPwrapper::getName()const{
276 return account->getAccountName(); 276 return account->getAccountName();
277} 277}
278 278
279void NNTPwrapper::deleteMail(const RecMail&) { 279void NNTPwrapper::deleteMail(const RecMailP&) {
280} 280}
281 281
282int NNTPwrapper::deleteAllMail(const FolderP&) { 282int NNTPwrapper::deleteAllMail(const FolderP&) {