aboutsummaryrefslogtreecommitdiffstats
path: root/src/header.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2013-02-24 15:28:13 +0000
committerVincent Richard <[email protected]>2013-02-24 15:28:13 +0000
commit0c5d4a10e6f616f5a63787b8fbda86ec9fc487a9 (patch)
treec04b535bffeeba3e95adae01b961740bdc3a938e /src/header.cpp
parentFixed filename case. (diff)
downloadvmime-0c5d4a10e6f616f5a63787b8fbda86ec9fc487a9.tar.gz
vmime-0c5d4a10e6f616f5a63787b8fbda86ec9fc487a9.zip
Message generation/parsing context. Charset conversion options. Preliminary implementation of RFC-6532.
Diffstat (limited to 'src/header.cpp')
-rw-r--r--src/header.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/header.cpp b/src/header.cpp
index 6543a302..d1896d96 100644
--- a/src/header.cpp
+++ b/src/header.cpp
@@ -61,8 +61,9 @@ field-body-contents =
specials tokens, or else consisting of texts>
*/
-void header::parseImpl(const string& buffer, const string::size_type position,
- const string::size_type end, string::size_type* newPosition)
+void header::parseImpl
+ (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;
@@ -70,7 +71,7 @@ void header::parseImpl(const string& buffer, const string::size_type position,
while (pos < end)
{
- ref <headerField> field = headerField::parseNext(buffer, pos, end, &pos);
+ ref <headerField> field = headerField::parseNext(ctx, buffer, pos, end, &pos);
if (field == NULL) break;
m_fields.push_back(field);
@@ -83,14 +84,15 @@ void header::parseImpl(const string& buffer, const string::size_type position,
}
-void header::generateImpl(utility::outputStream& os, const string::size_type maxLineLength,
- const string::size_type /* curLinePos */, string::size_type* newLinePos) const
+void header::generateImpl
+ (const generationContext& ctx, utility::outputStream& os,
+ const string::size_type /* curLinePos */, string::size_type* newLinePos) const
{
// Generate the fields
for (std::vector <ref <headerField> >::const_iterator it = m_fields.begin() ;
it != m_fields.end() ; ++it)
{
- (*it)->generate(os, maxLineLength);
+ (*it)->generate(ctx, os);
os << CRLF;
}