summaryrefslogtreecommitdiff
path: root/louloulibs/xmpp/adhoc_command.hpp
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2017-03-14 21:45:23 +0100
committerlouiz’ <louiz@louiz.org>2017-03-14 21:45:23 +0100
commit0ab40dc1ab4e689921da54080b135e1d22b1c586 (patch)
tree238ac477aa6b29a8d1e187a8d97ecbcbbbc663ef /louloulibs/xmpp/adhoc_command.hpp
parent2d3806152e854ace7533fc3ad34d4ac1c44e9687 (diff)
downloadbiboumi-0ab40dc1ab4e689921da54080b135e1d22b1c586.tar.gz
biboumi-0ab40dc1ab4e689921da54080b135e1d22b1c586.tar.bz2
biboumi-0ab40dc1ab4e689921da54080b135e1d22b1c586.tar.xz
biboumi-0ab40dc1ab4e689921da54080b135e1d22b1c586.zip
Refactoring louloulibs and cmake
Use OBJECT libraries Remove the louloulibs directory Write FOUND variables in the cache
Diffstat (limited to 'louloulibs/xmpp/adhoc_command.hpp')
-rw-r--r--louloulibs/xmpp/adhoc_command.hpp44
1 files changed, 0 insertions, 44 deletions
diff --git a/louloulibs/xmpp/adhoc_command.hpp b/louloulibs/xmpp/adhoc_command.hpp
deleted file mode 100644
index 7c4de47..0000000
--- a/louloulibs/xmpp/adhoc_command.hpp
+++ /dev/null
@@ -1,44 +0,0 @@
-#pragma once
-
-/**
- * Describe an ad-hoc command.
- *
- * Can only have zero or one step for now. When execution is requested, it
- * can return a result immediately, or provide a form to be filled, and
- * provide a result once the filled form is received.
- */
-
-#include <xmpp/adhoc_session.hpp>
-
-#include <functional>
-#include <string>
-
-class AdhocCommand
-{
- friend class AdhocSession;
-public:
- AdhocCommand(std::vector<AdhocStep>&& callback, const std::string& name, const bool admin_only);
- ~AdhocCommand() = default;
- AdhocCommand(const AdhocCommand&) = default;
- AdhocCommand(AdhocCommand&&) = default;
- AdhocCommand& operator=(AdhocCommand&&) = delete;
- AdhocCommand& operator=(const AdhocCommand&) = delete;
-
- const std::string name;
-
- bool is_admin_only() const;
-
-private:
- /**
- * A command may have one or more steps. Each step is a different
- * callback, inserting things into a <command/> XmlNode and calling
- * methods of an AdhocSession.
- */
- std::vector<AdhocStep> callbacks;
- const bool admin_only;
-};
-
-void PingStep1(XmppComponent&, AdhocSession& session, XmlNode& command_node);
-void HelloStep1(XmppComponent&, AdhocSession& session, XmlNode& command_node);
-void HelloStep2(XmppComponent&, AdhocSession& session, XmlNode& command_node);
-void Reload(XmppComponent&, AdhocSession& session, XmlNode& command_node);