Diffstat (limited to 'noncore/net/mail/libmailwrapper/mailtypes.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/mailtypes.cpp | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/noncore/net/mail/libmailwrapper/mailtypes.cpp b/noncore/net/mail/libmailwrapper/mailtypes.cpp index f9e5794..0e3174d 100644 --- a/noncore/net/mail/libmailwrapper/mailtypes.cpp +++ b/noncore/net/mail/libmailwrapper/mailtypes.cpp | |||
@@ -1,35 +1,36 @@ | |||
1 | #include "mailtypes.h" | 1 | #include "mailtypes.h" |
2 | 2 | ||
3 | 3 | ||
4 | RecMail::RecMail() | 4 | RecMail::RecMail() |
5 | :subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_flags(7) | 5 | :subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_size(0),msg_flags(7) |
6 | { | 6 | { |
7 | init(); | 7 | init(); |
8 | } | 8 | } |
9 | 9 | ||
10 | RecMail::RecMail(const RecMail&old) | 10 | RecMail::RecMail(const RecMail&old) |
11 | :subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_flags(7) | 11 | :subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_flags(7) |
12 | { | 12 | { |
13 | init(); | 13 | init(); |
14 | copy_old(old); | 14 | copy_old(old); |
15 | qDebug("Copy constructor RecMail"); | 15 | qDebug("Copy constructor RecMail"); |
16 | } | 16 | } |
17 | 17 | ||
18 | void RecMail::copy_old(const RecMail&old) | 18 | void RecMail::copy_old(const RecMail&old) |
19 | { | 19 | { |
20 | subject = old.subject; | 20 | subject = old.subject; |
21 | date = old.date; | 21 | date = old.date; |
22 | mbox = old.mbox; | 22 | mbox = old.mbox; |
23 | msg_id = old.msg_id; | 23 | msg_id = old.msg_id; |
24 | msg_size = old.msg_size; | ||
24 | msg_number = old.msg_number; | 25 | msg_number = old.msg_number; |
25 | from = old.from; | 26 | from = old.from; |
26 | msg_flags = old.msg_flags; | 27 | msg_flags = old.msg_flags; |
27 | to = old.to; | 28 | to = old.to; |
28 | cc = old.cc; | 29 | cc = old.cc; |
29 | bcc = old.bcc; | 30 | bcc = old.bcc; |
30 | } | 31 | } |
31 | 32 | ||
32 | void RecMail::init() | 33 | void RecMail::init() |
33 | { | 34 | { |
34 | to.clear(); | 35 | to.clear(); |
35 | cc.clear(); | 36 | cc.clear(); |
@@ -58,37 +59,47 @@ const QStringList&RecMail::CC()const | |||
58 | 59 | ||
59 | void RecMail::setBcc(const QStringList&list) | 60 | void RecMail::setBcc(const QStringList&list) |
60 | { | 61 | { |
61 | bcc = list; | 62 | bcc = list; |
62 | } | 63 | } |
63 | 64 | ||
64 | const QStringList& RecMail::Bcc()const | 65 | const QStringList& RecMail::Bcc()const |
65 | { | 66 | { |
66 | return bcc; | 67 | return bcc; |
67 | } | 68 | } |
68 | 69 | ||
69 | RecPart::RecPart() | 70 | RecPart::RecPart() |
70 | : m_type(""),m_subtype(""),m_identifier(""),m_encoding("") | 71 | : m_type(""),m_subtype(""),m_identifier(""),m_encoding(""),m_lines(0) |
71 | { | 72 | { |
72 | } | 73 | } |
73 | 74 | ||
74 | RecPart::RecPart(const QString&identifier,const QString&type,const QString&subtype,const QString&encoding) | 75 | RecPart::RecPart(const QString&identifier,const QString&type,const QString&subtype,const QString&encoding,unsigned int lines) |
75 | : m_type(type),m_subtype(subtype),m_identifier(identifier),m_encoding(encoding) | 76 | : m_type(type),m_subtype(subtype),m_identifier(identifier),m_encoding(encoding),m_lines(lines) |
76 | { | 77 | { |
77 | } | 78 | } |
78 | 79 | ||
79 | RecPart::~RecPart() | 80 | RecPart::~RecPart() |
80 | { | 81 | { |
81 | } | 82 | } |
82 | 83 | ||
84 | void RecPart::setLines(unsigned int lines) | ||
85 | { | ||
86 | m_lines = lines; | ||
87 | } | ||
88 | |||
89 | const unsigned int RecPart::Lines()const | ||
90 | { | ||
91 | return m_lines; | ||
92 | } | ||
93 | |||
83 | const QString& RecPart::Type()const | 94 | const QString& RecPart::Type()const |
84 | { | 95 | { |
85 | return m_type; | 96 | return m_type; |
86 | } | 97 | } |
87 | 98 | ||
88 | void RecPart::setType(const QString&type) | 99 | void RecPart::setType(const QString&type) |
89 | { | 100 | { |
90 | m_type = type; | 101 | m_type = type; |
91 | } | 102 | } |
92 | 103 | ||
93 | const QString& RecPart::Subtype()const | 104 | const QString& RecPart::Subtype()const |
94 | { | 105 | { |
@@ -147,12 +158,32 @@ void RecBody::setParts(const QList<RecPart>&parts) | |||
147 | } | 158 | } |
148 | 159 | ||
149 | const QList<RecPart>& RecBody::Parts()const | 160 | const QList<RecPart>& RecBody::Parts()const |
150 | { | 161 | { |
151 | return m_PartsList; | 162 | return m_PartsList; |
152 | } | 163 | } |
153 | 164 | ||
154 | void RecBody::addPart(const RecPart& part) | 165 | void RecBody::addPart(const RecPart& part) |
155 | { | 166 | { |
156 | RecPart*p = new RecPart(part); | 167 | RecPart*p = new RecPart(part); |
157 | m_PartsList.append(p); | 168 | m_PartsList.append(p); |
158 | } | 169 | } |
170 | |||
171 | void RecBody::setType(const QString&type) | ||
172 | { | ||
173 | m_type = type; | ||
174 | } | ||
175 | |||
176 | const QString& RecBody::Type()const | ||
177 | { | ||
178 | return m_type; | ||
179 | } | ||
180 | |||
181 | void RecBody::setSubtype(const QString&type) | ||
182 | { | ||
183 | m_subtype = type; | ||
184 | } | ||
185 | |||
186 | const QString& RecBody::Subtype()const | ||
187 | { | ||
188 | return m_subtype; | ||
189 | } | ||