-rw-r--r-- | noncore/net/mail/ProgrammersDoc/ReceivingMails.dia | bin | 3474 -> 3472 bytes | |||
-rw-r--r-- | noncore/net/mail/libmailwrapper/mailtypes.cpp | 11 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/mailtypes.h | 6 | ||||
-rw-r--r-- | noncore/net/mail/mailtypes.cpp | 11 | ||||
-rw-r--r-- | noncore/net/mail/mailtypes.h | 6 |
5 files changed, 16 insertions, 18 deletions
diff --git a/noncore/net/mail/ProgrammersDoc/ReceivingMails.dia b/noncore/net/mail/ProgrammersDoc/ReceivingMails.dia index a4a5fb6..4e63dc6 100644 --- a/noncore/net/mail/ProgrammersDoc/ReceivingMails.dia +++ b/noncore/net/mail/ProgrammersDoc/ReceivingMails.dia | |||
Binary files differ | |||
diff --git a/noncore/net/mail/libmailwrapper/mailtypes.cpp b/noncore/net/mail/libmailwrapper/mailtypes.cpp index f56bb63..9c312e9 100644 --- a/noncore/net/mail/libmailwrapper/mailtypes.cpp +++ b/noncore/net/mail/libmailwrapper/mailtypes.cpp | |||
@@ -121,91 +121,90 @@ void RecPart::setIdentifier(const QString&identifier) | |||
121 | const QString& RecPart::Encoding()const | 121 | const QString& RecPart::Encoding()const |
122 | { | 122 | { |
123 | return m_encoding; | 123 | return m_encoding; |
124 | } | 124 | } |
125 | 125 | ||
126 | void RecPart::setEncoding(const QString&encoding) | 126 | void RecPart::setEncoding(const QString&encoding) |
127 | { | 127 | { |
128 | m_encoding = encoding; | 128 | m_encoding = encoding; |
129 | } | 129 | } |
130 | 130 | ||
131 | void RecPart::setParameters(const part_plist_t&list) | 131 | void RecPart::setParameters(const part_plist_t&list) |
132 | { | 132 | { |
133 | m_Parameters = list; | 133 | m_Parameters = list; |
134 | } | 134 | } |
135 | 135 | ||
136 | const part_plist_t& RecPart::Parameters()const | 136 | const part_plist_t& RecPart::Parameters()const |
137 | { | 137 | { |
138 | return m_Parameters; | 138 | return m_Parameters; |
139 | } | 139 | } |
140 | 140 | ||
141 | void RecPart::addParameter(const QString&key,const QString&value) | 141 | void RecPart::addParameter(const QString&key,const QString&value) |
142 | { | 142 | { |
143 | m_Parameters[key]=value; | 143 | m_Parameters[key]=value; |
144 | } | 144 | } |
145 | 145 | ||
146 | const QString RecPart::searchParamter(const QString&key)const | 146 | const QString RecPart::searchParamter(const QString&key)const |
147 | { | 147 | { |
148 | QString value(""); | 148 | QString value(""); |
149 | part_plist_t::ConstIterator it = m_Parameters.find(key); | 149 | part_plist_t::ConstIterator it = m_Parameters.find(key); |
150 | if (it != m_Parameters.end()) { | 150 | if (it != m_Parameters.end()) { |
151 | value = it.data(); | 151 | value = it.data(); |
152 | } | 152 | } |
153 | return value; | 153 | return value; |
154 | } | 154 | } |
155 | 155 | ||
156 | void RecPart::setPositionlist(const QValueList<int>&poslist) | 156 | void RecPart::setPositionlist(const QValueList<int>&poslist) |
157 | { | 157 | { |
158 | m_poslist = poslist; | 158 | m_poslist = poslist; |
159 | } | 159 | } |
160 | 160 | ||
161 | const QValueList<int>& RecPart::Positionlist()const | 161 | const QValueList<int>& RecPart::Positionlist()const |
162 | { | 162 | { |
163 | return m_poslist; | 163 | return m_poslist; |
164 | } | 164 | } |
165 | 165 | ||
166 | RecBody::RecBody() | 166 | RecBody::RecBody() |
167 | : m_BodyText(),m_PartsList(),m_description() | 167 | : m_BodyText(),m_PartsList(),m_description() |
168 | { | 168 | { |
169 | m_PartsList.setAutoDelete(true); | 169 | m_PartsList.clear(); |
170 | } | 170 | } |
171 | 171 | ||
172 | RecBody::~RecBody() | 172 | RecBody::~RecBody() |
173 | { | 173 | { |
174 | } | 174 | } |
175 | 175 | ||
176 | void RecBody::setBodytext(const QString&bodyText) | 176 | void RecBody::setBodytext(const QString&bodyText) |
177 | { | 177 | { |
178 | m_BodyText = bodyText; | 178 | m_BodyText = bodyText; |
179 | } | 179 | } |
180 | 180 | ||
181 | const QString& RecBody::Bodytext()const | 181 | const QString& RecBody::Bodytext()const |
182 | { | 182 | { |
183 | return m_BodyText; | 183 | return m_BodyText; |
184 | } | 184 | } |
185 | 185 | ||
186 | void RecBody::setParts(const QList<RecPart>&parts) | 186 | void RecBody::setParts(const QValueList<RecPart>&parts) |
187 | { | 187 | { |
188 | m_PartsList.clear(); | ||
188 | m_PartsList = parts; | 189 | m_PartsList = parts; |
189 | m_PartsList.setAutoDelete(true); | ||
190 | } | 190 | } |
191 | 191 | ||
192 | const QList<RecPart>& RecBody::Parts()const | 192 | const QValueList<RecPart>& RecBody::Parts()const |
193 | { | 193 | { |
194 | return m_PartsList; | 194 | return m_PartsList; |
195 | } | 195 | } |
196 | 196 | ||
197 | void RecBody::addPart(const RecPart& part) | 197 | void RecBody::addPart(const RecPart& part) |
198 | { | 198 | { |
199 | RecPart*p = new RecPart(part); | 199 | m_PartsList.append(part); |
200 | m_PartsList.append(p); | ||
201 | } | 200 | } |
202 | 201 | ||
203 | void RecBody::setDescription(const RecPart&des) | 202 | void RecBody::setDescription(const RecPart&des) |
204 | { | 203 | { |
205 | m_description = des; | 204 | m_description = des; |
206 | } | 205 | } |
207 | 206 | ||
208 | const RecPart& RecBody::Description()const | 207 | const RecPart& RecBody::Description()const |
209 | { | 208 | { |
210 | return m_description; | 209 | return m_description; |
211 | } | 210 | } |
diff --git a/noncore/net/mail/libmailwrapper/mailtypes.h b/noncore/net/mail/libmailwrapper/mailtypes.h index 60db527..f308bc7 100644 --- a/noncore/net/mail/libmailwrapper/mailtypes.h +++ b/noncore/net/mail/libmailwrapper/mailtypes.h | |||
@@ -63,66 +63,66 @@ public: | |||
63 | 63 | ||
64 | protected: | 64 | protected: |
65 | QString subject,date,from,mbox,msg_id,replyto; | 65 | QString subject,date,from,mbox,msg_id,replyto; |
66 | int msg_number,msg_size; | 66 | int msg_number,msg_size; |
67 | QBitArray msg_flags; | 67 | QBitArray msg_flags; |
68 | QStringList to,cc,bcc; | 68 | QStringList to,cc,bcc; |
69 | void init(); | 69 | void init(); |
70 | void copy_old(const RecMail&old); | 70 | void copy_old(const RecMail&old); |
71 | }; | 71 | }; |
72 | 72 | ||
73 | typedef QMap<QString,QString> part_plist_t; | 73 | typedef QMap<QString,QString> part_plist_t; |
74 | 74 | ||
75 | class RecPart | 75 | class RecPart |
76 | { | 76 | { |
77 | protected: | 77 | protected: |
78 | QString m_type,m_subtype,m_identifier,m_encoding; | 78 | QString m_type,m_subtype,m_identifier,m_encoding; |
79 | unsigned int m_lines; | 79 | unsigned int m_lines; |
80 | part_plist_t m_Parameters; | 80 | part_plist_t m_Parameters; |
81 | /* describes the position in the mail */ | 81 | /* describes the position in the mail */ |
82 | QValueList<int> m_poslist; | 82 | QValueList<int> m_poslist; |
83 | 83 | ||
84 | public: | 84 | public: |
85 | RecPart(); | 85 | RecPart(); |
86 | virtual ~RecPart(); | 86 | virtual ~RecPart(); |
87 | 87 | ||
88 | const QString&Type()const; | 88 | const QString&Type()const; |
89 | void setType(const QString&type); | 89 | void setType(const QString&type); |
90 | const QString&Subtype()const; | 90 | const QString&Subtype()const; |
91 | void setSubtype(const QString&subtype); | 91 | void setSubtype(const QString&subtype); |
92 | const QString&Identifier()const; | 92 | const QString&Identifier()const; |
93 | void setIdentifier(const QString&identifier); | 93 | void setIdentifier(const QString&identifier); |
94 | const QString&Encoding()const; | 94 | const QString&Encoding()const; |
95 | void setEncoding(const QString&encoding); | 95 | void setEncoding(const QString&encoding); |
96 | void setLines(unsigned int lines); | 96 | void setLines(unsigned int lines); |
97 | const unsigned int Lines()const; | 97 | const unsigned int Lines()const; |
98 | 98 | ||
99 | void setParameters(const part_plist_t&list); | 99 | void setParameters(const part_plist_t&list); |
100 | const part_plist_t&Parameters()const; | 100 | const part_plist_t&Parameters()const; |
101 | void addParameter(const QString&key,const QString&value); | 101 | void addParameter(const QString&key,const QString&value); |
102 | const QString searchParamter(const QString&key)const; | 102 | const QString searchParamter(const QString&key)const; |
103 | void setPositionlist(const QValueList<int>&poslist); | 103 | void setPositionlist(const QValueList<int>&poslist); |
104 | const QValueList<int>& Positionlist()const; | 104 | const QValueList<int>& Positionlist()const; |
105 | }; | 105 | }; |
106 | 106 | ||
107 | class RecBody | 107 | class RecBody |
108 | { | 108 | { |
109 | protected: | 109 | protected: |
110 | QString m_BodyText; | 110 | QString m_BodyText; |
111 | QList<RecPart> m_PartsList; | 111 | QValueList<RecPart> m_PartsList; |
112 | RecPart m_description; | 112 | RecPart m_description; |
113 | 113 | ||
114 | public: | 114 | public: |
115 | RecBody(); | 115 | RecBody(); |
116 | virtual ~RecBody(); | 116 | virtual ~RecBody(); |
117 | void setBodytext(const QString&); | 117 | void setBodytext(const QString&); |
118 | const QString& Bodytext()const; | 118 | const QString& Bodytext()const; |
119 | 119 | ||
120 | void setDescription(const RecPart&des); | 120 | void setDescription(const RecPart&des); |
121 | const RecPart& Description()const; | 121 | const RecPart& Description()const; |
122 | 122 | ||
123 | void setParts(const QList<RecPart>&parts); | 123 | void setParts(const QValueList<RecPart>&parts); |
124 | const QList<RecPart>& Parts()const; | 124 | const QValueList<RecPart>& Parts()const; |
125 | void addPart(const RecPart&part); | 125 | void addPart(const RecPart&part); |
126 | }; | 126 | }; |
127 | 127 | ||
128 | #endif | 128 | #endif |
diff --git a/noncore/net/mail/mailtypes.cpp b/noncore/net/mail/mailtypes.cpp index f56bb63..9c312e9 100644 --- a/noncore/net/mail/mailtypes.cpp +++ b/noncore/net/mail/mailtypes.cpp | |||
@@ -121,91 +121,90 @@ void RecPart::setIdentifier(const QString&identifier) | |||
121 | const QString& RecPart::Encoding()const | 121 | const QString& RecPart::Encoding()const |
122 | { | 122 | { |
123 | return m_encoding; | 123 | return m_encoding; |
124 | } | 124 | } |
125 | 125 | ||
126 | void RecPart::setEncoding(const QString&encoding) | 126 | void RecPart::setEncoding(const QString&encoding) |
127 | { | 127 | { |
128 | m_encoding = encoding; | 128 | m_encoding = encoding; |
129 | } | 129 | } |
130 | 130 | ||
131 | void RecPart::setParameters(const part_plist_t&list) | 131 | void RecPart::setParameters(const part_plist_t&list) |
132 | { | 132 | { |
133 | m_Parameters = list; | 133 | m_Parameters = list; |
134 | } | 134 | } |
135 | 135 | ||
136 | const part_plist_t& RecPart::Parameters()const | 136 | const part_plist_t& RecPart::Parameters()const |
137 | { | 137 | { |
138 | return m_Parameters; | 138 | return m_Parameters; |
139 | } | 139 | } |
140 | 140 | ||
141 | void RecPart::addParameter(const QString&key,const QString&value) | 141 | void RecPart::addParameter(const QString&key,const QString&value) |
142 | { | 142 | { |
143 | m_Parameters[key]=value; | 143 | m_Parameters[key]=value; |
144 | } | 144 | } |
145 | 145 | ||
146 | const QString RecPart::searchParamter(const QString&key)const | 146 | const QString RecPart::searchParamter(const QString&key)const |
147 | { | 147 | { |
148 | QString value(""); | 148 | QString value(""); |
149 | part_plist_t::ConstIterator it = m_Parameters.find(key); | 149 | part_plist_t::ConstIterator it = m_Parameters.find(key); |
150 | if (it != m_Parameters.end()) { | 150 | if (it != m_Parameters.end()) { |
151 | value = it.data(); | 151 | value = it.data(); |
152 | } | 152 | } |
153 | return value; | 153 | return value; |
154 | } | 154 | } |
155 | 155 | ||
156 | void RecPart::setPositionlist(const QValueList<int>&poslist) | 156 | void RecPart::setPositionlist(const QValueList<int>&poslist) |
157 | { | 157 | { |
158 | m_poslist = poslist; | 158 | m_poslist = poslist; |
159 | } | 159 | } |
160 | 160 | ||
161 | const QValueList<int>& RecPart::Positionlist()const | 161 | const QValueList<int>& RecPart::Positionlist()const |
162 | { | 162 | { |
163 | return m_poslist; | 163 | return m_poslist; |
164 | } | 164 | } |
165 | 165 | ||
166 | RecBody::RecBody() | 166 | RecBody::RecBody() |
167 | : m_BodyText(),m_PartsList(),m_description() | 167 | : m_BodyText(),m_PartsList(),m_description() |
168 | { | 168 | { |
169 | m_PartsList.setAutoDelete(true); | 169 | m_PartsList.clear(); |
170 | } | 170 | } |
171 | 171 | ||
172 | RecBody::~RecBody() | 172 | RecBody::~RecBody() |
173 | { | 173 | { |
174 | } | 174 | } |
175 | 175 | ||
176 | void RecBody::setBodytext(const QString&bodyText) | 176 | void RecBody::setBodytext(const QString&bodyText) |
177 | { | 177 | { |
178 | m_BodyText = bodyText; | 178 | m_BodyText = bodyText; |
179 | } | 179 | } |
180 | 180 | ||
181 | const QString& RecBody::Bodytext()const | 181 | const QString& RecBody::Bodytext()const |
182 | { | 182 | { |
183 | return m_BodyText; | 183 | return m_BodyText; |
184 | } | 184 | } |
185 | 185 | ||
186 | void RecBody::setParts(const QList<RecPart>&parts) | 186 | void RecBody::setParts(const QValueList<RecPart>&parts) |
187 | { | 187 | { |
188 | m_PartsList.clear(); | ||
188 | m_PartsList = parts; | 189 | m_PartsList = parts; |
189 | m_PartsList.setAutoDelete(true); | ||
190 | } | 190 | } |
191 | 191 | ||
192 | const QList<RecPart>& RecBody::Parts()const | 192 | const QValueList<RecPart>& RecBody::Parts()const |
193 | { | 193 | { |
194 | return m_PartsList; | 194 | return m_PartsList; |
195 | } | 195 | } |
196 | 196 | ||
197 | void RecBody::addPart(const RecPart& part) | 197 | void RecBody::addPart(const RecPart& part) |
198 | { | 198 | { |
199 | RecPart*p = new RecPart(part); | 199 | m_PartsList.append(part); |
200 | m_PartsList.append(p); | ||
201 | } | 200 | } |
202 | 201 | ||
203 | void RecBody::setDescription(const RecPart&des) | 202 | void RecBody::setDescription(const RecPart&des) |
204 | { | 203 | { |
205 | m_description = des; | 204 | m_description = des; |
206 | } | 205 | } |
207 | 206 | ||
208 | const RecPart& RecBody::Description()const | 207 | const RecPart& RecBody::Description()const |
209 | { | 208 | { |
210 | return m_description; | 209 | return m_description; |
211 | } | 210 | } |
diff --git a/noncore/net/mail/mailtypes.h b/noncore/net/mail/mailtypes.h index 60db527..f308bc7 100644 --- a/noncore/net/mail/mailtypes.h +++ b/noncore/net/mail/mailtypes.h | |||
@@ -63,66 +63,66 @@ public: | |||
63 | 63 | ||
64 | protected: | 64 | protected: |
65 | QString subject,date,from,mbox,msg_id,replyto; | 65 | QString subject,date,from,mbox,msg_id,replyto; |
66 | int msg_number,msg_size; | 66 | int msg_number,msg_size; |
67 | QBitArray msg_flags; | 67 | QBitArray msg_flags; |
68 | QStringList to,cc,bcc; | 68 | QStringList to,cc,bcc; |
69 | void init(); | 69 | void init(); |
70 | void copy_old(const RecMail&old); | 70 | void copy_old(const RecMail&old); |
71 | }; | 71 | }; |
72 | 72 | ||
73 | typedef QMap<QString,QString> part_plist_t; | 73 | typedef QMap<QString,QString> part_plist_t; |
74 | 74 | ||
75 | class RecPart | 75 | class RecPart |
76 | { | 76 | { |
77 | protected: | 77 | protected: |
78 | QString m_type,m_subtype,m_identifier,m_encoding; | 78 | QString m_type,m_subtype,m_identifier,m_encoding; |
79 | unsigned int m_lines; | 79 | unsigned int m_lines; |
80 | part_plist_t m_Parameters; | 80 | part_plist_t m_Parameters; |
81 | /* describes the position in the mail */ | 81 | /* describes the position in the mail */ |
82 | QValueList<int> m_poslist; | 82 | QValueList<int> m_poslist; |
83 | 83 | ||
84 | public: | 84 | public: |
85 | RecPart(); | 85 | RecPart(); |
86 | virtual ~RecPart(); | 86 | virtual ~RecPart(); |
87 | 87 | ||
88 | const QString&Type()const; | 88 | const QString&Type()const; |
89 | void setType(const QString&type); | 89 | void setType(const QString&type); |
90 | const QString&Subtype()const; | 90 | const QString&Subtype()const; |
91 | void setSubtype(const QString&subtype); | 91 | void setSubtype(const QString&subtype); |
92 | const QString&Identifier()const; | 92 | const QString&Identifier()const; |
93 | void setIdentifier(const QString&identifier); | 93 | void setIdentifier(const QString&identifier); |
94 | const QString&Encoding()const; | 94 | const QString&Encoding()const; |
95 | void setEncoding(const QString&encoding); | 95 | void setEncoding(const QString&encoding); |
96 | void setLines(unsigned int lines); | 96 | void setLines(unsigned int lines); |
97 | const unsigned int Lines()const; | 97 | const unsigned int Lines()const; |
98 | 98 | ||
99 | void setParameters(const part_plist_t&list); | 99 | void setParameters(const part_plist_t&list); |
100 | const part_plist_t&Parameters()const; | 100 | const part_plist_t&Parameters()const; |
101 | void addParameter(const QString&key,const QString&value); | 101 | void addParameter(const QString&key,const QString&value); |
102 | const QString searchParamter(const QString&key)const; | 102 | const QString searchParamter(const QString&key)const; |
103 | void setPositionlist(const QValueList<int>&poslist); | 103 | void setPositionlist(const QValueList<int>&poslist); |
104 | const QValueList<int>& Positionlist()const; | 104 | const QValueList<int>& Positionlist()const; |
105 | }; | 105 | }; |
106 | 106 | ||
107 | class RecBody | 107 | class RecBody |
108 | { | 108 | { |
109 | protected: | 109 | protected: |
110 | QString m_BodyText; | 110 | QString m_BodyText; |
111 | QList<RecPart> m_PartsList; | 111 | QValueList<RecPart> m_PartsList; |
112 | RecPart m_description; | 112 | RecPart m_description; |
113 | 113 | ||
114 | public: | 114 | public: |
115 | RecBody(); | 115 | RecBody(); |
116 | virtual ~RecBody(); | 116 | virtual ~RecBody(); |
117 | void setBodytext(const QString&); | 117 | void setBodytext(const QString&); |
118 | const QString& Bodytext()const; | 118 | const QString& Bodytext()const; |
119 | 119 | ||
120 | void setDescription(const RecPart&des); | 120 | void setDescription(const RecPart&des); |
121 | const RecPart& Description()const; | 121 | const RecPart& Description()const; |
122 | 122 | ||
123 | void setParts(const QList<RecPart>&parts); | 123 | void setParts(const QValueList<RecPart>&parts); |
124 | const QList<RecPart>& Parts()const; | 124 | const QValueList<RecPart>& Parts()const; |
125 | void addPart(const RecPart&part); | 125 | void addPart(const RecPart&part); |
126 | }; | 126 | }; |
127 | 127 | ||
128 | #endif | 128 | #endif |