From eb9a20187098185cc10ad192e91a90dbba12633a Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Tue, 27 May 2014 01:01:38 +0200 Subject: Implement the support for adhoc commands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We have two basic example commands. But it’s not entirely finished because there are some error checks that we don’t do. ref #2521 --- src/xmpp/xmpp_stanza.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/xmpp/xmpp_stanza.cpp') diff --git a/src/xmpp/xmpp_stanza.cpp b/src/xmpp/xmpp_stanza.cpp index be9f8ae..c964c64 100644 --- a/src/xmpp/xmpp_stanza.cpp +++ b/src/xmpp/xmpp_stanza.cpp @@ -243,6 +243,13 @@ const std::string XmlNode::get_tag(const std::string& name) const } } +bool XmlNode::del_tag(const std::string& name) +{ + if (this->attributes.erase(name) != 0) + return true; + return false; +} + std::string& XmlNode::operator[](const std::string& name) { return this->attributes[name]; -- cgit v1.2.3