| 111 | } |
| 112 | |
| 113 | AbstractPart * IMAPPart::attachmentWithIMAPBody1Part(struct mailimap_body_type_1part * body_1part, |
| 114 | String * partID) |
| 115 | { |
| 116 | switch (body_1part->bd_type) { |
| 117 | case MAILIMAP_BODY_TYPE_1PART_BASIC: |
| 118 | { |
| 119 | IMAPPart * attachment; |
| 120 | |
| 121 | attachment = attachmentWithIMAPBody1PartBasic(body_1part->bd_data.bd_type_basic, |
| 122 | body_1part->bd_ext_1part); |
| 123 | attachment->setPartID(partID); |
| 124 | return attachment; |
| 125 | } |
| 126 | case MAILIMAP_BODY_TYPE_1PART_MSG: |
| 127 | { |
| 128 | return attachmentWithIMAPBody1PartMessage(body_1part->bd_data.bd_type_msg, |
| 129 | body_1part->bd_ext_1part, partID); |
| 130 | } |
| 131 | case MAILIMAP_BODY_TYPE_1PART_TEXT: |
| 132 | { |
| 133 | IMAPPart * attachment; |
| 134 | |
| 135 | attachment = attachmentWithIMAPBody1PartText(body_1part->bd_data.bd_type_text, |
| 136 | body_1part->bd_ext_1part); |
| 137 | attachment->setPartID(partID); |
| 138 | MCLog("attachment %s", MCUTF8(partID)); |
| 139 | return attachment; |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | return NULL; |
| 144 | } |
| 145 | |
| 146 | IMAPMessagePart * IMAPPart::attachmentWithIMAPBody1PartMessage(struct mailimap_body_type_msg * message, |
| 147 | struct mailimap_body_ext_1part * extension, |