MCPcopy Create free account
hub / github.com/MailCore/mailcore2 / recursiveSetupPartIDWithMessagePart

Method recursiveSetupPartIDWithMessagePart

src/core/rfc822/MCMessageParser.cpp:267–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265}
266
267void MessageParser::recursiveSetupPartIDWithMessagePart(mailcore::MessagePart * part,
268 mailcore::String * partIDPrefix)
269{
270 part->setPartID(partIDPrefix);
271 String * partID = NULL;
272 switch (part->mainPart()->partType()) {
273 case PartTypeSingle:
274 case PartTypeMessage:
275 {
276 if (partIDPrefix->length() == 0) {
277 partID = MCSTR("1");
278 }
279 else {
280 partID = partIDPrefix->stringByAppendingUTF8Characters(".1");
281 }
282 break;
283 }
284 default:
285 partID = partIDPrefix;
286 break;
287 }
288 recursiveSetupPartIDWithPart(part->mainPart(), partID);
289}
290
291void MessageParser::recursiveSetupPartIDWithMultipart(mailcore::Multipart * part,
292 mailcore::String * partIDPrefix)

Callers

nothing calls this directly

Calls 5

setPartIDMethod · 0.45
partTypeMethod · 0.45
mainPartMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected