aboutsummaryrefslogtreecommitdiffstats
path: root/unix/xserver/hw/vnc/RFBGlue.cc
diff options
context:
space:
mode:
Diffstat (limited to 'unix/xserver/hw/vnc/RFBGlue.cc')
-rw-r--r--unix/xserver/hw/vnc/RFBGlue.cc33
1 files changed, 10 insertions, 23 deletions
diff --git a/unix/xserver/hw/vnc/RFBGlue.cc b/unix/xserver/hw/vnc/RFBGlue.cc
index b7616298..f217906a 100644
--- a/unix/xserver/hw/vnc/RFBGlue.cc
+++ b/unix/xserver/hw/vnc/RFBGlue.cc
@@ -32,6 +32,8 @@
#include <network/TcpSocket.h>
+#include <rfb/UnixPasswordValidator.h>
+
#include "RFBGlue.h"
// Loggers used by C code must be created here
@@ -132,31 +134,9 @@ const char* vncGetParamDesc(const char *name)
return param->getDescription();
}
-int vncIsParamBool(const char *name)
-{
- core::VoidParameter* param;
- core::BoolParameter* bparam;
-
- param = core::Configuration::getParam(name);
- if (param == nullptr)
- return false;
-
- bparam = dynamic_cast<core::BoolParameter*>(param);
- if (bparam == nullptr)
- return false;
-
- return true;
-}
-
int vncGetParamCount(void)
{
- int count;
-
- count = 0;
- for (core::VoidParameter *param: *core::Configuration::global())
- count++;
-
- return count;
+ return core::Configuration::global()->size();
}
char *vncGetParamList(void)
@@ -256,3 +236,10 @@ int vncIsValidUTF8(const char* str, size_t bytes)
return 0;
}
}
+
+void vncSetDisplayName(const char *displayNumStr)
+{
+ std::string displayName(":");
+ displayName += displayNumStr;
+ rfb::UnixPasswordValidator::setDisplayName(displayName);
+}