Diffstat (limited to 'noncore/net/mail/mailtypes.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/mailtypes.cpp | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/noncore/net/mail/mailtypes.cpp b/noncore/net/mail/mailtypes.cpp index f9e5794..0e3174d 100644 --- a/noncore/net/mail/mailtypes.cpp +++ b/noncore/net/mail/mailtypes.cpp | |||
@@ -1,11 +1,11 @@ | |||
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) |
@@ -18,12 +18,13 @@ RecMail::RecMail(const RecMail&old) | |||
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; |
@@ -64,25 +65,35 @@ void RecMail::setBcc(const QStringList&list) | |||
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) |
@@ -153,6 +164,26 @@ const QList<RecPart>& RecBody::Parts()const | |||
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 | } | ||