summaryrefslogtreecommitdiffabout
path: root/include/opkele
authorMichael Krelin <hacker@klever.net>2007-01-11 23:52:29 (UTC)
committer Michael Krelin <hacker@klever.net>2007-01-11 23:52:29 (UTC)
commitf5eb33d7a9c296e3fa7bde9b678f0e1027a9bf88 (patch) (side-by-side diff)
treef2936775dd8a6a817a1d8f1b5add8cc6d0841796 /include/opkele
parent709e399023109847ff747b87dca371078fd95868 (diff)
downloadlibopkele-f5eb33d7a9c296e3fa7bde9b678f0e1027a9bf88.zip
libopkele-f5eb33d7a9c296e3fa7bde9b678f0e1027a9bf88.tar.gz
libopkele-f5eb33d7a9c296e3fa7bde9b678f0e1027a9bf88.tar.bz2
extension chain
Diffstat (limited to 'include/opkele') (more/less context) (ignore whitespace changes)
-rw-r--r--include/opkele/extension_chain.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/include/opkele/extension_chain.h b/include/opkele/extension_chain.h
new file mode 100644
index 0000000..955f4d5
--- a/dev/null
+++ b/include/opkele/extension_chain.h
@@ -0,0 +1,50 @@
+#ifndef __OPKELE_EXTENSION_CHAIN_H
+#define __OPKELE_EXTENSION_CHAIN_H
+
+/**
+ * @file
+ * @brief extension chain extension
+ */
+
+#include <list>
+#include <opkele/extension.h>
+
+/**
+ * @brief the main opkele namespace
+ */
+namespace opkele {
+ using std::list;
+
+ /**
+ * OpenID extensions chain used to combine extensions, it is actually an
+ * stl list of pointers to extensions.
+ */
+ class extension_chain_t : public extension_t, public list<extension_t*> {
+ public:
+
+ /**
+ * Default constructor creates an empty chain
+ */
+ extension_chain_t() { }
+ /**
+ * Create extension chain with a single extension in it
+ */
+ extension_chain_t(extension_t *e) { push_back(e); }
+
+ /**
+ * Implementation of consumer's checkid hook
+ */
+ virtual void checkid_hook(params_t& p,const string& identity);
+ /**
+ * Implementation of consumer's id_res hook
+ */
+ virtual void id_res_hook(const params_t& p,const params_t& sp,const string& identity);
+ /**
+ * Implementation of server's checkid_hook
+ */
+ virtual void checkid_hook(const params_t& pin,params_t& pout);
+ };
+
+}
+
+#endif /* __OPKELE_EXTENSION_CHAIN_H */