summaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
authorSimon Rettberg2018-08-02 14:53:27 +0200
committerSimon Rettberg2018-08-02 14:53:27 +0200
commit2204a616e5c649755540b01b6d85784551f785b7 (patch)
tree5f92b8d54cc65e5cabdbc8f53b0ae073af6159c8 /src/server
parentUpdate translations (diff)
downloadpvs2-2204a616e5c649755540b01b6d85784551f785b7.tar.gz
pvs2-2204a616e5c649755540b01b6d85784551f785b7.tar.xz
pvs2-2204a616e5c649755540b01b6d85784551f785b7.zip
Remove ugly comment separator lines above functions
Diffstat (limited to 'src/server')
-rw-r--r--src/server/mainwindow/mainwindow.cpp66
-rw-r--r--src/server/net/client.cpp16
-rw-r--r--src/server/net/discoverylistener.cpp10
3 files changed, 39 insertions, 53 deletions
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp
index 9a28a55..f59d040 100644
--- a/src/server/mainwindow/mainwindow.cpp
+++ b/src/server/mainwindow/mainwindow.cpp
@@ -57,7 +57,7 @@ using std::vector;
using std::cout;
using std::endl;
-/***************************************************************************//**
+/**
* Initialize MainWindow and ListenServer.
* @param ipListUrl
* @param parent
@@ -234,7 +234,7 @@ int distance(QPointF a, QPointF b)
return int(sum);
}
-/***************************************************************************//**
+/**
* \brief: find the closest available frame.
*
* Closest: smallest Euclidean distance from center to center
@@ -324,7 +324,7 @@ void MainWindow::placeFrameInFreeSlot(ConnectionFrame* frame, QPoint preferredPi
frame->setGridPosition(bestPosition);
}
-/***************************************************************************//**
+/**
* Create new Frame.
* Create new frame and add to current available frame list.
* Also connect signals frameMoved() and clicked() with slots.
@@ -346,7 +346,7 @@ ConnectionFrame* MainWindow::createFrame(const QString &computerId, const QPoint
return cf;
}
-/***************************************************************************//**
+/**
* Tells the new client the current situation in class room.
* Set the specific parameters like projection source or lock screen.
* @param client
@@ -365,7 +365,7 @@ void MainWindow::tellClientCurrentSituation(Client* client)
}
}
-/***************************************************************************//**
+/**
* Returns connected client which belongs to given id.
* Iterating over ConnectionFrames and comparing id to given id.
* @param id
@@ -382,7 +382,7 @@ Client* MainWindow::getClientFromId(int id)
return nullptr;
}
-/***************************************************************************//**
+/**
* Return the Frame, which is currently beeing Tutor.
* Iterating over all ConnectionFrames, and looking for flag _isTutor.
* @return Frame with flag _isTutor = true,
@@ -397,7 +397,7 @@ ConnectionFrame* MainWindow::getTutorFrame()
return nullptr;
}
-/***************************************************************************//**
+/**
* Return the Frame, which is currently selected by user.
* Iterating over all ConnectionFrame and looking for flag _isSelected.
* @return Frame with flag _isSelected = true,
@@ -416,7 +416,7 @@ ConnectionFrame* MainWindow::getSelectedFrame()
* Overridden methods
*/
-/***************************************************************************//**
+/**
* Handle closeEvent.
* If user calls closing MainWindow, close, else ignore.
* @param e
@@ -432,7 +432,7 @@ void MainWindow::closeEvent(QCloseEvent* e)
}
}
-/***************************************************************************//**
+/**
* Change Event.
* @param e
*/
@@ -463,7 +463,7 @@ AspectStatus checkAspectRatio(const QSize& frameSize, const QSize& gridSize)
}
-/***************************************************************************//**
+/**
* Resize event.
* @param e
*/
@@ -553,7 +553,7 @@ void MainWindow::updateContextButtonStates()
ui->action_TutorToAll->setEnabled(tutorOnline);
}
-/***************************************************************************//**
+/**
* Handle Mouse Release Event.
* Check if click was inside the frame and if that is the case, set the selection of each connected
* client to false.
@@ -576,7 +576,7 @@ void MainWindow::mouseReleaseEvent(QMouseEvent* e)
}
}
-/***************************************************************************//**
+/**
* @brief reset
*/
void MainWindow::reset(bool lock)
@@ -603,7 +603,7 @@ void MainWindow::reset(bool lock)
*/
-/***************************************************************************//**
+/**
* Place frame to from user specified position. Should be called when a
* connectionFrame is dropped during the "drag-n-drop".
*/
@@ -616,7 +616,7 @@ void MainWindow::onPlaceFrame(ConnectionFrame* connectionFrame)
//resizeEvent(nullptr);
}
-/***************************************************************************//**
+/**
* Mark given frame after it was clicked on.
* @param frame
*/
@@ -636,7 +636,7 @@ void MainWindow::onFrameClicked(ConnectionFrame* frame)
updateContextButtonStates();
}
-/***************************************************************************//**
+/**
* Show session name, after it was clicked on.
*/
void MainWindow::onSessionNameClick()
@@ -644,7 +644,7 @@ void MainWindow::onSessionNameClick()
_sessionNameWindow->show((serverApp->sessionName()));
}
-/***************************************************************************//**
+/**
* Update session name.
*/
void MainWindow::onSessionNameUpdate()
@@ -678,7 +678,7 @@ void MainWindow::onSessionNameUpdate()
}
}
-/***************************************************************************//**
+/**
* @brief MainWindow::startVncServerIfNecessary
* @param from
*/
@@ -829,7 +829,7 @@ QRect MainWindow::calcFrameGeometry(ConnectionFrame* frame) const
return QRect(pos.x() * w, pos.y() * h, w * clientSize.width(), h * clientSize.height());
}
-/***************************************************************************//**
+/**
* Display popup which explains possible actions about the buttons.
*/
void MainWindow::onButtonHelp()
@@ -837,7 +837,7 @@ void MainWindow::onButtonHelp()
_helpWindow->show();
}
-/***************************************************************************//**
+/**
* Handle projection from tutor to all.
* Get the client who is tutor and set the projectionSource of all
* clients, except the tutor ones, to false.
@@ -870,7 +870,7 @@ void MainWindow::onButtonTutorToAll()
}
}
-/***************************************************************************//**
+/**
* Handle the projection from Tutor to specific student.
* Set the client who is tutor as from and the selected client as to.
*/
@@ -908,7 +908,7 @@ void MainWindow::onButtonTutorToStudent()
}
}
-/***************************************************************************//**
+/**
* Handle projection from one student to tutor.
*/
void MainWindow::onButtonStudentToTutor()
@@ -917,7 +917,7 @@ void MainWindow::onButtonStudentToTutor()
}
-/***************************************************************************//**
+/**
* Handle projection from one student to tutor, lock everyone else.
*/
void MainWindow::onButtonStudentToTutorExclusive()
@@ -974,7 +974,7 @@ void MainWindow::vncOneOnOne(bool exclusive)
}
}
-/***************************************************************************//**
+/**
* Handle Button StopProjection.
* Set ProjectionSource of each client to false, stop the active VNC Server
* and the active VNC Client(s) and unlock all screens.
@@ -985,7 +985,7 @@ void MainWindow::onButtonStopProjection()
reset();
}
-/***************************************************************************//**
+/**
* Handle button to lock or unlock screens of client(s).
* If already locked, do nothing, else lock or unlock the clients, except the
* tutor and the manager running machine.
@@ -1026,7 +1026,7 @@ void MainWindow::onButtonLockSingle()
}
}
-/***************************************************************************//**
+/**
* On button exit, close application.
*/
void MainWindow::onButtonExit()
@@ -1034,7 +1034,7 @@ void MainWindow::onButtonExit()
this->close();
}
-/***************************************************************************//**
+/**
* Handle button to set specific client as tutor.
* Unset active tutor and set selected client, if not inactive, as new tutor.
*/
@@ -1063,7 +1063,7 @@ void MainWindow::onButtonSetAsTutor()
updateContextButtonStates();
}
-/***************************************************************************//**
+/**
* Handle from ListenServer signaled new client connection.
* @param client
*/
@@ -1073,7 +1073,7 @@ void MainWindow::onClientConnected(Client* client)
connect(client, SIGNAL(authenticated(Client*)), this, SLOT(onClientAuthenticated(Client*)));
}
-/***************************************************************************//**
+/**
* Authenticate new Client client.
* Check if incoming client ip already exists,
* if yes --> return.
@@ -1119,7 +1119,7 @@ void MainWindow::onClientAuthenticating(Client* client, ClientLogin* request)
request->name = check;
}
-/***************************************************************************//**
+/**
* New client was authenticated, make several checks.
* Check if new clients ip already exists,
* if yes --> not necessary to create new clientFrame.
@@ -1155,7 +1155,7 @@ void MainWindow::onClientAuthenticated(Client* client)
clientCountChanged();
}
-/***************************************************************************//**
+/**
* Handle if VNC Server State has changed.
* Check if VNC server has been started/stopped on some client and start VNC server/reset pending
* VNC projection information.
@@ -1206,7 +1206,7 @@ void MainWindow::onVncServerStateChange(Client* client)
}
}
-/***************************************************************************//**
+/**
* Handle VNC client state change.
* Check if any vnc client is in use, and if that is not the case, stop VNC Server.
* @param client
@@ -1247,7 +1247,7 @@ void MainWindow::onVncClientStateChange(Client* client)
}
}
-/***************************************************************************//**
+/**
* DisableButtons.
*/
void MainWindow::disableButtons()
@@ -1258,7 +1258,7 @@ void MainWindow::disableButtons()
}
}
-/***************************************************************************//**
+/**
* EnableButtons.
*/
void MainWindow::enableButtons()
diff --git a/src/server/net/client.cpp b/src/server/net/client.cpp
index ad101a1..e11a3e7 100644
--- a/src/server/net/client.cpp
+++ b/src/server/net/client.cpp
@@ -16,7 +16,6 @@
#define CHALLENGE_LEN 20
int Client::_clientIdCounter = 0;
-/******************************************************************************/
Client::Client(QTcpSocket* socket) : _socket(socket)
{
assert(socket != nullptr);
@@ -56,14 +55,12 @@ Client::Client(QTcpSocket* socket) : _socket(socket)
_pingTimeout = QDateTime::currentMSecsSinceEpoch() + PING_TIMEOUT_MS;
}
-/******************************************************************************/
Client::~Client()
{
qDebug() << "*** Client" << _host << " destroyed.";
_socket->deleteLater();
}
-/******************************************************************************/
void Client::timerEvent(QTimerEvent* event)
{
if (event->timerId() == _timerPingTimeout) {
@@ -81,7 +78,6 @@ void Client::timerEvent(QTimerEvent* event)
killTimer(event->timerId());
}
-/******************************************************************************/
void Client::sendMessage(NetworkMessage& message)
{
if (_socket->state() != QAbstractSocket::ConnectedState)
@@ -92,7 +88,6 @@ void Client::sendMessage(NetworkMessage& message)
}
}
-/******************************************************************************/
void Client::removeAttentionInternal()
{
NetworkMessage msg;
@@ -103,7 +98,6 @@ void Client::removeAttentionInternal()
emit stateChanged();
}
-/******************************************************************************/
void Client::requestThumb(const QSize& size)
{
if (_socket->state() != QAbstractSocket::ConnectedState) {
@@ -117,7 +111,6 @@ void Client::requestThumb(const QSize& size)
msgTmb.writeMessage(_socket);
}
-/******************************************************************************/
void Client::onDataArrival()
{
//
@@ -141,7 +134,6 @@ void Client::onDataArrival()
}
}
-/******************************************************************************/
void Client::handleMsg()
{
_pingTimeout = QDateTime::currentMSecsSinceEpoch() + PING_TIMEOUT_MS;
@@ -263,7 +255,6 @@ void Client::handleMsg()
}
-/******************************************************************************/
void Client::startVncServer()
{
NetworkMessage msg;
@@ -272,7 +263,6 @@ void Client::startVncServer()
sendMessage(msg);
}
-/******************************************************************************/
void Client::stopVncServer()
{
NetworkMessage msg;
@@ -281,7 +271,6 @@ void Client::stopVncServer()
sendMessage(msg);
}
-/******************************************************************************/
void Client::startVncClient(const Client * const to)
{
if (_projectionSource == to->_id)
@@ -299,7 +288,6 @@ void Client::startVncClient(const Client * const to)
sendMessage(msg);
}
-/******************************************************************************/
void Client::stopVncClient()
{
if (_isActiveVncClient) {
@@ -310,7 +298,7 @@ void Client::stopVncClient()
_desiredSource = NO_SOURCE;
}
-/***************************************************************************//**
+/**
* Checks if client and manager runs on same machine.
* @return Return true, if pvsmanager is running on client.
*/
@@ -323,7 +311,6 @@ bool Client::isManagerMachine()
return false;
}
-/******************************************************************************/
void Client::lockScreen(bool lock)
{
if (_isTutor || isManagerMachine()) {
@@ -339,7 +326,6 @@ void Client::lockScreen(bool lock)
emit stateChanged();
}
-/******************************************************************************/
void Client::disconnect()
{
qDebug("*** Client %s disconnected.", qPrintable(_socket->peerAddress().toString()));
diff --git a/src/server/net/discoverylistener.cpp b/src/server/net/discoverylistener.cpp
index cfeef82..76c0f52 100644
--- a/src/server/net/discoverylistener.cpp
+++ b/src/server/net/discoverylistener.cpp
@@ -26,7 +26,7 @@
// +++ static ++++ hash ip address +++
-/***************************************************************************//**
+/**
* @brief DiscoveryListener::DiscoveryListener
*/
DiscoveryListener::DiscoveryListener() :
@@ -40,14 +40,14 @@ DiscoveryListener::DiscoveryListener() :
startTimer((SPAM_MODERATE_AT_ONCE * SPAM_MODERATE_INTERVAL) / SD_PACKET_TABLE_SIZE + 1);
}
-/***************************************************************************//**
+/**
* @brief DiscoveryListener::~DiscoveryListener
*/
DiscoveryListener::~DiscoveryListener()
{
}
-/***************************************************************************//**
+/**
* @brief hash
* @param host
* @return
@@ -95,7 +95,7 @@ static quint16 hash(const QHostAddress& host)
* Overrides
*/
-/***************************************************************************//**
+/**
* @brief Decrease packet counters per source IP in our "spam protection" table.
* @param event
*/
@@ -116,7 +116,7 @@ void DiscoveryListener::timerEvent(QTimerEvent* /* event */ )
* Slots
*/
-/***************************************************************************//**
+/**
* @brief Incoming UDP packet on service discovery port - handle.
*/
void DiscoveryListener::onReadyRead()