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/libmailwrapper/mailtypes.h | |
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/libmailwrapper/mailtypes.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/mailtypes.h | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/noncore/net/mail/libmailwrapper/mailtypes.h b/noncore/net/mail/libmailwrapper/mailtypes.h index 900f10a..60db527 100644 --- a/noncore/net/mail/libmailwrapper/mailtypes.h +++ b/noncore/net/mail/libmailwrapper/mailtypes.h @@ -9,12 +9,14 @@ #define FLAG_RECENT 5 #include <qlist.h> #include <qbitarray.h> #include <qstring.h> #include <qstringlist.h> +#include <qmap.h> +#include <qvaluelist.h> /* a class to describe mails in a mailbox */ /* Attention! From programmers point of view it would make sense to store the mail body into this class, too. But: not from the point of view of the device. @@ -65,50 +67,61 @@ protected: QBitArray msg_flags; QStringList to,cc,bcc; void init(); void copy_old(const RecMail&old); }; +typedef QMap<QString,QString> part_plist_t; + class RecPart { protected: QString m_type,m_subtype,m_identifier,m_encoding; unsigned int m_lines; + part_plist_t m_Parameters; + /* describes the position in the mail */ + QValueList<int> m_poslist; + public: RecPart(); - RecPart(const QString&identifier,const QString&type="",const QString&subtype="",const QString&encoding="BASE64",unsigned int lines=0); virtual ~RecPart(); const QString&Type()const; void setType(const QString&type); const QString&Subtype()const; void setSubtype(const QString&subtype); const QString&Identifier()const; void setIdentifier(const QString&identifier); const QString&Encoding()const; void setEncoding(const QString&encoding); void setLines(unsigned int lines); const unsigned int Lines()const; + + void setParameters(const part_plist_t&list); + const part_plist_t&Parameters()const; + void addParameter(const QString&key,const QString&value); + const QString searchParamter(const QString&key)const; + void setPositionlist(const QValueList<int>&poslist); + const QValueList<int>& Positionlist()const; }; class RecBody { protected: - QString m_BodyText,m_type,m_subtype; + QString m_BodyText; QList<RecPart> m_PartsList; + RecPart m_description; public: RecBody(); virtual ~RecBody(); void setBodytext(const QString&); const QString& Bodytext()const; - void setType(const QString&); - const QString&Type()const; - void setSubtype(const QString&); - const QString&Subtype()const; + void setDescription(const RecPart&des); + const RecPart& Description()const; void setParts(const QList<RecPart>&parts); const QList<RecPart>& Parts()const; void addPart(const RecPart&part); }; |