The code which realizes full functionality Control Panel,
in a kind existing now, was added.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@467 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/rfb/ListConnInfo.h b/rfb/ListConnInfo.h
index e8ca60a..44df9ec 100644
--- a/rfb/ListConnInfo.h
+++ b/rfb/ListConnInfo.h
@@ -23,7 +23,7 @@
namespace rfb {
struct ListConnInfo {
- ListConnInfo() {}
+ ListConnInfo() : disableClients(false) {}
void Clear() {
conn.clear();
@@ -95,6 +95,16 @@
addInfo(InputList->iGetConn(), buf[0], buf[1], InputList->iGetStatus());
}
+ void setDisable(bool disable) {disableClients = disable;}
+
+ bool getDisable() {return disableClients;}
+
+ void setAllStatus(int stat) {
+ std::list<int>::iterator st;
+ for (st = status.begin(); st != status.end(); st++)
+ *st = stat;
+ }
+
private:
std::list<DWORD> conn;
std::list<char*> IP_address;
@@ -104,6 +114,7 @@
std::list<char*>::iterator Ii;
std::list<char*>::iterator ti;
std::list<int>::iterator si;
+ bool disableClients;
};
};
#endif
diff --git a/rfb/VNCServerST.cxx b/rfb/VNCServerST.cxx
index 9e6c480..9f6ecb5 100644
--- a/rfb/VNCServerST.cxx
+++ b/rfb/VNCServerST.cxx
@@ -81,7 +81,7 @@
renderedCursorInvalid(false),
securityFactory(sf ? sf : &defaultSecurityFactory),
queryConnectionHandler(0), useEconomicTranslate(false),
- lastConnectionTime(0)
+ lastConnectionTime(0), disableclients(false)
{
lastUserInputTime = lastDisconnectTime = time(0);
slog.debug("creating single-threaded server %s", name.buf);
@@ -511,6 +511,7 @@
void VNCServerST::getConnInfo(ListConnInfo * listConn)
{
listConn->Clear();
+ listConn->setDisable(getDisable());
if (clients.empty())
return;
std::list<VNCSConnectionST*>::iterator i;
@@ -521,6 +522,7 @@
void VNCServerST::setConnStatus(ListConnInfo* listConn)
{
+ setDisable(listConn->getDisable());
if (listConn->Empty() || clients.empty()) return;
for (listConn->iBegin(); !listConn->iEnd(); listConn->iNext()) {
VNCSConnectionST* conn = (VNCSConnectionST*)listConn->iGetConn();
diff --git a/rfb/VNCServerST.h b/rfb/VNCServerST.h
index 1cd2089..554a4c9 100644
--- a/rfb/VNCServerST.h
+++ b/rfb/VNCServerST.h
@@ -31,7 +31,6 @@
#include <rfb/LogWriter.h>
#include <rfb/Blacklist.h>
#include <rfb/Cursor.h>
-#include <rfb/ListConnInfo.h>
#include <network/Socket.h>
#include <rfb/ListConnInfo.h>
@@ -192,6 +191,9 @@
void getConnInfo(ListConnInfo * listConn);
void setConnStatus(ListConnInfo* listConn);
+ bool getDisable() { return disableclients;};
+ void setDisable(bool disable) { disableclients = disable;};
+
protected:
friend class VNCSConnectionST;
@@ -234,6 +236,8 @@
time_t lastUserInputTime;
time_t lastDisconnectTime;
time_t lastConnectionTime;
+
+ bool disableclients;
};
};