Changeset 24874 in vbox for trunk/src/VBox/Main
- Timestamp:
- Nov 23, 2009 3:37:58 PM (15 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImplTeleporter.cpp
r24770 r24874 92 92 Utf8Str mstrHostname; 93 93 uint32_t muPort; 94 uint32_t mcMsMaxDowntime; 94 95 MachineState_T menmOldMachineState; 95 96 bool mfSuspendedByUs; … … 99 100 : TeleporterState(pConsole, pVM, pProgress, true /*fIsSource*/) 100 101 , muPort(UINT32_MAX) 102 , mcMsMaxDowntime(250) 101 103 , menmOldMachineState(enmOldMachineState) 102 104 , mfSuspendedByUs(false) … … 640 642 641 643 void *pvUser = static_cast<void *>(static_cast<TeleporterState *>(pState)); 642 vrc = VMR3Teleport(pState->mpVM, &g_teleporterTcpOps, pvUser, teleporterProgressCallback, pvUser, &pState->mfSuspendedByUs); 644 vrc = VMR3Teleport(pState->mpVM, pState->mcMsMaxDowntime, 645 &g_teleporterTcpOps, pvUser, 646 teleporterProgressCallback, pvUser, 647 &pState->mfSuspendedByUs); 643 648 if (RT_FAILURE(vrc)) 644 649 return setError(E_FAIL, tr("VMR3Teleport -> %Rrc"), vrc); … … 854 859 * @returns COM status code. 855 860 * 856 * @param aHostname The name of the target host. 857 * @param aPort The TCP port number. 858 * @param aPassword The password. 859 * @param aProgress Where to return the progress object. 861 * @param aHostname The name of the target host. 862 * @param aPort The TCP port number. 863 * @param aPassword The password. 864 * @param aMaxDowntime Max allowed "downtime" in milliseconds. 865 * @param aProgress Where to return the progress object. 860 866 */ 861 867 STDMETHODIMP 862 Console::Teleport(IN_BSTR aHostname, ULONG aPort, IN_BSTR aPassword, IProgress **aProgress)868 Console::Teleport(IN_BSTR aHostname, ULONG aPort, IN_BSTR aPassword, ULONG aMaxDowntime, IProgress **aProgress) 863 869 { 864 870 /* … … 870 876 CheckComArgNotNull(aHostname); 871 877 CheckComArgExprMsg(aPort, aPort > 0 && aPort <= 65535, ("is %u", aPort)); 878 CheckComArgExprMsg(aMaxDowntime, aMaxDowntime > 0, ("is %u", aMaxDowntime)); 872 879 873 880 AutoCaller autoCaller(this); … … 903 910 904 911 TeleporterStateSrc *pState = new TeleporterStateSrc(this, mpVM, ptrProgress, mMachineState); 905 pState->mstrPassword = aPassword; 906 pState->mstrHostname = aHostname; 907 pState->muPort = aPort; 912 pState->mstrPassword = aPassword; 913 pState->mstrHostname = aHostname; 914 pState->muPort = aPort; 915 pState->mcMsMaxDowntime = aMaxDowntime; 908 916 909 917 void *pvUser = static_cast<void *>(static_cast<TeleporterState *>(pState)); -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r24865 r24874 6442 6442 <interface 6443 6443 name="IConsole" extends="$unknown" 6444 uuid=" 55dd56a5-1d1d-4d81-b742-b082b9571be6"6444 uuid="6375231a-c17c-464b-92cb-ae9e128d71c3" 6445 6445 wsmap="managed" 6446 6446 > … … 7147 7147 <param name="password" type="wstring" dir="in"> 7148 7148 <desc>The password.</desc> 7149 </param> 7150 <param name="maxDowntime" type="unsigned long" dir="in"> 7151 <desc> 7152 The maximum allowed downtime given as milliseconds. 0 is not a valid 7153 value. Recommended value: 250 ms. 7154 7155 The higher the value is, the greater the chance for a successful 7156 teleportation. A small value may easily result in the teleportation 7157 process taking hours and eventually fail. 7158 7159 <note> 7160 The current implementation treats this a guideline, not as an 7161 absolute rule. 7162 </note> 7163 </desc> 7149 7164 </param> 7150 7165 <param name="progress" type="IProgress" dir="return"> -
trunk/src/VBox/Main/include/ConsoleImpl.h
r24703 r24874 147 147 STDMETHOD(DeleteSnapshot)(IN_BSTR aId, IProgress **aProgress); 148 148 STDMETHOD(RestoreSnapshot)(ISnapshot *aSnapshot, IProgress **aProgress); 149 STDMETHOD(Teleport)(IN_BSTR aHostname, ULONG aPort, IN_BSTR aPassword, IProgress **aProgress);149 STDMETHOD(Teleport)(IN_BSTR aHostname, ULONG aPort, IN_BSTR aPassword, ULONG aMaxDowntime, IProgress **aProgress); 150 150 STDMETHOD(RegisterCallback) (IConsoleCallback *aCallback); 151 151 STDMETHOD(UnregisterCallback)(IConsoleCallback *aCallback);
Note:
See TracChangeset
for help on using the changeset viewer.