summaryrefslogtreecommitdiffstats
path: root/src/server/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/net')
-rw-r--r--src/server/net/client.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/server/net/client.h b/src/server/net/client.h
index 61b6a5b..6dbb5bd 100644
--- a/src/server/net/client.h
+++ b/src/server/net/client.h
@@ -10,6 +10,8 @@
//class QSslSocket;
+#define NO_SOURCE 0
+
struct ClientLogin
{
bool accept;
@@ -33,15 +35,22 @@ public:
inline const QString& host() const { return _host; }
inline const QString ip() const { return _socket->peerAddress().toString(); }
inline const int id() const { return _id; }
+ inline const int desiredProjectionSource(){ return _desiredSource; }
inline const int projectionSource() const { return _projectionSource; }
inline const bool isActiveVncClient() const { return _isActiveVncClient; }
inline const bool isActiveVncServer() const { return _vncPort > 0; }
inline const bool isLocked() const { return _locked; }
- inline const bool isWatcher() const { return _isWatcher; }
+ inline const bool isWatcher() const { return _desiredSource != 0; }
+
+
// Setters
inline void setTutor(bool enable){ _isTutor = enable; }
inline void setWatcher(bool enable){ _isWatcher = enable; }
+ inline void setDesiredProjectionSource(int id){
+ qDebug() << "ID" <<_id << " new source " << _desiredSource;
+ _desiredSource = id;
+ }
//Send message stuff
void startVncServer();
@@ -65,7 +74,8 @@ private:
int _id; // this client's unique id
QString _vncRwPass, _vncRoPass;
int _vncPort; // VNCserver state. Greater 0 -> active on this port. Equals 0 -> no server.
- int _projectionSource; // VNCclient state. The source the client was or is connected to (depends on _isActiveVncClient)
+ int _desiredSource; // The source the client shall be connected to
+ int _projectionSource; // The source the client was or is connected to (depends on _isActiveVncClient)
bool _isActiveVncClient; // VNCclient state. indicating that the client is displaying a remote screen via VNC
bool _isTutor; // Flag indicating that the client has been set as a tutor
bool _isWatcher; // Flag indicates that the client should watch to VNC Server.