~singpolyma/biboumi

284af79128c4bae9fa76f2dd5916ebfd81ecf718 — Florent Le Coz 8 years ago 6a7cd5e
Provide a “var” map in AdhocSession objects, to save values between each step
1 files changed, 10 insertions(+), 0 deletions(-)

M louloulibs/xmpp/adhoc_session.hpp
M louloulibs/xmpp/adhoc_session.hpp => louloulibs/xmpp/adhoc_session.hpp +10 -0
@@ 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;