summaryrefslogtreecommitdiffabout
path: root/include/opkele
authorMichael Krelin <hacker@klever.net>2008-01-31 22:07:53 (UTC)
committer Michael Krelin <hacker@klever.net>2008-01-31 22:07:53 (UTC)
commit67133db1f33b142561575cdf99fedca8fb6ad79b (patch) (side-by-side diff)
tree4320aff864ce4848808c6643bf289b9bbfe70a60 /include/opkele
parent66b14d4368d661daf2248e36ac4f9a3f69f6a75a (diff)
downloadlibopkele-67133db1f33b142561575cdf99fedca8fb6ad79b.zip
libopkele-67133db1f33b142561575cdf99fedca8fb6ad79b.tar.gz
libopkele-67133db1f33b142561575cdf99fedca8fb6ad79b.tar.bz2
added util::change_mode_message_proxy class
generatlized checkauth_message_proxy and added it to util namespace. To be later used for constructing setup url in 1.0 checkid_immediate reply. Signed-off-by: Michael Krelin <hacker@klever.net>
Diffstat (limited to 'include/opkele') (more/less context) (ignore whitespace changes)
-rw-r--r--include/opkele/util.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/opkele/util.h b/include/opkele/util.h
index e9176b0..6f3ddf6 100644
--- a/include/opkele/util.h
+++ b/include/opkele/util.h
@@ -146,2 +146,20 @@ namespace opkele {
+ class change_mode_message_proxy : public basic_openid_message {
+ public:
+ const basic_openid_message& x;
+ const string& mode;
+
+ change_mode_message_proxy(const basic_openid_message& xx,const string& m) : x(xx), mode(m) { }
+
+ bool has_field(const string& n) const { return x.has_field(n); }
+ const string& get_field(const string& n) const {
+ return (n=="mode")?mode:x.get_field(n); }
+ bool has_ns(const string& uri) const {return x.has_ns(uri); }
+ string get_ns(const string& uri) const { return x.get_ns(uri); }
+ fields_iterator fields_begin() const {
+ return x.fields_begin(); }
+ fields_iterator fields_end() const {
+ return x.fields_end(); }
+ };
+
}