From 0c5d4a10e6f616f5a63787b8fbda86ec9fc487a9 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Sun, 24 Feb 2013 16:28:13 +0100 Subject: Message generation/parsing context. Charset conversion options. Preliminary implementation of RFC-6532. --- src/bodyPart.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/bodyPart.cpp') diff --git a/src/bodyPart.cpp b/src/bodyPart.cpp index fbe9f1ed..32544ba8 100644 --- a/src/bodyPart.cpp +++ b/src/bodyPart.cpp @@ -47,17 +47,18 @@ bodyPart::bodyPart(weak_ref parentPart) void bodyPart::parseImpl - (ref parser, + (const parsingContext& ctx, + ref parser, const utility::stream::size_type position, const utility::stream::size_type end, utility::stream::size_type* newPosition) { // Parse the headers string::size_type pos = position; - m_header->parse(parser, pos, end, &pos); + m_header->parse(ctx, parser, pos, end, &pos); // Parse the body contents - m_body->parse(parser, pos, end, NULL); + m_body->parse(ctx, parser, pos, end, NULL); setParsedBounds(position, end); @@ -66,14 +67,15 @@ void bodyPart::parseImpl } -void bodyPart::generateImpl(utility::outputStream& os, const string::size_type maxLineLength, - const string::size_type /* curLinePos */, string::size_type* newLinePos) const +void bodyPart::generateImpl + (const generationContext& ctx, utility::outputStream& os, + const string::size_type /* curLinePos */, string::size_type* newLinePos) const { - m_header->generate(os, maxLineLength); + m_header->generate(ctx, os); os << CRLF; - m_body->generate(os, maxLineLength); + m_body->generate(ctx, os); if (newLinePos) *newLinePos = 0; -- cgit v1.2.3