author | alwin <alwin> | 2004-03-12 11:21:19 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-12 11:21:19 (UTC) |
commit | c71234bda29bd83de34ce04c766f2be641ed86be (patch) (unidiff) | |
tree | 85abe5962891fabe7a743b6f518469b6d6f8c40a | |
parent | eb734381bc4414ef5584c51e49582c3fa8930440 (diff) | |
download | opie-c71234bda29bd83de34ce04c766f2be641ed86be.zip opie-c71234bda29bd83de34ce04c766f2be641ed86be.tar.gz opie-c71234bda29bd83de34ce04c766f2be641ed86be.tar.bz2 |
fixed a variable name conflict
-rw-r--r-- | noncore/net/mail/libmailwrapper/genericwrapper.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/noncore/net/mail/libmailwrapper/genericwrapper.cpp b/noncore/net/mail/libmailwrapper/genericwrapper.cpp index ffa049f..6c8a5a1 100644 --- a/noncore/net/mail/libmailwrapper/genericwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/genericwrapper.cpp | |||
@@ -113,104 +113,104 @@ QString Genericwrapper::getencoding(mailmime_mechanism*aEnc) | |||
113 | enc = "8bit"; | 113 | enc = "8bit"; |
114 | break; | 114 | break; |
115 | case MAILMIME_MECHANISM_BINARY: | 115 | case MAILMIME_MECHANISM_BINARY: |
116 | enc = "binary"; | 116 | enc = "binary"; |
117 | break; | 117 | break; |
118 | case MAILMIME_MECHANISM_QUOTED_PRINTABLE: | 118 | case MAILMIME_MECHANISM_QUOTED_PRINTABLE: |
119 | enc = "quoted-printable"; | 119 | enc = "quoted-printable"; |
120 | break; | 120 | break; |
121 | case MAILMIME_MECHANISM_BASE64: | 121 | case MAILMIME_MECHANISM_BASE64: |
122 | enc = "base64"; | 122 | enc = "base64"; |
123 | break; | 123 | break; |
124 | case MAILMIME_MECHANISM_TOKEN: | 124 | case MAILMIME_MECHANISM_TOKEN: |
125 | default: | 125 | default: |
126 | if (aEnc->enc_token) { | 126 | if (aEnc->enc_token) { |
127 | enc = QString(aEnc->enc_token); | 127 | enc = QString(aEnc->enc_token); |
128 | } | 128 | } |
129 | break; | 129 | break; |
130 | } | 130 | } |
131 | return enc; | 131 | return enc; |
132 | } | 132 | } |
133 | 133 | ||
134 | void Genericwrapper::traverseBody(RecBody&target,mailmessage*message,mailmime*mime,QValueList<int>recList,unsigned int current_rec,int current_count) | 134 | void Genericwrapper::traverseBody(RecBody&target,mailmessage*message,mailmime*mime,QValueList<int>recList,unsigned int current_rec,int current_count) |
135 | { | 135 | { |
136 | if (current_rec >= 10) { | 136 | if (current_rec >= 10) { |
137 | qDebug("too deep recursion!"); | 137 | qDebug("too deep recursion!"); |
138 | } | 138 | } |
139 | if (!message || !mime) { | 139 | if (!message || !mime) { |
140 | return; | 140 | return; |
141 | } | 141 | } |
142 | int r; | 142 | int r; |
143 | char*data = 0; | 143 | char*data = 0; |
144 | size_t len; | 144 | size_t len; |
145 | clistiter * cur = 0; | 145 | clistiter * cur = 0; |
146 | QString b; | 146 | QString b; |
147 | RecPart part; | 147 | RecPart part; |
148 | 148 | ||
149 | switch (mime->mm_type) { | 149 | switch (mime->mm_type) { |
150 | case MAILMIME_SINGLE: | 150 | case MAILMIME_SINGLE: |
151 | { | 151 | { |
152 | QValueList<int>countlist = recList; | 152 | QValueList<int>countlist = recList; |
153 | countlist.append(current_count); | 153 | countlist.append(current_count); |
154 | r = mailmessage_fetch_section(message,mime,&data,&len); | 154 | r = mailmessage_fetch_section(message,mime,&data,&len); |
155 | part.setSize(len); | 155 | part.setSize(len); |
156 | part.setPositionlist(countlist); | 156 | part.setPositionlist(countlist); |
157 | b = gen_attachment_id(); | 157 | b = gen_attachment_id(); |
158 | part.setIdentifier(b); | 158 | part.setIdentifier(b); |
159 | fillSingleBody(part,message,mime); | 159 | fillSingleBody(part,message,mime); |
160 | if (part.Type()=="text" && target.Bodytext().isNull()) { | 160 | if (part.Type()=="text" && target.Bodytext().isNull()) { |
161 | encodedString*r = new encodedString(); | 161 | encodedString*rs = new encodedString(); |
162 | r->setContent(data,len); | 162 | rs->setContent(data,len); |
163 | encodedString*res = decode_String(r,part.Encoding()); | 163 | encodedString*res = decode_String(rs,part.Encoding()); |
164 | if (countlist.count()>2) { | 164 | if (countlist.count()>2) { |
165 | bodyCache[b]=r; | 165 | bodyCache[b]=rs; |
166 | target.addPart(part); | 166 | target.addPart(part); |
167 | } else { | 167 | } else { |
168 | delete r; | 168 | delete rs; |
169 | } | 169 | } |
170 | b = QString(res->Content()); | 170 | b = QString(res->Content()); |
171 | delete res; | 171 | delete res; |
172 | target.setBodytext(b); | 172 | target.setBodytext(b); |
173 | target.setDescription(part); | 173 | target.setDescription(part); |
174 | } else { | 174 | } else { |
175 | bodyCache[b]=new encodedString(data,len); | 175 | bodyCache[b]=new encodedString(data,len); |
176 | target.addPart(part); | 176 | target.addPart(part); |
177 | } | 177 | } |
178 | } | 178 | } |
179 | break; | 179 | break; |
180 | case MAILMIME_MULTIPLE: | 180 | case MAILMIME_MULTIPLE: |
181 | { | 181 | { |
182 | unsigned int ccount = 1; | 182 | unsigned int ccount = 1; |
183 | mailmime*cbody=0; | 183 | mailmime*cbody=0; |
184 | QValueList<int>countlist = recList; | 184 | QValueList<int>countlist = recList; |
185 | for (cur = clist_begin(mime->mm_data.mm_multipart.mm_mp_list) ; cur != NULL ; cur = clist_next(cur)) { | 185 | for (cur = clist_begin(mime->mm_data.mm_multipart.mm_mp_list) ; cur != NULL ; cur = clist_next(cur)) { |
186 | cbody = (mailmime*)clist_content(cur); | 186 | cbody = (mailmime*)clist_content(cur); |
187 | if (cbody->mm_type==MAILMIME_MULTIPLE) { | 187 | if (cbody->mm_type==MAILMIME_MULTIPLE) { |
188 | RecPart targetPart; | 188 | RecPart targetPart; |
189 | targetPart.setType("multipart"); | 189 | targetPart.setType("multipart"); |
190 | countlist.append(current_count); | 190 | countlist.append(current_count); |
191 | targetPart.setPositionlist(countlist); | 191 | targetPart.setPositionlist(countlist); |
192 | target.addPart(targetPart); | 192 | target.addPart(targetPart); |
193 | } | 193 | } |
194 | traverseBody(target,message, cbody,countlist,current_rec+1,ccount); | 194 | traverseBody(target,message, cbody,countlist,current_rec+1,ccount); |
195 | if (cbody->mm_type==MAILMIME_MULTIPLE) { | 195 | if (cbody->mm_type==MAILMIME_MULTIPLE) { |
196 | countlist = recList; | 196 | countlist = recList; |
197 | } | 197 | } |
198 | ++ccount; | 198 | ++ccount; |
199 | } | 199 | } |
200 | } | 200 | } |
201 | break; | 201 | break; |
202 | case MAILMIME_MESSAGE: | 202 | case MAILMIME_MESSAGE: |
203 | { | 203 | { |
204 | QValueList<int>countlist = recList; | 204 | QValueList<int>countlist = recList; |
205 | countlist.append(current_count); | 205 | countlist.append(current_count); |
206 | /* the own header is always at recursion 0 - we don't need that */ | 206 | /* the own header is always at recursion 0 - we don't need that */ |
207 | if (current_rec > 0) { | 207 | if (current_rec > 0) { |
208 | part.setPositionlist(countlist); | 208 | part.setPositionlist(countlist); |
209 | r = mailmessage_fetch_section(message,mime,&data,&len); | 209 | r = mailmessage_fetch_section(message,mime,&data,&len); |
210 | part.setSize(len); | 210 | part.setSize(len); |
211 | part.setPositionlist(countlist); | 211 | part.setPositionlist(countlist); |
212 | b = gen_attachment_id(); | 212 | b = gen_attachment_id(); |
213 | part.setIdentifier(b); | 213 | part.setIdentifier(b); |
214 | part.setType("message"); | 214 | part.setType("message"); |
215 | part.setSubtype("rfc822"); | 215 | part.setSubtype("rfc822"); |
216 | bodyCache[b]=new encodedString(data,len); | 216 | bodyCache[b]=new encodedString(data,len); |