| 1195 | } |
| 1196 | |
| 1197 | MessageHeader * MessageHeader::forwardHeader() |
| 1198 | { |
| 1199 | MessageHeader * result; |
| 1200 | String * subjectValue; |
| 1201 | Array * referencesValue; |
| 1202 | Array * inReplyTo; |
| 1203 | |
| 1204 | referencesValue = NULL; |
| 1205 | inReplyTo = NULL; |
| 1206 | |
| 1207 | result = new MessageHeader(); |
| 1208 | if (subject() == NULL) { |
| 1209 | subjectValue = MCSTR("Fw: "); |
| 1210 | } |
| 1211 | else { |
| 1212 | subjectValue = MCSTR("Fw: ")->stringByAppendingString(subject()->extractedSubjectAndKeepBracket(true)); |
| 1213 | } |
| 1214 | if (references() != NULL) { |
| 1215 | referencesValue = (Array *) (references()->copy()); |
| 1216 | referencesValue->autorelease(); |
| 1217 | if (messageID() != NULL ) { |
| 1218 | referencesValue->addObject(messageID()); |
| 1219 | } |
| 1220 | } |
| 1221 | if (messageID() != NULL) { |
| 1222 | inReplyTo = Array::array(); |
| 1223 | inReplyTo->addObject(messageID()); |
| 1224 | } |
| 1225 | result->setSubject(subjectValue); |
| 1226 | result->setReferences(referencesValue); |
| 1227 | result->setInReplyTo(inReplyTo); |
| 1228 | |
| 1229 | result->autorelease(); |
| 1230 | return result; |
| 1231 | } |
| 1232 | |
| 1233 | HashMap * MessageHeader::serializable() |
| 1234 | { |
nothing calls this directly
no test coverage detected