diff options
author | Mateusz Piekos <mateuszpiekos@gmail.com> | 2012-07-13 18:18:37 (GMT) |
---|---|---|
committer | Mateusz Piekos <mateuszpiekos@gmail.com> | 2012-07-13 18:18:37 (GMT) |
commit | 0ba890e7e8c7e09c1257a7c3b1018f396e6896d1 (patch) | |
tree | 13dc4658023e89d48d4e7ae1854f70e827bf9cf6 /Swiften/Whiteboard/WhiteboardSession.cpp | |
parent | 4dc0788b78da3fe5a9daed5ab4593ba6423600ec (diff) | |
download | swift-contrib-0ba890e7e8c7e09c1257a7c3b1018f396e6896d1.zip swift-contrib-0ba890e7e8c7e09c1257a7c3b1018f396e6896d1.tar.bz2 |
Integrated WhiteboardClient and WhiteboardServer into rest of the code
Diffstat (limited to 'Swiften/Whiteboard/WhiteboardSession.cpp')
-rw-r--r-- | Swiften/Whiteboard/WhiteboardSession.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/Swiften/Whiteboard/WhiteboardSession.cpp b/Swiften/Whiteboard/WhiteboardSession.cpp index d9dc592..2828436 100644 --- a/Swiften/Whiteboard/WhiteboardSession.cpp +++ b/Swiften/Whiteboard/WhiteboardSession.cpp @@ -27,7 +27,9 @@ namespace Swift { switch (payload->getType()) { case WhiteboardPayload::Data: - onElementReceived(payload->getElement()); + //onElementReceived(payload->getElement()); +// onOperationReceived(payload->getOperation()); + handleIncomingOperation(payload->getOperation()); break; case WhiteboardPayload::SessionAccept: onRequestAccepted(toJID_); @@ -42,6 +44,20 @@ namespace Swift { request->send(); } + void WhiteboardSession::sendOperation(const WhiteboardOperation::ref operation) { +/* boost::shared_ptr<WhiteboardPayload> payload = boost::make_shared<WhiteboardPayload>(); + // payload->setElement(operation->getElement()); + payload->setOperation(operation); + boost::shared_ptr<GenericRequest<WhiteboardPayload> > request = boost::make_shared<GenericRequest<WhiteboardPayload> >(IQ::Set, toJID_, payload, router_); + request->send();*/ + handleSendOperationRequest(operation); + } + + void WhiteboardSession::sendPayload(boost::shared_ptr<WhiteboardPayload> payload) { + boost::shared_ptr<GenericRequest<WhiteboardPayload> > request = boost::make_shared<GenericRequest<WhiteboardPayload> >(IQ::Set, toJID_, payload, router_); + request->send(); + } + void WhiteboardSession::cancel() { boost::shared_ptr<WhiteboardPayload> payload = boost::make_shared<WhiteboardPayload>(WhiteboardPayload::SessionTerminate); boost::shared_ptr<GenericRequest<WhiteboardPayload> > request = boost::make_shared<GenericRequest<WhiteboardPayload> >(IQ::Set, toJID_, payload, router_); |