From 3d92360310d8e35394109058ff723da57af5b380 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 10 Nov 2013 02:26:07 +0100 Subject: Use the Expat library directly instead of relying on expatpp And now we handle namespaces, yay. And a nice little test. --- src/xmpp/xmpp_stanza.hpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'src/xmpp/xmpp_stanza.hpp') diff --git a/src/xmpp/xmpp_stanza.hpp b/src/xmpp/xmpp_stanza.hpp index 62f152d..d2fe8c8 100644 --- a/src/xmpp/xmpp_stanza.hpp +++ b/src/xmpp/xmpp_stanza.hpp @@ -5,8 +5,6 @@ #include #include -#include - std::string xml_escape(const std::string& data); /** @@ -52,15 +50,29 @@ 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. + * Append the given data to the content of the tail. This exists because + * the expat library may provide the complete text of an element in more + * than one call + */ + void add_to_tail(const std::string& data); + /** + * Set the content of the inner, that is the text inside this node. */ void set_inner(const std::string& data); + /** + * Append the given data to the content of the inner. For the reason + * described in add_to_tail comment. + */ + void add_to_inner(const std::string& data); /** * Get the content of inner * TODO: unescape it here. */ std::string get_inner() const; + /** + * Get the content of the tail + */ + std::string get_tail() const; /** * Get a pointer to the first child element with that name */ -- cgit v1.2.3