/* * 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 namespace Swift { OutgoingWhiteboardSession::OutgoingWhiteboardSession(const JID& jid, IQRouter* router) : WhiteboardSession(jid, router) { } OutgoingWhiteboardSession::~OutgoingWhiteboardSession() { } void OutgoingWhiteboardSession::startSession() { boost::shared_ptr payload = boost::make_shared(WhiteboardPayload::SessionRequest); boost::shared_ptr > request = boost::make_shared >(IQ::Set, toJID_, payload, router_); request->onResponse.connect(boost::bind(&OutgoingWhiteboardSession::handleRequestResponse, this, _1, _2)); request->send(); } std::string OutgoingWhiteboardSession::getClientID() const { return "a"; } void OutgoingWhiteboardSession::handleRequestResponse(boost::shared_ptr payload, ErrorPayload::ref error) { if (error) { onRequestRejected(toJID_); } } }