summaryrefslogtreecommitdiff
path: root/src/xmpp/xmpp_stanza.hpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2013-11-10 02:26:07 +0100
committerFlorent Le Coz <louiz@louiz.org>2013-11-10 02:30:22 +0100
commit3d92360310d8e35394109058ff723da57af5b380 (patch)
treea268ca56705b09251151919c51daef63f04bee22 /src/xmpp/xmpp_stanza.hpp
parent8acd7a02aeda01c0ac828b05c36f10bbacaea70e (diff)
downloadbiboumi-3d92360310d8e35394109058ff723da57af5b380.tar.gz
biboumi-3d92360310d8e35394109058ff723da57af5b380.tar.bz2
biboumi-3d92360310d8e35394109058ff723da57af5b380.tar.xz
biboumi-3d92360310d8e35394109058ff723da57af5b380.zip
Use the Expat library directly instead of relying on expatpp
And now we handle namespaces, yay. And a nice little test.
Diffstat (limited to 'src/xmpp/xmpp_stanza.hpp')
-rw-r--r--src/xmpp/xmpp_stanza.hpp20
1 files changed, 16 insertions, 4 deletions
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 <string>
#include <vector>
-#include <expatpp.h>
-
std::string xml_escape(const std::string& data);
/**
@@ -52,16 +50,30 @@ 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
*/
XmlNode* get_child(const std::string& name) const;