author | alwin <alwin> | 2004-01-09 01:16:31 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-01-09 01:16:31 (UTC) |
commit | d3a4757e062ffc5ce5840cb1c52215435a468ff0 (patch) (unidiff) | |
tree | df5fdfdf42909e31c112b8e147e9e80c9bc0e94d /noncore/net/mail | |
parent | 9fc7d401f1445c5f3d3d74e173dea6de2ea4784a (diff) | |
download | opie-d3a4757e062ffc5ce5840cb1c52215435a468ff0.zip opie-d3a4757e062ffc5ce5840cb1c52215435a468ff0.tar.gz opie-d3a4757e062ffc5ce5840cb1c52215435a468ff0.tar.bz2 |
- MHfolder in accountview enhanced
- mv/cp mails has special methods when copy between folder inside a
mh storage
- removed obsolete vars inside pop3wrapper
-rw-r--r-- | noncore/net/mail/accountview.cpp | 77 | ||||
-rw-r--r-- | noncore/net/mail/accountview.h | 6 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/mhwrapper.cpp | 68 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/mhwrapper.h | 2 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/pop3wrapper.cpp | 43 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/pop3wrapper.h | 1 |
6 files changed, 157 insertions, 40 deletions
diff --git a/noncore/net/mail/accountview.cpp b/noncore/net/mail/accountview.cpp index 62cbf62..3048e49 100644 --- a/noncore/net/mail/accountview.cpp +++ b/noncore/net/mail/accountview.cpp | |||
@@ -243,5 +243,4 @@ void IMAPviewItem::removeChilds() | |||
243 | delete tmp; | 243 | delete tmp; |
244 | } | 244 | } |
245 | |||
246 | } | 245 | } |
247 | 246 | ||
@@ -707,5 +706,6 @@ void AccountView::downloadMails(Folder*fromFolder,AbstractMail*fromWrapper) | |||
707 | * MH Account stuff | 706 | * MH Account stuff |
708 | */ | 707 | */ |
709 | 708 | /* MH is a little bit different - the top folder can contains messages other than in IMAP and | |
709 | POP3 and MBOX */ | ||
710 | MHviewItem::MHviewItem( const QString&aPath, AccountView *parent ) | 710 | MHviewItem::MHviewItem( const QString&aPath, AccountView *parent ) |
711 | : AccountViewItem( parent ) | 711 | : AccountViewItem( parent ) |
@@ -717,4 +717,5 @@ MHviewItem::MHviewItem( const QString&aPath, AccountView *parent ) | |||
717 | setText( 0, " Local Folders" ); | 717 | setText( 0, " Local Folders" ); |
718 | setOpen( true ); | 718 | setOpen( true ); |
719 | folder = 0; | ||
719 | } | 720 | } |
720 | 721 | ||
@@ -722,4 +723,5 @@ MHviewItem::~MHviewItem() | |||
722 | { | 723 | { |
723 | delete wrapper; | 724 | delete wrapper; |
725 | if (folder) delete folder; | ||
724 | } | 726 | } |
725 | 727 | ||
@@ -729,13 +731,12 @@ AbstractMail *MHviewItem::getWrapper() | |||
729 | } | 731 | } |
730 | 732 | ||
731 | void MHviewItem::refresh( QList<RecMail> & ) | 733 | void MHviewItem::refresh( QList<RecMail> & target) |
732 | { | 734 | { |
733 | refresh(false); | 735 | refresh(false); |
736 | getWrapper()->listMessages( "",target ); | ||
734 | } | 737 | } |
735 | 738 | ||
736 | void MHviewItem::refresh(bool force) | 739 | void MHviewItem::removeChilds() |
737 | { | 740 | { |
738 | if (childCount()>0 && force==false) return; | ||
739 | QList<Folder> *folders = wrapper->listFolders(); | ||
740 | QListViewItem *child = firstChild(); | 741 | QListViewItem *child = firstChild(); |
741 | while ( child ) { | 742 | while ( child ) { |
@@ -744,8 +745,27 @@ void MHviewItem::refresh(bool force) | |||
744 | delete tmp; | 745 | delete tmp; |
745 | } | 746 | } |
747 | } | ||
748 | |||
749 | void MHviewItem::refresh(bool force) | ||
750 | { | ||
751 | if (childCount()>0 && force==false) return; | ||
752 | removeChilds(); | ||
753 | QList<Folder> *folders = wrapper->listFolders(); | ||
746 | Folder *it; | 754 | Folder *it; |
747 | QListViewItem*item = 0; | 755 | MHfolderItem*item = 0; |
756 | MHfolderItem*pmaster = 0; | ||
757 | QString fname = ""; | ||
748 | for ( it = folders->first(); it; it = folders->next() ) { | 758 | for ( it = folders->first(); it; it = folders->next() ) { |
749 | item = new MHfolderItem( it, this , item ); | 759 | fname = it->getDisplayName(); |
760 | /* this folder itself */ | ||
761 | if (fname=="/") { | ||
762 | folder = it; | ||
763 | continue; | ||
764 | } | ||
765 | if (pmaster) { | ||
766 | item = new MHfolderItem( it, pmaster, item, this ); | ||
767 | } else { | ||
768 | item = new MHfolderItem( it, this , item ); | ||
769 | } | ||
750 | item->setSelectable(it->may_select()); | 770 | item->setSelectable(it->may_select()); |
751 | } | 771 | } |
@@ -767,4 +787,6 @@ QPopupMenu * MHviewItem::getContextMenu() | |||
767 | m->insertItem(QObject::tr("Refresh folder list",contextName),0); | 787 | m->insertItem(QObject::tr("Refresh folder list",contextName),0); |
768 | m->insertItem(QObject::tr("Create new folder",contextName),1); | 788 | m->insertItem(QObject::tr("Create new folder",contextName),1); |
789 | m->insertItem(QObject::tr("Delete all mails",contextName),2); | ||
790 | m->insertItem(QObject::tr("Move/Copie all mails",contextName),3); | ||
769 | } | 791 | } |
770 | return m; | 792 | return m; |
@@ -783,8 +805,16 @@ void MHviewItem::createFolder() | |||
783 | } | 805 | } |
784 | 806 | ||
807 | void MHviewItem::downloadMails() | ||
808 | { | ||
809 | AccountView*bl = accountView(); | ||
810 | if (!bl) return; | ||
811 | bl->downloadMails(folder,getWrapper()); | ||
812 | } | ||
813 | |||
785 | QStringList MHviewItem::subFolders() | 814 | QStringList MHviewItem::subFolders() |
786 | { | 815 | { |
787 | QStringList result; | 816 | QStringList result; |
788 | QListViewItem *child = firstChild(); | 817 | QListViewItem *child = firstChild(); |
818 | result.append("/"); | ||
789 | while ( child ) { | 819 | while ( child ) { |
790 | MHfolderItem *tmp = (MHfolderItem*)child; | 820 | MHfolderItem *tmp = (MHfolderItem*)child; |
@@ -805,4 +835,10 @@ void MHviewItem::contextMenuSelected(int which) | |||
805 | createFolder(); | 835 | createFolder(); |
806 | break; | 836 | break; |
837 | case 2: | ||
838 | deleteAllMail(getWrapper(),folder); | ||
839 | break; | ||
840 | case 3: | ||
841 | downloadMails(); | ||
842 | break; | ||
807 | default: | 843 | default: |
808 | break; | 844 | break; |
@@ -820,12 +856,29 @@ MHfolderItem::MHfolderItem( Folder *folderInit, MHviewItem *parent , QListViewIt | |||
820 | folder = folderInit; | 856 | folder = folderInit; |
821 | mbox = parent; | 857 | mbox = parent; |
822 | if (folder->getDisplayName().lower() == "outgoing") { | 858 | initName(); |
859 | } | ||
860 | |||
861 | MHfolderItem::MHfolderItem( Folder *folderInit, MHfolderItem *parent, QListViewItem*after, MHviewItem*master) | ||
862 | : AccountViewItem( parent,after ) | ||
863 | { | ||
864 | folder = folderInit; | ||
865 | mbox = master; | ||
866 | initName(); | ||
867 | } | ||
868 | |||
869 | void MHfolderItem::initName() | ||
870 | { | ||
871 | QString bName = folder->getDisplayName(); | ||
872 | if (bName.startsWith("/")&&bName.length()>1) { | ||
873 | bName.replace(0,1,""); | ||
874 | } | ||
875 | if (bName.lower() == "outgoing") { | ||
823 | setPixmap( 0, PIXMAP_OUTBOXFOLDER ); | 876 | setPixmap( 0, PIXMAP_OUTBOXFOLDER ); |
824 | } else if (folder->getDisplayName().lower() == "inbox") { | 877 | } else if (bName.lower() == "inbox") { |
825 | setPixmap( 0, PIXMAP_INBOXFOLDER); | 878 | setPixmap( 0, PIXMAP_INBOXFOLDER); |
826 | } else { | 879 | } else { |
827 | setPixmap( 0, PIXMAP_MBOXFOLDER ); | 880 | setPixmap( 0, PIXMAP_MBOXFOLDER ); |
828 | } | 881 | } |
829 | setText( 0, folder->getDisplayName() ); | 882 | setText( 0, bName ); |
830 | } | 883 | } |
831 | 884 | ||
@@ -874,4 +927,5 @@ QPopupMenu * MHfolderItem::getContextMenu() | |||
874 | m->insertItem(QObject::tr("Delete folder",contextName),1); | 927 | m->insertItem(QObject::tr("Delete folder",contextName),1); |
875 | m->insertItem(QObject::tr("Move/Copie all mails",contextName),2); | 928 | m->insertItem(QObject::tr("Move/Copie all mails",contextName),2); |
929 | m->insertItem(QObject::tr("Create new folder",contextName),3); | ||
876 | } | 930 | } |
877 | return m; | 931 | return m; |
@@ -901,2 +955,3 @@ void MHfolderItem::contextMenuSelected(int which) | |||
901 | } | 955 | } |
902 | } | 956 | } |
957 | |||
diff --git a/noncore/net/mail/accountview.h b/noncore/net/mail/accountview.h index f5a2973..60e2b4b 100644 --- a/noncore/net/mail/accountview.h +++ b/noncore/net/mail/accountview.h | |||
@@ -135,8 +135,10 @@ public: | |||
135 | 135 | ||
136 | protected: | 136 | protected: |
137 | void downloadMails(); | ||
138 | void removeChilds(); | ||
137 | virtual void createFolder(); | 139 | virtual void createFolder(); |
138 | QString m_Path; | 140 | QString m_Path; |
139 | AbstractMail *wrapper; | 141 | AbstractMail *wrapper; |
140 | 142 | Folder *folder; | |
141 | }; | 143 | }; |
142 | 144 | ||
@@ -146,4 +148,5 @@ class MHfolderItem : public AccountViewItem | |||
146 | public: | 148 | public: |
147 | MHfolderItem( Folder *folder, MHviewItem *parent , QListViewItem*after ); | 149 | MHfolderItem( Folder *folder, MHviewItem *parent , QListViewItem*after ); |
150 | MHfolderItem( Folder *folder, MHfolderItem *parent, QListViewItem*after, MHviewItem*master); | ||
148 | virtual ~MHfolderItem(); | 151 | virtual ~MHfolderItem(); |
149 | virtual void refresh(QList<RecMail>&); | 152 | virtual void refresh(QList<RecMail>&); |
@@ -156,4 +159,5 @@ protected: | |||
156 | void downloadMails(); | 159 | void downloadMails(); |
157 | virtual void deleteFolder(); | 160 | virtual void deleteFolder(); |
161 | void initName(); | ||
158 | Folder *folder; | 162 | Folder *folder; |
159 | MHviewItem *mbox; | 163 | MHviewItem *mbox; |
diff --git a/noncore/net/mail/libmailwrapper/mhwrapper.cpp b/noncore/net/mail/libmailwrapper/mhwrapper.cpp index 5adba55..512f778 100644 --- a/noncore/net/mail/libmailwrapper/mhwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/mhwrapper.cpp | |||
@@ -332,2 +332,70 @@ const QString&MHwrapper::getName()const | |||
332 | return MHName; | 332 | return MHName; |
333 | } | 333 | } |
334 | void MHwrapper::mvcpMail(const RecMail&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit) | ||
335 | { | ||
336 | init_storage(); | ||
337 | if (!m_storage) { | ||
338 | return; | ||
339 | } | ||
340 | if (targetWrapper != this) { | ||
341 | qDebug("Using generic"); | ||
342 | Genericwrapper::mvcpMail(mail,targetFolder,targetWrapper,moveit); | ||
343 | return; | ||
344 | } | ||
345 | qDebug("Using internal routines for move/copy"); | ||
346 | QString tf = buildPath(targetFolder); | ||
347 | int r = mailsession_select_folder(m_storage->sto_session,(char*)mail.getMbox().latin1()); | ||
348 | if (r != MAIL_NO_ERROR) { | ||
349 | qDebug("Error selecting source mailbox"); | ||
350 | return; | ||
351 | } | ||
352 | if (moveit) { | ||
353 | r = mailsession_move_message(m_storage->sto_session,mail.getNumber(),(char*)tf.latin1()); | ||
354 | } else { | ||
355 | r = mailsession_copy_message(m_storage->sto_session,mail.getNumber(),(char*)tf.latin1()); | ||
356 | } | ||
357 | if (r != MAIL_NO_ERROR) { | ||
358 | qDebug("Error copy/moving mail internal (%i)",r); | ||
359 | } | ||
360 | } | ||
361 | |||
362 | void MHwrapper::mvcpAllMails(Folder*fromFolder,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit) | ||
363 | { | ||
364 | init_storage(); | ||
365 | if (!m_storage) { | ||
366 | return; | ||
367 | } | ||
368 | if (targetWrapper != this) { | ||
369 | qDebug("Using generic"); | ||
370 | Genericwrapper::mvcpAllMails(fromFolder,targetFolder,targetWrapper,moveit); | ||
371 | return; | ||
372 | } | ||
373 | if (!fromFolder) return; | ||
374 | int r = mailsession_select_folder(m_storage->sto_session,(char*)fromFolder->getName().latin1()); | ||
375 | if (r!=MAIL_NO_ERROR) { | ||
376 | qDebug("error selecting source folder!"); | ||
377 | return; | ||
378 | } | ||
379 | QString tf = buildPath(targetFolder); | ||
380 | mailmessage_list*l=0; | ||
381 | r = mailsession_get_messages_list(m_storage->sto_session,&l); | ||
382 | if (r != MAIL_NO_ERROR) { | ||
383 | qDebug("Error message list"); | ||
384 | } | ||
385 | unsigned j = 0; | ||
386 | for(unsigned int i = 0 ; l!= 0 && i < carray_count(l->msg_tab) ; ++i) { | ||
387 | mailmessage * msg; | ||
388 | msg = (mailmessage*)carray_get(l->msg_tab, i); | ||
389 | j = msg->msg_index; | ||
390 | if (moveit) { | ||
391 | r = mailsession_move_message(m_storage->sto_session,j,(char*)tf.latin1()); | ||
392 | } else { | ||
393 | r = mailsession_copy_message(m_storage->sto_session,j,(char*)tf.latin1()); | ||
394 | } | ||
395 | if (r != MAIL_NO_ERROR) { | ||
396 | qDebug("Error copy/moving mail internal (%i)",r); | ||
397 | break; | ||
398 | } | ||
399 | } | ||
400 | if (l) mailmessage_list_free(l); | ||
401 | } | ||
diff --git a/noncore/net/mail/libmailwrapper/mhwrapper.h b/noncore/net/mail/libmailwrapper/mhwrapper.h index 7f028b4..79dec30 100644 --- a/noncore/net/mail/libmailwrapper/mhwrapper.h +++ b/noncore/net/mail/libmailwrapper/mhwrapper.h | |||
@@ -23,4 +23,6 @@ public: | |||
23 | virtual void deleteMail(const RecMail&mail); | 23 | virtual void deleteMail(const RecMail&mail); |
24 | virtual void answeredMail(const RecMail&mail); | 24 | virtual void answeredMail(const RecMail&mail); |
25 | virtual void mvcpMail(const RecMail&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); | ||
26 | virtual void mvcpAllMails(Folder*fromFolder,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); | ||
25 | 27 | ||
26 | virtual int createMbox(const QString&folder,const Folder*f=0,const QString&d="",bool s=false); | 28 | virtual int createMbox(const QString&folder,const Folder*f=0,const QString&d="",bool s=false); |
diff --git a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp index f5eca4a..14c2059 100644 --- a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp +++ b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp | |||
@@ -15,5 +15,4 @@ POP3wrapper::POP3wrapper( POP3account *a ) | |||
15 | account = a; | 15 | account = a; |
16 | m_pop3 = NULL; | 16 | m_pop3 = NULL; |
17 | m_folder = NULL; | ||
18 | msgTempName = a->getFileName()+"_msg_cache"; | 17 | msgTempName = a->getFileName()+"_msg_cache"; |
19 | last_msg_id = 0; | 18 | last_msg_id = 0; |
@@ -59,5 +58,5 @@ RecBody POP3wrapper::fetchBody( const RecMail &mail ) { | |||
59 | msg_cache.open(IO_ReadWrite|IO_Truncate); | 58 | msg_cache.open(IO_ReadWrite|IO_Truncate); |
60 | last_msg_id = mail.getNumber(); | 59 | last_msg_id = mail.getNumber(); |
61 | err = mailsession_get_message(m_folder->fld_session, mail.getNumber(), &mailmsg); | 60 | err = mailsession_get_message(m_pop3->sto_session, mail.getNumber(), &mailmsg); |
62 | err = mailmessage_fetch(mailmsg,&message,&length); | 61 | err = mailmessage_fetch(mailmsg,&message,&length); |
63 | msg_cache.writeBlock(message,length); | 62 | msg_cache.writeBlock(message,length); |
@@ -95,15 +94,17 @@ RecBody POP3wrapper::fetchBody( const RecMail &mail ) { | |||
95 | } | 94 | } |
96 | 95 | ||
97 | void POP3wrapper::listMessages(const QString &, QList<RecMail> &target ) { | 96 | void POP3wrapper::listMessages(const QString &, QList<RecMail> &target ) |
97 | { | ||
98 | login(); | 98 | login(); |
99 | if (!m_pop3) | 99 | if (!m_pop3) |
100 | return; | 100 | return; |
101 | uint32_t res_messages,res_recent,res_unseen; | 101 | uint32_t res_messages,res_recent,res_unseen; |
102 | mailsession_status_folder(m_folder->fld_session,"INBOX",&res_messages,&res_recent,&res_unseen); | 102 | mailsession_status_folder(m_pop3->sto_session,"INBOX",&res_messages,&res_recent,&res_unseen); |
103 | parseList(target,m_folder->fld_session,"INBOX"); | 103 | parseList(target,m_pop3->sto_session,"INBOX"); |
104 | Global::statusMessage( tr("Mailbox contains %1 mail(s)").arg(res_messages)); | 104 | Global::statusMessage( tr("Mailbox contains %1 mail(s)").arg(res_messages)); |
105 | } | 105 | } |
106 | 106 | ||
107 | void POP3wrapper::login() { | 107 | void POP3wrapper::login() |
108 | { | ||
108 | if (account->getOffline()) | 109 | if (account->getOffline()) |
109 | return; | 110 | return; |
@@ -158,19 +159,8 @@ void POP3wrapper::login() { | |||
158 | 159 | ||
159 | 160 | ||
160 | 161 | err = mailstorage_connect(m_pop3); | |
161 | m_folder = mailfolder_new(m_pop3, NULL, NULL); | ||
162 | |||
163 | if (m_folder==0) { | ||
164 | Global::statusMessage(tr("Error initializing folder")); | ||
165 | mailstorage_free(m_pop3); | ||
166 | m_pop3 = NULL; | ||
167 | return; | ||
168 | } | ||
169 | err = mailfolder_connect(m_folder); | ||
170 | if (err != MAIL_NO_ERROR) { | 162 | if (err != MAIL_NO_ERROR) { |
171 | qDebug( QString( "FEHLERNUMMER %1" ).arg( err ) ); | 163 | qDebug( QString( "FEHLERNUMMER %1" ).arg( err ) ); |
172 | Global::statusMessage(tr("Error initializing folder")); | 164 | Global::statusMessage(tr("Error initializing folder")); |
173 | mailfolder_free(m_folder); | ||
174 | m_folder = 0; | ||
175 | mailstorage_free(m_pop3); | 165 | mailstorage_free(m_pop3); |
176 | m_pop3 = 0; | 166 | m_pop3 = 0; |
@@ -178,10 +168,9 @@ void POP3wrapper::login() { | |||
178 | } | 168 | } |
179 | 169 | ||
180 | void POP3wrapper::logout() { | 170 | void POP3wrapper::logout() |
171 | { | ||
181 | int err = MAILPOP3_NO_ERROR; | 172 | int err = MAILPOP3_NO_ERROR; |
182 | if ( m_pop3 == NULL ) | 173 | if ( m_pop3 == NULL ) |
183 | return; | 174 | return; |
184 | mailfolder_free(m_folder); | ||
185 | m_folder = 0; | ||
186 | mailstorage_free(m_pop3); | 175 | mailstorage_free(m_pop3); |
187 | m_pop3 = 0; | 176 | m_pop3 = 0; |
@@ -201,5 +190,5 @@ void POP3wrapper::deleteMail(const RecMail&mail) { | |||
201 | if (!m_pop3) | 190 | if (!m_pop3) |
202 | return; | 191 | return; |
203 | int err = mailsession_remove_message(m_folder->fld_session,mail.getNumber()); | 192 | int err = mailsession_remove_message(m_pop3->sto_session,mail.getNumber()); |
204 | if (err != MAIL_NO_ERROR) { | 193 | if (err != MAIL_NO_ERROR) { |
205 | Global::statusMessage(tr("error deleting mail")); | 194 | Global::statusMessage(tr("error deleting mail")); |
@@ -216,5 +205,5 @@ int POP3wrapper::deleteAllMail(const Folder*) { | |||
216 | 205 | ||
217 | uint32_t result = 0; | 206 | uint32_t result = 0; |
218 | int err = mailsession_messages_number(m_folder->fld_session,NULL,&result); | 207 | int err = mailsession_messages_number(m_pop3->sto_session,NULL,&result); |
219 | if (err != MAIL_NO_ERROR) { | 208 | if (err != MAIL_NO_ERROR) { |
220 | Global::statusMessage(tr("Error getting folder info")); | 209 | Global::statusMessage(tr("Error getting folder info")); |
@@ -222,5 +211,5 @@ int POP3wrapper::deleteAllMail(const Folder*) { | |||
222 | } | 211 | } |
223 | for (unsigned int i = 0; i < result; ++i) { | 212 | for (unsigned int i = 0; i < result; ++i) { |
224 | err = mailsession_remove_message(m_folder->fld_session,i+1); | 213 | err = mailsession_remove_message(m_pop3->sto_session,i+1); |
225 | if (err != MAIL_NO_ERROR) { | 214 | if (err != MAIL_NO_ERROR) { |
226 | Global::statusMessage(tr("Error deleting mail %1").arg(i+1)); | 215 | Global::statusMessage(tr("Error deleting mail %1").arg(i+1)); |
@@ -239,5 +228,5 @@ void POP3wrapper::statusFolder(folderStat&target_stat,const QString&) { | |||
239 | if (!m_pop3) | 228 | if (!m_pop3) |
240 | return; | 229 | return; |
241 | int r = mailsession_status_folder(m_folder->fld_session,0,&target_stat.message_count, | 230 | int r = mailsession_status_folder(m_pop3->sto_session,0,&target_stat.message_count, |
242 | &target_stat.message_recent,&target_stat.message_unseen); | 231 | &target_stat.message_recent,&target_stat.message_unseen); |
243 | } | 232 | } |
@@ -248,5 +237,5 @@ encodedString* POP3wrapper::fetchRawBody(const RecMail&mail) { | |||
248 | encodedString*res = 0; | 237 | encodedString*res = 0; |
249 | mailmessage * mailmsg = 0; | 238 | mailmessage * mailmsg = 0; |
250 | int err = mailsession_get_message(m_folder->fld_session, mail.getNumber(), &mailmsg); | 239 | int err = mailsession_get_message(m_pop3->sto_session, mail.getNumber(), &mailmsg); |
251 | err = mailmessage_fetch(mailmsg,&target,&length); | 240 | err = mailmessage_fetch(mailmsg,&target,&length); |
252 | if (mailmsg) | 241 | if (mailmsg) |
@@ -262,5 +251,5 @@ const QString&POP3wrapper::getType()const { | |||
262 | } | 251 | } |
263 | 252 | ||
264 | const QString&POP3wrapper::getName()const { | 253 | const QString&POP3wrapper::getName()const{ |
265 | return account->getAccountName(); | 254 | return account->getAccountName(); |
266 | } | 255 | } |
diff --git a/noncore/net/mail/libmailwrapper/pop3wrapper.h b/noncore/net/mail/libmailwrapper/pop3wrapper.h index d2b708d..a24b9cf 100644 --- a/noncore/net/mail/libmailwrapper/pop3wrapper.h +++ b/noncore/net/mail/libmailwrapper/pop3wrapper.h | |||
@@ -38,5 +38,4 @@ protected: | |||
38 | POP3account *account; | 38 | POP3account *account; |
39 | mailstorage*m_pop3; | 39 | mailstorage*m_pop3; |
40 | mailfolder*m_folder; | ||
41 | }; | 40 | }; |
42 | 41 | ||