Diffstat (limited to 'kmicromail/libmailwrapper/abstractmail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kmicromail/libmailwrapper/abstractmail.cpp | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/kmicromail/libmailwrapper/abstractmail.cpp b/kmicromail/libmailwrapper/abstractmail.cpp index 128a7c0..3998abd 100644 --- a/kmicromail/libmailwrapper/abstractmail.cpp +++ b/kmicromail/libmailwrapper/abstractmail.cpp @@ -1,3 +1,4 @@ +// CHANGED 2004-09-31 Lutz Rogowski #include "abstractmail.h" #include "imapwrapper.h" #include "pop3wrapper.h" @@ -137,24 +138,38 @@ QString AbstractMail::draftFolder() void AbstractMail::deleteMails(const QString &,const QValueList<Opie::Core::OSmartPointer<RecMail> > &) { } +void AbstractMail::deleteMailList(const QValueList<RecMailP>&target) +{ + qDebug("AbstractMail::deleteMailList:: Please reimplement! "); +} void AbstractMail::mvcpAllMails(const FolderP&fromFolder, - const QString&targetFolder,AbstractMail*targetWrapper,bool moveit) + const QString&targetFolder,AbstractMail*targetWrapper,bool moveit, int maxSizeInKb) +{ + QValueList<RecMailP> t; + listMessages(fromFolder->getName(),t, maxSizeInKb); + mvcpMailList( t,targetFolder,targetWrapper,moveit); + +} +void AbstractMail::mvcpMailList(const QValueList<RecMailP>& t, + const QString&targetFolder,AbstractMail*targetWrapper,bool moveit) { - QValueList<RecMailP> t; - listMessages(fromFolder->getName(),t); + encodedString*st = 0; - while (t.count()>0) { - RecMailP r = (*t.begin()); + int iii = 0; + int count = t.count(); + while (iii < count ) { + RecMailP r = (*t.at( iii )); st = fetchRawBody(r); if (st) { targetWrapper->storeMessage(st->Content(),st->Length(),targetFolder); delete st; } - t.remove(t.begin()); + ++iii; } if (moveit) { - deleteAllMail(fromFolder); + deleteMailList( t ); + //deleteAllMail(fromFolder); } } |