Diffstat (limited to 'noncore/net/mail/mailtypes.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/mailtypes.cpp | 62 |
1 files changed, 42 insertions, 20 deletions
diff --git a/noncore/net/mail/mailtypes.cpp b/noncore/net/mail/mailtypes.cpp index 6a66113..f56bb63 100644 --- a/noncore/net/mail/mailtypes.cpp +++ b/noncore/net/mail/mailtypes.cpp | |||
@@ -72,7 +72,4 @@ RecPart::RecPart() | |||
72 | { | 72 | { |
73 | } | 73 | m_Parameters.clear(); |
74 | 74 | m_poslist.clear(); | |
75 | RecPart::RecPart(const QString&identifier,const QString&type,const QString&subtype,const QString&encoding,unsigned int lines) | ||
76 | : m_type(type),m_subtype(subtype),m_identifier(identifier),m_encoding(encoding),m_lines(lines) | ||
77 | { | ||
78 | } | 75 | } |
@@ -133,4 +130,39 @@ void RecPart::setEncoding(const QString&encoding) | |||
133 | 130 | ||
131 | void RecPart::setParameters(const part_plist_t&list) | ||
132 | { | ||
133 | m_Parameters = list; | ||
134 | } | ||
135 | |||
136 | const part_plist_t& RecPart::Parameters()const | ||
137 | { | ||
138 | return m_Parameters; | ||
139 | } | ||
140 | |||
141 | void RecPart::addParameter(const QString&key,const QString&value) | ||
142 | { | ||
143 | m_Parameters[key]=value; | ||
144 | } | ||
145 | |||
146 | const QString RecPart::searchParamter(const QString&key)const | ||
147 | { | ||
148 | QString value(""); | ||
149 | part_plist_t::ConstIterator it = m_Parameters.find(key); | ||
150 | if (it != m_Parameters.end()) { | ||
151 | value = it.data(); | ||
152 | } | ||
153 | return value; | ||
154 | } | ||
155 | |||
156 | void RecPart::setPositionlist(const QValueList<int>&poslist) | ||
157 | { | ||
158 | m_poslist = poslist; | ||
159 | } | ||
160 | |||
161 | const QValueList<int>& RecPart::Positionlist()const | ||
162 | { | ||
163 | return m_poslist; | ||
164 | } | ||
165 | |||
134 | RecBody::RecBody() | 166 | RecBody::RecBody() |
135 | : m_BodyText(),m_PartsList() | 167 | : m_BodyText(),m_PartsList(),m_description() |
136 | { | 168 | { |
@@ -170,20 +202,10 @@ void RecBody::addPart(const RecPart& part) | |||
170 | 202 | ||
171 | void RecBody::setType(const QString&type) | 203 | void RecBody::setDescription(const RecPart&des) |
172 | { | 204 | { |
173 | m_type = type; | 205 | m_description = des; |
174 | } | 206 | } |
175 | 207 | ||
176 | const QString& RecBody::Type()const | 208 | const RecPart& RecBody::Description()const |
177 | { | 209 | { |
178 | return m_type; | 210 | return m_description; |
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 | } | 211 | } |