Send and receive messages

Also correctly respond to PING with the id, escape some XML content, but not
always
This commit is contained in:
Florent Le Coz
2013-11-07 01:53:09 +01:00
parent 4b76a30d04
commit a418b6ed5d
11 changed files with 224 additions and 28 deletions
+12
View File
@@ -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;