summaryrefslogtreecommitdiff
path: root/noncore/net/mail/libmailwrapper/mailtypes.cpp
Unidiff
Diffstat (limited to 'noncore/net/mail/libmailwrapper/mailtypes.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/mailtypes.cpp33
1 files changed, 31 insertions, 2 deletions
diff --git a/noncore/net/mail/libmailwrapper/mailtypes.cpp b/noncore/net/mail/libmailwrapper/mailtypes.cpp
index 9f2c9e3..f9e5794 100644
--- a/noncore/net/mail/libmailwrapper/mailtypes.cpp
+++ b/noncore/net/mail/libmailwrapper/mailtypes.cpp
@@ -1,63 +1,92 @@
1#include "mailtypes.h" 1#include "mailtypes.h"
2 2
3 3
4RecMail::RecMail() 4RecMail::RecMail()
5 :subject(""),date(""),mbox(""),msg_number(0),msg_flags(7) 5 :subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_flags(7)
6{ 6{
7 init();
8}
9
10RecMail::RecMail(const RecMail&old)
11 :subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_flags(7)
12{
13 init();
14 copy_old(old);
15 qDebug("Copy constructor RecMail");
16}
17
18void RecMail::copy_old(const RecMail&old)
19{
20 subject = old.subject;
21 date = old.date;
22 mbox = old.mbox;
23 msg_id = old.msg_id;
24 msg_number = old.msg_number;
25 from = old.from;
26 msg_flags = old.msg_flags;
27 to = old.to;
28 cc = old.cc;
29 bcc = old.bcc;
30}
31
32void RecMail::init()
33{
34 to.clear();
35 cc.clear();
36 bcc.clear();
7} 37}
8 38
9void RecMail::setTo(const QStringList&list) 39void RecMail::setTo(const QStringList&list)
10{ 40{
11 to = list; 41 to = list;
12} 42}
13 43
14const QStringList&RecMail::To()const 44const QStringList&RecMail::To()const
15{ 45{
16 return to; 46 return to;
17} 47}
18 48
19void RecMail::setCC(const QStringList&list) 49void RecMail::setCC(const QStringList&list)
20{ 50{
21 cc = list; 51 cc = list;
22} 52}
23 53
24const QStringList&RecMail::CC()const 54const QStringList&RecMail::CC()const
25{ 55{
26 return cc; 56 return cc;
27} 57}
28 58
29void RecMail::setBcc(const QStringList&list) 59void RecMail::setBcc(const QStringList&list)
30{ 60{
31 bcc = list; 61 bcc = list;
32} 62}
33 63
34const QStringList& RecMail::Bcc()const 64const QStringList& RecMail::Bcc()const
35{ 65{
36 return bcc; 66 return bcc;
37} 67}
38 68
39
40RecPart::RecPart() 69RecPart::RecPart()
41 : m_type(""),m_subtype(""),m_identifier(""),m_encoding("") 70 : m_type(""),m_subtype(""),m_identifier(""),m_encoding("")
42{ 71{
43} 72}
44 73
45RecPart::RecPart(const QString&identifier,const QString&type,const QString&subtype,const QString&encoding) 74RecPart::RecPart(const QString&identifier,const QString&type,const QString&subtype,const QString&encoding)
46 : m_type(type),m_subtype(subtype),m_identifier(identifier),m_encoding(encoding) 75 : m_type(type),m_subtype(subtype),m_identifier(identifier),m_encoding(encoding)
47{ 76{
48} 77}
49 78
50RecPart::~RecPart() 79RecPart::~RecPart()
51{ 80{
52} 81}
53 82
54const QString& RecPart::Type()const 83const QString& RecPart::Type()const
55{ 84{
56 return m_type; 85 return m_type;
57} 86}
58 87
59void RecPart::setType(const QString&type) 88void RecPart::setType(const QString&type)
60{ 89{
61 m_type = type; 90 m_type = type;
62} 91}
63 92