From: daleharvey Date: Tue, 25 Jul 2006 23:51:32 +0000 (+0000) Subject: added sendProtocol X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=239c921b1308b3a2ce8722c6f497b36b8425b68e;p=inkscape.git added sendProtocol --- diff --git a/src/jabber_whiteboard/session-manager.cpp b/src/jabber_whiteboard/session-manager.cpp index 536bc8db4..36bf3615b 100644 --- a/src/jabber_whiteboard/session-manager.cpp +++ b/src/jabber_whiteboard/session-manager.cpp @@ -106,6 +106,35 @@ SessionManager::send(const Glib::ustring &destJid, return true; } +bool +SessionManager::sendProtocol(const Glib::ustring &destJid, + const MessageType type, + const Glib::ustring &data) +{ + Pedro::DOMString xmlData = Pedro::Parser::encode(data); + char *fmt= + "" + "%s" + "" + ""; + if (!getClient().write(fmt, + getClient().getJid().c_str(), + destJid.c_str(), + getClient().getMsgId(), + INKBOARD_XMLNS, + 2, + (MessageType)type, + getSequenceNumber(), + xmlData.c_str() + )) + { + return false; + } + + return true; +} + bool SessionManager::sendGroup(const Glib::ustring &groupJid, const MessageType type, diff --git a/src/jabber_whiteboard/session-manager.h b/src/jabber_whiteboard/session-manager.h index 880049db8..0a2c22f55 100644 --- a/src/jabber_whiteboard/session-manager.h +++ b/src/jabber_whiteboard/session-manager.h @@ -75,6 +75,12 @@ public: virtual bool send(const Glib::ustring &destJid, const MessageType type, const Glib::ustring &data); + /** + * + */ + virtual bool sendProtocol(const Glib::ustring &destJid, + const MessageType type, + const Glib::ustring &data); /** *