summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2015-12-03 21:08:04 +0100
committerFlorent Le Coz <louiz@louiz.org>2015-12-03 21:08:04 +0100
commit284af79128c4bae9fa76f2dd5916ebfd81ecf718 (patch)
treecac7f961b0e7043e2a7f702925855aaa0b993bd5
parent6a7cd5eecfa4df0552969e5d5d57452d290b7fc5 (diff)
downloadbiboumi-284af79128c4bae9fa76f2dd5916ebfd81ecf718.tar.gz
biboumi-284af79128c4bae9fa76f2dd5916ebfd81ecf718.tar.bz2
biboumi-284af79128c4bae9fa76f2dd5916ebfd81ecf718.tar.xz
biboumi-284af79128c4bae9fa76f2dd5916ebfd81ecf718.zip
Provide a “var” map in AdhocSession objects, to save values between each step
-rw-r--r--louloulibs/xmpp/adhoc_session.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/louloulibs/xmpp/adhoc_session.hpp b/louloulibs/xmpp/adhoc_session.hpp
index da7913f..05afc91 100644
--- a/louloulibs/xmpp/adhoc_session.hpp
+++ b/louloulibs/xmpp/adhoc_session.hpp
@@ -5,6 +5,7 @@
#include <functional>
#include <string>
+#include <map>
class XmppComponent;
@@ -75,6 +76,15 @@ private:
size_t current_step;
bool terminated;
+public:
+ /**
+ * A map to store various things that we may want to remember between two
+ * steps of the same session. A step can insert any value associated to
+ * any key in there.
+ */
+ std::map<std::string, std::string> vars;
+
+private:
AdhocSession(const AdhocSession&) = delete;
AdhocSession(AdhocSession&&) = delete;
AdhocSession& operator=(const AdhocSession&) = delete;