summaryrefslogtreecommitdiff
path: root/src/xmpp/xmpp_component.hpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-03-28 01:16:05 +0100
committerFlorent Le Coz <louiz@louiz.org>2014-03-28 01:16:05 +0100
commit3c5f823621e170aaa5ae9f240335bea49d470da5 (patch)
tree3a052d91885b7629c8066badac4706ec5f984a8d /src/xmpp/xmpp_component.hpp
parent2ffbfb71ddeb791e6a5ab1955208067f2856aeea (diff)
downloadbiboumi-3c5f823621e170aaa5ae9f240335bea49d470da5.tar.gz
biboumi-3c5f823621e170aaa5ae9f240335bea49d470da5.tar.bz2
biboumi-3c5f823621e170aaa5ae9f240335bea49d470da5.tar.xz
biboumi-3c5f823621e170aaa5ae9f240335bea49d470da5.zip
Send a stanza error when receiving bad stanzas
Whether this is a bad-request (missing XML attributes or elements) or an internal server error.
Diffstat (limited to 'src/xmpp/xmpp_component.hpp')
-rw-r--r--src/xmpp/xmpp_component.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/xmpp/xmpp_component.hpp b/src/xmpp/xmpp_component.hpp
index d4853c8..5a5d3d8 100644
--- a/src/xmpp/xmpp_component.hpp
+++ b/src/xmpp/xmpp_component.hpp
@@ -69,6 +69,12 @@ public:
*/
void send_stream_error(const std::string& message, const std::string& explanation);
/**
+ * Send error stanza, described in http://xmpp.org/rfcs/rfc6120.html#stanzas-error
+ */
+ void send_stanza_error(const std::string& kind, const std::string& to, const std::string& from,
+ const std::string& id, const std::string& error_type,
+ const std::string& defined_condition, const std::string& text);
+ /**
* Send the closing signal for our document (not closing the connection though).
*/
void close_document();