Diffstat (limited to 'noncore/net/mail/libmailwrapper') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/imapwrapper.cpp | 1 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/mailtypes.cpp | 17 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/mailtypes.h | 7 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/pop3wrapper.cpp | 1 |
4 files changed, 25 insertions, 1 deletions
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp index e5eb335..3222c7e 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp @@ -132,4 +132,5 @@ void IMAPwrapper::listMessages(const QString&mailbox,QList<RecMail> &target ) m->setNumber(i); m->setMbox(mailbox); + m->setWrapper(this); target.append(m); } diff --git a/noncore/net/mail/libmailwrapper/mailtypes.cpp b/noncore/net/mail/libmailwrapper/mailtypes.cpp index 5cd45ed..94f5d6f 100644 --- a/noncore/net/mail/libmailwrapper/mailtypes.cpp +++ b/noncore/net/mail/libmailwrapper/mailtypes.cpp @@ -16,4 +16,9 @@ RecMail::RecMail(const RecMail&old) } +RecMail::~RecMail() +{ + wrapper = 0; +} + void RecMail::copy_old(const RecMail&old) { @@ -29,4 +34,5 @@ void RecMail::copy_old(const RecMail&old) cc = old.cc; bcc = old.bcc; + wrapper = old.wrapper; } @@ -36,4 +42,15 @@ void RecMail::init() cc.clear(); bcc.clear(); + wrapper = 0; +} + +void RecMail::setWrapper(AbstractMail*awrapper) +{ + wrapper = awrapper; +} + +AbstractMail* RecMail::Wrapper() +{ + return wrapper; } diff --git a/noncore/net/mail/libmailwrapper/mailtypes.h b/noncore/net/mail/libmailwrapper/mailtypes.h index 24518cf..9ef762d 100644 --- a/noncore/net/mail/libmailwrapper/mailtypes.h +++ b/noncore/net/mail/libmailwrapper/mailtypes.h @@ -16,4 +16,5 @@ #include <qvaluelist.h> +class AbstractMail; /* a class to describe mails in a mailbox */ /* Attention! @@ -33,5 +34,5 @@ public: RecMail(); RecMail(const RecMail&old); - virtual ~RecMail(){} + virtual ~RecMail(); const int getNumber()const{return msg_number;} @@ -61,4 +62,7 @@ public: const QBitArray&getFlags()const{return msg_flags;} void setFlags(const QBitArray&flags){msg_flags = flags;} + + void setWrapper(AbstractMail*wrapper); + AbstractMail* Wrapper(); protected: @@ -67,4 +71,5 @@ protected: QBitArray msg_flags; QStringList to,cc,bcc; + AbstractMail*wrapper; void init(); void copy_old(const RecMail&old); diff --git a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp index 49c3b7a..903ef4d 100644 --- a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp +++ b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp @@ -82,4 +82,5 @@ void POP3wrapper::listMessages(const QString &, QList<RecMail> &target ) RecMail *mail = parseHeader( header ); mail->setNumber( info->msg_index ); + mail->setWrapper(this); target.append( mail ); } |