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/mediaType.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/mediaType.cpp')
| -rw-r--r-- | src/mediaType.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mediaType.cpp b/src/mediaType.cpp index 92e8d058..62d65c23 100644 --- a/src/mediaType.cpp +++ b/src/mediaType.cpp @@ -48,8 +48,9 @@ mediaType::mediaType(const string& type, const string& subType) } -void mediaType::parseImpl(const string& buffer, const string::size_type position, - const string::size_type end, string::size_type* newPosition) +void mediaType::parseImpl + (const parsingContext& ctx, const string& buffer, const string::size_type position, + const string::size_type end, string::size_type* newPosition) { const string::value_type* const pend = buffer.data() + end; const string::value_type* const pstart = buffer.data() + position; @@ -82,12 +83,13 @@ void mediaType::parseImpl(const string& buffer, const string::size_type position } -void mediaType::generateImpl(utility::outputStream& os, const string::size_type maxLineLength, - const string::size_type curLinePos, string::size_type* newLinePos) const +void mediaType::generateImpl + (const generationContext& ctx, utility::outputStream& os, + const string::size_type curLinePos, string::size_type* newLinePos) const { const string value = m_type + "/" + m_subType; - if (curLinePos + value.length() > maxLineLength) + if (curLinePos + value.length() > ctx.getMaxLineLength()) { os << NEW_LINE_SEQUENCE; os << value; |
