Diffstat (limited to 'noncore/net/mail/libmailwrapper/mailtypes.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/mailtypes.cpp | 129 |
1 files changed, 129 insertions, 0 deletions
diff --git a/noncore/net/mail/libmailwrapper/mailtypes.cpp b/noncore/net/mail/libmailwrapper/mailtypes.cpp new file mode 100644 index 0000000..9f2c9e3 --- a/dev/null +++ b/noncore/net/mail/libmailwrapper/mailtypes.cpp | |||
@@ -0,0 +1,129 @@ | |||
1 | #include "mailtypes.h" | ||
2 | |||
3 | |||
4 | RecMail::RecMail() | ||
5 | :subject(""),date(""),mbox(""),msg_number(0),msg_flags(7) | ||
6 | { | ||
7 | } | ||
8 | |||
9 | void RecMail::setTo(const QStringList&list) | ||
10 | { | ||
11 | to = list; | ||
12 | } | ||
13 | |||
14 | const QStringList&RecMail::To()const | ||
15 | { | ||
16 | return to; | ||
17 | } | ||
18 | |||
19 | void RecMail::setCC(const QStringList&list) | ||
20 | { | ||
21 | cc = list; | ||
22 | } | ||
23 | |||
24 | const QStringList&RecMail::CC()const | ||
25 | { | ||
26 | return cc; | ||
27 | } | ||
28 | |||
29 | void RecMail::setBcc(const QStringList&list) | ||
30 | { | ||
31 | bcc = list; | ||
32 | } | ||
33 | |||
34 | const QStringList& RecMail::Bcc()const | ||
35 | { | ||
36 | return bcc; | ||
37 | } | ||
38 | |||
39 | |||
40 | RecPart::RecPart() | ||
41 | : m_type(""),m_subtype(""),m_identifier(""),m_encoding("") | ||
42 | { | ||
43 | } | ||
44 | |||
45 | RecPart::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) | ||
47 | { | ||
48 | } | ||
49 | |||
50 | RecPart::~RecPart() | ||
51 | { | ||
52 | } | ||
53 | |||
54 | const QString& RecPart::Type()const | ||
55 | { | ||
56 | return m_type; | ||
57 | } | ||
58 | |||
59 | void RecPart::setType(const QString&type) | ||
60 | { | ||
61 | m_type = type; | ||
62 | } | ||
63 | |||
64 | const QString& RecPart::Subtype()const | ||
65 | { | ||
66 | return m_subtype; | ||
67 | } | ||
68 | |||
69 | void RecPart::setSubtype(const QString&subtype) | ||
70 | { | ||
71 | m_subtype = subtype; | ||
72 | } | ||
73 | |||
74 | const QString& RecPart::Identifier()const | ||
75 | { | ||
76 | return m_identifier; | ||
77 | } | ||
78 | |||
79 | void RecPart::setIdentifier(const QString&identifier) | ||
80 | { | ||
81 | m_identifier = identifier; | ||
82 | } | ||
83 | |||
84 | const QString& RecPart::Encoding()const | ||
85 | { | ||
86 | return m_encoding; | ||
87 | } | ||
88 | |||
89 | void RecPart::setEncoding(const QString&encoding) | ||
90 | { | ||
91 | m_encoding = encoding; | ||
92 | } | ||
93 | |||
94 | RecBody::RecBody() | ||
95 | : m_BodyText(""),m_PartsList() | ||
96 | { | ||
97 | m_PartsList.setAutoDelete(true); | ||
98 | } | ||
99 | |||
100 | RecBody::~RecBody() | ||
101 | { | ||
102 | } | ||
103 | |||
104 | void RecBody::setBodytext(const QString&bodyText) | ||
105 | { | ||
106 | m_BodyText = bodyText; | ||
107 | } | ||
108 | |||
109 | const QString& RecBody::Bodytext()const | ||
110 | { | ||
111 | return m_BodyText; | ||
112 | } | ||
113 | |||
114 | void RecBody::setParts(const QList<RecPart>&parts) | ||
115 | { | ||
116 | m_PartsList = parts; | ||
117 | m_PartsList.setAutoDelete(true); | ||
118 | } | ||
119 | |||
120 | const QList<RecPart>& RecBody::Parts()const | ||
121 | { | ||
122 | return m_PartsList; | ||
123 | } | ||
124 | |||
125 | void RecBody::addPart(const RecPart& part) | ||
126 | { | ||
127 | RecPart*p = new RecPart(part); | ||
128 | m_PartsList.append(p); | ||
129 | } | ||