Implement IRC format to xhtml-im conversion

The generated XML is very verbose because each IRC formatting tag makes us
close a <span/> element and reopen it with the new style applied.  However,
this works quite well and is easy to implement.
This commit is contained in:
Florent Le Coz
2013-11-28 01:18:26 +01:00
parent 31e18e49b6
commit e6f20d3c0f
8 changed files with 275 additions and 47 deletions
+4 -4
View File
@@ -58,7 +58,7 @@ public:
/**
* Send a message from from@served_hostname, with the given body
*/
void send_message(const std::string& from, const std::string& body, const std::string& to);
void send_message(const std::string& from, Xmpp::body&& body, const std::string& to);
/**
* Send a join from a new participant
*/
@@ -70,15 +70,15 @@ public:
/**
* Send the MUC topic to the user
*/
void send_topic(const std::string& from, const std::string& topic, const std::string& to);
void send_topic(const std::string& from, Xmpp::body&& xmpp_topic, const std::string& to);
/**
* Send a (non-private) message to the MUC
*/
void send_muc_message(const std::string& muc_name, const std::string& nick, const std::string body_str, const std::string& jid_to);
void send_muc_message(const std::string& muc_name, const std::string& nick, Xmpp::body&& body, const std::string& jid_to);
/**
* Send an unavailable presence for this nick
*/
void send_muc_leave(std::string&& muc_name, std::string&& nick, std::string&& message, const std::string& jid_to, const bool self);
void send_muc_leave(std::string&& muc_name, std::string&& nick, Xmpp::body&& message, const std::string& jid_to, const bool self);
/**
* Indicate that a participant changed his nick
*/