summaryrefslogtreecommitdiffstats
path: root/src/server/mainwindow/mainwindow.cpp
diff options
context:
space:
mode:
authorManuel Schneider2014-05-22 12:27:16 +0200
committerManuel Schneider2014-05-22 12:27:16 +0200
commitdfe1328006193f2ad5013cecb9e4c3558cad6a2d (patch)
tree65df0d59c26ba99d6f74a0e928caf23441106367 /src/server/mainwindow/mainwindow.cpp
parentFix mitstake in rewrite 58646932664b6ab9014a410dc75dd443fb4f58b9 (diff)
downloadpvs2-dfe1328006193f2ad5013cecb9e4c3558cad6a2d.tar.gz
pvs2-dfe1328006193f2ad5013cecb9e4c3558cad6a2d.tar.xz
pvs2-dfe1328006193f2ad5013cecb9e4c3558cad6a2d.zip
Refactor ambigious projectionsSoure to BroadcastSource
Diffstat (limited to 'src/server/mainwindow/mainwindow.cpp')
-rw-r--r--src/server/mainwindow/mainwindow.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp
index b194528..5059516 100644
--- a/src/server/mainwindow/mainwindow.cpp
+++ b/src/server/mainwindow/mainwindow.cpp
@@ -446,11 +446,11 @@ void MainWindow::broadcast(Client *from)
// Tell all clients to listen to server
for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it){
if ((*it)->client() != NULL)
- (*it)->client()->setProjectionSource(false);
+ (*it)->client()->setBroadcastSource(false);
}
from->setDesiredProjectionSource(0);
- from->setProjectionSource(true);
+ from->setBroadcastSource(true);
// Set desired projection source on all clients, if not "from" or oflline
for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it)
@@ -481,7 +481,7 @@ void MainWindow::unicast(Client *from, Client *to, bool blockOthers)
to->stopVncServer();
from->setDesiredProjectionSource(0);
- to->setProjectionSource(false);
+ to->setBroadcastSource(false);
to->setDesiredProjectionSource(from->id());
if (from->isActiveVncServer()) // From is already active
@@ -607,7 +607,7 @@ void MainWindow::onButtonStopProjection()
if (c == NULL)
continue;
c->setDesiredProjectionSource(0);
- c->setProjectionSource(false);
+ c->setBroadcastSource(false);
}
for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it)
@@ -813,7 +813,7 @@ void MainWindow::onClientAuthenticated(Client* client)
for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it)
{
Client *c = (**it).client();
- if (c != NULL && c != client && c->isActiveVncServer() && c->isProjectionSource())
+ if (c != NULL && c != client && c->isActiveVncServer() && c->isBroadcastSource())
{
client->startVncClient(c);
client->setDesiredProjectionSource(c->id());
@@ -842,7 +842,7 @@ void MainWindow::onVncServerStateChange(Client* client)
continue; // Offline or self
if (c->currentProjectionSource() == client->id())
continue; // Already watching this client
- if (c->desiredProjectionSource() != client->id() && !client->isProjectionSource())
+ if (c->desiredProjectionSource() != client->id() && !client->isBroadcastSource())
continue; // Not interested
c->startVncClient(client);
}
@@ -852,9 +852,9 @@ void MainWindow::onVncServerStateChange(Client* client)
// VNC server stopped on some client or failed to start - reset local pending projection information
// If at least one other client seemed to be waiting for this client's screen, pop up a message
// on the console
- bool wasInterested = client->isProjectionSource();
+ bool wasInterested = client->isBroadcastSource();
//qDebug() << "On VNC stop:" << client->ip() << "was projection source:" << wasInterested;
- client->setProjectionSource(false);
+ client->setBroadcastSource(false);
for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it)
{
Client *c = (**it).client();