| 164 | } |
| 165 | |
| 166 | Attachment * Attachment::attachmentWithData(String * filename, Data * data) |
| 167 | { |
| 168 | Attachment * attachment; |
| 169 | String * mimeType; |
| 170 | |
| 171 | attachment = new Attachment(); |
| 172 | mimeType = Attachment::mimeTypeForFilename(filename); |
| 173 | if (mimeType != NULL) { |
| 174 | attachment->setMimeType(mimeType); |
| 175 | } |
| 176 | if (filename != NULL) { |
| 177 | attachment->setFilename(filename->lastPathComponent()); |
| 178 | } |
| 179 | attachment->setData(data); |
| 180 | |
| 181 | return (Attachment *) attachment->autorelease(); |
| 182 | } |
| 183 | |
| 184 | Attachment * Attachment::attachmentWithHTMLString(String * htmlString) |
| 185 | { |
nothing calls this directly
no test coverage detected