/* * Copyright (c) 2012 Mateusz Piękos * Licensed under the simplified BSD license. * See Documentation/Licenses/BSD-simplified.txt for more information. */ #include #include #include #include #include namespace Swift { WhiteboardSession::WhiteboardSession(const JID& jid, IQRouter* router) : toJID_(jid), router_(router) { } void WhiteboardSession::handleIncomingAction(boost::shared_ptr payload) { onDataReceived(payload->getData()); } void WhiteboardSession::sendData(const std::string& data) { boost::shared_ptr payload = boost::make_shared(); payload->setData(data); boost::shared_ptr > request = boost::make_shared >(IQ::Set, toJID_, payload, router_); request->send(); } }