summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper/abstractmail.h
authorzautrix <zautrix>2004-09-11 15:41:30 (UTC)
committer zautrix <zautrix>2004-09-11 15:41:30 (UTC)
commit32f9963a39236d08718a36d5adad2a0c5c4e2602 (patch) (side-by-side diff)
tree8856a90d505df8dc3afa0d72541f27cb68913a0d /kmicromail/libmailwrapper/abstractmail.h
parentd7a273f40838f56205c1377ed0bcc5457bd46ea3 (diff)
downloadkdepimpi-32f9963a39236d08718a36d5adad2a0c5c4e2602.zip
kdepimpi-32f9963a39236d08718a36d5adad2a0c5c4e2602.tar.gz
kdepimpi-32f9963a39236d08718a36d5adad2a0c5c4e2602.tar.bz2
Mail enhancements
Diffstat (limited to 'kmicromail/libmailwrapper/abstractmail.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/abstractmail.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/kmicromail/libmailwrapper/abstractmail.h b/kmicromail/libmailwrapper/abstractmail.h
index cae83f4..2069ca1 100644
--- a/kmicromail/libmailwrapper/abstractmail.h
+++ b/kmicromail/libmailwrapper/abstractmail.h
@@ -1,76 +1,81 @@
// CHANGED 2004-09-31 Lutz Rogowski
#ifndef __abstract_mail_
#define __abstract_mail_
#include "maildefines.h"
#include "settings.h"
#include <qobject.h>
#include <opie2/osmartpointer.h>
#include "mailtypes.h"
+
+#include "mailwrapper.h"
+
class IMAPwrapper;
class POP3wrapper;
class Folder;
class encodedString;
struct folderStat;
class AbstractMail:public QObject
{
Q_OBJECT
public:
AbstractMail(){};
virtual ~AbstractMail(){}
virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders()=0;
virtual void listMessages(const QString & mailbox,QValueList<RecMailP>&target, int sizeInKb = 0 )=0;
virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX")=0;
virtual RecBodyP fetchBody(const RecMailP&mail)=0;
virtual QString fetchTextPart(const RecMailP&mail,const RecPartP&part)=0;
virtual encodedString* fetchDecodedPart(const RecMailP&mail,const RecPartP&part)=0;
virtual encodedString* fetchRawPart(const RecMailP&mail,const RecPartP&part)=0;
virtual encodedString* fetchRawBody(const RecMailP&mail)=0;
virtual void deleteMail(const RecMailP&mail)=0;
virtual void deleteMailList(const QValueList<RecMailP>&target);
virtual void answeredMail(const RecMailP&mail)=0;
virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&)=0;
virtual void deleteMails(const QString & FolderName,const QValueList<Opie::Core::OSmartPointer<RecMail> >&target);
virtual int deleteMbox(const Opie::Core::OSmartPointer<Folder>&)=0;
virtual void storeMessage(const char*msg,size_t length, const QString&folder)=0;
-
+ void downloadNewMails(const FolderP&fromFolder,AbstractMail*targetWrapper );
virtual void mvcpAllMails(const Opie::Core::OSmartPointer<Folder>&fromFolder,
const QString&targetFolder,AbstractMail*targetWrapper,bool moveit, int sizeInKb = 0);
virtual void mvcpMailList(const QValueList<RecMailP>& t,
const QString&targetFolder,AbstractMail*targetWrapper,bool moveit);
virtual void mvcpMail(const RecMailP&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit);
virtual void cleanMimeCache(){};
/* mail box methods */
/* parameter is the box to create.
* if the implementing subclass has prefixes,
* them has to be appended automatic.
*/
virtual int createMbox(const QString&,const Opie::Core::OSmartPointer<Folder>&parentfolder=0,
const QString& delemiter="/",bool getsubfolder=false);
virtual void logout()=0;
+ virtual Account* getAccount() = 0;
+
static AbstractMail* getWrapper(IMAPaccount *a);
static AbstractMail* getWrapper(POP3account *a);
static AbstractMail* getWrapper(NNTPaccount *a);
/* mbox only! */
static AbstractMail* getWrapper(const QString&a,const QString&name="Local Folders");
static AbstractMail* getWrapper(Account*a);
static QString defaultLocalfolder();
static QString draftFolder();
virtual MAILLIB::ATYPE getType()const=0;
virtual const QString&getName()const=0;
protected:
static encodedString*decode_String(const encodedString*text,const QString&enc);
static QString convert_String(const char*text);
static QString gen_attachment_id();
};
#endif