summaryrefslogtreecommitdiff
path: root/src/xmpp/xmpp_stanza.hpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2013-11-07 01:53:09 +0100
committerFlorent Le Coz <louiz@louiz.org>2013-11-07 01:53:09 +0100
commita418b6ed5d70f0e61e71bb1adce2a693ade89e30 (patch)
treef4d979e1dae286df4faa6de3660288495d4ced77 /src/xmpp/xmpp_stanza.hpp
parent4b76a30d0479f366374c7dcf99ac211038722503 (diff)
downloadbiboumi-a418b6ed5d70f0e61e71bb1adce2a693ade89e30.tar.gz
biboumi-a418b6ed5d70f0e61e71bb1adce2a693ade89e30.tar.bz2
biboumi-a418b6ed5d70f0e61e71bb1adce2a693ade89e30.tar.xz
biboumi-a418b6ed5d70f0e61e71bb1adce2a693ade89e30.zip
Send and receive messages
Also correctly respond to PING with the id, escape some XML content, but not always
Diffstat (limited to 'src/xmpp/xmpp_stanza.hpp')
-rw-r--r--src/xmpp/xmpp_stanza.hpp12
1 files changed, 12 insertions, 0 deletions
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 <expatpp.h>
+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;