Browse Source

remove transport_encode, because it was b0rken

MIME-13
Roker 2 years ago
parent
commit
8c2985692b
2 changed files with 12 additions and 12 deletions
  1. +11
    -11
      src/headerparser.cc
  2. +1
    -1
      src/headerparser.hh

+ 11
- 11
src/headerparser.cc View File

@ -90,7 +90,7 @@ struct Discard : public HeaderBase
// Do nothing, intentionally. So this header is discarded.
}
virtual void output(std::string&, const message*, bool) override
virtual void output(std::string&, const message*) override
{
// do nothing.
}
@ -100,17 +100,17 @@ template<class TM>
struct OutputHeader : HeaderBase
{
TM message::* member;
void (*out_fn)(std::string&, const TM& data, bool transport_encode);
void (*out_fn)(std::string&, const TM& data);
OutputHeader(sv name, TM message::* m, void(*out)(std::string&, const TM&, bool))
OutputHeader(sv name, TM message::* m, void(*out)(std::string&, const TM&))
: HeaderBase(name)
, member{m}
, out_fn{out}
{}
virtual void output(std::string& out, const message* msg, bool transport_encode) override
virtual void output(std::string& out, const message* msg) override
{
out_fn(out, msg->*member, transport_encode);
out_fn(out, msg->*member);
}
};
@ -122,7 +122,7 @@ struct SimpleHeader : public OutputHeader<TM>
typedef OutputHeader<TM> Base;
TM (*in_fn)(sv);
SimpleHeader(sv name, TM message::* m, TM(*in)(sv), void(*out)(std::string&, const TM&, bool))
SimpleHeader(sv name, TM message::* m, TM(*in)(sv), void(*out)(std::string&, const TM&))
: Base(name, m, out)
, in_fn{in}
{}
@ -145,7 +145,7 @@ struct RuleHeader : public OutputHeader<TM>
TM (*in_fn)(const TP&);
const rule_t& rule;
RuleHeader(sv name, TM message::* m, const rule_t& r, TM(*in)(const TP&), void(*out)(std::string&, const TM&, bool) )
RuleHeader(sv name, TM message::* m, const rule_t& r, TM(*in)(const TP&), void(*out)(std::string&, const TM&) )
: Base(name, m, out)
, in_fn(in)
, rule{r}
@ -169,7 +169,7 @@ struct RuleHeader : public OutputHeader<TM>
};
void just_copy(std::string& out, const std::string& value, bool transport_encode)
void just_copy(std::string& out, const std::string& value)
{
out += value;
}
@ -179,7 +179,7 @@ void just_copy(std::string& out, const std::string& value, bool transport_encode
struct AuxHeader : public HeaderBase
{
// typedef qi::rule<sv::const_iterator, std::string()> rule_t;
typedef void (*out_fn_t)(std::string&, const std::string& value, bool transport_encode);
typedef void (*out_fn_t)(std::string&, const std::string& value);
out_fn_t out_fn;
@ -193,7 +193,7 @@ struct AuxHeader : public HeaderBase
add_opt_field(msg, HeaderBase::name(), s);
}
virtual void output(std::string& out, const message* msg, bool transport_encode) override
virtual void output(std::string& out, const message* msg) override
{
if(out_fn)
{
@ -202,7 +202,7 @@ struct AuxHeader : public HeaderBase
if(spl)
{
out += name_s + ": ";
out_fn(out, spl->value->value, transport_encode);
out_fn(out, spl->value->value);
out += "\r\n";
}
}


+ 1
- 1
src/headerparser.hh View File

@ -15,7 +15,7 @@ namespace pEpMIME
HeaderBase(sv _name) : m_name(_name) {}
virtual ~HeaderBase() = default;
virtual void assign(message* msg, sv) = 0;
virtual void output(std::string& out, const message* msg, bool transport_encode) = 0;
virtual void output(std::string& out, const message* msg) = 0;
sv name() const { return m_name; }


Loading…
Cancel
Save