summaryrefslogtreecommitdiff
path: root/src/xmpp/xmpp_component.hpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-05-31 17:06:36 +0200
committerFlorent Le Coz <louiz@louiz.org>2014-05-31 17:06:36 +0200
commit4e27298b3a6389781893589b37f66260d6a34707 (patch)
tree5b33fe906f698c4b2789197d51d3712daf791489 /src/xmpp/xmpp_component.hpp
parentf5b61f0feba271770474c4d540d7bf48a6c2b180 (diff)
downloadbiboumi-4e27298b3a6389781893589b37f66260d6a34707.tar.gz
biboumi-4e27298b3a6389781893589b37f66260d6a34707.tar.bz2
biboumi-4e27298b3a6389781893589b37f66260d6a34707.tar.xz
biboumi-4e27298b3a6389781893589b37f66260d6a34707.zip
Add an ad-hoc command to disconnect some users
Diffstat (limited to 'src/xmpp/xmpp_component.hpp')
-rw-r--r--src/xmpp/xmpp_component.hpp12
1 files changed, 11 insertions, 1 deletions
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
@@ -42,6 +42,16 @@ public:
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<Bridge*> get_bridges() const;
+
+ /**
* Returns a unique id, to be used in the 'id' element of our iq stanzas.
*/
static std::string next_id();
@@ -228,6 +238,7 @@ private:
bool doc_open;
std::unordered_map<std::string, std::function<void(const Stanza&)>> 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<std::string, std::unique_ptr<Bridge>> bridges;
- AdhocCommandsHandler adhoc_commands_handler;
XmppComponent(const XmppComponent&) = delete;
XmppComponent(XmppComponent&&) = delete;
XmppComponent& operator=(const XmppComponent&) = delete;