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 @@ | |||
9 | #define FLAG_RECENT 5 | 9 | #define FLAG_RECENT 5 |
10 | 10 | ||
11 | #include <qlist.h> | 11 | #include <qlist.h> |
12 | #include <qbitarray.h> | 12 | #include <qbitarray.h> |
13 | #include <qstring.h> | 13 | #include <qstring.h> |
14 | #include <qstringlist.h> | 14 | #include <qstringlist.h> |
15 | #include <qmap.h> | ||
16 | #include <qvaluelist.h> | ||
15 | 17 | ||
16 | /* a class to describe mails in a mailbox */ | 18 | /* a class to describe mails in a mailbox */ |
17 | /* Attention! | 19 | /* Attention! |
18 | From programmers point of view it would make sense to | 20 | From programmers point of view it would make sense to |
19 | store the mail body into this class, too. | 21 | store the mail body into this class, too. |
20 | But: not from the point of view of the device. | 22 | But: not from the point of view of the device. |
@@ -65,50 +67,61 @@ protected: | |||
65 | QBitArray msg_flags; | 67 | QBitArray msg_flags; |
66 | QStringList to,cc,bcc; | 68 | QStringList to,cc,bcc; |
67 | void init(); | 69 | void init(); |
68 | void copy_old(const RecMail&old); | 70 | void copy_old(const RecMail&old); |
69 | }; | 71 | }; |
70 | 72 | ||
73 | typedef QMap<QString,QString> part_plist_t; | ||
74 | |||
71 | class RecPart | 75 | class RecPart |
72 | { | 76 | { |
73 | protected: | 77 | protected: |
74 | QString m_type,m_subtype,m_identifier,m_encoding; | 78 | QString m_type,m_subtype,m_identifier,m_encoding; |
75 | unsigned int m_lines; | 79 | unsigned int m_lines; |
80 | part_plist_t m_Parameters; | ||
81 | /* describes the position in the mail */ | ||
82 | QValueList<int> m_poslist; | ||
83 | |||
76 | public: | 84 | public: |
77 | RecPart(); | 85 | RecPart(); |
78 | RecPart(const QString&identifier,const QString&type="",const QString&subtype="",const QString&encoding="BASE64",unsigned int lines=0); | ||
79 | virtual ~RecPart(); | 86 | virtual ~RecPart(); |
80 | 87 | ||
81 | const QString&Type()const; | 88 | const QString&Type()const; |
82 | void setType(const QString&type); | 89 | void setType(const QString&type); |
83 | const QString&Subtype()const; | 90 | const QString&Subtype()const; |
84 | void setSubtype(const QString&subtype); | 91 | void setSubtype(const QString&subtype); |
85 | const QString&Identifier()const; | 92 | const QString&Identifier()const; |
86 | void setIdentifier(const QString&identifier); | 93 | void setIdentifier(const QString&identifier); |
87 | const QString&Encoding()const; | 94 | const QString&Encoding()const; |
88 | void setEncoding(const QString&encoding); | 95 | void setEncoding(const QString&encoding); |
89 | void setLines(unsigned int lines); | 96 | void setLines(unsigned int lines); |
90 | const unsigned int Lines()const; | 97 | const unsigned int Lines()const; |
98 | |||
99 | void setParameters(const part_plist_t&list); | ||
100 | const part_plist_t&Parameters()const; | ||
101 | void addParameter(const QString&key,const QString&value); | ||
102 | const QString searchParamter(const QString&key)const; | ||
103 | void setPositionlist(const QValueList<int>&poslist); | ||
104 | const QValueList<int>& Positionlist()const; | ||
91 | }; | 105 | }; |
92 | 106 | ||
93 | class RecBody | 107 | class RecBody |
94 | { | 108 | { |
95 | protected: | 109 | protected: |
96 | QString m_BodyText,m_type,m_subtype; | 110 | QString m_BodyText; |
97 | QList<RecPart> m_PartsList; | 111 | QList<RecPart> m_PartsList; |
112 | RecPart m_description; | ||
98 | 113 | ||
99 | public: | 114 | public: |
100 | RecBody(); | 115 | RecBody(); |
101 | virtual ~RecBody(); | 116 | virtual ~RecBody(); |
102 | void setBodytext(const QString&); | 117 | void setBodytext(const QString&); |
103 | const QString& Bodytext()const; | 118 | const QString& Bodytext()const; |
104 | void setType(const QString&); | ||
105 | const QString&Type()const; | ||
106 | void setSubtype(const QString&); | ||
107 | const QString&Subtype()const; | ||
108 | 119 | ||
120 | void setDescription(const RecPart&des); | ||
121 | const RecPart& Description()const; | ||
109 | 122 | ||
110 | void setParts(const QList<RecPart>&parts); | 123 | void setParts(const QList<RecPart>&parts); |
111 | const QList<RecPart>& Parts()const; | 124 | const QList<RecPart>& Parts()const; |
112 | void addPart(const RecPart&part); | 125 | void addPart(const RecPart&part); |
113 | }; | 126 | }; |
114 | 127 | ||