author | alwin <alwin> | 2003-12-12 13:56:20 (UTC) |
---|---|---|
committer | alwin <alwin> | 2003-12-12 13:56:20 (UTC) |
commit | 8af6feb08d168fefaa2568b057efa132386471f6 (patch) (side-by-side diff) | |
tree | 3c5dd691e33ebf62156a22e4916ba8b34625acf5 /noncore/net/mail/mailtypes.cpp | |
parent | 2a3290782c29e14de64d031fbdf4ce79fdfa1506 (diff) | |
download | opie-8af6feb08d168fefaa2568b057efa132386471f6.zip opie-8af6feb08d168fefaa2568b057efa132386471f6.tar.gz opie-8af6feb08d168fefaa2568b057efa132386471f6.tar.bz2 |
fetching mail body and attachments is working.
Diffstat (limited to 'noncore/net/mail/mailtypes.cpp') (more/less context) (ignore 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 @@ -71,9 +71,6 @@ RecPart::RecPart() : m_type(""),m_subtype(""),m_identifier(""),m_encoding(""),m_lines(0) { -} - -RecPart::RecPart(const QString&identifier,const QString&type,const QString&subtype,const QString&encoding,unsigned int lines) - : m_type(type),m_subtype(subtype),m_identifier(identifier),m_encoding(encoding),m_lines(lines) -{ + m_Parameters.clear(); + m_poslist.clear(); } @@ -132,6 +129,41 @@ void RecPart::setEncoding(const QString&encoding) } +void RecPart::setParameters(const part_plist_t&list) +{ + m_Parameters = list; +} + +const part_plist_t& RecPart::Parameters()const +{ + return m_Parameters; +} + +void RecPart::addParameter(const QString&key,const QString&value) +{ + m_Parameters[key]=value; +} + +const QString RecPart::searchParamter(const QString&key)const +{ + QString value(""); + part_plist_t::ConstIterator it = m_Parameters.find(key); + if (it != m_Parameters.end()) { + value = it.data(); + } + return value; +} + +void RecPart::setPositionlist(const QValueList<int>&poslist) +{ + m_poslist = poslist; +} + +const QValueList<int>& RecPart::Positionlist()const +{ + return m_poslist; +} + RecBody::RecBody() - : m_BodyText(),m_PartsList() + : m_BodyText(),m_PartsList(),m_description() { m_PartsList.setAutoDelete(true); @@ -169,21 +201,11 @@ void RecBody::addPart(const RecPart& part) } -void RecBody::setType(const QString&type) +void RecBody::setDescription(const RecPart&des) { - m_type = type; + m_description = des; } -const QString& RecBody::Type()const +const RecPart& RecBody::Description()const { - return m_type; -} - -void RecBody::setSubtype(const QString&type) -{ - m_subtype = type; -} - -const QString& RecBody::Subtype()const -{ - return m_subtype; + return m_description; } |