Commit 756b2970 authored by louiz’'s avatar louiz’

Small cleanup

parent 284af791
...@@ -13,10 +13,6 @@ AdhocSession::AdhocSession(const AdhocCommand& command, const std::string& owner ...@@ -13,10 +13,6 @@ AdhocSession::AdhocSession(const AdhocCommand& command, const std::string& owner
{ {
} }
AdhocSession::~AdhocSession()
{
}
const AdhocStep& AdhocSession::get_next_step() const AdhocStep& AdhocSession::get_next_step()
{ {
assert(this->current_step < this->command.callbacks.size()); assert(this->current_step < this->command.callbacks.size());
......
...@@ -16,17 +16,15 @@ class AdhocSession; ...@@ -16,17 +16,15 @@ class AdhocSession;
* A function executed as an ad-hoc command step. It takes a <command/> * A function executed as an ad-hoc command step. It takes a <command/>
* XmlNode and modifies it accordingly (inserting for example an <error/> * XmlNode and modifies it accordingly (inserting for example an <error/>
* node, or a data form…). * 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; using AdhocStep = std::function<void(XmppComponent*, AdhocSession&, XmlNode&)>;
class AdhocSession class AdhocSession
{ {
public: public:
explicit AdhocSession(const AdhocCommand& command, const std::string& owner_jid, explicit AdhocSession(const AdhocCommand& command, const std::string& owner_jid,
const std::string& to_jid); const std::string& to_jid);
~AdhocSession(); ~AdhocSession() = default;
/** /**
* Return the function to be executed, found in our AdhocCommand, for the * Return the function to be executed, found in our AdhocCommand, for the
* current_step. And increment the current_step. * current_step. And increment the current_step.
...@@ -52,7 +50,6 @@ public: ...@@ -52,7 +50,6 @@ public:
return this->owner_jid; return this->owner_jid;
} }
private: private:
/** /**
* A reference of the command concerned by this session. Used for example * A reference of the command concerned by this session. Used for example
......
...@@ -30,8 +30,6 @@ Jid::Jid(const std::string& jid) ...@@ -30,8 +30,6 @@ Jid::Jid(const std::string& jid)
this->domain = jid.substr(at, slash - at); this->domain = jid.substr(at, slash - at);
} }
#include <iostream>
static constexpr size_t max_jid_part_len = 1023; static constexpr size_t max_jid_part_len = 1023;
std::string jidprep(const std::string& original) std::string jidprep(const std::string& original)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment