author | alwin <alwin> | 2004-03-12 19:24:38 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-12 19:24:38 (UTC) |
commit | b600871ce93553a116a66fd80acd6dfc1cc46829 (patch) (side-by-side diff) | |
tree | b361346a49e09d9f0220993583bf183cf29bd974 /noncore/net/mail/libmailwrapper/imapwrapper.cpp | |
parent | 874d5a34eca296263dcd1adf857aebe9981825a1 (diff) | |
download | opie-b600871ce93553a116a66fd80acd6dfc1cc46829.zip opie-b600871ce93553a116a66fd80acd6dfc1cc46829.tar.gz opie-b600871ce93553a116a66fd80acd6dfc1cc46829.tar.bz2 |
some more smart-pointers
some bugfixes
some renaming of internals
Diffstat (limited to 'noncore/net/mail/libmailwrapper/imapwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/imapwrapper.cpp | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp index 3b3be0f..071e734 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp @@ -206,5 +206,5 @@ void IMAPwrapper::logout() } -void IMAPwrapper::listMessages(const QString&mailbox,QList<RecMail> &target ) +void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::OSmartPointer<RecMail> > &target ) { int err = MAILIMAP_NO_ERROR; @@ -267,5 +267,5 @@ void IMAPwrapper::listMessages(const QString&mailbox,QList<RecMail> &target ) } -QValueList<Opie::osmart_pointer<Folder> >* IMAPwrapper::listFolders() +QValueList<Opie::OSmartPointer<Folder> >* IMAPwrapper::listFolders() { const char *path, *mask; @@ -483,5 +483,5 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) } -RecBody IMAPwrapper::fetchBody(const RecMail&mail) +RecBody IMAPwrapper::fetchBody(const RecMailP&mail) { RecBody body; @@ -495,5 +495,5 @@ RecBody IMAPwrapper::fetchBody(const RecMail&mail) mailimap_body*body_desc = 0; - mb = mail.getMbox().latin1(); + mb = mail->getMbox().latin1(); login(); @@ -501,5 +501,5 @@ RecBody IMAPwrapper::fetchBody(const RecMail&mail) return body; } - err = selectMbox(mail.getMbox()); + err = selectMbox(mail->getMbox()); if ( err != MAILIMAP_NO_ERROR ) { return body; @@ -507,5 +507,5 @@ RecBody IMAPwrapper::fetchBody(const RecMail&mail) /* the range has to start at 1!!! not with 0!!!! */ - set = mailimap_set_new_interval( mail.getNumber(),mail.getNumber() ); + set = mailimap_set_new_interval( mail->getNumber(),mail->getNumber() ); fetchAtt = mailimap_fetch_att_new_bodystructure(); fetchType = mailimap_fetch_type_new_fetch_att(fetchAtt); @@ -569,5 +569,5 @@ QStringList IMAPwrapper::address_list_to_stringlist(clist*list) } -encodedString*IMAPwrapper::fetchRawPart(const RecMail&mail,const QValueList<int>&path,bool internal_call) +encodedString*IMAPwrapper::fetchRawPart(const RecMailP&mail,const QValueList<int>&path,bool internal_call) { encodedString*res=new encodedString; @@ -586,10 +586,10 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMail&mail,const QValueList<int> } if (!internal_call) { - err = selectMbox(mail.getMbox()); + err = selectMbox(mail->getMbox()); if ( err != MAILIMAP_NO_ERROR ) { return res; } } - set = mailimap_set_new_single(mail.getNumber()); + set = mailimap_set_new_single(mail->getNumber()); clist*id_list = 0; @@ -642,5 +642,5 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMail&mail,const QValueList<int> /* current_recursion is for recursive calls. current_count means the position inside the internal loop! */ -void IMAPwrapper::traverseBody(const RecMail&mail,mailimap_body*body,RecBody&target_body, +void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBody&target_body, int current_recursion,QValueList<int>recList,int current_count) { @@ -870,5 +870,5 @@ void IMAPwrapper::fillBodyFields(RecPart&target_part,mailimap_body_fields*which) } -void IMAPwrapper::deleteMail(const RecMail&mail) +void IMAPwrapper::deleteMail(const RecMailP&mail) { mailimap_flag_list*flist; @@ -880,5 +880,5 @@ void IMAPwrapper::deleteMail(const RecMail&mail) return; } - err = selectMbox(mail.getMbox()); + err = selectMbox(mail->getMbox()); if ( err != MAILIMAP_NO_ERROR ) { return; @@ -887,5 +887,5 @@ void IMAPwrapper::deleteMail(const RecMail&mail) mailimap_flag_list_add(flist,mailimap_flag_new_deleted()); store_flags = mailimap_store_att_flags_new_set_flags(flist); - set = mailimap_set_new_single(mail.getNumber()); + set = mailimap_set_new_single(mail->getNumber()); err = mailimap_store(m_imap,set,store_flags); mailimap_set_free( set ); @@ -905,5 +905,5 @@ void IMAPwrapper::deleteMail(const RecMail&mail) } -void IMAPwrapper::answeredMail(const RecMail&mail) +void IMAPwrapper::answeredMail(const RecMailP&mail) { mailimap_flag_list*flist; @@ -915,5 +915,5 @@ void IMAPwrapper::answeredMail(const RecMail&mail) return; } - err = selectMbox(mail.getMbox()); + err = selectMbox(mail->getMbox()); if ( err != MAILIMAP_NO_ERROR ) { return; @@ -922,5 +922,5 @@ void IMAPwrapper::answeredMail(const RecMail&mail) mailimap_flag_list_add(flist,mailimap_flag_new_answered()); store_flags = mailimap_store_att_flags_new_add_flags(flist); - set = mailimap_set_new_single(mail.getNumber()); + set = mailimap_set_new_single(mail->getNumber()); err = mailimap_store(m_imap,set,store_flags); mailimap_set_free( set ); @@ -933,5 +933,5 @@ void IMAPwrapper::answeredMail(const RecMail&mail) } -QString IMAPwrapper::fetchTextPart(const RecMail&mail,const QValueList<int>&path,bool internal_call,const QString&enc) +QString IMAPwrapper::fetchTextPart(const RecMailP&mail,const QValueList<int>&path,bool internal_call,const QString&enc) { QString body(""); @@ -948,10 +948,10 @@ QString IMAPwrapper::fetchTextPart(const RecMail&mail,const QValueList<int>&path } -QString IMAPwrapper::fetchTextPart(const RecMail&mail,const RecPart&part) +QString IMAPwrapper::fetchTextPart(const RecMailP&mail,const RecPart&part) { return fetchTextPart(mail,part.Positionlist(),false,part.Encoding()); } -encodedString* IMAPwrapper::fetchDecodedPart(const RecMail&mail,const RecPart&part) +encodedString* IMAPwrapper::fetchDecodedPart(const RecMailP&mail,const RecPart&part) { encodedString*res = fetchRawPart(mail,part.Positionlist(),false); @@ -961,5 +961,5 @@ encodedString* IMAPwrapper::fetchDecodedPart(const RecMail&mail,const RecPart&pa } -encodedString* IMAPwrapper::fetchRawPart(const RecMail&mail,const RecPart&part) +encodedString* IMAPwrapper::fetchRawPart(const RecMailP&mail,const RecPart&part) { return fetchRawPart(mail,part.Positionlist(),false); @@ -1056,5 +1056,4 @@ void IMAPwrapper::statusFolder(folderStat&target_stat,const QString & mailbox) clistiter * cur = 0; int r = 0; - int res = 0; target_stat.message_count = 0; target_stat.message_unseen = 0; @@ -1116,5 +1115,5 @@ const QString&IMAPwrapper::getName()const } -encodedString* IMAPwrapper::fetchRawBody(const RecMail&mail) +encodedString* IMAPwrapper::fetchRawBody(const RecMailP&mail) { // dummy @@ -1155,5 +1154,5 @@ void IMAPwrapper::mvcpAllMails(const FolderP&fromFolder, } -void IMAPwrapper::mvcpMail(const RecMail&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit) +void IMAPwrapper::mvcpMail(const RecMailP&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit) { if (targetWrapper != this) { @@ -1167,9 +1166,9 @@ void IMAPwrapper::mvcpMail(const RecMail&mail,const QString&targetFolder,Abstrac return; } - int err = selectMbox(mail.getMbox()); + int err = selectMbox(mail->getMbox()); if ( err != MAILIMAP_NO_ERROR ) { return; } - set = mailimap_set_new_single(mail.getNumber()); + set = mailimap_set_new_single(mail->getNumber()); err = mailimap_copy(m_imap,set,targetFolder.latin1()); mailimap_set_free( set ); |