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

Function isTextPart

src/core/renderer/MCHTMLRenderer.cpp:97–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95 Array * relatedAttachments);
96
97static bool isTextPart(AbstractPart * part, htmlRendererContext * context)
98{
99 String * mimeType = part->mimeType()->lowercaseString();
100 MCAssert(mimeType != NULL);
101
102 if (!part->isInlineAttachment()) {
103 if (part->isAttachment() || ((part->filename() != NULL) && context->firstRendered)) {
104 return false;
105 }
106 }
107
108 if (mimeType->isEqual(MCSTR("text/plain"))) {
109 return true;
110 }
111 else if (mimeType->isEqual(MCSTR("text/html"))) {
112 return true;
113 }
114 else {
115 return false;
116 }
117}
118
119
120static AbstractPart * preferredPartInMultipartAlternative(AbstractMultipart * part)

Callers 1

Calls 6

lowercaseStringMethod · 0.80
isAttachmentMethod · 0.80
mimeTypeMethod · 0.45
isInlineAttachmentMethod · 0.45
filenameMethod · 0.45
isEqualMethod · 0.45

Tested by

no test coverage detected