author | alwin <alwin> | 2003-12-13 21:03:45 (UTC) |
---|---|---|
committer | alwin <alwin> | 2003-12-13 21:03:45 (UTC) |
commit | c0e86973b0cd2d01163ccf60340c8d295aa645f4 (patch) (side-by-side diff) | |
tree | 4ccb0f7b8071711bf7ebc5320ea5c2f6974d6fb4 /noncore/net | |
parent | 85444223acfafd9d7955032b2cbdad3279ba27ad (diff) | |
download | opie-c0e86973b0cd2d01163ccf60340c8d295aa645f4.zip opie-c0e86973b0cd2d01163ccf60340c8d295aa645f4.tar.gz opie-c0e86973b0cd2d01163ccf60340c8d295aa645f4.tar.bz2 |
the RecMail class get on creation a mailwrapper assigened
-rw-r--r-- | noncore/net/mail/imapwrapper.cpp | 1 | ||||
-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 | ||||
-rw-r--r-- | noncore/net/mail/mailtypes.cpp | 17 | ||||
-rw-r--r-- | noncore/net/mail/mailtypes.h | 7 | ||||
-rw-r--r-- | noncore/net/mail/pop3wrapper.cpp | 1 |
8 files changed, 50 insertions, 2 deletions
diff --git a/noncore/net/mail/imapwrapper.cpp b/noncore/net/mail/imapwrapper.cpp index e5eb335..3222c7e 100644 --- a/noncore/net/mail/imapwrapper.cpp +++ b/noncore/net/mail/imapwrapper.cpp @@ -133,2 +133,3 @@ void IMAPwrapper::listMessages(const QString&mailbox,QList<RecMail> &target ) m->setMbox(mailbox); + m->setWrapper(this); target.append(m); 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 @@ -133,2 +133,3 @@ void IMAPwrapper::listMessages(const QString&mailbox,QList<RecMail> &target ) 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 @@ -17,2 +17,7 @@ RecMail::RecMail(const RecMail&old) +RecMail::~RecMail() +{ + wrapper = 0; +} + void RecMail::copy_old(const RecMail&old) @@ -30,2 +35,3 @@ void RecMail::copy_old(const RecMail&old) bcc = old.bcc; + wrapper = old.wrapper; } @@ -37,2 +43,13 @@ void RecMail::init() 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 @@ -17,2 +17,3 @@ +class AbstractMail; /* a class to describe mails in a mailbox */ @@ -34,3 +35,3 @@ public: RecMail(const RecMail&old); - virtual ~RecMail(){} + virtual ~RecMail(); @@ -62,2 +63,5 @@ public: void setFlags(const QBitArray&flags){msg_flags = flags;} + + void setWrapper(AbstractMail*wrapper); + AbstractMail* Wrapper(); @@ -68,2 +72,3 @@ protected: QStringList to,cc,bcc; + AbstractMail*wrapper; void init(); 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 @@ -83,2 +83,3 @@ void POP3wrapper::listMessages(const QString &, QList<RecMail> &target ) mail->setNumber( info->msg_index ); + mail->setWrapper(this); target.append( mail ); diff --git a/noncore/net/mail/mailtypes.cpp b/noncore/net/mail/mailtypes.cpp index 5cd45ed..94f5d6f 100644 --- a/noncore/net/mail/mailtypes.cpp +++ b/noncore/net/mail/mailtypes.cpp @@ -17,2 +17,7 @@ RecMail::RecMail(const RecMail&old) +RecMail::~RecMail() +{ + wrapper = 0; +} + void RecMail::copy_old(const RecMail&old) @@ -30,2 +35,3 @@ void RecMail::copy_old(const RecMail&old) bcc = old.bcc; + wrapper = old.wrapper; } @@ -37,2 +43,13 @@ void RecMail::init() bcc.clear(); + wrapper = 0; +} + +void RecMail::setWrapper(AbstractMail*awrapper) +{ + wrapper = awrapper; +} + +AbstractMail* RecMail::Wrapper() +{ + return wrapper; } diff --git a/noncore/net/mail/mailtypes.h b/noncore/net/mail/mailtypes.h index 24518cf..9ef762d 100644 --- a/noncore/net/mail/mailtypes.h +++ b/noncore/net/mail/mailtypes.h @@ -17,2 +17,3 @@ +class AbstractMail; /* a class to describe mails in a mailbox */ @@ -34,3 +35,3 @@ public: RecMail(const RecMail&old); - virtual ~RecMail(){} + virtual ~RecMail(); @@ -62,2 +63,5 @@ public: void setFlags(const QBitArray&flags){msg_flags = flags;} + + void setWrapper(AbstractMail*wrapper); + AbstractMail* Wrapper(); @@ -68,2 +72,3 @@ protected: QStringList to,cc,bcc; + AbstractMail*wrapper; void init(); diff --git a/noncore/net/mail/pop3wrapper.cpp b/noncore/net/mail/pop3wrapper.cpp index 49c3b7a..903ef4d 100644 --- a/noncore/net/mail/pop3wrapper.cpp +++ b/noncore/net/mail/pop3wrapper.cpp @@ -83,2 +83,3 @@ void POP3wrapper::listMessages(const QString &, QList<RecMail> &target ) mail->setNumber( info->msg_index ); + mail->setWrapper(this); target.append( mail ); |