summaryrefslogtreecommitdiff
path: root/src/xmpp/adhoc_session.hpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2015-02-27 12:16:09 +0100
committerFlorent Le Coz <louiz@louiz.org>2015-02-27 12:26:48 +0100
commitd600a2843f1dbe3b1ba2dead9a020cc73d7d10ae (patch)
treea34da2e3c617a39a73f716b9a5dddbdfbc510df6 /src/xmpp/adhoc_session.hpp
parent1028d4d549b517c5b42bb0c30a410d1ab43c4cf3 (diff)
downloadbiboumi-d600a2843f1dbe3b1ba2dead9a020cc73d7d10ae.tar.gz
biboumi-d600a2843f1dbe3b1ba2dead9a020cc73d7d10ae.tar.bz2
biboumi-d600a2843f1dbe3b1ba2dead9a020cc73d7d10ae.tar.xz
biboumi-d600a2843f1dbe3b1ba2dead9a020cc73d7d10ae.zip
Remove all the libs that are now in louloulibs
Diffstat (limited to 'src/xmpp/adhoc_session.hpp')
-rw-r--r--src/xmpp/adhoc_session.hpp70
1 files changed, 0 insertions, 70 deletions
diff --git a/src/xmpp/adhoc_session.hpp b/src/xmpp/adhoc_session.hpp
deleted file mode 100644
index ddfb2fe..0000000
--- a/src/xmpp/adhoc_session.hpp
+++ /dev/null
@@ -1,70 +0,0 @@
-#ifndef ADHOC_SESSION_HPP
-# define ADHOC_SESSION_HPP
-
-#include <xmpp/xmpp_stanza.hpp>
-
-#include <functional>
-#include <string>
-
-class XmppComponent;
-
-class AdhocCommand;
-class AdhocSession;
-
-/**
- * A function executed as an ad-hoc command step. It takes a <command/>
- * XmlNode and modifies it accordingly (inserting for example an <error/>
- * node, or a data form…).
- * TODO fix this:
- * It also must call one of step_passed(), cancel() etc on the AdhocSession object.
- */
-typedef std::function<void(XmppComponent*, AdhocSession&, XmlNode&)> AdhocStep;
-
-class AdhocSession
-{
-public:
- explicit AdhocSession(const AdhocCommand& command, const std::string& jid);
- ~AdhocSession();
- /**
- * Return the function to be executed, found in our AdhocCommand, for the
- * current_step. And increment the current_step.
- */
- const AdhocStep& get_next_step();
- /**
- * Return the number of remaining steps.
- */
- size_t remaining_steps() const;
- /**
- * This may be modified by an AdhocStep, to indicate that this session
- * should no longer exist, because we encountered an error, and we can't
- * execute any more step of it.
- */
- void terminate();
- bool is_terminated() const;
-
-private:
- /**
- * A reference of the command concerned by this session. Used for example
- * to get the next step of that command, things like that.
- */
- const AdhocCommand& command;
- /**
- * The full JID of the XMPP user that created this session by executing
- * the first step of a command. Only that JID must be allowed to access
- * this session.
- */
- const std::string& owner_jid;
- /**
- * The current step we are at. It starts at zero. It is used to index the
- * associated AdhocCommand::callbacks vector.
- */
- size_t current_step;
- bool terminated;
-
- AdhocSession(const AdhocSession&) = delete;
- AdhocSession(AdhocSession&&) = delete;
- AdhocSession& operator=(const AdhocSession&) = delete;
- AdhocSession& operator=(AdhocSession&&) = delete;
-};
-
-#endif // ADHOC_SESSION_HPP