summaryrefslogtreecommitdiff
path: root/SPICEConsoleAPI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'SPICEConsoleAPI.cpp')
-rw-r--r--SPICEConsoleAPI.cpp55
1 files changed, 55 insertions, 0 deletions
diff --git a/SPICEConsoleAPI.cpp b/SPICEConsoleAPI.cpp
index 078fa7a..473554d 100644
--- a/SPICEConsoleAPI.cpp
+++ b/SPICEConsoleAPI.cpp
@@ -43,6 +43,61 @@ SPICEConsolePtr SPICEConsoleAPI::getPlugin()
return plugin;
}
+DEFINE_PROPERTY_STRING(hostIP)
+DEFINE_PROPERTY_STRING(port)
+DEFINE_PROPERTY_STRING(SecurePort)
+DEFINE_PROPERTY_STRING(Password)
+DEFINE_PROPERTY_STRING(CipherSuite)
+//DEFINE_PROPERTY_STRING(SSLChannels)
+DEFINE_PROPERTY_STRING(TrustStore)
+DEFINE_PROPERTY_STRING(HostSubject)
+DEFINE_PROPERTY_BOOL(fullScreen)
+DEFINE_PROPERTY_BOOL(Smartcard)
+DEFINE_PROPERTY_BOOL(AdminConsole)
+DEFINE_PROPERTY_STRING(Title)
+DEFINE_PROPERTY_STRING(dynamicMenu)
+DEFINE_PROPERTY_STRING(NumberOfMonitors)
+DEFINE_PROPERTY_STRING(GuestHostName)
+DEFINE_PROPERTY_STRING(HotKey)
+DEFINE_PROPERTY_BOOL(NoTaskMgrExecution)
+DEFINE_PROPERTY_BOOL(SendCtrlAltDelete)
+DEFINE_PROPERTY_STRING(UsbListenPort)
+DEFINE_PROPERTY_BOOL(UsbAutoShare)
+DEFINE_PROPERTY_STRING(ColorDepth)
+DEFINE_PROPERTY_STRING(DisableEffects)
+
+/* attribute string SSLChannels; */
+std::string SPICEConsoleAPI::get_SSLChannels() const
+{
+ return m_SSLChannels;
+}
+
+void SPICEConsoleAPI::set_SSLChannels(const std::string &aSSLChannels)
+{
+ m_SSLChannels = aSSLChannels;
+
+ /*
+ * Backward Compatibility: Begin
+ * Remove leading 's' from m_SSLChannels, e.g. "main" not "smain"
+ * RHEL5 uses 'smain' and 'sinpusts
+ * RHEL6 uses 'main' and 'inputs'
+ */
+ const char* chan_names[] = {
+ "smain", "sdisplay", "sinputs",
+ "scursor", "splayback", "srecord",
+ "susbredir", "ssmartcard", "stunnel"
+ };
+ const int nnames = sizeof(chan_names) / sizeof(chan_names[0]);
+
+ for (int i = 0; i < nnames; i++) {
+ const char *name = chan_names[i];
+ size_t found = 0;
+ while ((found = m_SSLChannels.find(name, found)) != std::string::npos)
+ m_SSLChannels.replace(found, strlen(name), name + 1);
+ }
+ /* Backward Compatibility: End */
+}
+
void SPICEConsoleAPI::testEvent()
{
fire_test();