From 4cd6cad3b5fda6eb09c8c36efeb9426316f35a37 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Mon, 11 Feb 2008 21:16:01 +0000 Subject: allow to add prefix to generated htmlhiddens Signed-off-by: Michael Krelin --- (limited to 'lib') diff --git a/lib/openid_message.cc b/lib/openid_message.cc index 521ea85..588bd62 100644 --- a/lib/openid_message.cc +++ b/lib/openid_message.cc @@ -163,20 +163,24 @@ namespace opkele { public: const basic_openid_message& om; ostream& os; + const char *pfx; - __om_html_outputter(const basic_openid_message& m,ostream& s) - : om(m), os(s) { } + __om_html_outputter(const basic_openid_message& m,ostream& s,const char *p=0) + : om(m), os(s), pfx(p) { } result_type operator()(argument_type f) { os << ""; } }; - void basic_openid_message::to_htmlhiddens(ostream& o) const { - for_each(fields_begin(),fields_end(),__om_html_outputter(*this,o)); + void basic_openid_message::to_htmlhiddens(ostream& o,const char* pfx) const { + for_each(fields_begin(),fields_end(),__om_html_outputter(*this,o,pfx)); } void basic_openid_message::add_to_signed(const string& fields) { -- cgit v0.9.0.2