VRDEServerImpl.cpp revision 34290b0bc0f5900c975171dd402f3d270795da68
2N/A * VirtualBox COM class implementation 2N/A * Copyright (C) 2006-2013 Oracle Corporation 2N/A * This file is part of VirtualBox Open Source Edition (OSE), as 2N/A * you can redistribute it and/or modify it under the terms of the GNU 2N/A * General Public License (GPL) as published by the Free Software 2N/A * Foundation, in version 2 as it comes in the "COPYING" file of the 2N/A * VirtualBox OSE distribution. VirtualBox OSE is distributed in the 2N/A * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 2N/A///////////////////////////////////////////////////////////////////////////// 2N/A// constructor / destructor 2N/A///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// * Initializes the VRDP server object. * @param aParent Handle of the parent object. /* Enclose the state transition NotReady->InInit->Ready */ /* Confirm a successful initialization */ * Initializes the object given another object * (a kind of copy constructor). This object shares data with * the object passed as an argument. * @note This object must be destroyed before the original object * it shares data with is destroyed. * @note Locks @a aThat object for reading. /* Enclose the state transition NotReady->InInit->Ready */ /* Confirm a successful initialization */ * Initializes the guest object given another guest object * (a kind of copy constructor). This object makes a private copy of data * of the original object passed as an argument. * @note Locks @a aThat object for reading. /* Enclose the state transition NotReady->InInit->Ready */ /* Confirm a successful initialization */ * Uninitializes the instance and sets the ready flag to FALSE. * Called either from FinalRelease() or by the parent when it gets destroyed. /* Enclose the state transition Ready->InUninit->NotReady */ * Loads settings from the given machine node. * May be called once right after this object creation. * @param aMachineNode <Machine> node. * @note Locks this object for writing. * Saves settings to the given machine node. * @param aMachineNode <Machine> node. * @note Locks this object for reading. // IVRDEServer properties ///////////////////////////////////////////////////////////////////////////// /* the machine can also be in saved state for this property to change */ /* leave the lock before informing callbacks */ /* Avoid deadlock when onVRDEServerChange eventually calls SetExtraData. */ /* Gets a string of digits, converts to 16 bit port number. * Note: pszStart <= pszEnd is expected, the string contains * only digits and pszEnd points to the char after last if (
cch > 0 &&
cch <=
5)
/* Port is up to 5 decimal digits. */ /* The string should be like "1000-1010,1020,2000-2003" */ /* Update the next range pointer. */ /* A probably valid range. Verify and parse it. */ /* the machine can also be in saved state for this property to change */ /* Special processing for some "standard" properties. */ /* Port value is not verified here because it is up to VRDP transport to * use it. Specifying a wrong port number will cause a running server to * stop. There is no fool proof here. /* leave the lock before informing callbacks */ /* Avoid deadlock when onVRDEServerChange eventually calls SetExtraData. */ /* Generic properties processing. * Look up the old value first; if nothing's changed then do nothing. /* leave the lock before informing callbacks */ /* Avoid deadlock when onVRDEServerChange eventually calls SetExtraData. */ LogRel((
"VRDE: Error resolving symbol '%s', rc %Rrc.\n",
"VRDESupportedProperties",
rc));
* Check that a VRDE extension pack name is set and resolve it into a Log((
"VRDEPROP: library get rc %Rrc\n",
vrc));
* Load the VRDE library and start the server, if it is enabled. /* Do not forget to unload the library. */ /* the machine can also be in saved state for this property to change */ /* leave the lock before informing callbacks */ /* the machine can also be in saved state for this property to change */ /* leave the lock before informing callbacks */ /* sunlover 20060131: This setter does not require the notification /* Get the global setting. */ return setError(
hrc,
"failed to query the library setting\n");
/* the machine can also be in saved state for this property to change */ /* leave the lock before informing callbacks */ /* the machine can also be in saved state for this property to change */ /* leave the lock before informing callbacks */ /* leave the lock before informing callbacks */ /* Get the global setting. */ // public methods only for internal purposes ///////////////////////////////////////////////////////////////////////////// /* the machine can also be in saved state for this property to change */ * If not empty, check the specific extension pack. * Update the setting if there is an actual change, post an * change event to trigger a VRDE server restart. /* leave the lock before informing callbacks */ // public methods only for internal purposes ///////////////////////////////////////////////////////////////////////////// * @note Locks this object for writing. * @note Locks this object for writing, together with the peer object (also * for writing) if there is one. /* lock both for writing since we modify both (mPeer is "master" so locked /* attach new data to the peer and reshare it */ * @note Locks this object for writing, together with the peer object * represented by @a aThat (locked for reading). /* peer is not modified, lock it for reading (aThat is "master" so locked /* this will back up current data */ /* vi: set tabstop=4 shiftwidth=4 expandtab: */