From 4e27298b3a6389781893589b37f66260d6a34707 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sat, 31 May 2014 17:06:36 +0200 Subject: Add an ad-hoc command to disconnect some users --- src/xmpp/xmpp_component.hpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/xmpp/xmpp_component.hpp') diff --git a/src/xmpp/xmpp_component.hpp b/src/xmpp/xmpp_component.hpp index e3e24e0..5de471c 100644 --- a/src/xmpp/xmpp_component.hpp +++ b/src/xmpp/xmpp_component.hpp @@ -41,6 +41,16 @@ public: void on_connection_close() override final; void parse_in_buffer(const size_t size) override final; + /** + * Returns the bridge for the given user. If it does not exist, return + * nullptr. + */ + Bridge* find_user_bridge(const std::string& user_jid); + /** + * Return a list of all the managed bridges. + */ + std::list get_bridges() const; + /** * Returns a unique id, to be used in the 'id' element of our iq stanzas. */ @@ -228,6 +238,7 @@ private: bool doc_open; std::unordered_map> stanza_handlers; + AdhocCommandsHandler adhoc_commands_handler; /** * One bridge for each user of the component. Indexed by the user's full @@ -235,7 +246,6 @@ private: */ std::unordered_map> bridges; - AdhocCommandsHandler adhoc_commands_handler; XmppComponent(const XmppComponent&) = delete; XmppComponent(XmppComponent&&) = delete; XmppComponent& operator=(const XmppComponent&) = delete; -- cgit v1.2.3