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

Function htmlForAbstractMessagePart

src/core/renderer/MCHTMLRenderer.cpp:434–453  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

432}
433
434static String * htmlForAbstractMessagePart(AbstractMessagePart * part, htmlRendererContext * context)
435{
436 if (context->pass == 0) {
437 return NULL;
438 }
439 String * substring = htmlForAbstractPart(part->mainPart(), context);
440 if (substring == NULL)
441 return NULL;
442
443 HashMap * values = context->htmlCallback->templateValuesForHeader(part->header());
444 String * headerString = renderTemplate(context->htmlCallback->templateForEmbeddedMessageHeader(part->header()), values);
445
446 HashMap * msgValues = new HashMap();
447 msgValues->setObjectForKey(MCSTR("HEADER"), headerString);
448 msgValues->setObjectForKey(MCSTR("BODY"), substring);
449 String * result = renderTemplate(context->htmlCallback->templateForEmbeddedMessage(part), msgValues);
450 msgValues->release();
451
452 return result;
453}
454
455String * htmlForAbstractMultipartAlternative(AbstractMultipart * part, htmlRendererContext * context)
456{

Callers 1

htmlForAbstractPartFunction · 0.85

Calls 9

htmlForAbstractPartFunction · 0.85
renderTemplateFunction · 0.85
setObjectForKeyMethod · 0.80
releaseMethod · 0.80
mainPartMethod · 0.45
headerMethod · 0.45

Tested by

no test coverage detected