#include <extensions.h>
Inheritance diagram for SaX::SaXManipulateVNC:
Public Member Functions | |
void | addVNCKeyboard (void) |
void | addVNCMouse (void) |
void | removeVNCMouse (void) |
void | removeVNCKeyboard (void) |
void | enableVNC (void) |
void | disableVNC (void) |
void | setPassword (const QString &) |
void | enablePasswordProtection (const QString &) |
void | disablePasswordProtection (void) |
void | enableHTTPAccess (int=5800) |
void | disableHTTPAccess (void) |
void | allowMultipleConnections (bool=true) |
int | getHTTPPort (void) |
bool | isVNCEnabled (void) |
bool | isHTTPAccessEnabled (void) |
bool | isMultiConnectEnabled (void) |
bool | isPwdProtectionEnabled (void) |
SaXManipulateVNC (SaXImport *, SaXImport *, SaXImport *, SaXImport *, SaXImport *, int=0) |
The VNC manipulator requires five import objects (Card,Pointers,Keyboard, Layout and Path) to become created. Once created the manipulator object can enable/disable the exporting of the display via VNC protocol. The following example demonstrate how to enable/disable VNC for the current configuration:
#include <sax/sax.h> int main (void) { SaXException().setDebug (true); QDict<SaXImport> section; int importID[] = { SAX_CARD, SAX_POINTERS, SAX_KEYBOARD, SAX_LAYOUT, SAX_PATH }; printf ("Importing data...\n"); SaXConfig* config = new SaXConfig; for (int id=0; id<5; id++) { SaXImport* import = new SaXImport ( importID[id] ); import->setSource ( SAX_SYSTEM_CONFIG ); import->doImport(); config->addImport (import); section.insert ( import->getSectionName(),import ); } printf ("Exporting display for VNC access...\n"); SaXManipulateVNC mVNC ( section["Card"],section["Pointers"],section["Keyboard"], section["Layout"],section["Path"] ); if (! mVNC.VNCEnabled()) { mVNC.enableVNC(); mVNC.addVNCKeyboard(); mVNC.addVNCMouse(); } printf ("writing configuration\n"); config->setMode (SAX_MERGE); if ( ! config->createConfiguration() ) { printf ("%s\n",config->errorString().ascii()); printf ("%s\n",config->getParseErrorValue().ascii()); return 1; } return (0); }
Definition at line 168 of file extensions.h.
|
An object of this type is used to manipulate the configuration to be able to accesss the X-Server via VNC Definition at line 55 of file extensions.cpp. References SaX::SaXException::errorString(), SaX::SaXException::excLayoutImportBindFailed(), and SaX::SaXImport::getSectionID(). Here is the call graph for this function: ![]() |
|
add the VNC keyboard to handle keyboard events properly Implements SaX::SaXManipulateVNCIF. Definition at line 207 of file extensions.cpp. References SaX::SaXManipulateDevices::addInputDevice(). Here is the call graph for this function: ![]() |
|
add the VNC mouse to handle mouse events properly Implements SaX::SaXManipulateVNCIF. Definition at line 226 of file extensions.cpp. References SaX::SaXManipulateDevices::addInputDevice(). Here is the call graph for this function: ![]() |
|
allow multiple connections at the same time. default is to allow only one connection at the same time Implements SaX::SaXManipulateVNCIF. Definition at line 191 of file extensions.cpp. References SaX::SaXManipulateCard::addCardOption(), and SaX::SaXManipulateCard::removeCardOption(). Here is the call graph for this function: ![]() |
|
disable HTTP access by removing the httpdir and httpport options Implements SaX::SaXManipulateVNCIF. Definition at line 179 of file extensions.cpp. References SaX::SaXManipulateCard::removeCardOption(). Referenced by enableHTTPAccess(). Here is the call graph for this function: ![]() |
|
disable the password protection will not remove the passwd file. Only the rfbauth option is removed which will disable the password prompt while connecting Implements SaX::SaXManipulateVNCIF. Definition at line 151 of file extensions.cpp. References SaX::SaXManipulateCard::removeCardOption(). Referenced by enablePasswordProtection(). Here is the call graph for this function: ![]() |
|
disable VNC support by unloading the vnc module and switch off the service with: usevnc -> no NOTE: The X-Server must be restarted in order the changes to become effective Implements SaX::SaXManipulateVNCIF. Definition at line 96 of file extensions.cpp. References SaX::SaXManipulateCard::addCardOption(), SaX::SaXManipulateCard::removeCardOption(), and SaX::SaXManipulatePath::removeLoadableModule(). Here is the call graph for this function: ![]() |
|
enable VNC HTTP access on the given port. This is done by setting up the httpdir option in combination with the httpport option Implements SaX::SaXManipulateVNCIF. Definition at line 163 of file extensions.cpp. References SaX::SaXManipulateCard::addCardOption(), and disableHTTPAccess(). Here is the call graph for this function: ![]() |
|
enable the password protection by setting a password and activating it with the rfbauth option. A user who will access the display is asked for this password while connecting Implements SaX::SaXManipulateVNCIF. Definition at line 136 of file extensions.cpp. References SaX::SaXManipulateCard::addCardOption(), disablePasswordProtection(), and setPassword(). Here is the call graph for this function: ![]() |
|
export the display using the VNC protocol. This method will enable VNC by loading the vnc module and applying the usevnc option into the Device section Implements SaX::SaXManipulateVNCIF. Definition at line 81 of file extensions.cpp. References SaX::SaXManipulateCard::addCardOption(), SaX::SaXManipulatePath::addLoadableModule(), SaX::SaXManipulateCard::removeCardOption(), and SaX::SaXManipulatePath::removeLoadableModule(). Here is the call graph for this function: ![]() |
|
check if HTTP access is activated and return the current port number set for HTTP access Implements SaX::SaXManipulateVNCIF. Definition at line 373 of file extensions.cpp. References SaX::SaXManipulateCard::getOptions(). Here is the call graph for this function: ![]() |
|
check if HTTP access is enabled Implements SaX::SaXManipulateVNCIF. Definition at line 330 of file extensions.cpp. References SaX::SaXManipulateCard::getOptions(). Here is the call graph for this function: ![]() |
|
check if multiple connections at the same time are allowed Implements SaX::SaXManipulateVNCIF. Definition at line 344 of file extensions.cpp. References SaX::SaXManipulateCard::getOptions(). Here is the call graph for this function: ![]() |
|
check if the password protection is enabled Implements SaX::SaXManipulateVNCIF. Definition at line 359 of file extensions.cpp. References SaX::SaXManipulateCard::getOptions(). Here is the call graph for this function: ![]() |
|
check if VNC has been enabled Implements SaX::SaXManipulateVNCIF. Definition at line 316 of file extensions.cpp. References SaX::SaXManipulateCard::getOptions(). Here is the call graph for this function: ![]() |
|
remove the VNC keyboard -> no kbd events in VNC session Implements SaX::SaXManipulateVNCIF. Definition at line 262 of file extensions.cpp. References SaX::SaXManipulateDevices::removeInputDevice(). Here is the call graph for this function: ![]() |
|
remove the VNC mouse -> no mouse events in VNC session Implements SaX::SaXManipulateVNCIF. Definition at line 244 of file extensions.cpp. References SaX::SaXManipulateDevices::removeInputDevice(). Here is the call graph for this function: ![]() |
|
restricted access can be set up by creating a password file. This file is set within the rfbauth option. This method is used to create the password file by using the vncp program Implements SaX::SaXManipulateVNCIF. Definition at line 111 of file extensions.cpp. References SaX::SaXException::errorString(), SaX::SaXException::excProcessFailed(), SaX::SaXException::setLock(), and SaX::SaXException::unsetLock(). Referenced by enablePasswordProtection(). Here is the call graph for this function: ![]() |