-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqtserverinteractor.cpp
More file actions
30 lines (25 loc) · 998 Bytes
/
Copy pathqtserverinteractor.cpp
File metadata and controls
30 lines (25 loc) · 998 Bytes
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
#include "qtserverinteractor.h"
#include "serverinteractor.h"
#include "mainwindow.h"
#include "messagehandler.h"
QTServerInteractor::QTServerInteractor(ServerInteractor& Interactor,
MainWindow& Window,
boost::asio::io_service& IOService,
MessageHandler& MessageHandler) :
m_ServerInteractor(Interactor),
m_IOService(IOService),
m_MessageHandler(MessageHandler)
{
QObject::connect(&Window, SIGNAL(StartServer(const DeviceConfiguration&)),
this, SLOT(StartServer(const DeviceConfiguration&)));
QObject::connect(&Window, SIGNAL(StopServer()),
this, SLOT(StopServer()));
}
void QTServerInteractor::StartServer(const DeviceConfiguration& Configuration)
{
m_ServerInteractor.StartServer(Configuration, m_IOService, m_MessageHandler);
}
void QTServerInteractor::StopServer()
{
m_ServerInteractor.StopServer();
}