diff options
| author | Vincent Richard <[email protected]> | 2013-02-24 15:28:13 +0000 |
|---|---|---|
| committer | Vincent Richard <[email protected]> | 2013-02-24 15:28:13 +0000 |
| commit | 0c5d4a10e6f616f5a63787b8fbda86ec9fc487a9 (patch) | |
| tree | c04b535bffeeba3e95adae01b961740bdc3a938e /src/headerField.cpp | |
| parent | Fixed filename case. (diff) | |
| download | vmime-0c5d4a10e6f616f5a63787b8fbda86ec9fc487a9.tar.gz vmime-0c5d4a10e6f616f5a63787b8fbda86ec9fc487a9.zip | |
Message generation/parsing context. Charset conversion options. Preliminary implementation of RFC-6532.
Diffstat (limited to 'src/headerField.cpp')
| -rw-r--r-- | src/headerField.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/headerField.cpp b/src/headerField.cpp index 3d0f8834..0a17abac 100644 --- a/src/headerField.cpp +++ b/src/headerField.cpp @@ -73,8 +73,9 @@ headerField& headerField::operator=(const headerField& other) } -ref <headerField> headerField::parseNext(const string& buffer, const string::size_type position, - const string::size_type end, string::size_type* newPosition) +ref <headerField> headerField::parseNext + (const parsingContext& ctx, const string& buffer, const string::size_type position, + const string::size_type end, string::size_type* newPosition) { string::size_type pos = position; @@ -215,7 +216,7 @@ ref <headerField> headerField::parseNext(const string& buffer, const string::siz // Return a new field ref <headerField> field = headerFieldFactory::getInstance()->create(name); - field->parse(buffer, contentsStart, contentsEnd, NULL); + field->parse(ctx, buffer, contentsStart, contentsEnd, NULL); field->setParsedBounds(nameStart, pos); if (newPosition) @@ -262,19 +263,21 @@ ref <headerField> headerField::parseNext(const string& buffer, const string::siz } -void headerField::parseImpl(const string& buffer, const string::size_type position, const string::size_type end, - string::size_type* newPosition) +void headerField::parseImpl + (const parsingContext& ctx, const string& buffer, const string::size_type position, + const string::size_type end, string::size_type* newPosition) { - m_value->parse(buffer, position, end, newPosition); + m_value->parse(ctx, buffer, position, end, newPosition); } -void headerField::generateImpl(utility::outputStream& os, const string::size_type maxLineLength, - const string::size_type curLinePos, string::size_type* newLinePos) const +void headerField::generateImpl + (const generationContext& ctx, utility::outputStream& os, + const string::size_type curLinePos, string::size_type* newLinePos) const { os << m_name + ": "; - m_value->generate(os, maxLineLength, curLinePos + m_name.length() + 2, newLinePos); + m_value->generate(ctx, os, curLinePos + m_name.length() + 2, newLinePos); } |
