summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fff9ffc)
raw | patch | inline | side by side (parent: fff9ffc)
author | daleharvey <daleharvey@users.sourceforge.net> | |
Tue, 25 Jul 2006 23:51:32 +0000 (23:51 +0000) | ||
committer | daleharvey <daleharvey@users.sourceforge.net> | |
Tue, 25 Jul 2006 23:51:32 +0000 (23:51 +0000) |
src/jabber_whiteboard/session-manager.cpp | patch | blob | history | |
src/jabber_whiteboard/session-manager.h | patch | blob | history |
index 536bc8db47020bd3eaae0288777808eba8be9f4d..36bf3615b77a5e54aa6345b16dcd01df5877955e 100644 (file)
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=
+ "<message type='chat' from='%s' to='%s' id='ink_%d'>"
+ "<wb xmlns='%s' "
+ "protocol='%d' type='%d' seq='%d'><x:inkboard-data>%s</x:inkboard-data></inkboard>"
+ "<body></body>"
+ "</message>";
+ 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,
index 880049db883cdd5219e2b02bcb9cb865373c4717..0a2c22f558613fb38a87c69f21333f6815960c14 100644 (file)
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);
/**
*