summaryrefslogtreecommitdiff
path: root/src/bridge/bridge.hpp
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-05-22 12:54:18 +0200
committerlouiz’ <louiz@louiz.org>2016-06-08 01:42:43 +0200
commit711861d40e365564e3828a251066c16e924d30f3 (patch)
treef9501b71283afbdab0c06b4e9b4cc6cc8ec8ae03 /src/bridge/bridge.hpp
parent367de4826c3c7298a88e80c92e325081a3c3d794 (diff)
downloadbiboumi-711861d40e365564e3828a251066c16e924d30f3.tar.gz
biboumi-711861d40e365564e3828a251066c16e924d30f3.tar.bz2
biboumi-711861d40e365564e3828a251066c16e924d30f3.tar.xz
biboumi-711861d40e365564e3828a251066c16e924d30f3.zip
Add methods to know which resource is on which server or channel
Diffstat (limited to 'src/bridge/bridge.hpp')
-rw-r--r--src/bridge/bridge.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/bridge/bridge.hpp b/src/bridge/bridge.hpp
index 2676d1d..b852a30 100644
--- a/src/bridge/bridge.hpp
+++ b/src/bridge/bridge.hpp
@@ -194,6 +194,13 @@ public:
void trigger_on_irc_message(const std::string& irc_hostname, const IrcMessage& message);
std::unordered_map<std::string, std::shared_ptr<IrcClient>>& get_irc_clients();
+ /**
+ * Manage which resource is in which channel
+ */
+ void add_resource_to_chan(const std::string& channel, const std::string& resource);
+ void remove_resource_from_chan(const std::string& channel, const std::string& resource);
+ bool is_resource_in_chan(const std::string& channel, const std::string& resource) const;
+
private:
/**
* Returns the client for the given hostname, create one (and use the
@@ -244,6 +251,10 @@ private:
* response iq.
*/
std::list<irc_responder_callback_t> waiting_irc;
+ /**
+ * Keep track of which resource is in which channel.
+ */
+ std::map<std::string, std::set<std::string>> resources_in_chan;
};
struct IRCNotConnected: public std::exception