diff options
author | Florent Le Coz <louiz@louiz.org> | 2015-09-18 21:52:11 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2015-09-18 22:09:26 +0200 |
commit | 19666d2ffd3ce36b7edd4044143fe535ef85dbd9 (patch) | |
tree | 3dacaabd486bd2a3ded51c65c560e978615b690d /louloulibs/xmpp/adhoc_session.hpp | |
parent | 88ae2599f6dbf655e8806c9b4619ec089425683b (diff) | |
download | biboumi-19666d2ffd3ce36b7edd4044143fe535ef85dbd9.tar.gz biboumi-19666d2ffd3ce36b7edd4044143fe535ef85dbd9.tar.bz2 biboumi-19666d2ffd3ce36b7edd4044143fe535ef85dbd9.tar.xz biboumi-19666d2ffd3ce36b7edd4044143fe535ef85dbd9.zip |
Store the target jid in the AdhocSession objects
Diffstat (limited to 'louloulibs/xmpp/adhoc_session.hpp')
-rw-r--r-- | louloulibs/xmpp/adhoc_session.hpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/louloulibs/xmpp/adhoc_session.hpp b/louloulibs/xmpp/adhoc_session.hpp index ddfb2fe..da7913f 100644 --- a/louloulibs/xmpp/adhoc_session.hpp +++ b/louloulibs/xmpp/adhoc_session.hpp @@ -23,7 +23,8 @@ typedef std::function<void(XmppComponent*, AdhocSession&, XmlNode&)> AdhocStep; class AdhocSession { public: - explicit AdhocSession(const AdhocCommand& command, const std::string& jid); + explicit AdhocSession(const AdhocCommand& command, const std::string& owner_jid, + const std::string& to_jid); ~AdhocSession(); /** * Return the function to be executed, found in our AdhocCommand, for the @@ -41,6 +42,15 @@ public: */ void terminate(); bool is_terminated() const; + std::string get_target_jid() const + { + return this->to_jid; + } + std::string get_owner_jid() const + { + return this->owner_jid; + } + private: /** @@ -55,6 +65,10 @@ private: */ const std::string& owner_jid; /** + * The 'to' attribute in the request stanza. This is the target of the current session. + */ + const std::string& to_jid; + /** * The current step we are at. It starts at zero. It is used to index the * associated AdhocCommand::callbacks vector. */ |