From a418b6ed5d70f0e61e71bb1adce2a693ade89e30 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 7 Nov 2013 01:53:09 +0100 Subject: Send and receive messages Also correctly respond to PING with the id, escape some XML content, but not always --- src/bridge/bridge.hpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/bridge/bridge.hpp') diff --git a/src/bridge/bridge.hpp b/src/bridge/bridge.hpp index f9ddcca..38cf565 100644 --- a/src/bridge/bridge.hpp +++ b/src/bridge/bridge.hpp @@ -30,6 +30,7 @@ public: **/ void join_irc_channel(const Iid& iid, const std::string& username); + void send_channel_message(const Iid& iid, const std::string& body); /*** ** @@ -54,7 +55,10 @@ public: * Send the topic of the MUC to the user */ void send_topic(const std::string& hostname, const std::string& chan_name, const std::string topic); - + /** + * Send a MUC message from some participant + */ + void send_muc_message(const Iid& iid, const std::string& nick, const std::string& body); private: /** * Returns the client for the given hostname, create one (and use the @@ -62,6 +66,11 @@ private: * client immediately. */ IrcClient* get_irc_client(const std::string& hostname, const std::string& username); + /** + * This version does not create the IrcClient if it does not exist, and + * returns nullptr in that case + */ + IrcClient* get_irc_client(const std::string& hostname); /** * The JID of the user associated with this bridge. Messages from/to this * JID are only managed by this bridge. -- cgit v1.2.3