summaryrefslogtreecommitdiff
path: root/src/xmpp/xmpp_component.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmpp/xmpp_component.hpp')
-rw-r--r--src/xmpp/xmpp_component.hpp23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/xmpp/xmpp_component.hpp b/src/xmpp/xmpp_component.hpp
index ce594ec..9f1cec3 100644
--- a/src/xmpp/xmpp_component.hpp
+++ b/src/xmpp/xmpp_component.hpp
@@ -2,7 +2,7 @@
# define XMPP_COMPONENT_INCLUDED
#include <xmpp/adhoc_commands_handler.hpp>
-#include <network/socket_handler.hpp>
+#include <network/tcp_socket_handler.hpp>
#include <xmpp/xmpp_parser.hpp>
#include <bridge/bridge.hpp>
@@ -30,7 +30,7 @@
*
* TODO: implement XEP-0225: Component Connections
*/
-class XmppComponent: public SocketHandler
+class XmppComponent: public TCPSocketHandler
{
public:
explicit XmppComponent(std::shared_ptr<Poller> poller, const std::string& hostname, const std::string& secret);
@@ -38,7 +38,7 @@ public:
void on_connection_failed(const std::string& reason) override final;
void on_connected() override final;
- void on_connection_close() override final;
+ void on_connection_close(const std::string& error) override final;
void parse_in_buffer(const size_t size) override final;
/**
@@ -172,20 +172,15 @@ public:
const std::string& author,
const std::string& jid_to);
/**
- * Send a presence type=error with a conflict element
- */
- void send_nickname_conflict_error(const std::string& muc_name,
- const std::string& nickname,
- const std::string& jid_to);
- /**
* Send a generic presence error
*/
void send_presence_error(const std::string& muc_name,
- const std::string& nickname,
- const std::string& jid_to,
- const std::string& type,
- const std::string& condition,
- const std::string& text);
+ const std::string& nickname,
+ const std::string& jid_to,
+ const std::string& type,
+ const std::string& condition,
+ const std::string& error_code,
+ const std::string& text);
/**
* Send a presence from the MUC indicating a change in the role and/or
* affiliation of a participant