summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/imapwrapper.cpp1
-rw-r--r--noncore/net/mail/libmailwrapper/imapwrapper.cpp1
-rw-r--r--noncore/net/mail/libmailwrapper/mailtypes.cpp17
-rw-r--r--noncore/net/mail/libmailwrapper/mailtypes.h7
-rw-r--r--noncore/net/mail/libmailwrapper/pop3wrapper.cpp1
-rw-r--r--noncore/net/mail/mailtypes.cpp17
-rw-r--r--noncore/net/mail/mailtypes.h7
-rw-r--r--noncore/net/mail/pop3wrapper.cpp1
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
@@ -130,8 +130,9 @@ void IMAPwrapper::listMessages(const QString&mailbox,QList<RecMail> &target )
130 RecMail*m = parse_list_result(msg_att); 130 RecMail*m = parse_list_result(msg_att);
131 if (m) { 131 if (m) {
132 m->setNumber(i); 132 m->setNumber(i);
133 m->setMbox(mailbox); 133 m->setMbox(mailbox);
134 m->setWrapper(this);
134 target.append(m); 135 target.append(m);
135 } 136 }
136 } 137 }
137 } else { 138 } else {
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
@@ -130,8 +130,9 @@ void IMAPwrapper::listMessages(const QString&mailbox,QList<RecMail> &target )
130 RecMail*m = parse_list_result(msg_att); 130 RecMail*m = parse_list_result(msg_att);
131 if (m) { 131 if (m) {
132 m->setNumber(i); 132 m->setNumber(i);
133 m->setMbox(mailbox); 133 m->setMbox(mailbox);
134 m->setWrapper(this);
134 target.append(m); 135 target.append(m);
135 } 136 }
136 } 137 }
137 } else { 138 } else {
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
@@ -14,8 +14,13 @@ RecMail::RecMail(const RecMail&old)
14 copy_old(old); 14 copy_old(old);
15 qDebug("Copy constructor RecMail"); 15 qDebug("Copy constructor RecMail");
16} 16}
17 17
18RecMail::~RecMail()
19{
20 wrapper = 0;
21}
22
18void RecMail::copy_old(const RecMail&old) 23void RecMail::copy_old(const RecMail&old)
19{ 24{
20 subject = old.subject; 25 subject = old.subject;
21 date = old.date; 26 date = old.date;
@@ -27,15 +32,27 @@ void RecMail::copy_old(const RecMail&old)
27 msg_flags = old.msg_flags; 32 msg_flags = old.msg_flags;
28 to = old.to; 33 to = old.to;
29 cc = old.cc; 34 cc = old.cc;
30 bcc = old.bcc; 35 bcc = old.bcc;
36 wrapper = old.wrapper;
31} 37}
32 38
33void RecMail::init() 39void RecMail::init()
34{ 40{
35 to.clear(); 41 to.clear();
36 cc.clear(); 42 cc.clear();
37 bcc.clear(); 43 bcc.clear();
44 wrapper = 0;
45}
46
47void RecMail::setWrapper(AbstractMail*awrapper)
48{
49 wrapper = awrapper;
50}
51
52AbstractMail* RecMail::Wrapper()
53{
54 return wrapper;
38} 55}
39 56
40void RecMail::setTo(const QStringList&list) 57void RecMail::setTo(const QStringList&list)
41{ 58{
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
@@ -14,8 +14,9 @@
14#include <qstringlist.h> 14#include <qstringlist.h>
15#include <qmap.h> 15#include <qmap.h>
16#include <qvaluelist.h> 16#include <qvaluelist.h>
17 17
18class AbstractMail;
18/* a class to describe mails in a mailbox */ 19/* a class to describe mails in a mailbox */
19/* Attention! 20/* Attention!
20 From programmers point of view it would make sense to 21 From programmers point of view it would make sense to
21 store the mail body into this class, too. 22 store the mail body into this class, too.
@@ -31,9 +32,9 @@ class RecMail
31{ 32{
32public: 33public:
33 RecMail(); 34 RecMail();
34 RecMail(const RecMail&old); 35 RecMail(const RecMail&old);
35 virtual ~RecMail(){} 36 virtual ~RecMail();
36 37
37 const int getNumber()const{return msg_number;} 38 const int getNumber()const{return msg_number;}
38 void setNumber(int number){msg_number=number;} 39 void setNumber(int number){msg_number=number;}
39 const QString&getDate()const{ return date; } 40 const QString&getDate()const{ return date; }
@@ -59,14 +60,18 @@ public:
59 void setBcc(const QStringList&list); 60 void setBcc(const QStringList&list);
60 const QStringList&Bcc()const; 61 const QStringList&Bcc()const;
61 const QBitArray&getFlags()const{return msg_flags;} 62 const QBitArray&getFlags()const{return msg_flags;}
62 void setFlags(const QBitArray&flags){msg_flags = flags;} 63 void setFlags(const QBitArray&flags){msg_flags = flags;}
64
65 void setWrapper(AbstractMail*wrapper);
66 AbstractMail* Wrapper();
63 67
64protected: 68protected:
65 QString subject,date,from,mbox,msg_id,replyto; 69 QString subject,date,from,mbox,msg_id,replyto;
66 int msg_number,msg_size; 70 int msg_number,msg_size;
67 QBitArray msg_flags; 71 QBitArray msg_flags;
68 QStringList to,cc,bcc; 72 QStringList to,cc,bcc;
73 AbstractMail*wrapper;
69 void init(); 74 void init();
70 void copy_old(const RecMail&old); 75 void copy_old(const RecMail&old);
71}; 76};
72 77
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
@@ -80,8 +80,9 @@ void POP3wrapper::listMessages(const QString &, QList<RecMail> &target )
80 return; 80 return;
81 } 81 }
82 RecMail *mail = parseHeader( header ); 82 RecMail *mail = parseHeader( header );
83 mail->setNumber( info->msg_index ); 83 mail->setNumber( info->msg_index );
84 mail->setWrapper(this);
84 target.append( mail ); 85 target.append( mail );
85 } 86 }
86 87
87 logout(); 88 logout();
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
@@ -14,8 +14,13 @@ RecMail::RecMail(const RecMail&old)
14 copy_old(old); 14 copy_old(old);
15 qDebug("Copy constructor RecMail"); 15 qDebug("Copy constructor RecMail");
16} 16}
17 17
18RecMail::~RecMail()
19{
20 wrapper = 0;
21}
22
18void RecMail::copy_old(const RecMail&old) 23void RecMail::copy_old(const RecMail&old)
19{ 24{
20 subject = old.subject; 25 subject = old.subject;
21 date = old.date; 26 date = old.date;
@@ -27,15 +32,27 @@ void RecMail::copy_old(const RecMail&old)
27 msg_flags = old.msg_flags; 32 msg_flags = old.msg_flags;
28 to = old.to; 33 to = old.to;
29 cc = old.cc; 34 cc = old.cc;
30 bcc = old.bcc; 35 bcc = old.bcc;
36 wrapper = old.wrapper;
31} 37}
32 38
33void RecMail::init() 39void RecMail::init()
34{ 40{
35 to.clear(); 41 to.clear();
36 cc.clear(); 42 cc.clear();
37 bcc.clear(); 43 bcc.clear();
44 wrapper = 0;
45}
46
47void RecMail::setWrapper(AbstractMail*awrapper)
48{
49 wrapper = awrapper;
50}
51
52AbstractMail* RecMail::Wrapper()
53{
54 return wrapper;
38} 55}
39 56
40void RecMail::setTo(const QStringList&list) 57void RecMail::setTo(const QStringList&list)
41{ 58{
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
@@ -14,8 +14,9 @@
14#include <qstringlist.h> 14#include <qstringlist.h>
15#include <qmap.h> 15#include <qmap.h>
16#include <qvaluelist.h> 16#include <qvaluelist.h>
17 17
18class AbstractMail;
18/* a class to describe mails in a mailbox */ 19/* a class to describe mails in a mailbox */
19/* Attention! 20/* Attention!
20 From programmers point of view it would make sense to 21 From programmers point of view it would make sense to
21 store the mail body into this class, too. 22 store the mail body into this class, too.
@@ -31,9 +32,9 @@ class RecMail
31{ 32{
32public: 33public:
33 RecMail(); 34 RecMail();
34 RecMail(const RecMail&old); 35 RecMail(const RecMail&old);
35 virtual ~RecMail(){} 36 virtual ~RecMail();
36 37
37 const int getNumber()const{return msg_number;} 38 const int getNumber()const{return msg_number;}
38 void setNumber(int number){msg_number=number;} 39 void setNumber(int number){msg_number=number;}
39 const QString&getDate()const{ return date; } 40 const QString&getDate()const{ return date; }
@@ -59,14 +60,18 @@ public:
59 void setBcc(const QStringList&list); 60 void setBcc(const QStringList&list);
60 const QStringList&Bcc()const; 61 const QStringList&Bcc()const;
61 const QBitArray&getFlags()const{return msg_flags;} 62 const QBitArray&getFlags()const{return msg_flags;}
62 void setFlags(const QBitArray&flags){msg_flags = flags;} 63 void setFlags(const QBitArray&flags){msg_flags = flags;}
64
65 void setWrapper(AbstractMail*wrapper);
66 AbstractMail* Wrapper();
63 67
64protected: 68protected:
65 QString subject,date,from,mbox,msg_id,replyto; 69 QString subject,date,from,mbox,msg_id,replyto;
66 int msg_number,msg_size; 70 int msg_number,msg_size;
67 QBitArray msg_flags; 71 QBitArray msg_flags;
68 QStringList to,cc,bcc; 72 QStringList to,cc,bcc;
73 AbstractMail*wrapper;
69 void init(); 74 void init();
70 void copy_old(const RecMail&old); 75 void copy_old(const RecMail&old);
71}; 76};
72 77
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
@@ -80,8 +80,9 @@ void POP3wrapper::listMessages(const QString &, QList<RecMail> &target )
80 return; 80 return;
81 } 81 }
82 RecMail *mail = parseHeader( header ); 82 RecMail *mail = parseHeader( header );
83 mail->setNumber( info->msg_index ); 83 mail->setNumber( info->msg_index );
84 mail->setWrapper(this);
84 target.append( mail ); 85 target.append( mail );
85 } 86 }
86 87
87 logout(); 88 logout();