blob: aaa2198c57a16221bb77c889c3f519998aa2d46a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/*
* Copyright (c) 2012 Yoann Blein
* Licensed under the simplified BSD license.
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
#include <Swiften/ScreenSharing/OutgoingScreenSharingManager.h>
#include <Swiften/ScreenSharing/OutgoingScreenSharing.h>
#include <Swiften/Jingle/JingleSessionImpl.h>
#include <Swiften/Jingle/JingleSessionManager.h>
#include <boost/smart_ptr/make_shared.hpp>
namespace Swift {
OutgoingScreenSharingManager::OutgoingScreenSharingManager(JingleSessionManager* jingleSessionManager,IQRouter* router,
UDPSocketFactory *udpSocketFactory, TimerFactory* timerFactory)
: jsManager(jingleSessionManager), iqRouter(router), udpSocketFactory(udpSocketFactory), timerFactory(timerFactory)
{
}
boost::shared_ptr<OutgoingScreenSharing> OutgoingScreenSharingManager::createOutgoingScreenSharing(const JID& from, const JID& to)
{
JingleSessionImpl::ref jingleSession = boost::make_shared<JingleSessionImpl>(from, to, idGenerator.generateID(), iqRouter);
assert(jingleSession);
jsManager->registerOutgoingSession(from, jingleSession);
return boost::make_shared<OutgoingScreenSharing>(jingleSession, udpSocketFactory, timerFactory);
}
}
|