From a418b6ed5d70f0e61e71bb1adce2a693ade89e30 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 7 Nov 2013 01:53:09 +0100 Subject: Send and receive messages Also correctly respond to PING with the id, escape some XML content, but not always --- src/xmpp/xmpp_stanza.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/xmpp/xmpp_stanza.hpp') diff --git a/src/xmpp/xmpp_stanza.hpp b/src/xmpp/xmpp_stanza.hpp index 277b0db..62f152d 100644 --- a/src/xmpp/xmpp_stanza.hpp +++ b/src/xmpp/xmpp_stanza.hpp @@ -7,6 +7,8 @@ #include +std::string xml_escape(const std::string& data); + /** * Raised on operator[] when the attribute does not exist */ @@ -51,8 +53,18 @@ public: void set_tail(const std::string& data); /** * Set the content of the inner, that is the text inside this node + * TODO: escape it here. */ void set_inner(const std::string& data); + /** + * Get the content of inner + * TODO: unescape it here. + */ + std::string get_inner() const; + /** + * Get a pointer to the first child element with that name + */ + XmlNode* get_child(const std::string& name) const; void add_child(XmlNode* child); void add_child(XmlNode&& child); XmlNode* get_last_child() const; -- cgit v1.2.3